scribes-0.4~r910/0000755000175000017500000000000011242100540013422 5ustar andreasandreasscribes-0.4~r910/intltool-extract.in0000644000175000017500000000000011242100540017254 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/0000755000175000017500000000000011242100540016507 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/__init__.py0000644000175000017500000000000011242100540020606 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/JavaScriptComment/0000755000175000017500000000000011242100540022100 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/JavaScriptComment/__init__.py0000644000175000017500000000000011242100540024177 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/JavaScriptComment/Signals.py0000644000175000017500000000117411242100540024055 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "comment-boundary": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "single-line-boundary": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "multiline-boundary": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "processed-text": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "inserted-text": (SSIGNAL, TYPE_NONE, ()), "finished": (SSIGNAL, TYPE_NONE, ()), "commenting": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/LanguagePlugins/JavaScriptComment/SelectionManager.py0000644000175000017500000000313111242100540025670 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "multiline-boundary", self.__multi_line_cb) self.connect(manager, "single-line-boundary", self.__single_line_cb) self.connect(manager, "inserted-text", self.__text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__selection = False self.__buffer = editor.textbuffer self.__boundaries = () self.__state = None return def __destroy(self): self.disconnect() del self return False def __select(self): if not self.__state: return False start = self.__buffer.get_iter_at_mark(self.__boundaries[0]) end = self.__buffer.get_iter_at_mark(self.__boundaries[1]) self.__buffer.select_range(start, end) self.__manager.emit("finished") self.__boundaries = () return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__selection = self.__editor.has_selection return False def __text_cb(self, *args): from gobject import idle_add idle_add(self.__select) return False def __multi_line_cb(self, manager, boundaries): self.__boundaries = boundaries self.__state = self.__boundaries return False def __single_line_cb(self, manager, boundaries): self.__boundaries = boundaries self.__state = self.__selection return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/Utils.py0000644000175000017500000000277211242100540023562 0ustar andreasandreasfrom re import U, M, L, escape, compile as compile_ BEGIN_CHARACTER = "/\*+" END_CHARACTER = "\*+/" flags = U|M|L BEGIN_RE = compile_(BEGIN_CHARACTER, flags) END_RE = compile_(END_CHARACTER, flags) def has_comment(text): text = text.strip(" \t") if text.startswith("//"): return True if text.startswith("/*") and text.endswith("*/"): return True return False def get_indentation(text): is_indentation_character = lambda character: character in (" ", "\t") from itertools import takewhile whitespaces = takewhile(is_indentation_character, text) return "".join(whitespaces) def comment(text, multiline=False): if multiline is False: return __comment_single_line(text) return __comment_multiple_lines(text) def __comment_single_line(text): return get_indentation(text) + "// " + text.lstrip(" \t") def __comment_multiple_lines(text): indent_value = lambda line: len(line.replace("\t", " ")) line_indentations = [(indent_value(line), get_indentation(line)) for line in text.splitlines()] line_indentations.sort() indentation = line_indentations[0][1] return indentation + "/*\n" + text.rstrip(" \t") + "\n" + indentation + "*/" def uncomment(text): tmp = text.lstrip(" \t") if tmp.startswith("//"): return __uncomment_single_line(text) text = BEGIN_RE.sub("", text) return END_RE.sub("", text) def __uncomment_single_line(text): tmp = text.lstrip(" \t") if tmp.startswith("// "): return text.replace("// ", "", 1) return text.replace("//", "", 1) def __uncomment_multiple_lines(text): return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/MultiLineCommentProcessor.py0000644000175000017500000000324211242100540027600 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Processor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "multiline-boundary", self.__boundary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.disconnect() del self return False def __emit(self, boundaries): text = self.__extract_text_from(boundaries) from Utils import has_comment text = self.__uncomment(text) if has_comment(text) else self.__comment(text) self.__manager.emit("processed-text", text) return False def __uncomment(self, text): self.__manager.emit("commenting", False) from Utils import uncomment text = uncomment(text) lines = text.split("\n") if not lines[0] or not lines[0].strip(" \t"): lines = lines[1:] if not lines[-1] or not lines[-1].strip(" \t"): lines = lines[:-1] uncommented_lines = [uncomment(line) for line in lines] return "\n".join(uncommented_lines) def __comment(self, text): self.__manager.emit("commenting", True) from Utils import comment return comment(text, True) def __extract_text_from(self, boundaries): start = self.__buffer.get_iter_at_mark(boundaries[0]) end = self.__buffer.get_iter_at_mark(boundaries[1]) return self.__buffer.get_text(start, end) def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundaries): from gobject import idle_add idle_add(self.__emit, boundaries) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/Exceptions.py0000644000175000017500000000006511242100540024574 0ustar andreasandreasclass NoMultiCommentCharacterError(Exception): pass scribes-0.4~r910/LanguagePlugins/JavaScriptComment/Trigger.py0000644000175000017500000000217311242100540024060 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "toggle-comment", "c", _("Toggle comment"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try : self.__manager.activate() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return scribes-0.4~r910/LanguagePlugins/JavaScriptComment/MultiCommentSearcher.py0000644000175000017500000000171011242100540026543 0ustar andreasandreasclass Searcher(object): def find_comment_boundaries(self, text, cursor): # Find all start comment characters from Utils import BEGIN_RE, END_RE start_matches = self.__find_matches(BEGIN_RE, text, 0) if not start_matches: return () # Find all end comment characters end_matches = self.__find_matches(END_RE, text, 1) if not end_matches: return () if len(start_matches) != len(end_matches): print "Possible comment character mismatch" # Pair opening and closing comment characters paired_offsets = zip(start_matches, end_matches) # Find comment boundaries around cursor offset. return self.__find_boundary(paired_offsets, cursor) def __find_matches(self, RE, text, offset): iterator = RE.finditer(text.decode("utf-8")) matches = [match.span()[offset] for match in iterator] return matches def __find_boundary(self, paired_offsets, cursor): for start, end in paired_offsets: if start < cursor < end: return start, end return () scribes-0.4~r910/LanguagePlugins/JavaScriptComment/SingleLineCommentProcessor.py0000644000175000017500000000263411242100540027733 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Processor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "single-line-boundary", self.__boundary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.disconnect() del self return False def __emit(self, boundaries): text = self.__extract_text_from(boundaries) from Utils import has_comment text = self.__uncomment(text) if has_comment(text) else self.__comment(text) self.__manager.emit("processed-text", text) return False def __uncomment(self, text): self.__manager.emit("commenting", False) from Utils import uncomment return uncomment(text) def __comment(self, text): self.__manager.emit("commenting", True) from Utils import comment return comment(text) def __extract_text_from(self, boundaries): start = self.__buffer.get_iter_at_mark(boundaries[0]) end = self.__buffer.get_iter_at_mark(boundaries[1]) return self.__buffer.get_text(start, end) def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundaries): from gobject import idle_add idle_add(self.__emit, boundaries) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/BusyManager.py0000644000175000017500000000154511242100540024674 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb, True) self.connect(manager, "finished", self.__finished_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): # self.__editor.busy(True) self.__editor.textview.window.freeze_updates() return False def __finished_cb(self, *args): self.__editor.textview.window.thaw_updates() # self.__editor.busy(False) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/Manager.py0000644000175000017500000000147111242100540024027 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from FeedbackManager import Manager Manager(self, editor) from BusyManager import Manager Manager(self, editor) from CursorPositioner import Positioner Positioner(self, editor) from SelectionManager import Manager Manager(self, editor) from TextInserter import Inserter Inserter(self, editor) from MultiLineCommentProcessor import Processor Processor(self, editor) from SingleLineCommentProcessor import Processor Processor(self, editor) from BoundaryMarker import Marker Marker(self, editor) from MarkProcessor import Processor Processor(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/FeedbackManager.py0000644000175000017500000000441711242100540025437 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager RUN_MESSAGE = _("please wait...") COMMENT_MESSAGE = _("Commented line %s") COMMENTS_MESSAGE = _("Commented lines") UNCOMMENT_MESSAGE = _("Uncommented line %s") UNCOMMENTS_MESSAGE = _("Uncommented lines") class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "commenting", self.__commenting_cb) self.connect(manager, "single-line-boundary", self.__single_boundary_cb) self.connect(manager, "multiline-boundary", self.__multi_boundary_cb) self.connect(manager, "processed-text", self.__text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__boundaries = () self.__commenting = False return def __destroy(self): self.disconnect() del self return False def __update(self): self.__editor.unset_message(RUN_MESSAGE, "run") if self.__commenting: if self.__boundaries: line_number = self.__buffer.get_iter_at_mark(self.__boundaries[0]).get_line() + 1 message = COMMENT_MESSAGE % line_number self.__editor.update_message(message, "yes", 5) else: self.__editor.update_message(COMMENTS_MESSAGE, "yes", 5) else: if self.__boundaries: line_number = self.__buffer.get_iter_at_mark(self.__boundaries[0]).get_line() + 1 message = UNCOMMENT_MESSAGE % line_number self.__editor.update_message(message, "yes", 5) else: self.__editor.update_message(UNCOMMENTS_MESSAGE, "yes", 5) return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__editor.set_message(RUN_MESSAGE, "run") return False def __multi_boundary_cb(self, manager, boundaries): self.__boundaries = () return False def __single_boundary_cb(self, manager, boundaries): self.__boundaries = boundaries return False def __commenting_cb(self, manager, commenting): self.__commenting = commenting return False def __text_cb(self, *args): from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/CursorPositioner.py0000644000175000017500000000535311242100540026011 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Positioner(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "single-line-boundary", self.__boundary_cb) self.connect(manager, "processed-text", self.__processed_cb) self.connect(manager, "inserted-text", self.__text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__selection = False self.__buffer = editor.textbuffer self.__offset = 0 self.__boundaries = () self.__commenting = False self.__old_text = "" self.__new_text = "" return def __destroy(self): self.disconnect() del self return False def __iter_after_indent(self): iterator = self.__buffer.get_iter_at_mark(self.__boundaries[0]) iterator = self.__editor.backward_to_line_begin(iterator) while iterator.get_char() in (" ", "\t"): iterator.forward_char() return iterator def __iter_at(self, offset): iterator = self.__buffer.get_iter_at_offset(offset) return iterator def __position(self): # Ignore multiline text. if self.__selection: return False if not self.__boundaries: return False if len(self.__new_text.splitlines()) > 1: return False # Adjust new cursor position based on whether comment string # was added or removed. offset = self.__offset + len(self.__new_text) - len(self.__old_text) # Always ensure that cursor is placed somewhere on the current # line. If all else fails place cursor at the beginning of # indentation. start_offset = self.__buffer.get_iter_at_mark(self.__boundaries[0]).get_offset() iterator = self.__iter_after_indent() if offset < start_offset else self.__iter_at(offset) self.__buffer.place_cursor(iterator) self.__manager.emit("finished") self.__boundaries = () self.__old_text = "" self.__new_text = "" return False def __update_old_text(self, boundaries): start = self.__buffer.get_iter_at_mark(boundaries[0]) end = self.__buffer.get_iter_at_mark(boundaries[1]) self.__old_text = self.__buffer.get_text(start, end) return False def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundaries): self.__boundaries = boundaries self.__update_old_text(boundaries) return False def __activate_cb(self, *args): self.__selection = self.__editor.has_selection self.__offset = self.__editor.cursor.get_offset() return False def __text_cb(self, *args): from gobject import idle_add idle_add(self.__position) return False def __processed_cb(self, manager, text): self.__new_text = text return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/MarkProcessor.py0000644000175000017500000000313211242100540025243 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Processor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "comment-boundary", self.__boundary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.disconnect() del self return False def __emit(self, boundaries): signal = "single-line-boundary" if self.__on_same_line(boundaries) else "multiline-boundary" if signal == "multiline-boundary": self.__move_to_edge(boundaries) self.__manager.emit(signal, boundaries) return False def __on_same_line(self, boundaries): start_line = self.__buffer.get_iter_at_mark(boundaries[0]).get_line() end_line = self.__buffer.get_iter_at_mark(boundaries[1]).get_line() return start_line == end_line def __move_to_edge(self, boundaries): # Move left mark to start of line. start = self.__buffer.get_iter_at_mark(boundaries[0]) start = self.__editor.backward_to_line_begin(start) self.__buffer.move_mark(boundaries[0], start) # Move right mark to end of line. end = self.__buffer.get_iter_at_mark(boundaries[1]) end = self.__editor.forward_to_line_end(end) self.__buffer.move_mark(boundaries[1], end) return def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundaries): from gobject import idle_add idle_add(self.__emit, boundaries) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/TextInserter.py0000644000175000017500000000250711242100540025116 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "comment-boundary", self.__boundary_cb) self.connect(manager, "processed-text", self.__text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__boundaries = () return def __destroy(self): self.disconnect() del self return False def __insert(self, text): start, end = self.__get_iters_from(self.__boundaries) self.__buffer.begin_user_action() self.__buffer.delete(start, end) self.__buffer.insert_at_cursor(text) self.__buffer.end_user_action() self.__manager.emit("inserted-text") return False def __get_iters_from(self, boundaries): start = self.__buffer.get_iter_at_mark(boundaries[0]) end = self.__buffer.get_iter_at_mark(boundaries[1]) return start, end def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundaries): self.__boundaries = boundaries return False def __text_cb(self, manager, text): from gobject import idle_add idle_add(self.__insert, text) return False scribes-0.4~r910/LanguagePlugins/JavaScriptComment/BoundaryMarker.py0000644000175000017500000000361011242100540025377 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer from MultiCommentSearcher import Searcher self.__searcher = Searcher() iterator_copy = self.__editor.cursor.copy self.__lmark = self.__editor.create_left_mark(iterator_copy()) self.__rmark = self.__editor.create_right_mark(iterator_copy()) return def __destroy(self): self.disconnect() self.__editor.delete_mark(self.__lmark) self.__editor.delete_mark(self.__rmark) del self return False def __mark_region(self, start, end): self.__buffer.move_mark(self.__lmark, start) self.__buffer.move_mark(self.__rmark, end) return def __mark_comment_region(self): from Exceptions import NoMultiCommentCharacterError try: text = self.__editor.text boundaries = self.__searcher.find_comment_boundaries(text, self.__editor.cursor.get_offset()) if not boundaries: raise NoMultiCommentCharacterError start = self.__buffer.get_iter_at_offset(boundaries[0]) end = self.__buffer.get_iter_at_offset(boundaries[1]) self.__mark_region(start, end) except NoMultiCommentCharacterError: self.__mark_region(*self.__editor.get_line_bounds()) return def __emit(self): self.__mark_region(*self.__editor.selection_bounds) if self.__editor.has_selection else self.__mark_comment_region() self.__manager.emit("comment-boundary", (self.__lmark, self.__rmark)) return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__emit) return False scribes-0.4~r910/LanguagePlugins/PluginPythonSmartIndentation.py0000644000175000017500000000113611242100540024726 0ustar andreasandreasname = "Smart indentation plugin" authors = ["Lateef Alabi-Oki "] languages = ["python"] version = 0.1 autoload = True class_name = "SmartIndentationPlugin" short_description = "Smart indentation for Python source code." long_description = """Smart indentation for Python source code.""" class SmartIndentationPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from PythonSmartIndentation.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/LanguagePlugins/PluginPythonSymbolBrowser.py0000644000175000017500000000124711242100540024257 0ustar andreasandreasname = "Python Symbol Browser" authors = ["Lateef Alabi-Oki "] languages = ["python"] version = 0.1 autoload = True class_name = "SymbolBrowserPlugin" short_description = "Show symbols in python source code." long_description = """This plugin allows users to view all symbols in python source code and navigate to them easily. Press F5 to show the symbol browser.""" class SymbolBrowserPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from PythonSymbolBrowser.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/PluginSparkup.py0000644000175000017500000000121411242100540021663 0ustar andreasandreasname = "Sparkup Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 languages = ["html", "xml", "css", "javascript", "php"] autoload = True class_name = "SparkupPlugin" short_description = "Advanced dynamic templates for HTML/XML/Javascript/CSS" long_description = "See http://net.tutsplus.com/articles/general/quick-tip-even-quicker-markup-with-sparkup/" class SparkupPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Sparkup.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/0000755000175000017500000000000011242100540022267 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Metadata.py0000644000175000017500000000051211242100540024357 0ustar andreasandreasfrom SCRIBES.Utils import open_storage STORAGE_FILE = "PythonErrorCheckType.dict" KEY = "more_error_checks" def get_value(): try: value = True storage = open_storage(STORAGE_FILE) value = storage[KEY] except: pass return value def set_value(value): storage = open_storage(STORAGE_FILE) storage[KEY] = value return scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/__init__.py0000644000175000017500000000000111242100540024367 0ustar andreasandreas scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Signals.py0000644000175000017500000000125411242100540024243 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "check": (SSIGNAL, TYPE_NONE, ()), "start-check": (SSIGNAL, TYPE_NONE, ()), "remote-file-error": (SSIGNAL, TYPE_NONE, ()), "remote-file-message": (SSIGNAL, TYPE_NONE, ()), "check-message": (SSIGNAL, TYPE_NONE, ()), "error-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "error-check-type": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "database-updated": (SSIGNAL, TYPE_NONE, ()), "toggle-error-check": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/LineJumper.py0000644000175000017500000000323711242100540024720 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Jumper(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "error-data", self.__error_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "remote-file-error", self.__remote_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__active = False return def __destroy(self): self.disconnect() del self return False def __jump(self, line): iterator = self.__editor.textbuffer.get_iter_at_line(line-1) self.__editor.textbuffer.place_cursor(iterator) self.__editor.refresh(True) self.__editor.move_view_to_cursor(True, iterator.copy()) self.__editor.refresh(True) return False def __destroy_cb(self, *args): self.__destroy() return False def __error_cb(self, manager, error_data): if self.__active is False: return False self.__active = False lineno = error_data[0] if not lineno: return False self.__jump(lineno) return False def __activate_cb(self, *args): from Exceptions import FileSaveError try: self.__active = True self.__manager.emit("check-message") if self.__editor.buf.get_modified() is True: raise FileSaveError self.__manager.emit("check") except (FileSaveError): self.__editor.save_file(self.__editor.uri) return False def __no_cb(self, *args): self.__active = False return False def __remote_cb(self, *args): self.__active = False self.__manager.emit("remote-file-message") return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Utils.py0000644000175000017500000000056111242100540023743 0ustar andreasandreasdef window_is_active(editor): try: if editor is None: return False if editor.window.props.is_active is False: return False if editor.textview.props.has_focus is False: return False except AttributeError: return False return True def get_modification_time(file_path): from SCRIBES.Utils import get_modification_time return get_modification_time(file_path) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/DatabaseMonitor.py0000644000175000017500000000243611242100540025722 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.storage_folder, "PythonErrorCheckType.dict") self.__monitor = editor.get_file_monitor(_file) return def __update(self): self.__manager.emit("database-updated") return False def __update_timeout(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __destroy_cb(self, *args): self.__monitor.cancel() self.disconnect() del self return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__remove_timer() from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(250, self.__update_timeout, priority=PRIORITY_LOW) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ExternalProcessStarter.py0000644000175000017500000000376111242100540027336 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from ErrorCheckerProcess.Utils import DBUS_SERVICE class Starter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(manager, "destroy", self.__destroy_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) def __init_attributes(self, editor): from os.path import join from sys import prefix self.__editor = editor self.__cwd = self.__editor.get_current_folder(globals()) self.__executable = join(self.__cwd, "ErrorCheckerProcess", "ScribesPythonErrorChecker.py") self.__python_executable = join(prefix, "bin", "python") return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) del self return False def __process_init(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) return False def __start(self): if self.__process_exists(): return False self.__start_process() return False def __process_exists(self): services = self.__editor.dbus_iface.ListNames() if DBUS_SERVICE in services: return True return False def __start_process(self): from gobject import spawn_async, GError try: spawn_async([self.__python_executable, self.__executable, self.__editor.python_path], working_directory=self.__cwd) except GError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __name_change_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Exceptions.py0000644000175000017500000000016711242100540024766 0ustar andreasandreasclass RemoteFileError(Exception): pass class FileSaveError(Exception): pass class FirstTimeError(Exception): pass scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Trigger.py0000644000175000017500000000251311242100540024245 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(editor) name, shortcut, description, category = ( "move-cursor-to-errors", "F2", _("Move cursor to errors in python code"), _("Python"), ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) self.__trigger1.command = "activate" name, shortcut, description, category = ( "toggle-error-checking", "F2", _("Move cursor to errors in python code"), _("Python"), ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.command = "toggle-error-check" return def __activate_cb(self, trigger): self.__manager.activate(trigger.command) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/DatabaseReader.py0000644000175000017500000000143011242100540025466 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "database-updated", self.__updated_cb) self.__read() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __read(self): from Metadata import get_value self.__manager.emit("error-check-type", get_value()) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __updated_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__read, priority=PRIORITY_LOW) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Feedback.py0000644000175000017500000000372211242100540024331 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "error-data", self.__message_cb) self.connect(manager, "remote-file-message", self.__error_cb) self.connect(manager, "check-message", self.__check_cb) self.connect(manager, "error-check-type", self.__type_cb, True) self.connect(manager, "toggle-error-check", self.__toggle_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__is_first_time = True return def __destroy(self): self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __message_cb(self, manager, data): if data[0]: message = "Error: %s on line %s" % (data[1], data[0]) self.__editor.update_message(message, "error", 10) else: message = _("No errors found") self.__editor.update_message(message, "yes") return False def __error_cb(self, *args): message = _("No error checking on remote file") self.__editor.update_message(message, "no", 3) return False def __check_cb(self, *args): message = _("checking for errors please wait...") self.__editor.update_message(message, "run", 60) return False def __type_cb(self, manager, more_error_checks): from Exceptions import FirstTimeError try: if self.__is_first_time: raise FirstTimeError message = _("Switched to Python error checking") if more_error_checks else _("Switched to syntax error checking") self.__editor.hide_message() self.__editor.update_message(message, "yes") except FirstTimeError: self.__is_first_time = False return False def __toggle_cb(self, *args): message = _("switching please wait...") self.__editor.update_message(message, "run", 20) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Manager.py0000644000175000017500000000133311242100540024213 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Feedback import Feedback Feedback(self, editor) from LineJumper import Jumper Jumper(self, editor) from Checker import Checker Checker(self, editor) from ProcessCommunicator import Communicator Communicator(self, editor) from ExternalProcessStarter import Starter Starter(self, editor) from DatabaseReader import Reader Reader(self, editor) from DatabaseWriter import Writer Writer(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self, signal): self.emit(signal) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/0000755000175000017500000000000011242100540026204 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/PyLintChecker.py0000644000175000017500000000274311242100540031270 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "pylint-check", self.__check_cb) self.connect(manager, "stop", self.__stop_cb) def __init_attributes(self, manager): self.__manager = manager self.__stale_session = () return def __check(self, data): from Exceptions import StaleSessionError, FileChangedError try: filename, editor_id, session_id, modification_time = data[0], data[1], data[2], data[3] from Utils import validate_session, update_python_environment_with validate_session(filename, self.__stale_session, editor_id, session_id, modification_time) update_python_environment_with(filename) import PyLinter reload(PyLinter) messages = PyLinter.Linter().check(filename, modification_time) if messages is None: raise FileChangedError messages.sort() emit = self.__manager.emit if messages: error_message = messages[0][0], messages[0][1], editor_id, session_id, modification_time emit("finished", error_message) else: emit("pycheck", data) except FileChangedError: self.__manager.emit("ignored") except StaleSessionError: self.__manager.emit("ignored") return False def __check_cb(self, manager, data): from gobject import idle_add idle_add(self.__check, data) return False def __stop_cb(self, manager, data): self.__stale_session = data return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/__init__.py0000644000175000017500000000007011242100540030312 0ustar andreasandreas__import__('pkg_resources').declare_namespace(__name__) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/Signals.py0000644000175000017500000000111411242100540030153 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "new-job": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "syntax-check": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "flakes-check": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "pylint-check": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "pycheck": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "finished": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "stop": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "ignored": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/SyntaxChecker.py0000644000175000017500000000376611242100540031345 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "syntax-check", self.__check_cb) self.connect(manager, "stop", self.__stop_cb) def __init_attributes(self, manager): self.__manager = manager self.__stale_session = () return def __check(self, data): # Since compiler.parse does not reliably report syntax errors, use the # built in compiler first to detect those. from Exceptions import StaleSessionError, FileChangedError try: try: file_content, file_path, editor_id, session_id, check_type, modification_time = data from Utils import validate_session validate_session(file_path, self.__stale_session, editor_id, session_id, modification_time) compile(file_content, file_path, "exec") except MemoryError: # Python 2.4 will raise MemoryError if the source can't be # decoded. from sys import version_info if version_info[:2] == (2, 4): raise SyntaxError(None) raise except (SyntaxError, IndentationError), value: msg = value.args[0] lineno = value.lineno # If there's an encoding problem with the file, the text is None. data = lineno, msg, editor_id, session_id, modification_time self.__manager.emit("finished", data) except FileChangedError: self.__manager.emit("ignored") except StaleSessionError: self.__manager.emit("ignored") else: if check_type == 1: data = 0, "", editor_id, session_id, modification_time signal = "finished" else: from compiler import parse parse_tree = parse(file_content) data = file_path, editor_id, session_id, check_type, modification_time, parse_tree signal = "flakes-check" self.__manager.emit(signal, data) return False def __check_cb(self, manager, data): from gobject import idle_add idle_add(self.__check, data) return False def __stop_cb(self, manager, data): self.__stale_session = data return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/Utils.py0000644000175000017500000000221611242100540027657 0ustar andreasandreasDBUS_SERVICE = "org.sourceforge.ScribesPythonErrorChecker" DBUS_PATH = "/org/sourceforge/ScribesPythonErrorChecker" def file_has_changed(file_path, modification_time): from SCRIBES.Utils import get_modification_time modtime = get_modification_time(file_path) return modtime != modification_time def validate_session(file_path, stale_session, editor_id, session_id, modification_time): from Exceptions import StaleSessionError, FileChangedError if editor_id in stale_session and session_id in stale_session: raise StaleSessionError if file_has_changed(file_path, modification_time): raise FileChangedError return def update_python_environment_with(module_path): from os.path import dirname module_folder = dirname(module_path) from sys import path if not (module_folder in path): path.insert(0, module_folder) from os import environ, pathsep, putenv python_path = pathsep.join(path) environ["PYTHONPATH"] = python_path putenv("PYTHONPATH", python_path) return def reformat_error(message): message = message.strip(" \t\n\r").split() strings = [string for string in message if string.strip(" \t\n\r")] message = " ".join(strings) return message scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/DBusService.py0000644000175000017500000000207611242100540030741 0ustar andreasandreasfrom dbus.service import Object, method, BusName, signal from Utils import DBUS_SERVICE, DBUS_PATH class DBusService(Object): def __init__(self, manager): from SCRIBES.Globals import session_bus from dbus.exceptions import NameExistsException try: bus_name = BusName(DBUS_SERVICE, bus=session_bus, do_not_queue=True) Object.__init__(self, bus_name, DBUS_PATH) self.__manager = manager manager.connect("finished", self.__finished_cb) except NameExistsException: manager.quit() @method(DBUS_SERVICE, in_signature="(ssxxid)") def check(self, data): # data is (file_content, file_path, editor_id, session_id, check_type, modification_time) return self.__manager.check(data) @method(DBUS_SERVICE, in_signature="(xx)") def stop(self, data): # data is (editor_id, session_id) return self.__manager.stop(data) @signal(DBUS_SERVICE, signature="(xsxxd)") def finished(self, data): # data is (line_number, error_message, editor_id, session_id, modification_time) return def __finished_cb(self, manager, data): self.finished(data) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/Exceptions.py0000644000175000017500000000012411242100540030674 0ustar andreasandreasclass StaleSessionError(Exception): pass class FileChangedError(Exception): pass scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/0000755000175000017500000000000011242100540030161 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/__init__.py0000644000175000017500000000103711242100540032273 0ustar andreasandreas""" Copyright (c) 2001, MetaSlash Inc. All rights reserved. PyChecker is a tool for finding common bugs in python source code. It finds problems that are typically caught by a compiler for less dynamic languages, like C and C++. It is also similar to lint. Contact Info: http://pychecker.sourceforge.net/ pychecker-list@lists.sourceforge.net """ # A version # to check against in the main module (checker.py) # this will allow us to check if there are two versions of checker # in site-packages and local dir MAIN_MODULE_VERSION = 3 scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/OP.py0000644000175000017500000001227511242100540031060 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Python byte code operations. Very similar to the dis and opcode module, but dis does not exist in Jython, so recreate the small portion we need here. """ from pychecker import utils def LINE_NUM(op): return op == 127 def LOAD_GLOBAL(op): return op == 116 def LOAD_CONST(op): return op == 100 def LOAD_FAST(op): return op == 124 if utils.pythonVersion() >= utils.PYTHON_2_7: def LOAD_ATTR(op): return op == 106 else: def LOAD_ATTR(op): return op == 105 def LOAD_DEREF(op): return op == 136 def STORE_ATTR(op): return op == 95 def POP_TOP(op): return op == 1 if utils.pythonVersion() >= utils.PYTHON_2_7: def IMPORT_FROM(op): return op == 109 else: def IMPORT_FROM(op): return op == 108 def IMPORT_STAR(op): return op == 84 def UNARY_POSITIVE(op): return op == 10 def UNARY_NEGATIVE(op): return op == 11 def UNARY_INVERT(op): return op == 15 def RETURN_VALUE(op): return op == 83 def JUMP_FORWARD(op): return op == 110 def JUMP_ABSOLUTE(op): return op == 113 def FOR_ITER(op): return op == 93 def FOR_LOOP(op): return op == 114 def SETUP_LOOP(op): return op == 120 def BREAK_LOOP(op): return op == 80 def RAISE_VARARGS(op): return op == 130 def POP_BLOCK(op): return op == 87 def END_FINALLY(op): return op == 88 def CALL_FUNCTION(op): return op == 131 def UNPACK_SEQUENCE(op) : "Deal w/Python 1.5.2 (UNPACK_[LIST|TUPLE]) or 2.0 (UNPACK_SEQUENCE)" return op in (92, 93,) if utils.pythonVersion() >= utils.PYTHON_2_7: def IS_CONDITIONAL_JUMP(op): return op in (111, 112, 114, 115) else: def IS_CONDITIONAL_JUMP(op): return op in (111, 112) def IS_NOT(op): return op == 12 HAVE_ARGUMENT = 90 # Opcodes from here have an argument # moved 2 places in 2.7 if utils.pythonVersion() >= utils.PYTHON_2_7: EXTENDED_ARG = 145 else: EXTENDED_ARG = 143 if utils.pythonVersion() >= utils.PYTHON_2_7: _HAS_NAME = (90, 91, 95, 96, 97, 98, 101, 106, 108, 109, 116,) else: _HAS_NAME = (90, 91, 95, 96, 97, 98, 101, 105, 107, 108, 116,) _HAS_LOCAL = (124, 125, 126,) _HAS_CONST = (100,) if utils.pythonVersion() >= utils.PYTHON_2_7: _HAS_COMPARE = (107,) else: _HAS_COMPARE = (106,) if utils.pythonVersion() >= utils.PYTHON_2_7: _HAS_JREL = (93, 110, 120, 121, 122, 143,) _HAS_JABS = (111, 112, 113, 114, 115, 119,) else: # FIXME: 2.6 here has 93 and does not have 114 _HAS_JREL = (110, 111, 112, 114, 120, 121, 122,) _HAS_JABS = (113, 119,) _CMP_OP = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is', 'is not', 'exception match', 'BAD') EXCEPT_COMPARISON = 10 IS_COMPARISON = 8 IN_COMPARISON = 6 NOT_IN_COMPARISON = 7 def getOperand(op, func_code, oparg) : """ Get the actual object the oparg references. @rtype: object """ if op in _HAS_NAME : return func_code.co_names[oparg] elif op in _HAS_LOCAL : return func_code.co_varnames[oparg] elif op in _HAS_CONST : return func_code.co_consts[oparg] elif op in _HAS_COMPARE : return _CMP_OP[oparg] return None def getLabel(op, oparg, i) : if op in _HAS_JREL : return i + oparg elif op in _HAS_JABS : return oparg return None def getInfo(code, index, extended_arg) : """Returns (op, oparg, index, extended_arg) based on code this is a helper function while looping through byte code, refer to the standard module dis.disassemble() for more info""" # get the operation we are performing op = ord(code[index]) index = index + 1 if op >= HAVE_ARGUMENT : # get the argument to the operation oparg = ord(code[index]) + ord(code[index+1])*256 + extended_arg index = index + 2 extended_arg = 0 if op == EXTENDED_ARG : extended_arg = oparg * 65536L else : oparg, extended_arg = 0, 0 return op, oparg, index, extended_arg def initFuncCode(func) : """Returns (func_code, code, i, maxCode, extended_arg) based on func, this is a helper function to setup looping through byte code""" func_code = func.func_code code = func_code.co_code return func_code, code, 0, len(code), 0 def conditional(op): "returns true if the code results in conditional execution" return op in [83, # return 93, # for_iter 111, 112, 114, 115, # conditional jump 121, # setup_exec 130 # raise_varargs ] # this code is here for debugging purposes. # Jython doesn't support dis, so don't rely on it try : import dis name = dis.opname except ImportError : class Name: 'Turn name[x] into x' def __getitem__(self, x): from pychecker import utils return utils.safestr(x) name = Name() scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/options.py0000755000175000017500000002124611242100540032236 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 "Main module for running pychecker a Tkinter GUI for all the options" import sys import os import Tkinter, tkFileDialog from OptionTypes import * from string import capitalize, strip, rstrip, split import Config MAX_SUBBOX_ROWS = 8 MAX_BOX_COLS = 3 PAD = 10 EDITOR = "xterm -e vi -n +%(line)d %(file)s" if sys.platform == 'win32': EDITOR = "notepad %(file)s" def col_weight(grid): "Set column weights so that sticky grid settings actually work" unused, col = grid.grid_size() for c in range(col): grid.columnconfigure(c, weight=1) def spawn(cmd_list): try: if os.fork(): try: os.execvp(cmd_list[0], cmd_list) finally: sys.exit() except AttributeError: os.execvp(cmd_list[0], cmd_list) def edit(file, line): "Fire up an external editor to see the file at the given line" unused = file, line args = split(EDITOR) cmd_list = [] for word in args: cmd_list.append(word % locals()) spawn(cmd_list) def closeCB(): sys.exit(0) class Results: "Display the warnings produced by checker" def __init__(self, w): self.top = Tkinter.Toplevel(w, name="results") self.top.transient(w) self.top.bind('', self.hide) self.top.bind('', self.hide) self.text = Tkinter.Text(self.top, name="text") self.text.grid() self.text.bind('', self.showFile) close = Tkinter.Button(self.top, name="close", default=Tkinter.ACTIVE, command=self.hide) close.grid() self.text.update_idletasks() def show(self, text): self.text.delete("0.1", "end") self.text.insert("0.1", text) self.top.deiconify() self.top.lift() def hide(self, *unused): self.top.withdraw() def line(self): return split(self.text.index(Tkinter.CURRENT), ".")[0] def showFile(self, unused): import re line = self.line() text = self.text.get(line + ".0", line + ".end") text = rstrip(text) result = re.search("(.*):([0-9]+):", text) if result: path, line = result.groups() edit(path, int(line)) self.text.after(0, self.selectLine) def selectLine(self): line = self.line() self.text.tag_remove(Tkinter.SEL, "1.0", Tkinter.END) self.text.tag_add(Tkinter.SEL, line + ".0", line + ".end") class ConfigDialog: "Dialog for editing options" def __init__(self, tk): self._tk = tk self._cfg, _, _ = Config.setupFromArgs(sys.argv) self._help = None self._optMap = {} self._opts = [] self._file = Tkinter.StringVar() self._results = None if len(sys.argv) > 1: self._file.set(sys.argv[1]) for name, group in Config._OPTIONS: opts = [] for _, useValue, longArg, member, description in group: value = None if member: value = getattr(self._cfg, member) description = member + ": " + capitalize(description) description = strip(description) tk.option_add('*' + longArg + ".help", description) if useValue: if type(value) == type([]): field = List(longArg, value) elif type(value) == type(1): field = Number(longArg, int(value)) elif type(value) == type(''): field = Text(longArg, value) else: field = Boolean(longArg, value) else: field = Boolean(longArg, value) self._optMap[longArg] = field opts.append(field) self._opts.append( (name, opts)) def _add_fields(self, w, opts): count = 0 for opt in opts: f = opt.field(w) c, r = divmod(count, MAX_SUBBOX_ROWS) f.grid(row=r, column=c, sticky=Tkinter.NSEW) count = count + 1 def _add_group(self, w, name, opts): colFrame = Tkinter.Frame(w) label = Tkinter.Label(colFrame, text=name + ":") label.grid(row=0, column=0, sticky=Tkinter.NSEW) gframe = Tkinter.Frame(colFrame, relief=Tkinter.GROOVE, borderwidth=2) gframe.grid(row=1, column=0, sticky=Tkinter.NSEW) self._add_fields(gframe, opts) label = Tkinter.Label(colFrame) label.grid(row=2, column=0, sticky=Tkinter.NSEW) colFrame.rowconfigure(2, weight=1) return colFrame def main(self): frame = Tkinter.Frame(self._tk, name="opts") frame.grid() self._tk.option_readfile('Options.ad') self._fields = {} row, col = 0, 0 rowFrame = Tkinter.Frame(frame) rowFrame.grid(row=row) row = row + 1 for name, opts in self._opts: w = self._add_group(rowFrame, name, opts) w.grid(row=row, column=col, sticky=Tkinter.NSEW, padx=PAD) col = col + 1 if col >= MAX_BOX_COLS: col_weight(rowFrame) rowFrame=Tkinter.Frame(frame) rowFrame.grid(row=row, sticky=Tkinter.NSEW) col = 0 row = row + 1 col_weight(rowFrame) self._help = Tkinter.Label(self._tk, name="helpBox") self._help.grid(row=row) self._help.config(takefocus=0) buttons = Tkinter.Frame(self._tk, name="buttons") ok = Tkinter.Button(buttons, name="ok", command=self.ok, default=Tkinter.ACTIVE) ok.grid(row=row, column=0) default = Tkinter.Button(buttons, name="default", command=self.default) default.grid(row=row, column=1) close = Tkinter.Button(buttons, name="close", command=closeCB) close.grid(row=row, column=2) buttons.grid() f = Tkinter.Frame(self._tk, name="fileStuff") Tkinter.Button(f, name="getfile", command=self.file).grid(row=0, column=1) fileEntry = Tkinter.Entry(f, name="fname", textvariable=self._file) fileEntry.grid(row=0, column=2) Tkinter.Button(f, name="check", command=self.check).grid(row=0, column=3) f.grid(sticky=Tkinter.EW) self._tk.bind_all('', self.focus) self._tk.bind_all('', self.focus) self._tk.bind_all('', self.click) fileEntry.bind('', self.check) self._tk.mainloop() # # Callbacks # def help(self, w): if type(w) == type(''): # occurs with file dialog... return if self._help == w: # ignore help events on help... return text = w.option_get("help", "help") self._help.configure(text=text) def focus(self, ev): self.help(ev.widget) def click(self, ev): self.help(ev.widget) def ok(self): opts = [] # Pull command-line args for _, group in self._opts: for opt in group: arg = opt.arg() if arg: opts.append(arg) # Calculate config self._cfg, _, _ = Config.setupFromArgs(opts) # Set controls based on new config for _, group in Config._OPTIONS: for _, _, longArg, member, _ in group: if member: self._optMap[longArg].set(getattr(self._cfg, member)) def default(self): self._cfg, _, _ = Config.setupFromArgs(sys.argv) for _, group in Config._OPTIONS: for _, _, longArg, member, _ in group: if member: self._optMap[longArg].set(getattr(self._cfg, member)) else: self._optMap[longArg].set(0) def file(self): self._file.set(tkFileDialog.askopenfilename()) def check(self, *unused): import checker import StringIO self.ok() # show effect of all settings checker._allModules = {} warnings = checker.getWarnings([self._file.get()], self._cfg) capture = StringIO.StringIO() if not self._results: self._results = Results(self._help) checker._printWarnings(warnings, capture) value = strip(capture.getvalue()) if not value: value = "None" self._results.show(value) if __name__=='__main__': dirs = os.path.join(os.path.split(os.getcwd())[:-1]) sys.path.append(dirs[0]) tk = Tkinter.Tk() tk.title('PyChecker') ConfigDialog(tk).main() scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/pcmodules.py0000644000175000017500000005323611242100540032537 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ Track loaded PyCheckerModules together with the directory they were loaded from. This allows us to differentiate between loaded modules with the same name but from different paths, in a way that sys.modules doesn't do. """ import re import sys import imp import types import string from pychecker import utils, function, Config, OP # Constants _DEFAULT_MODULE_TOKENS = ('__builtins__', '__doc__', '__file__', '__name__', '__path__') _DEFAULT_CLASS_TOKENS = ('__doc__', '__name__', '__module__') # When using introspection on objects from some C extension modules, # the interpreter will crash. Since pychecker exercises these bugs we # need to blacklist the objects and ignore them. For more info on how # to determine what object is causing the crash, search for this # comment below (ie, it is also several hundred lines down): # # README if interpreter is crashing: # FIXME: the values should indicate the versions of these modules # that are broken. We shouldn't ignore good modules. EVIL_C_OBJECTS = { 'matplotlib.axes.BinOpType': None, # broken on versions <= 0.83.2 # broken on versions at least 2.5.5 up to 2.6 'wx.TheClipboard': None, 'wx._core.TheClipboard': None, 'wx._misc.TheClipboard': None, } __pcmodules = {} def _filterDir(object, ignoreList): """ Return a list of attribute names of an object, excluding the ones in ignoreList. @type ignoreList: list of str @rtype: list of str """ tokens = dir(object) for token in ignoreList: if token in tokens: tokens.remove(token) return tokens def _getClassTokens(c): return _filterDir(c, _DEFAULT_CLASS_TOKENS) def _getPyFile(filename): """Return the file and '.py' filename from a filename which could end with .py, .pyc, or .pyo""" if filename[-1] in 'oc' and filename[-4:-1] == '.py': return filename[:-1] return filename def _getModuleTokens(m): return _filterDir(m, _DEFAULT_MODULE_TOKENS) class Variable: "Class to hold all information about a variable" def __init__(self, name, type): """ @param name: name of the variable @type name: str @param type: type of the variable @type type: type """ self.name = name self.type = type self.value = None def __str__(self) : return self.name __repr__ = utils.std_repr class Class: """ Class to hold all information about a class. @ivar name: name of class @type name: str @ivar classObject: the object representing the class @type classObject: class @ivar module: the module where the class is defined @type module: module @ivar ignoreAttrs: whether to ignore this class's attributes when checking attributes. Can be set because of a bad __getattr__ or because the module this class comes from is blacklisted. @type ignoreAttrs: int (used as bool) @type methods: dict @type members: dict of str -> type @type memberRefs: dict @type statics: dict @type lineNums: dict """ def __init__(self, name, pcmodule): """ @type name: str @type pcmodule: L{PyCheckerModule} """ self.name = name module = pcmodule.module self.classObject = getattr(module, name) modname = getattr(self.classObject, '__module__', None) if modname is None: # hm, some ExtensionClasses don't have a __module__ attribute # so try parsing the type output typerepr = repr(type(self.classObject)) mo = re.match("^$", typerepr) if mo: modname = ".".join(mo.group(1).split(".")[:-1]) # TODO(nnorwitz): this check for __name__ might not be necessary # any more. Previously we checked objects as if they were classes. # This problem is fixed by not adding objects as if they are classes. # zope.interface for example has Provides and Declaration that # look a lot like class objects but do not have __name__ if not hasattr(self.classObject, '__name__'): if modname not in utils.cfg().blacklist: sys.stderr.write("warning: no __name__ attribute " "for class %s (module name: %s)\n" % (self.classObject, modname)) self.classObject.__name__ = name # later pychecker code uses this self.classObject__name__ = self.classObject.__name__ self.module = sys.modules.get(modname) # if the pcmodule has moduleDir, it means we processed it before, # and deleted it from sys.modules if not self.module and pcmodule.moduleDir is None: self.module = module if modname not in utils.cfg().blacklist: sys.stderr.write("warning: couldn't find real module " "for class %s (module name: %s)\n" % (self.classObject, modname)) self.ignoreAttrs = 0 self.methods = {} self.members = { '__class__': types.ClassType, '__doc__': types.StringType, '__dict__': types.DictType, } self.memberRefs = {} self.statics = {} self.lineNums = {} def __str__(self) : return self.name __repr__ = utils.std_repr def getFirstLine(self) : "Return first line we can find in THIS class, not any base classes" lineNums = [] classDir = dir(self.classObject) for m in self.methods.values() : if m != None and m.function.func_code.co_name in classDir: lineNums.append(m.function.func_code.co_firstlineno) if lineNums : return min(lineNums) return 0 def allBaseClasses(self, c = None) : "Return a list of all base classes for this class and its subclasses" baseClasses = [] if c == None : c = self.classObject for base in getattr(c, '__bases__', None) or (): baseClasses = baseClasses + [ base ] + self.allBaseClasses(base) return baseClasses def __getMethodName(self, func_name, className = None) : if func_name[0:2] == '__' and func_name[-2:] != '__' : if className == None : className = self.name if className[0] != '_' : className = '_' + className func_name = className + func_name return func_name def addMethod(self, methodName, method=None): """ Add the given method to this class by name. @type methodName: str @type method: method or None """ if not method: self.methods[methodName] = None else : self.methods[methodName] = function.Function(method, 1) def addMethods(self, classObject): """ Add all methods for this class object to the class. @param classObject: the class object to add methods from. @type classObject: types.ClassType (classobj) """ for classToken in _getClassTokens(classObject): token = getattr(classObject, classToken, None) if token is None: continue # Looks like a method. Need to code it this way to # accommodate ExtensionClass and Python 2.2. Yecchh. if (hasattr(token, "func_code") and hasattr(token.func_code, "co_argcount")): self.addMethod(token.__name__, method=token) elif hasattr(token, '__get__') and \ not hasattr(token, '__set__') and \ type(token) is not types.ClassType: self.addMethod(getattr(token, '__name__', classToken)) else: self.members[classToken] = type(token) self.memberRefs[classToken] = None self.cleanupMemberRefs() # add standard methods for methodName in ('__class__', ): self.addMethod(methodName) def addMembers(self, classObject) : if not utils.cfg().onlyCheckInitForMembers : for classToken in _getClassTokens(classObject) : method = getattr(classObject, classToken, None) if type(method) == types.MethodType : self.addMembersFromMethod(method.im_func) else: try: self.addMembersFromMethod(classObject.__init__.im_func) except AttributeError: pass def addMembersFromMethod(self, method) : if not hasattr(method, 'func_code') : return func_code, code, i, maxCode, extended_arg = OP.initFuncCode(method) stack = [] while i < maxCode : op, oparg, i, extended_arg = OP.getInfo(code, i, extended_arg) if op >= OP.HAVE_ARGUMENT : operand = OP.getOperand(op, func_code, oparg) if OP.LOAD_CONST(op) or OP.LOAD_FAST(op) or OP.LOAD_GLOBAL(op): stack.append(operand) elif OP.LOAD_DEREF(op): try: operand = func_code.co_cellvars[oparg] except IndexError: index = oparg - len(func_code.co_cellvars) operand = func_code.co_freevars[index] stack.append(operand) elif OP.STORE_ATTR(op) : if len(stack) > 0 : if stack[-1] == utils.cfg().methodArgName: value = None if len(stack) > 1 : value = type(stack[-2]) self.members[operand] = value self.memberRefs[operand] = None stack = [] self.cleanupMemberRefs() def cleanupMemberRefs(self) : try : del self.memberRefs[Config.CHECKER_VAR] except KeyError : pass def abstractMethod(self, m): """Return 1 if method is abstract, None if not An abstract method always raises an exception. """ if not self.methods.get(m, None): return None funcCode, codeBytes, i, maxCode, extended_arg = \ OP.initFuncCode(self.methods[m].function) # abstract if the first opcode is RAISE_VARARGS and it raises # NotImplementedError arg = "" while i < maxCode: op, oparg, i, extended_arg = OP.getInfo(codeBytes, i, extended_arg) if OP.LOAD_GLOBAL(op): arg = funcCode.co_names[oparg] elif OP.RAISE_VARARGS(op): # if we saw NotImplementedError sometime before the raise # assume it's related to this raise stmt return arg == "NotImplementedError" if OP.conditional(op): break return None def isAbstract(self): """Return the method names that make a class abstract. An abstract class has at least one abstract method.""" result = [] for m in self.methods.keys(): if self.abstractMethod(m): result.append(m) return result class PyCheckerModule: """ Class to hold all information for a module @ivar module: the module wrapped by this PyCheckerModule @type module: module @ivar moduleName: name of the module @type moduleName: str @ivar moduleDir: if specified, the directory where the module can be loaded from; allows discerning between modules with the same name in a different directory. Note that moduleDir can be the empty string, if the module being tested lives in the current working directory. @type moduleDir: str @ivar variables: dict of variable name -> Variable @type variables: dict of str -> L{Variable} @ivar functions: dict of function name -> function @type functions: dict of str -> L{function.Function} @ivar classes: dict of class name -> class @type classes: dict of str -> L{Class} @ivar modules: dict of module name -> module @type modules: dict of str -> L{PyCheckerModule} @ivar moduleLineNums: mapping of the module's nameds/operands to the filename and linenumber where they are created @type moduleLineNums: dict of str -> (str, int) @type mainCode: L{function.Function} @ivar check: whether this module should be checked @type check: int (used as bool) """ def __init__(self, moduleName, check=1, moduleDir=None): """ @param moduleName: name of the module @type moduleName: str @param check: whether this module should be checked @type check: int (used as bool) @param moduleDir: if specified, the directory where the module can be loaded from; allows discerning between modules with the same name in a different directory. Note that moduleDir can be the empty string, if the module being tested lives in the current working directory. @type moduleDir: str """ self.module = None self.moduleName = moduleName self.moduleDir = moduleDir self.variables = {} self.functions = {} self.classes = {} self.modules = {} self.moduleLineNums = {} self.attributes = [ '__dict__' ] self.mainCode = None self.check = check # key on a combination of moduleName and moduleDir so we have separate # entries for modules with the same name but in different directories addPCModule(self) def __str__(self): return self.moduleName __repr__ = utils.std_repr def addVariable(self, var, varType): """ @param var: name of the variable @type var: str @param varType: type of the variable @type varType: type """ self.variables[var] = Variable(var, varType) def addFunction(self, func): """ @type func: callable """ self.functions[func.__name__] = function.Function(func) def __addAttributes(self, c, classObject) : for base in getattr(classObject, '__bases__', None) or (): self.__addAttributes(c, base) c.addMethods(classObject) c.addMembers(classObject) def addClass(self, name): self.classes[name] = c = Class(name, self) try: objName = utils.safestr(c.classObject) except TypeError: # this can happen if there is a goofy __getattr__ c.ignoreAttrs = 1 else: packages = string.split(objName, '.') c.ignoreAttrs = packages[0] in utils.cfg().blacklist if not c.ignoreAttrs : self.__addAttributes(c, c.classObject) def addModule(self, name, moduleDir=None) : module = getPCModule(name, moduleDir) if module is None : self.modules[name] = module = PyCheckerModule(name, 0) if imp.is_builtin(name) == 0: module.load() else : globalModule = globals().get(name) if globalModule : module.attributes.extend(dir(globalModule)) else : self.modules[name] = module def filename(self) : try : filename = self.module.__file__ except AttributeError : filename = self.moduleName # FIXME: we're blindly adding .py, but it might be something else. if self.moduleDir: filename = self.moduleDir + '/' + filename + '.py' return _getPyFile(filename) def load(self): try : # there's no need to reload modules we already have if no moduleDir # is specified for this module # NOTE: self.moduleDir can be '' if the module tested lives in # the current working directory if self.moduleDir is None: module = sys.modules.get(self.moduleName) if module: pcmodule = getPCModule(self.moduleName) if not pcmodule.module: return self._initModule(module) return 1 return self._initModule(self.setupMainCode()) except (SystemExit, KeyboardInterrupt): exc_type, exc_value, exc_tb = sys.exc_info() raise exc_type, exc_value except: utils.importError(self.moduleName, self.moduleDir) return utils.cfg().ignoreImportErrors def initModule(self, module) : if not self.module: filename = _getPyFile(module.__file__) if string.lower(filename[-3:]) == '.py': try: handle = open(filename) except IOError: pass else: self._setupMainCode(handle, filename, module) return self._initModule(module) return 1 def _initModule(self, module): self.module = module self.attributes = dir(self.module) # interpret module-specific suppressions pychecker_attr = getattr(module, Config.CHECKER_VAR, None) if pychecker_attr is not None : utils.pushConfig() utils.updateCheckerArgs(pychecker_attr, 'suppressions', 0, []) # read all tokens from the real module, and register them for tokenName in _getModuleTokens(self.module): if EVIL_C_OBJECTS.has_key('%s.%s' % (self.moduleName, tokenName)): continue # README if interpreter is crashing: # Change 0 to 1 if the interpretter is crashing and re-run. # Follow the instructions from the last line printed. if utils.cfg().findEvil: print "Add the following line to EVIL_C_OBJECTS or the string to evil in a config file:\n" \ " '%s.%s': None, " % (self.moduleName, tokenName) token = getattr(self.module, tokenName) if isinstance(token, types.ModuleType) : # get the real module name, tokenName could be an alias self.addModule(token.__name__) elif isinstance(token, types.FunctionType) : self.addFunction(token) elif isinstance(token, types.ClassType) or \ hasattr(token, '__bases__') and \ issubclass(type(token), type): self.addClass(tokenName) else : self.addVariable(tokenName, type(token)) if pychecker_attr is not None : utils.popConfig() return 1 def setupMainCode(self): handle, filename, smt = utils.findModule( self.moduleName, self.moduleDir) # FIXME: if the smt[-1] == imp.PKG_DIRECTORY : load __all__ # HACK: to make sibling imports work, we add self.moduleDir to sys.path # temporarily, and remove it later if self.moduleDir is not None: oldsyspath = sys.path[:] sys.path.insert(0, self.moduleDir) module = imp.load_module(self.moduleName, handle, filename, smt) if self.moduleDir is not None: sys.path = oldsyspath # to make sure that subsequent modules with the same moduleName # do not persist, and get their namespace clobbered, delete it del sys.modules[self.moduleName] self._setupMainCode(handle, filename, module) return module def _setupMainCode(self, handle, filename, module): try: self.mainCode = function.create_from_file(handle, filename, module) finally: if handle != None: handle.close() def getToken(self, name): """ Looks up the given name in this module's namespace. @param name: the name of the token to look up in this module. @rtype: one of L{Variable}, L{function.Function}, L{Class}, L{PyCheckerModule}, or None """ if name in self.variables: return self.variables[name] elif name in self.functions: return self.functions[name] elif name in self.classes: return self.classes[name] elif name in self.modules: return self.modules[name] return None def getPCModule(moduleName, moduleDir=None): """ @type moduleName: str @param moduleDir: if specified, the directory where the module can be loaded from; allows discerning between modules with the same name in a different directory. Note that moduleDir can be the empty string, if the module being tested lives in the current working directory. @type moduleDir: str @rtype: L{pychecker.checker.PyCheckerModule} """ global __pcmodules return __pcmodules.get((moduleName, moduleDir), None) def getPCModules(): """ @rtype: list of L{pychecker.checker.PyCheckerModule} """ global __pcmodules return __pcmodules.values() def addPCModule(pcmodule): """ @type pcmodule: L{pychecker.checker.PyCheckerModule} """ global __pcmodules __pcmodules[(pcmodule.moduleName, pcmodule.moduleDir)] = pcmodule scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/CodeChecks.py0000644000175000017500000026536611242100540032550 0ustar andreasandreas# -*- Mode: Python; test-case-name: test.test_pychecker_CodeChecks -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2006, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Find warnings in byte code from Python source files. """ # For documentation about dispatcher arguments, look for # dispatcher functions for operands import keyword import string import types from pychecker import msgs from pychecker import utils from pychecker import Warning from pychecker import OP from pychecker import Stack from pychecker import python __pychecker__ = 'no-argsused' def cfg() : return utils.cfg() def getFunctionArgErr(funcName, argCount, minArgs, maxArgs): """ Check that the number of arguments given is correct according to the given minArgs and maxArgs. @type funcName: str @type argCount: int @ivar minArgs: the minimum number of arguments that should be passed to this function @type minArgs: int @ivar minArgs: the maximum number of arguments that should be passed to this function, or None in case of *args/unlimited @type maxArgs: int or None @rtype: L{msgs.WarningClass} or None """ err = None if maxArgs == None: if argCount < minArgs : err = msgs.INVALID_ARG_COUNT2 % (funcName, argCount, minArgs) elif argCount < minArgs or argCount > maxArgs: if minArgs == maxArgs: err = msgs.INVALID_ARG_COUNT1 % (funcName, argCount, minArgs) else: err = msgs.INVALID_ARG_COUNT3 % (funcName, argCount, minArgs, maxArgs) return err def _checkFunctionArgCount(code, func_name, argCount, minArgs, maxArgs, objectReference=0): """ @param objectReference: whether the first argument references self @type objectReference: int (used as bool) """ # there is an implied argument for object creation and self.xxx() # FIXME: this is where test44 fails if objectReference: minArgs = minArgs - 1 if maxArgs is not None: maxArgs = maxArgs - 1 err = getFunctionArgErr(func_name, argCount, minArgs, maxArgs) if err: code.addWarning(err) def _checkFunctionArgs(code, func, objectReference, argCount, kwArgs, checkArgCount=1): """ @param code: The code block containing the invocation of the function to be checked @type code: L{Code} @param func: The function to check the invocation against @type func: L{function.Function} @param objectReference: whether the first argument references self @type objectReference: int (used as bool) @param checkArgCount: whether the first argument references self @type checkArgCount: int (used as bool) """ func_name = func.function.func_code.co_name if kwArgs : args_len = func.function.func_code.co_argcount arg_names = func.function.func_code.co_varnames[argCount:args_len] if argCount < args_len and kwArgs[0] in arg_names: if cfg().namedArgs : code.addWarning(msgs.FUNC_USES_NAMED_ARGS % func_name) # convert the named args into regular params, and really check while argCount < args_len and kwArgs and kwArgs[0] in arg_names: argCount = argCount + 1 kwArgs = kwArgs[1:] _checkFunctionArgs(code, func, objectReference, argCount, kwArgs, checkArgCount) return if not func.supportsKW : code.addWarning(msgs.FUNC_DOESNT_SUPPORT_KW % func_name) if checkArgCount: _checkFunctionArgCount(code, func_name, argCount, func.minArgs, func.maxArgs, objectReference) def _getReferenceFromModule(module, identifier): """ Looks up the given identifier in the module. If it is a function, returns (function, None, 0) If it is a class instantiation, returns (__init__ function, class, 1) @type module: L{pychecker.checker.PyCheckerModule} @type identifier: str @returns: a triple of: - the function object (which can be the __init__ for the class) - the class, if the identifier references a class - 0 if it was a function, 1 if it was a class @rtype: triple of (function, class or None, int (as bool)) """ # if the identifier is in the list of module's functions, return # the function, with no class, and method 0 func = module.functions.get(identifier, None) if func is not None: return func, None, 0 # now look it up as a class instantiation c = module.classes.get(identifier, None) if c is not None : func = c.methods.get(utils.INIT, None) return func, c, 1 # not found as either return None, None, 0 def _getFunction(module, stackValue): # FIXME: it's not clear to me if the above method really returns # whether the stack value is a constructor """ Return (function, class, is_a_method) from the stack value @type module: L{pychecker.checker.PyCheckerModule} @type stackValue: L{Stack.Item} @rtype: tuple of (function or None, class or None, int (as bool)) """ identifier = stackValue.data if type(identifier) == types.StringType: return _getReferenceFromModule(module, identifier) # find the module this references i, maxLen = 0, len(identifier) while i < maxLen : name = utils.safestr(identifier[i]) if module.classes.has_key(name) or module.functions.has_key(name) : break refModule = module.modules.get(name, None) if refModule is not None : module = refModule else : return None, None, 0 i = i + 1 # if we got to the end, there is only modules, nothing we can do # we also can't handle if there is more than 2 items left if i >= maxLen or (i+2) < maxLen : return None, None, 0 if (i+1) == maxLen : return _getReferenceFromModule(module, identifier[-1]) # we can't handle self.x.y if (i+2) == maxLen and identifier[0] == cfg().methodArgName: return None, None, 0 c = module.classes.get(identifier[-2], None) if c is None : return None, None, 0 return c.methods.get(identifier[-1], None), c, 0 def _validateKwArgs(code, info, func_name, kwArgs): if len(info) < 4: code.addWarning(msgs.FUNC_DOESNT_SUPPORT_KW % func_name) elif not info[3]: return try: # info could be from a builtin method which means that # info[3] is not a list. dummy = info[3][0] except IndexError: return for arg in kwArgs: if arg not in info[3]: code.addWarning(msgs.FUNC_DOESNT_SUPPORT_KW_ARG % (func_name, arg)) def _checkBuiltin(code, loadValue, argCount, kwArgs, check_arg_count = 1) : returnValue = Stack.makeFuncReturnValue(loadValue, argCount) func_name = loadValue.data if loadValue.type == Stack.TYPE_GLOBAL : info = python.GLOBAL_FUNC_INFO.get(func_name, None) if info is not None : if func_name == 'input' and cfg().usesInput: code.addWarning(msgs.USES_INPUT) if cfg().constAttr and \ ((func_name == 'setattr' and argCount >= 2) or (func_name == 'getattr' and argCount == 2)): arg2 = code.stack[-argCount + 1] if arg2.const and not keyword.iskeyword(arg2.data): # lambda with setattr and const is a common way of setting # attributes, so allow it if code.func.function.func_name != '': code.addWarning(msgs.USES_CONST_ATTR % func_name) if kwArgs: _validateKwArgs(code, info, func_name, kwArgs) elif check_arg_count : _checkFunctionArgCount(code, func_name, argCount, info[1], info[2]) returnValue = Stack.Item(returnValue.data, info[0]) returnValue.setStringType(info[0]) elif type(func_name) == types.TupleType and len(func_name) <= 2 : objType = code.typeMap.get(utils.safestr(func_name[0]), []) if types.ListType in objType : try : if func_name[1] == 'append' and argCount > 1 : code.addWarning(msgs.LIST_APPEND_ARGS % func_name[0]) check_arg_count = 0 except AttributeError : # FIXME: why do we need to catch AttributeError??? pass if len(objType) == 1 : # if it's a builtin, check method builtinType = python.BUILTIN_METHODS.get(objType[0]) if builtinType is not None : methodInfo = builtinType.get(func_name[1]) # set func properly if kwArgs : _validateKwArgs(code, methodInfo, func_name[1], kwArgs) elif methodInfo : returnValue = Stack.Item(func_name[1], methodInfo[0]) returnValue.setStringType(methodInfo[0]) if check_arg_count and methodInfo is not None : _checkFunctionArgCount(code, func_name[1], argCount, methodInfo[1], methodInfo[2]) return returnValue _IMMUTABLE_LIST_METHODS = ('count', 'index',) _IMMUTABLE_DICT_METHODS = ('copy', 'get', 'has_key', 'items', 'keys', 'values', 'iteritems', 'iterkeys', 'itervalues') def _checkModifyDefaultArg(code, objectName, methodName=None) : try : value = code.func.defaultValue(objectName) objectType = type(value) if objectType in python.MUTABLE_TYPES : if objectType == types.DictType and \ methodName in _IMMUTABLE_DICT_METHODS : return if objectType == types.ListType and \ methodName in _IMMUTABLE_LIST_METHODS : return code.addWarning(msgs.MODIFYING_DEFAULT_ARG % objectName) except ValueError : pass def _isexception(object) : # FIXME: i have no idea why this function is necessary # it seems that the issubclass() should work, but it doesn't always if hasattr(object, 'type'): if object.type == types.TupleType: # if we have a tuple, we can't check the contents (not enough info) ## for item in object.value: ## if not _isexception(item): ## return 0 return 1 try: # try/except is necessary for globals like NotImplemented if issubclass(object, Exception) : return 1 # Python 2.5 added a BaseException to the hierarchy. That's # really what we need to check if it exists. if utils.pythonVersion() >= utils.PYTHON_2_5: if issubclass(object, BaseException): return 1 except TypeError: return 0 for c in object.__bases__ : if utils.startswith(utils.safestr(c), 'exceptions.') : return 1 if len(c.__bases__) > 0 and _isexception(c) : return 1 return 0 def _checkStringFind(code, loadValue): if len(loadValue.data) == 2 and loadValue.data[1] == 'find': try: if types.StringType in code.typeMap.get(loadValue.data[0], []): op = code.nextOpInfo()[0] if OP.IS_CONDITIONAL_JUMP(op) or OP.IS_NOT(op): code.addWarning(msgs.BAD_STRING_FIND) except TypeError: # we don't care if loadValue.data[0] is not hashable pass def _checkAbstract(refClass, code, name): name_list = refClass.isAbstract() if name_list: name_list.sort() names = string.join(name_list, ", ") code.addWarning(msgs.METHODS_NEED_OVERRIDE % (names, name)) _SEQUENCE_TYPES = (types.TupleType, types.ListType, types.StringType) try: _SEQUENCE_TYPES = _SEQUENCE_TYPES + (types.UnicodeType,) except AttributeError: pass # FIXME: this is not complete. errors will be caught only sometimes, # depending on the order the functions/methods are processed # in the dict. Need to be able to run through all functions # twice, but because the code sucks, this is not possible. def _checkReturnValueUse(code, func): if func.returnValues is None: return err = None opInfo = code.nextOpInfo() if func.returnsNoValue(): # make sure we really know how to check for all the return types for rv in func.returnValues: if rv[1].type in _UNCHECKABLE_STACK_TYPES: return if not OP.POP_TOP(opInfo[0]): err = msgs.USING_NONE_RETURN_VALUE % utils.safestr(func) elif OP.UNPACK_SEQUENCE(opInfo[0]): # verify unpacking into proper # of vars varCount = opInfo[1] stackRV = func.returnValues[0][1] returnType = stackRV.getType({}) funcCount = stackRV.length if returnType in _SEQUENCE_TYPES: if varCount != funcCount and funcCount > 0: err = msgs.WRONG_UNPACK_FUNCTION % (utils.safestr(func), funcCount, varCount) elif returnType not in _UNCHECKABLE_STACK_TYPES: err = msgs.UNPACK_NON_SEQUENCE % (utils.safestr(func), _getTypeStr(returnType)) if err: code.addWarning(err) def _handleFunctionCall(codeSource, code, argCount, indexOffset = 0, check_arg_count = 1) : 'Checks for warnings, returns function called (may be None)' if not code.stack : return kwArgCount = argCount >> utils.VAR_ARGS_BITS argCount = argCount & utils.MAX_ARGS_MASK # function call on stack is before the args, and keyword args funcIndex = argCount + 2 * kwArgCount + 1 + indexOffset if funcIndex > len(code.stack) : funcIndex = 0 # to find on stack, we have to look backwards from top of stack (end) funcIndex = -funcIndex # store the keyword names/keys to check if using named arguments kwArgs = [] if kwArgCount > 0 : # loop backwards by 2 (keyword, value) in stack to find keyword args for i in range(-2 - indexOffset, (-2 * kwArgCount - 1), -2) : kwArgs.append(code.stack[i].data) kwArgs.reverse() loadValue = code.stack[funcIndex] funcName = loadValue.getName() returnValue = Stack.makeFuncReturnValue(loadValue, argCount) if loadValue.isMethodCall(codeSource.classObject, cfg().methodArgName): methodName = loadValue.data[1] try : m = codeSource.classObject.methods[methodName] if m != None : objRef = not m.isStaticMethod() _checkFunctionArgs(code, m, objRef, argCount, kwArgs, check_arg_count) except KeyError : sattr = codeSource.classObject.statics.get(methodName) if sattr is not None : funcName = sattr.getName() if sattr is None and cfg().callingAttribute : code.addWarning(msgs.INVALID_METHOD % methodName) elif loadValue.type in (Stack.TYPE_ATTRIBUTE, Stack.TYPE_GLOBAL) and \ type(loadValue.data) in (types.StringType, types.TupleType) : # apply(func, (args)), can't check # of args, so just return func if loadValue.data == 'apply' : loadValue = code.stack[funcIndex+1] funcName = loadValue.getName() else : if cfg().modifyDefaultValue and \ type(loadValue.data) == types.TupleType : _checkModifyDefaultArg(code, loadValue.data[0], loadValue.data[1]) func, refClass, method = _getFunction(codeSource.module, loadValue) if func == None and type(loadValue.data) == types.TupleType and \ len(loadValue.data) == 2 : # looks like we are making a method call data = loadValue.data if type(data[0]) == types.StringType : # do we know the type of the local variable? varType = code.typeMap.get(data[0]) if varType is not None and len(varType) == 1 : if hasattr(varType[0], 'methods') : # it's a class & we know the type, get the method func = varType[0].methods.get(data[1]) if func is not None : method = 1 if cfg().abstractClasses and refClass and method: _checkAbstract(refClass, code, funcName) if cfg().stringFind: _checkStringFind(code, loadValue) if func != None : if refClass and func.isClassMethod(): argCount = argCount + 1 _checkFunctionArgs(code, func, method, argCount, kwArgs, check_arg_count) # if this isn't a c'tor, we should check if not (refClass and method) and cfg().checkReturnValues: _checkReturnValueUse(code, func) if refClass : if method : # c'tor, return the class as the type returnValue = Stack.Item(loadValue, refClass) elif func.isClassMethod(): # FIXME: do anything here? pass elif argCount > 0 and cfg().methodArgName and \ not func.isStaticMethod() and \ code.stack[funcIndex].type == Stack.TYPE_ATTRIBUTE and \ code.stack[funcIndex+1].data != cfg().methodArgName: e = msgs.SELF_NOT_FIRST_ARG % (cfg().methodArgName, '') code.addWarning(e) elif refClass and method : returnValue = Stack.Item(loadValue, refClass) if (argCount > 0 or len(kwArgs) > 0) and \ not refClass.ignoreAttrs and \ not refClass.methods.has_key(utils.INIT) and \ not _isexception(refClass.classObject) : code.addWarning(msgs.NO_CTOR_ARGS) else : returnValue = _checkBuiltin(code, loadValue, argCount, kwArgs, check_arg_count) if returnValue.type is types.NoneType and \ not OP.POP_TOP(code.nextOpInfo()[0]) : name = utils.safestr(loadValue.data) if type(loadValue.data) == types.TupleType : name = string.join(loadValue.data, '.') # lambda with setattr is a common way of setting # attributes, so allow it if name != 'setattr' \ or code.func.function.func_name != '': code.addWarning(msgs.USING_NONE_RETURN_VALUE % name) code.stack = code.stack[:funcIndex] + [ returnValue ] code.functionsCalled[funcName] = loadValue def _classHasAttribute(c, attr) : return (c.methods.has_key(attr) or c.members.has_key(attr) or hasattr(c.classObject, attr)) def _checkClassAttribute(attr, c, code) : if _classHasAttribute(c, attr) : try : del c.memberRefs[attr] except KeyError : pass elif cfg().classAttrExists : if attr not in cfg().missingAttrs: code.addWarning(msgs.INVALID_CLASS_ATTR % attr) def _checkModuleAttribute(attr, module, code, ref) : try: if attr not in module.modules[ref].attributes and \ not utils.endswith(ref, '.' + attr) : code.addWarning(msgs.INVALID_MODULE_ATTR % attr) except (KeyError, TypeError): # if ref isn't found, or ref isn't even hashable, we don't care # we may not know, or ref could be something funky [e for e].method() pass try: _checkClassAttribute(attr, module.classes[ref], code) except (KeyError, TypeError): # if ref isn't found, or ref isn't even hashable, we don't care # we may not know, or ref could be something funky [e for e].method() pass def _getGlobalName(name, func) : # get the right name of global refs (for from XXX import YYY) opModule = func.function.func_globals.get(name) try : if opModule and isinstance(opModule, types.ModuleType) : name = opModule.__name__ except : # we have to do this in case the class raises an access exception # due to overriding __special__() methods pass return name def _checkNoEffect(code, ignoreStmtWithNoEffect=0): if (not ignoreStmtWithNoEffect and OP.POP_TOP(code.nextOpInfo()[0]) and cfg().noEffect): code.addWarning(msgs.POSSIBLE_STMT_WITH_NO_EFFECT) def _makeConstant(code, index, factoryFunction) : """ Build a constant on the stack ((), [], or {}) @param index: how many items the constant will consume from the stack @param factoryFunction: the factory function from L{pychecker.Stack} to use when creating the actual constant """ if index > 0 : # replace the bottom of the stack with the result of applying the # factory function to it code.stack[-index:] = [ factoryFunction(code.stack[-index:]) ] _checkNoEffect(code) else : code.pushStack(factoryFunction()) def _hasGlobal(operand, module, func, main) : # returns whether we have a global with the operand's name, because of: # - being in the function's global list # - main being set to 1 # - being in the module's list of global operands # - being a builtin return (func.function.func_globals.has_key(operand) or main or module.moduleLineNums.has_key(operand) or __builtins__.has_key(operand)) def _checkGlobal(operand, module, func, code, err, main = 0) : # if the given operand is not in the global namespace, add the given err if not _hasGlobal(operand, module, func, main) : code.addWarning(err % operand) if not cfg().reportAllGlobals : func.function.func_globals[operand] = operand def _handleComparison(stack, operand) : num_ops = 2 if operand == 'exception match': num_ops = 1 si = min(len(stack), num_ops) compareValues = stack[-si:] for _ in range(si, 2) : compareValues.append(Stack.Item(None, None)) stack[-si:] = [ Stack.makeComparison(compareValues, operand) ] return compareValues # FIXME: this code needs to be vetted; star imports should actually # import all the names from the module and put them in the new module # namespace so we detect collisions def _handleImport(code, operand, module, main, fromName): """ @param code: the code block in which the import is happening @type code: L{Code} @param operand: what is being imported (the module name in case of normal import, or the object names in the module in case of from ... import names/*) @type operand: str @param module: the module in which the import is happening @type module: L{pychecker.checker.PyCheckerModule} @param main: whether the import is in the source's global namespace (__main__) @type main: int (treated as bool) @param fromName: the name that's being imported @type fromName: str """ assert type(operand) is str # FIXME: this function should be refactored/cleaned up key = operand tmpOperand = tmpFromName = operand if fromName is not None : tmpOperand = tmpFromName = fromName key = (fromName, operand) if cfg().deprecated: try: undeprecated = python.DEPRECATED_MODULES[tmpFromName] except KeyError: pass else: msg = msgs.USING_DEPRECATED_MODULE % tmpFromName if undeprecated: msg.data = msg.data + msgs.USE_INSTEAD % undeprecated code.addWarning(msg) if cfg().reimportSelf and tmpOperand == module.module.__name__ : code.addWarning(msgs.IMPORT_SELF % tmpOperand) modline1 = module.moduleLineNums.get(tmpOperand, None) modline2 = module.moduleLineNums.get((tmpFromName, '*'), None) key2 = (tmpFromName,) if fromName is not None and operand != '*' : key2 = (tmpFromName, operand) modline3 = module.moduleLineNums.get(key2, None) if modline1 is not None or modline2 is not None or modline3 is not None : err = None if fromName is None : if modline1 is not None : err = msgs.MODULE_IMPORTED_AGAIN % operand elif cfg().mixImport : err = msgs.MIX_IMPORT_AND_FROM_IMPORT % tmpFromName else : if modline3 is not None and operand != '*' : err = 'from %s import %s' % (tmpFromName, operand) err = msgs.MODULE_MEMBER_IMPORTED_AGAIN % err elif modline1 is not None : if cfg().mixImport and code.getLineNum() != modline1[1] : err = msgs.MIX_IMPORT_AND_FROM_IMPORT % tmpFromName else : err = msgs.MODULE_MEMBER_ALSO_STAR_IMPORTED % fromName # filter out warnings when files are different (ie, from X import ...) if err is not None and cfg().moduleImportErrors : codeBytes = module.mainCode if codeBytes is None or \ codeBytes.function.func_code.co_filename == code.func_code.co_filename : code.addWarning(err) if main : fileline = (code.func_code.co_filename, code.getLineNum()) module.moduleLineNums[key] = fileline if fromName is not None : module.moduleLineNums[(fromName,)] = fileline def _handleImportFrom(code, operand, module, main): """ @type code: L{Code} @param operand: what is being imported; can be * for star imports @param main: whether the import is in the source's global namespace (__main__) @type main: int (treated as bool) """ # previous opcode is IMPORT_NAME fromName = code.stack[-1].data if utils.pythonVersion() < utils.PYTHON_2_0 and \ OP.POP_TOP(code.nextOpInfo()[0]): code.popNextOp() # FIXME: thomas: why are we pushing the operand, which represents what # we import, not where we import from ? code.pushStack(Stack.Item(operand, types.ModuleType)) _handleImport(code, operand, module, main, fromName) # http://www.python.org/doc/current/lib/typesseq-strings.html _FORMAT_CONVERTERS = 'diouxXeEfFgGcrs' # NOTE: lLh are legal in the flags, but are ignored by python, we warn _FORMAT_FLAGS = '*#- +.' + string.digits def _getFormatInfo(formatString, code) : variables = [] # first get rid of all the instances of %% in the string, they don't count formatString = string.replace(formatString, "%%", "") sections = string.split(formatString, '%') percentFormatCount = formatCount = string.count(formatString, '%') mappingFormatCount = 0 # skip the first item in the list, it's always empty for section in sections[1:] : orig_section = section if not section: w = msgs.INVALID_FORMAT % orig_section w.data = w.data + ' (end of format string)' code.addWarning(w) continue # handle dictionary formats if section[0] == '(' : mappingFormatCount = mappingFormatCount + 1 varname = string.split(section, ')') if varname[1] == '' : code.addWarning(msgs.INVALID_FORMAT % section) variables.append(varname[0][1:]) section = varname[1] if not section : # no format data to check continue # FIXME: we ought to just define a regular expression to check # formatRE = '[ #+-]*([0-9]*|*)(|.(|*|[0-9]*)[diouxXeEfFgGcrs].*' stars = 0 for i in range(0, len(section)) : if section[i] in _FORMAT_CONVERTERS : break if section[i] in _FORMAT_FLAGS : if section[i] == '*' : stars = stars + 1 if mappingFormatCount > 0 : code.addWarning(msgs.USING_STAR_IN_FORMAT_MAPPING % section) if stars > 2 : code.addWarning(msgs.TOO_MANY_STARS_IN_FORMAT) formatCount = formatCount + stars if section[i] not in _FORMAT_CONVERTERS : code.addWarning(msgs.INVALID_FORMAT % orig_section) if mappingFormatCount > 0 and mappingFormatCount != percentFormatCount : code.addWarning(msgs.CANT_MIX_MAPPING_IN_FORMATS) return formatCount, variables def _getConstant(code, module, data) : data = utils.safestr(data.data) formatString = code.constants.get(data) if formatString is not None : return formatString formatString = module.variables.get(data) if formatString is not None and formatString.value is not None : return formatString.value return None _UNCHECKABLE_FORMAT_STACK_TYPES = \ (Stack.TYPE_UNKNOWN, Stack.TYPE_FUNC_RETURN, Stack.TYPE_ATTRIBUTE, Stack.TYPE_GLOBAL, Stack.TYPE_EXCEPT) _UNCHECKABLE_STACK_TYPES = _UNCHECKABLE_FORMAT_STACK_TYPES + (types.NoneType,) def _getFormatString(code, codeSource) : if len(code.stack) <= 1 : return '' formatString = code.stack[-2] if formatString.type != types.StringType or not formatString.const : formatString = _getConstant(code, codeSource.module, formatString) if formatString is None or type(formatString) != types.StringType : return '' return formatString return formatString.data def _getFormatWarnings(code, codeSource) : formatString = _getFormatString(code, codeSource) if not formatString : return args = 0 count, variables = _getFormatInfo(formatString, code) topOfStack = code.stack[-1] if topOfStack.isLocals() : for varname in variables : if not code.unusedLocals.has_key(varname) : code.addWarning(msgs.NO_LOCAL_VAR % varname) else : code.unusedLocals[varname] = None else : stackItemType = topOfStack.getType(code.typeMap) if ((stackItemType == types.DictType and len(variables) > 0) or codeSource.func.isParam(topOfStack.data) or stackItemType in _UNCHECKABLE_FORMAT_STACK_TYPES) : return if topOfStack.type == types.TupleType : args = topOfStack.length elif stackItemType == types.TupleType : args = len(code.constants.get(topOfStack.data, (0,))) else : args = 1 if args and count != args : code.addWarning(msgs.INVALID_FORMAT_COUNT % (count, args)) def _checkAttributeType(code, stackValue, attr) : """ @type code: {Code} @type stackValue: {Stack.Item} @type attr: str """ if not cfg().checkObjectAttrs: return varTypes = code.typeMap.get(utils.safestr(stackValue.data), None) if not varTypes: return # the value may have been converted on stack (`v`) otherTypes = [] if stackValue.type not in varTypes: otherTypes = [stackValue.type] for varType in varTypes + otherTypes: # ignore built-in types that have no attributes if python.METHODLESS_OBJECTS.has_key(varType): continue attrs = python.BUILTIN_ATTRS.get(varType, None) if attrs is not None: if attr in attrs: return continue if hasattr(varType, 'ignoreAttrs') : if varType.ignoreAttrs or _classHasAttribute(varType, attr) : return elif not hasattr(varType, 'attributes') or attr in varType.attributes : return code.addWarning(msgs.OBJECT_HAS_NO_ATTR % (stackValue.data, attr)) def _getTypeStr(t): returnStr = utils.safestr(t) strs = string.split(returnStr, "'") try: if len(strs) == 3: returnStr = strs[-2] except IndexError: pass return returnStr def _getLineNum(co, instr_index): co_lnotab = co.co_lnotab lineno = co.co_firstlineno addr = 0 for lnotab_index in range(0, len(co_lnotab), 2): addr = addr + ord(co_lnotab[lnotab_index]) if addr > instr_index: return lineno lineno = lineno + ord(co_lnotab[lnotab_index+1]) return lineno class Code : """ Hold all the code state information necessary to find warnings. @ivar bytes: the raw bytecode for this code object @type bytes: str @ivar func_code: the function code object @type func_code: L{types.CodeType} @ivar index: index into bytes for the current instruction @type index: int @ivar extended_arg: extended argument for the current instruction @type extended_arg: int @ivar maxCode: length of bytes @type maxCode: int @ivar stack: @type stack: list of L{Stack.Item} @ivar warnings: list of warnings @type warnings: list of L{pychecker.Warning.Warning} @ivar returnValues: tuple of (line number, stack item, index to next instruction) @type returnValues: tuple of (int, L{Stack.Item}, int) @ivar typeMap: dict of token name -> list of wrapped types; type can also be string defined in L{Stack} with TYPE_ @type typeMap: dict of str -> list of str or L{pcmodules.Class} @ivar codeObjects: dict of name/anonymous index -> code @type codeObjects: dict of str/int -> L{types.CodeType} @ivar codeOrder: ordered list of when the given key was added to codeObjects @type codeOrder: list of str/int """ # opcodes are either 1 byte (no argument) or 3 bytes (with argument) long # opcode can be EXTENDED_ARGS which then accumulates to the previous arg # to span values > 64K def __init__(self) : self.bytes = None self.func = None self.func_code = None self.index = 0 self.indexList = [] self.extended_arg = 0 self.lastLineNum = 0 self.maxCode = 0 self.has_except = 0 self.try_finally_first = 0 self.starts_and_ends_with_finally = 0 self.returnValues = [] self.raiseValues = [] self.stack = [] self.unpackCount = 0 self.loops = 0 self.branches = {} self.warnings = [] self.globalRefs = {} self.unusedLocals = {} self.deletedLocals = {} self.functionsCalled = {} self.typeMap = {} self.constants = {} self.codeObjects = {} self.codeOrder = [] def init(self, func) : self.func = func self.func_code, self.bytes, self.index, self.maxCode, self.extended_arg = \ OP.initFuncCode(func.function) self.lastLineNum = self.func_code.co_firstlineno self.returnValues = [] # initialize the arguments to unused for arg in func.arguments() : self.unusedLocals[arg] = 0 self.typeMap[arg] = [ Stack.TYPE_UNKNOWN ] def getLineNum(self): line = self.lastLineNum # if we don't have linenum info, calc it from co_lntab & index if line == self.func_code.co_firstlineno: # FIXME: this could be optimized, if we kept last line info line = _getLineNum(self.func_code, self.index - 1) return line def getWarning(self, err, line = None) : """ @type err: L{msgs.WarningClass} """ if line is None : line = self.getLineNum() return Warning.Warning(self.func_code, line, err) def addWarning(self, err, line = None) : """ @type line: int or L{types.CodeType} or None @type err: L{Warning.Warning} or L{msgs.WarningClass} """ w = err if not isinstance(w, Warning.Warning): w = self.getWarning(err, line) utils.debug('adding warning: %s', w.format()) self.warnings.append(w) def popNextOp(self) : """ Pops the next bytecode instruction from the code object for processing. The opcode and oparg are integers coming from the byte code. The operand is the object referenced by the oparg, from the respective array (co_consts, co_names, co_varnames) Changes L{index} and L{extended_arg} to point to the next operation. @returns: tuple of (opcode, oparg, operand) @rtype: tuple of (int, int, object) """ self.indexList.append(self.index) info = OP.getInfo(self.bytes, self.index, self.extended_arg) op, oparg, self.index, self.extended_arg = info if op < OP.HAVE_ARGUMENT : utils.debug("DIS %d %s" % (self.indexList[-1], OP.name[op])) operand = None else : operand = OP.getOperand(op, self.func_code, oparg) self.label = label = OP.getLabel(op, oparg, self.index) utils.debug("DIS %d %s" % (self.indexList[-1], OP.name[op]), oparg, operand) if label != None : self.addBranch(label) return op, oparg, operand def nextOpInfo(self, offset = 0) : """ Peeks ahead at the next instruction. @returns: tuple of (opcode, oparg, index) or (-1, 0, -1) if no next @rtype: tuple of (int, int, int) """ try : return OP.getInfo(self.bytes, self.index + offset, 0)[0:3] except IndexError : return -1, 0, -1 def getFirstOp(self) : # find the first real op, maybe we should not check if params are used i = extended_arg = 0 while i < self.maxCode : op, oparg, i, extended_arg = OP.getInfo(self.bytes, i, extended_arg) if not OP.LINE_NUM(op) : if not (OP.LOAD_CONST(op) or OP.LOAD_GLOBAL(op)) : return op raise RuntimeError('Could not find first opcode in function') def pushStack(self, item, ignoreStmtWithNoEffect=0): self.stack.append(item) _checkNoEffect(self, ignoreStmtWithNoEffect) def popStack(self) : if self.stack : del self.stack[-1] def popStackItems(self, count) : stackLen = len(self.stack) if stackLen > 0 : count = min(count, stackLen) del self.stack[-count:] def unpack(self) : if self.unpackCount : self.unpackCount = self.unpackCount - 1 else : self.popStack() def __getStringStackType(self, data) : try : return data.getType({}) except AttributeError : return Stack.TYPE_UNKNOWN def __getStackType(self) : if not self.stack : return Stack.TYPE_UNKNOWN if not self.unpackCount : return self.__getStringStackType(self.stack[-1]) data = self.stack[-1].data if type(data) == types.TupleType : try : return self.__getStringStackType(data[len(data)-self.unpackCount]) except IndexError : # happens when unpacking a var for which we don't know the size pass return Stack.TYPE_UNKNOWN def setType(self, name) : valueList = self.typeMap.get(name, []) newType = self.__getStackType() # longs are being merged with ints, assume they are the same # comparisons are really ints anyways if newType in (types.LongType, Stack.TYPE_COMPARISON): newType = types.IntType if newType not in valueList : valueList.append(newType) # need to ignore various types (Unknown, Func return values, etc) # also ignore None, don't care if they use it and a real type if valueList and newType not in _UNCHECKABLE_STACK_TYPES and \ cfg().inconsistentTypes: oldTypes = [] # only add types to the value list that are "interesting" for typeToAdd in valueList: if typeToAdd not in _UNCHECKABLE_STACK_TYPES and \ typeToAdd != newType: oldTypes.append(_getTypeStr(typeToAdd)) # do we have any "interesting" old types? if so, warn if oldTypes: self.addWarning(msgs.INCONSISTENT_TYPE % \ (name, oldTypes, _getTypeStr(newType))) self.typeMap[name] = valueList def addReturn(self) : if len(self.stack) > 0 : value = (self.getLineNum(), self.stack[-1], self.nextOpInfo()[2]) self.returnValues.append(value) self.popStack() def addRaise(self) : self.raiseValues.append((self.getLineNum(), None, self.nextOpInfo()[2])) def addBranch(self, label) : if label is not None : self.branches[label] = self.branches.get(label, 0) + 1 def removeBranch(self, label) : branch = self.branches.get(label, None) if branch is not None : if branch == 1 : del self.branches[label] else : self.branches[label] = branch - 1 def remove_unreachable_code(self, label) : if len(self.indexList) >= 2 : index = self.indexList[-2] if index >= 0 and OP.POP_BLOCK(ord(self.bytes[index])) : index = self.indexList[-3] if index >= 0 : op = ord(self.bytes[index]) if OP.RETURN_VALUE(op) or OP.RAISE_VARARGS(op) or \ OP.END_FINALLY(ord(self.bytes[label-1])) : self.removeBranch(label) def updateCheckerArgs(self, operand) : """ If the operand is a __pychecker__ argument string, update the checker arguments for this Code object. @rtype: bool @returns: whether the checker arguments were updated. """ rc = utils.shouldUpdateArgs(operand) if rc : # pass the location of the __pychecker__ arguments utils.updateCheckerArgs(self.stack[-1].data, self.func_code, self.getLineNum(), self.warnings) return rc def updateModuleLineNums(self, module, operand) : """ @type module: L{pychecker.checker.PyCheckerModule} """ filelist = (self.func_code.co_filename, self.getLineNum()) module.moduleLineNums[operand] = filelist def addCodeObject(self, key, code): """ Add the given code object, maintaining order of addition. @param key: the key to be used for storing in self.codeObjects @type key: str or int @param code: the code to be stored @type code: L{types.CodeType} """ self.codeObjects[key] = code self.codeOrder.append(key) class CodeSource: """ Holds source information about a code block (module, class, func, etc) @ivar module: module the source is for @type module: L{pychecker.checker.PyCheckerModule} @ivar func: function the source is for @type func: L{pychecker.function.Function} @ivar classObject: the class object, if applicable @type classObject: L{pychecker.checker.Class} or None @ivar main: whether this code block is in the source's global namespace (__main__) @type main: int (used as bool) @ivar in_class: whether this code block is inside a class scope @type in_class: int (used as bool) @ivar calling_code: list of functions that call this source @type calling_code: list of callable """ def __init__(self, module, func, c, main, in_class, code): self.module = module self.func = func self.classObject = c self.main = main self.in_class = in_class self.code = code self.calling_code = [] def _checkException(code, name) : if code.stack and code.stack[-1].type == Stack.TYPE_EXCEPT : if __builtins__.has_key(name) : code.addWarning(msgs.SET_EXCEPT_TO_BUILTIN % name) def _checkAssign(code, name): if name in _BAD_ASSIGN_NAMES: code.addWarning(msgs.SHOULDNT_ASSIGN_BUILTIN % name) else: cap = string.capitalize(name) if cap in _BAD_ASSIGN_NAMES: code.addWarning(msgs.SHOULDNT_ASSIGN_NAME % (name, cap)) def _checkVariableOperationOnItself(code, lname, msg): if code.stack and code.stack[-1].getName() == lname: code.addWarning(msg % lname) # checks if the given varname is a known future keyword, and warn if so def _checkFutureKeywords(code, varname) : kw = python.FUTURE_KEYWORDS.get(varname) if kw is not None : code.addWarning(msgs.USING_KEYWORD % (varname, kw)) ### dispatcher functions for operands # All these functions have the following documentation: # @type oparg: int # @param oparg: # @type operand: object # @param operand: # @param codeSource: # @type codeSource: L{CodeSource} # @param code: # @type code: L{Code} # Implements name = TOS. namei is the index of name in the attribute co_names # of the code object. The compiler tries to use STORE_FAST or STORE_GLOBAL if # possible. def _STORE_NAME(oparg, operand, codeSource, code) : if not code.updateCheckerArgs(operand) : module = codeSource.module # not a __pychecker__ operand, so continue checking _checkFutureKeywords(code, operand) if not codeSource.in_class : _checkShadowBuiltin(code, operand) # complain if the code is called and declares global on an # undefined name if not codeSource.calling_code : _checkGlobal(operand, module, codeSource.func, code, msgs.GLOBAL_DEFINED_NOT_DECLARED, codeSource.main) else : # we're in a class if code.stack : codeSource.classObject.statics[operand] = code.stack[-1] codeSource.classObject.lineNums[operand] = code.getLineNum() var = module.variables.get(operand) if var is not None and code.stack and code.stack[-1].const : var.value = code.stack[-1].data if code.unpackCount : code.unpackCount = code.unpackCount - 1 else: _checkAssign(code, operand) _checkException(code, operand) code.popStack() if not module.moduleLineNums.has_key(operand) and codeSource.main : code.updateModuleLineNums(module, operand) _STORE_GLOBAL = _STORE_NAME def _checkLoadGlobal(codeSource, code, varname) : _checkFutureKeywords(code, varname) should_check = 1 if code.func_code.co_name == utils.LAMBDA : # this could really be a local reference, check first if not codeSource.main and codeSource.calling_code: func = getattr(codeSource.calling_code[-1], 'function', None) if func is not None and varname in func.func_code.co_varnames : _handleLoadLocal(code, codeSource, varname) should_check = 0 if should_check : # if a global var starts w/__ and the global is referenced in a class # we have to strip off the _class-name, to get the original name if codeSource.classObject and \ utils.startswith(varname, '_' + codeSource.classObject.name + '__'): varname = varname[len(codeSource.classObject.name)+1:] # make sure we remember each global ref to check for unused code.globalRefs[_getGlobalName(varname, codeSource.func)] = varname if not codeSource.in_class : _checkGlobal(varname, codeSource.module, codeSource.func, code, msgs.INVALID_GLOBAL) def _LOAD_NAME(oparg, operand, codeSource, code) : _checkLoadGlobal(codeSource, code, operand) # if there was from XXX import *, _* names aren't imported if codeSource.module.modules.has_key(operand) and \ hasattr(codeSource.module.module, operand) : operand = getattr(codeSource.module.module, operand).__name__ opType, const = Stack.TYPE_GLOBAL, 0 if operand == 'None' : opType, const = types.NoneType, 0 elif operand == 'Ellipsis' : opType, const = types.EllipsisType, 1 code.pushStack(Stack.Item(operand, opType, const)) _LOAD_GLOBAL = _LOAD_NAME def _LOAD_DEREF(oparg, operand, codeSource, code) : if type(oparg) == types.IntType : func_code = code.func_code try: argname = func_code.co_cellvars[oparg] except IndexError: argname = func_code.co_freevars[oparg - len(func_code.co_cellvars)] code.pushStack(Stack.Item(argname, types.StringType)) if code.func_code.co_name != utils.LAMBDA : code.unusedLocals[argname] = None else : _LOAD_GLOBAL(oparg, operand, codeSource, code) _LOAD_CLOSURE = _LOAD_DEREF # Implements del name, where namei is the index into co_names attribute of the # code object. def _DELETE_NAME(oparg, operand, codeSource, code) : _checkLoadGlobal(codeSource, code, operand) # FIXME: handle deleting global multiple times _DELETE_GLOBAL = _DELETE_NAME def _make_const(value): if type(value) == types.TupleType: return Stack.makeTuple(map(_make_const, value)) return Stack.Item(value, type(value), 1) def _LOAD_CONST(oparg, operand, codeSource, code): code.pushStack(_make_const(operand)) # add code objects to code.codeObjects if type(operand) == types.CodeType: name = operand.co_name obj = code.codeObjects.get(name, None) if name in (utils.LAMBDA, utils.GENEXP, utils.GENEXP25): # use a unique key, so we can have multiple lambdas if code.index in code.codeObjects: msg = "LOAD_CONST: code.index %d is already in codeObjects" \ % code.index code.addWarning(msgs.CHECKER_BROKEN % msg) code.addCodeObject(code.index, operand) elif obj is None: code.addCodeObject(name, operand) elif cfg().redefiningFunction: code.addWarning(msgs.REDEFINING_ATTR % (name, obj.co_firstlineno)) def _checkLocalShadow(code, module, varname) : # FIXME: why is this only for variables, not for classes/functions ? if module.variables.has_key(varname) and cfg().shadows : line = module.moduleLineNums.get(varname, ('', 0)) w = code.getWarning(msgs.LOCAL_SHADOWS_GLOBAL % (varname, line[1])) if line[0] != w.file: w.err = '%s in file %s' % (w.err, line[0]) code.addWarning(w) def _checkShadowBuiltin(code, varname) : # Check if the given variable name shadows a builtin if __builtins__.has_key(varname) and varname[0] != '_' and \ cfg().shadowBuiltins: code.addWarning(msgs.VARIABLE_SHADOWS_BUILTIN % varname) def _checkLoadLocal(code, codeSource, varname, deletedWarn, usedBeforeSetWarn) : _checkFutureKeywords(code, varname) deletedLine = code.deletedLocals.get(varname) if deletedLine : code.addWarning(deletedWarn % (varname, deletedLine)) elif not code.unusedLocals.has_key(varname) and \ not codeSource.func.isParam(varname) : code.addWarning(usedBeforeSetWarn % varname) code.unusedLocals[varname] = None _checkLocalShadow(code, codeSource.module, varname) def _handleLoadLocal(code, codeSource, varname) : _checkLoadLocal(code, codeSource, varname, msgs.LOCAL_DELETED, msgs.VAR_USED_BEFORE_SET) def _LOAD_FAST(oparg, operand, codeSource, code) : code.pushStack(Stack.Item(operand, type(operand))) _handleLoadLocal(code, codeSource, operand) def _STORE_FAST(oparg, operand, codeSource, code) : if not code.updateCheckerArgs(operand) : # not a __pychecker__ operand, so continue checking _checkFutureKeywords(code, operand) if code.stack and code.stack[-1].type == types.StringType and \ not code.stack[-1].const: _checkVariableOperationOnItself(code, operand, msgs.SET_VAR_TO_ITSELF) code.setType(operand) if not code.unpackCount and code.stack and \ (code.stack[-1].const or code.stack[-1].type == types.TupleType) : if code.constants.has_key(operand) : del code.constants[operand] else : code.constants[operand] = code.stack[-1].data _checkLocalShadow(code, codeSource.module, operand) _checkShadowBuiltin(code, operand) _checkAssign(code, operand) _checkException(code, operand) if code.deletedLocals.has_key(operand) : del code.deletedLocals[operand] if not code.unusedLocals.has_key(operand) : errLine = code.getLineNum() if code.unpackCount and not cfg().unusedLocalTuple : errLine = -errLine code.unusedLocals[operand] = errLine code.unpack() def _DELETE_FAST(oparg, operand, codeSource, code) : _checkLoadLocal(code, codeSource, operand, msgs.LOCAL_ALREADY_DELETED, msgs.VAR_DELETED_BEFORE_SET) code.deletedLocals[operand] = code.getLineNum() def _checkAttribute(top, operand, codeSource, code) : if top.data == cfg().methodArgName and codeSource.classObject != None : _checkClassAttribute(operand, codeSource.classObject, code) elif type(top.type) == types.StringType or top.type == types.ModuleType : _checkModuleAttribute(operand, codeSource.module, code, top.data) else : _checkAttributeType(code, top, operand) def _checkExcessiveReferences(code, top, extraAttr = None) : if cfg().maxReferences <= 0 : return try : data = top.data if extraAttr is not None : data = data + (extraAttr,) maxReferences = cfg().maxReferences if data[0] == cfg().methodArgName: maxReferences = maxReferences + 1 if len(data) > maxReferences : name = string.join(top.data, '.') code.addWarning(msgs.TOO_MANY_REFERENCES % (maxReferences, name)) except TypeError : pass def _checkDeprecated(code, identifierTuple): # check deprecated module.function try: name = string.join(identifierTuple, '.') undeprecated = python.DEPRECATED_ATTRS[name] except (KeyError, TypeError): pass else: msg = msgs.USING_DEPRECATED_ATTR % name if undeprecated: msg.data = msg.data + msgs.USE_INSTEAD % undeprecated code.addWarning(msg) def _LOAD_ATTR(oparg, operand, codeSource, code) : if len(code.stack) > 0 : top = code.stack[-1] _checkAttribute(top, operand, codeSource, code) top.addAttribute(operand) if len(top.data) == 2: if cfg().deprecated: _checkDeprecated(code, top.data) try: insecure = python.SECURITY_FUNCS.get(top.data[0]) except TypeError: pass else: if insecure and insecure.has_key(operand): func = string.join(top.data, '.') code.addWarning(msgs.USING_INSECURE_FUNC % func) nextOp = code.nextOpInfo()[0] if not OP.LOAD_ATTR(nextOp) : if OP.POP_TOP(nextOp) and cfg().noEffect: code.addWarning(msgs.POSSIBLE_STMT_WITH_NO_EFFECT) else : _checkExcessiveReferences(code, top) def _ok_to_set_attr(classObject, basename, attr) : return (cfg().onlyCheckInitForMembers and classObject != None and basename == cfg().methodArgName and not _classHasAttribute(classObject, attr)) def _STORE_ATTR(oparg, operand, codeSource, code) : if code.stack : top = code.stack.pop() top_name = '%s.%s' % (top.getName(), operand) try: # FIXME: this is a hack to handle code like: # a.a = [x for x in range(2) if x > 1] previous = code.stack[-1] except IndexError: previous = None if top.type in (types.StringType, Stack.TYPE_ATTRIBUTE) and \ previous and previous.type == Stack.TYPE_ATTRIBUTE: _checkVariableOperationOnItself(code, top_name, msgs.SET_VAR_TO_ITSELF) _checkExcessiveReferences(code, top, operand) if _ok_to_set_attr(codeSource.classObject, top.data, operand) : code.addWarning(msgs.INVALID_SET_CLASS_ATTR % operand) code.unpack() def _DELETE_ATTR(oparg, operand, codeSource, code) : if len(code.stack) > 0 : _checkAttribute(code.stack[-1], operand, codeSource, code) def _getExceptionInfo(codeSource, item): # FIXME: probably ought to try to handle raise module.Error if item.type is types.StringType and item.const == 1: return item.data, 1 e = None if item.type is Stack.TYPE_GLOBAL: try: e = eval(item.data) except NameError: pass if not e: try: c = codeSource.module.classes.get(item.data) except TypeError: # item.data may not be hashable (e.g., list) return e, 0 if c is not None: e = c.classObject else: v = codeSource.module.variables.get(item.data) if v is not None: return v, (v.type == types.StringType) return e, 0 _UNCHECKABLE_CATCH_TYPES = (Stack.TYPE_UNKNOWN, Stack.TYPE_ATTRIBUTE) def _checkCatchException(codeSource, code, item): if not cfg().badExceptions: return if item.data is None or item.type in _UNCHECKABLE_CATCH_TYPES: return e, is_str = _getExceptionInfo(codeSource, item) if is_str: code.addWarning(msgs.CATCH_STR_EXCEPTION % item.data) elif e is not None and not _isexception(e): code.addWarning(msgs.CATCH_BAD_EXCEPTION % item.data) def _handleExceptionChecks(codeSource, code, checks): for item in checks: if item is not None: if item.type is not types.TupleType: _checkCatchException(codeSource, code, item) else: for ti in item.data: if isinstance(ti, Stack.Item): _checkCatchException(codeSource, code, ti) _BOOL_NAMES = ('True', 'False') _BAD_ASSIGN_NAMES = _BOOL_NAMES + ('None',) def _checkBoolean(code, checks): for item in checks: try: data = string.capitalize(item.data) if item.type is Stack.TYPE_GLOBAL and data in _BOOL_NAMES: code.addWarning(msgs.BOOL_COMPARE % item.data) except (AttributeError, TypeError): # TypeError is necessary for Python 1.5.2 pass # ignore items that are not a StackItem or a string def _COMPARE_OP(oparg, operand, codeSource, code) : compareValues = _handleComparison(code.stack, operand) if oparg == OP.EXCEPT_COMPARISON: _handleExceptionChecks(codeSource, code, compareValues) elif oparg < OP.IN_COMPARISON: # '<', '<=', '==', '!=', '>', '>=' _checkBoolean(code, compareValues) elif oparg < OP.IS_COMPARISON: # 'in', 'not in' # TODO: any checks that should be done here? pass elif cfg().isLiteral: # X is Y or X is not Y comparison second_arg = code.stack[-1].data[2] # FIXME: how should booleans be handled, need to think about it ## if second_arg.const or (second_arg.type == Stack.TYPE_GLOBAL and ## second_arg.data in ['True', 'False']): if second_arg.const and second_arg.data is not None: data = second_arg.data if second_arg.type is types.DictType: data = {} not_str = '' if oparg != OP.IS_COMPARISON: not_str = ' not' code.addWarning(msgs.IS_LITERAL % (not_str, data)) _checkNoEffect(code) def _IMPORT_NAME(oparg, operand, codeSource, code) : code.pushStack(Stack.Item(operand, types.ModuleType)) # only handle straight import names; FROM or STAR are done separately nextOp = code.nextOpInfo()[0] if not OP.IMPORT_FROM(nextOp) and not OP.IMPORT_STAR(nextOp): _handleImport(code, operand, codeSource.module, codeSource.main, None) def _IMPORT_FROM(oparg, operand, codeSource, code) : _handleImportFrom(code, operand, codeSource.module, codeSource.main) # this is necessary for python 1.5 (see STORE_GLOBAL/NAME) if utils.pythonVersion() < utils.PYTHON_2_0 : code.popStack() if not codeSource.main : code.unusedLocals[operand] = None elif not codeSource.module.moduleLineNums.has_key(operand) : code.updateModuleLineNums(codeSource.module, operand) # Loads all symbols not starting with '_' directly from the module TOS to the # local namespace. The module is popped after loading all names. This opcode # implements from module import *. def _IMPORT_STAR(oparg, operand, codeSource, code): # codeSource: the piece of source code doing the import # code: the piece of code matching codeSource doing the import _handleImportFrom(code, '*', codeSource.module, codeSource.main) # Python 2.3 introduced some optimizations that create problems # this is a utility for ignoring these cases def _shouldIgnoreCodeOptimizations(code, bytecodes, offset, length=None): if utils.pythonVersion() < utils.PYTHON_2_3: return 0 if length is None: length = offset - 1 try: start = code.index - offset return bytecodes == code.bytes[start:start+length] except IndexError: return 0 # In Python 2.3, a, b = 1,2 generates this code: # ... # ROT_TWO # JUMP_FORWARD 2 # DUP_TOP # POP_TOP # # which generates a Possible stmt w/no effect # ROT_TWO = 2; JUMP_FORWARD = 110; 2, 0 is the offset (2) _IGNORE_SEQ = '%c%c%c%c' % (2, 110, 2, 0) def _shouldIgnoreNoEffectWarning(code): return _shouldIgnoreCodeOptimizations(code, _IGNORE_SEQ, 5) def _DUP_TOP(oparg, operand, codeSource, code) : if len(code.stack) > 0 : code.pushStack(code.stack[-1], _shouldIgnoreNoEffectWarning(code)) # Duplicate count items, keeping them in the same order. Due to implementation # limits, count should be between 1 and 5 inclusive. def _DUP_TOPX(oparg, operand, codeSource, code): if oparg > 5: code.addWarning(msgs.Warning( 'DUP_TOPX has oparg %d, should not be more than 5' % oparg)) if len(code.stack) > oparg - 1: source = code.stack[-oparg:] for item in source: code.pushStack(item, _shouldIgnoreNoEffectWarning(code)) def _popn(code, n) : if len(code.stack) >= 2 : loadValue = code.stack[-2] if cfg().modifyDefaultValue and loadValue.type == types.StringType : _checkModifyDefaultArg(code, loadValue.data) code.popStackItems(n) def _DELETE_SUBSCR(oparg, operand, codeSource, code) : _popn(code, 2) def _STORE_SUBSCR(oparg, operand, codeSource, code) : _popn(code, 3) def _CALL_FUNCTION(oparg, operand, codeSource, code) : _handleFunctionCall(codeSource, code, oparg) def _CALL_FUNCTION_VAR(oparg, operand, codeSource, code) : _handleFunctionCall(codeSource, code, oparg, 1, 0) def _CALL_FUNCTION_KW(oparg, operand, codeSource, code) : _handleFunctionCall(codeSource, code, oparg, 1) def _CALL_FUNCTION_VAR_KW(oparg, operand, codeSource, code) : _handleFunctionCall(codeSource, code, oparg, 2, 0) # Pushes a new function object on the stack. TOS is the code associated with # the function. The function object is defined to have argc default parameters, # which are found below TOS. def _MAKE_FUNCTION(oparg, operand, codeSource, code) : newValue = Stack.makeFuncReturnValue(code.stack[-1], oparg) code.popStackItems(oparg+1) code.pushStack(newValue) def _MAKE_CLOSURE(oparg, operand, codeSource, code) : _MAKE_FUNCTION(max(0, oparg - 1), operand, codeSource, code) def _BUILD_MAP(oparg, operand, codeSource, code) : # Pushes a new dictionary object onto the stack. The dictionary is # pre-sized to hold count entries. # before python 2.6, the argument was always zero # since 2.6, the argument is the size the dict should be pre-sized to # In either case, _BUILD_MAP does not consume anything from the stack _makeConstant(code, 0, Stack.makeDict) def _BUILD_TUPLE(oparg, operand, codeSource, code) : # Creates a tuple consuming count items from the stack, and pushes the # resulting tuple onto the stack. _makeConstant(code, oparg, Stack.makeTuple) def _BUILD_LIST(oparg, operand, codeSource, code) : # Works as BUILD_TUPLE, but creates a list. _makeConstant(code, oparg, Stack.makeList) def _STORE_MAP(oparg, operand, codeSource, code) : _popn(code, 2) # Creates a new class object. TOS is the methods dictionary, TOS1 the tuple # of the names of the base classes, and TOS2 the class name. def _BUILD_CLASS(oparg, operand, codeSource, code) : newValue = Stack.makeFuncReturnValue(code.stack[-1], types.ClassType) code.popStackItems(3) code.pushStack(newValue) # example disassembly: # (' 18 BUILD_LIST', 6, None) # (' 21 STORE_FAST', 0, 'l') # (' 24 LOAD_FAST', 0, 'l') # (' 27 LOAD_CONST', 7, 0) # (' 30 LOAD_CONST', 0, None) # (' 33 LOAD_CONST', 2, 2) # (' 36 BUILD_SLICE', 3, None) def _BUILD_SLICE(oparg, operand, codeSource, code): argCount = oparg assert argCount in [2, 3] if argCount == 3: start = code.stack[-3].data stop = code.stack[-2].data step = code.stack[-1].data sourceName = code.stack[-4].data else: start = code.stack[-2].data stop = code.stack[-1].data step = None sourceName = code.stack[-3].data if sourceName in code.constants: source = code.constants[sourceName] if step: sl = source[start:stop:step] else: sl = source[start:stop] # push new slice on stack code.stack[-argCount:] = [Stack.Item(sl, types.ListType, 1, len(sl)), ] else: # FIXME: not sure what we do with a non-constant slice ? # push a non-constant slice of the source on stack code.stack[-argCount:] = [Stack.Item( sourceName, types.ListType, 0, 1), ] _checkNoEffect(code) # old pre-2.7 LIST_APPEND, argumentless def _LIST_APPEND(oparg, operand, codeSource, code): code.popStackItems(2) # new 2.7 LIST_APPEND, takes argument as number of items to append def _LIST_APPEND_2_7(oparg, operand, codeSource, code): count = oparg code.popStackItems(1 + count) def _modifyStackName(code, suffix): if code.stack: tos = code.stack[-1] tos_type = type(tos.data) if tos_type == types.StringType: tos.data = tos.data + suffix elif tos_type == types.TupleType and \ type(tos.data[-1]) == types.StringType: tos.data = tos.data[:-1] + (tos.data[-1] + suffix,) def _UNARY_CONVERT(oparg, operand, codeSource, code) : if code.stack: stackValue = code.stack[-1] if stackValue.data == cfg().methodArgName and \ stackValue.const == 0 and codeSource.classObject is not None and \ codeSource.func.function.func_name == '__repr__' : code.addWarning(msgs.USING_SELF_IN_REPR) stackValue.data = utils.safestr(stackValue.data) stackValue.type = types.StringType _modifyStackName(code, '-repr') def _UNARY_POSITIVE(oparg, operand, codeSource, code) : if OP.UNARY_POSITIVE(code.nextOpInfo()[0]) : code.addWarning(msgs.STMT_WITH_NO_EFFECT % '++') code.popNextOp() elif cfg().unaryPositive and code.stack and not code.stack[-1].const : code.addWarning(msgs.UNARY_POSITIVE_HAS_NO_EFFECT) _modifyStackName(code, '-pos') def _UNARY_NEGATIVE(oparg, operand, codeSource, code) : if OP.UNARY_NEGATIVE(code.nextOpInfo()[0]) : code.addWarning(msgs.STMT_WITH_NO_EFFECT % '--') _modifyStackName(code, '-neg') def _UNARY_NOT(oparg, operand, codeSource, code) : _modifyStackName(code, '-not') def _UNARY_INVERT(oparg, operand, codeSource, code) : if OP.UNARY_INVERT(code.nextOpInfo()[0]) : code.addWarning(msgs.STMT_WITH_NO_EFFECT % '~~') _modifyStackName(code, '-invert') def _popStackRef(code, operand, count = 2) : # pop count items, then push a ref to the operand on the stack code.popStackItems(count) code.pushStack(Stack.Item(operand, Stack.TYPE_UNKNOWN)) def _popModifiedStack(code, suffix=' '): code.popStack() _modifyStackName(code, suffix) def _pop(oparg, operand, codeSource, code) : code.popStack() _POP_TOP = _PRINT_ITEM = _pop def _popModified(oparg, operand, codeSource, code): _popModifiedStack(code) def _BINARY_RSHIFT(oparg, operand, codeSource, code): _coerce_type(code) _popModified(oparg, operand, codeSource, code) _BINARY_LSHIFT = _BINARY_RSHIFT def _checkModifyNoOp(code, op, msg=msgs.MODIFY_VAR_NOOP, modifyStack=1): stack = code.stack if len(stack) >= 2: if (stack[-1].type != Stack.TYPE_UNKNOWN and stack[-2].type != Stack.TYPE_UNKNOWN): name = stack[-1].getName() if name != Stack.TYPE_UNKNOWN and name == stack[-2].getName(): code.addWarning(msg % (name, op, name)) if modifyStack: code.popStack() stack[-1].const = 0 _modifyStackName(code, op) def _BINARY_AND(oparg, operand, codeSource, code): # Don't modify the stack, since _coerce_type() will do it. _checkModifyNoOp(code, '&', modifyStack=0) _coerce_type(code) def _BINARY_OR(oparg, operand, codeSource, code): # Don't modify the stack, since _coerce_type() will do it. _checkModifyNoOp(code, '|', modifyStack=0) _coerce_type(code) def _BINARY_XOR(oparg, operand, codeSource, code): # Don't modify the stack, since _coerce_type() will do it. _checkModifyNoOp(code, '^', msgs.XOR_VAR_WITH_ITSELF, modifyStack=0) _coerce_type(code) def _PRINT_ITEM_TO(oparg, operand, codeSource, code): code.popStackItems(2) def _PRINT_NEWLINE_TO(oparg, operand, codeSource, code): code.popStackItems(1) try: ComplexType = types.ComplexType except NameError: ComplexType = types.FloatType # need some numeric type here _NUMERIC_TYPES = (types.IntType, types.FloatType, ComplexType) # FIXME: This is pathetically weak, need to handle more types def _coerce_type(code) : _checkNoEffect(code) newItem = Stack.Item('', Stack.TYPE_UNKNOWN) if len(code.stack) >= 2 : s1, s2 = code.stack[-2:] s1type = s1.getType(code.typeMap) s2type = s2.getType(code.typeMap) if s1type != s2type : if s1type in _NUMERIC_TYPES and s2type in _NUMERIC_TYPES : newType = types.FloatType if s1type == ComplexType or s2type == ComplexType: newType = ComplexType newItem.type = newType code.popStackItems(2) code.pushStack(newItem) def _BINARY_ADD(oparg, operand, codeSource, code) : stack = code.stack if len(stack) >= 2 and (stack[-1].const and stack[-2].const and stack[-1].type == stack[-2].type) : value = stack[-2].data + stack[-1].data code.popStackItems(2) code.pushStack(Stack.Item(value, type(value), 1)) else : _coerce_type(code) def _BINARY_SUBTRACT(oparg, operand, codeSource, code) : _coerce_type(code) _BINARY_POWER = _BINARY_SUBTRACT def _BINARY_SUBSCR(oparg, operand, codeSource, code) : _checkNoEffect(code) if len(code.stack) >= 2 : stack = code.stack varType = code.typeMap.get(utils.safestr(stack[-2].data), []) if types.ListType in varType and stack[-1].type == types.TupleType : code.addWarning(msgs.USING_TUPLE_ACCESS_TO_LIST % stack[-2].data) _popStackRef(code, operand) def _isint(stackItem, code) : if type(stackItem.data) == types.IntType : return 1 stackTypes = code.typeMap.get(stackItem.data, []) if len(stackTypes) != 1 : return 0 return types.IntType in stackTypes def _BINARY_DIVIDE(oparg, operand, codeSource, code) : _checkNoEffect(code) _checkModifyNoOp(code, '/', msgs.DIVIDE_VAR_BY_ITSELF, 0) if cfg().intDivide and len(code.stack) >= 2 : if _isint(code.stack[-1], code) and _isint(code.stack[-2], code) : # don't warn if we are going to convert the result to an int if not (len(code.stack) >= 3 and code.stack[-3].data == 'int' and OP.CALL_FUNCTION(code.nextOpInfo()[0])): code.addWarning(msgs.INTEGER_DIVISION % tuple(code.stack[-2:])) _popModifiedStack(code, '/') def _BINARY_TRUE_DIVIDE(oparg, operand, codeSource, code) : _checkNoEffect(code) _checkVariableOperationOnItself(code, operand, msgs.DIVIDE_VAR_BY_ITSELF) _popModifiedStack(code, '/') _BINARY_FLOOR_DIVIDE = _BINARY_TRUE_DIVIDE def _BINARY_MULTIPLY(oparg, operand, codeSource, code) : if len(code.stack) >= 2 : formatString = _getFormatString(code, codeSource) if formatString and type(code.stack[-1].data) == types.IntType : code.stack[-2].data = formatString * code.stack[-1].data code.popStack() else: _coerce_type(code) else: _popModifiedStack(code, '*') def _BINARY_MODULO(oparg, operand, codeSource, code) : _checkNoEffect(code) if cfg().modulo1 and code.stack and code.stack[-1].data == 1: if len(code.stack) < 2 or \ code.stack[-2].getType(code.typeMap) != types.FloatType: code.addWarning(msgs.MODULO_1) _getFormatWarnings(code, codeSource) _popModifiedStack(code, '%') if code.stack: code.stack[-1].const = 0 def _ROT_TWO(oparg, operand, codeSource, code) : if len(code.stack) >= 2 : tmp = code.stack[-2] code.stack[-2] = code.stack[-1] code.stack[-1] = tmp def _ROT_THREE(oparg, operand, codeSource, code) : """Lifts second and third stack item one position up, moves top down to position three.""" if len(code.stack) >= 3 : second = code.stack[-2] third = code.stack[-3] code.stack[-3] = code.stack[-1] code.stack[-2] = third code.stack[-1] = second def _ROT_FOUR(oparg, operand, codeSource, code) : """Lifts second, third and forth stack item one position up, moves top down to position four.""" if len(code.stack) >= 4 : second = code.stack[-2] third = code.stack[-3] fourth = code.stack[-4] code.stack[-4] = code.stack[-1] code.stack[-3] = fourth code.stack[-2] = third code.stack[-1] = second def _SETUP_EXCEPT(oparg, operand, codeSource, code) : code.has_except = 1 code.pushStack(Stack.Item(None, Stack.TYPE_EXCEPT)) code.pushStack(Stack.Item(None, Stack.TYPE_EXCEPT)) def _SETUP_FINALLY(oparg, operand, codeSource, code) : if not code.has_except : code.try_finally_first = 1 # SETUP_WITH added in 2.7 # not sure what _SETUP_FINALLY does exactly, but looking at the 2.6 # implementation for the new SETUP_WITH, it ends with SETUP_FINALLY, # so SETUP_WITH should do the same def _SETUP_WITH(oparg, operand, codeSource, code): if not code.has_except: code.try_finally_first = 1 # WITH_CLEANUP since 2.5 # four stack possibilities: # * TOP = None # * (TOP, SECOND) = (WHY_{RETURN,CONTINUE}), retval # * TOP = WHY_*; no retval below it # * (TOP, SECOND, THIRD) = exc_info() def _WITH_CLEANUP(oparg, operand, codeSource, code): if code.stack: top = code.stack[-1] # FIXME: only implement the first one, only one I've seen if top.isNone(): code.popStack() else: # FIXME: NotImplementedError gets recaught and reraised with # less useful info raise IndexError('WITH_CLEANUP with TOS %r' % top) # pop exit ? I didn't see it in my example case def _END_FINALLY(oparg, operand, codeSource, code) : if code.try_finally_first and code.index == (len(code.bytes) - 4) : code.starts_and_ends_with_finally = 1 def _LINE_NUM(oparg, operand, codeSource, code) : code.lastLineNum = oparg def _UNPACK_SEQUENCE(oparg, operand, codeSource, code) : code.unpackCount = oparg if code.stack: top = code.stack[-1] # if we know we have a tuple, make sure we unpack it into the # right # of variables topType = top.getType(code.typeMap) if topType in _SEQUENCE_TYPES: length = top.length # we don't know the length, maybe it's constant and we can find out if length == 0: value = code.constants.get(utils.safestr(top.data)) if type(value) in _SEQUENCE_TYPES: length = len(value) if length > 0 and length != oparg: if cfg().unpackLength: code.addWarning(msgs.WRONG_UNPACK_SIZE % (length, oparg)) elif topType not in _UNCHECKABLE_STACK_TYPES: if cfg().unpackNonSequence: code.addWarning(msgs.UNPACK_NON_SEQUENCE % (top.data, _getTypeStr(topType))) _modifyStackName(code, '-unpack') def _SLICE_1_ARG(oparg, operand, codeSource, code) : _popStackRef(code, operand) def _SLICE0(oparg, operand, codeSource, code) : # Implements TOS = TOS[:]. _popStackRef(code, operand, count=1) _SLICE1 = _SLICE2 = _SLICE_1_ARG def _SLICE3(oparg, operand, codeSource, code) : _popStackRef(code, operand, 3) def _STORE_SLICE0(oparg, operand, codeSource, code) : # FIXME: can we check here if we're storing to something that supports # slice assignment ? _popStackRef(code, operand, 2) def _STORE_SLICE1(oparg, operand, codeSource, code) : # FIXME: can we check here if we're storing to something that supports # slice assignment ? _popStackRef(code, operand, 3) _STORE_SLICE2 = _STORE_SLICE1 def _DELETE_SLICE1(oparg, operand, codeSource, code) : # FIXME: can we check here if we're deleting from something that supports # slice deletion ? _popStackRef(code, operand, count=2) _DELETE_SLICE2 = _DELETE_SLICE1 def _DELETE_SLICE3(oparg, operand, codeSource, code) : # FIXME: can we check here if we're deleting from something that supports # slice deletion ? _popStackRef(code, operand, 3) def _check_string_iteration(code, index): try: item = code.stack[index] except IndexError: return if item.getType(code.typeMap) == types.StringType and \ cfg().stringIteration: code.addWarning(msgs.STRING_ITERATION % item.data) def _FOR_LOOP(oparg, operand, codeSource, code) : code.loops = code.loops + 1 _check_string_iteration(code, -2) _popStackRef(code, '', 2) def _GET_ITER(oparg, operand, codeSource, code) : _check_string_iteration(code, -1) def _FOR_ITER(oparg, operand, codeSource, code) : code.loops = code.loops + 1 _popStackRef(code, '', 1) def _jump(oparg, operand, codeSource, code): if len(code.stack) >0: topOfStack = code.stack[-1] if topOfStack.isMethodCall(codeSource.classObject, cfg().methodArgName): name = topOfStack.data[-1] if codeSource.classObject.methods.has_key(name): code.addWarning(msgs.USING_METHOD_AS_ATTR % name) _JUMP_ABSOLUTE = _jump def _skip_loops(bytes, i, lastLineNum, max) : extended_arg = 0 blockCount = 1 while i < max : op, oparg, i, extended_arg = OP.getInfo(bytes, i, extended_arg) if OP.LINE_NUM(op) : lastLineNum = oparg elif OP.FOR_LOOP(op) or OP.FOR_ITER(op) or OP.SETUP_LOOP(op) : blockCount = blockCount + 1 elif OP.POP_BLOCK(op) : blockCount = blockCount - 1 if blockCount <= 0 : break return lastLineNum, i def _is_unreachable(code, topOfStack, branch, ifFalse) : # Are we are checking exceptions, but we not catching all exceptions? if (topOfStack.type == Stack.TYPE_COMPARISON and topOfStack.data[1] == 'exception match' and topOfStack.data[2] is not Exception) : return 1 # do we possibly have while 1: ? if not (topOfStack.const and topOfStack.data == 1 and ifFalse): return 0 # get the op just before the branch (ie, -3) op, oparg, i, extended_arg = OP.getInfo(code.bytes, branch - 3, 0) # are we are jumping to before the while 1: (LOAD_CONST, JUMP_IF_FALSE) if not (OP.JUMP_ABSOLUTE(op) and oparg == (code.index - 3*3)) : return 0 # check if we break out of the loop i = code.index lastLineNum = code.getLineNum() while i < branch : op, oparg, i, extended_arg = OP.getInfo(code.bytes, i, extended_arg) if OP.LINE_NUM(op) : lastLineNum = oparg elif OP.BREAK_LOOP(op) : return 0 elif OP.FOR_LOOP(op) or OP.FOR_ITER(op) or OP.SETUP_LOOP(op) : lastLineNum, i = _skip_loops(code.bytes, i, lastLineNum, branch) i = code.index - 3*4 op, oparg, i, extended_arg = OP.getInfo(code.bytes, i, 0) if OP.SETUP_LOOP(op) : # a little lie to pretend we have a raise after a while 1: code.removeBranch(i + oparg) code.raiseValues.append((lastLineNum, None, i + oparg)) return 1 # In Python 2.3, while/if 1: gets optimized to # ... # JUMP_FORWARD 4 # JUMP_IF_FALSE ? # POP_TOP # # which generates a Using a conditional statement with a constant value # JUMP_FORWARD = 110; 4, 0 is the offset (4) _IGNORE_BOGUS_JUMP = '%c%c%c' % (110, 4, 0) def _shouldIgnoreBogusJumps(code): return _shouldIgnoreCodeOptimizations(code, _IGNORE_BOGUS_JUMP, 6, 3) def _checkConstantCondition(code, topOfStack, ifFalse, nextIsPop): # don't warn when doing (test and 'true' or 'false') # still warn when doing (test and None or 'false') # since 2.7, instead of JUMP_IF_x/POP_TOP, we have POP_JUMP_IF_x, so # the next opcode is not POP_TOP, but a possible LOAD_CONST already. candidate = 0 if nextIsPop: candidate = 1 if ifFalse or not OP.LOAD_CONST(code.nextOpInfo(candidate)[0]) or \ not topOfStack.data or topOfStack.type is types.NoneType: if not _shouldIgnoreBogusJumps(code): code.addWarning(msgs.CONSTANT_CONDITION % utils.safestr(topOfStack)) def _jump_conditional(oparg, operand, codeSource, code, ifFalse, nextIsPop): # FIXME: this doesn't work in 2.3+ since constant conditions # are optimized away by the compiler. if code.stack: topOfStack = code.stack[-1] if (topOfStack.const or topOfStack.type is types.NoneType) and \ cfg().constantConditions and \ (topOfStack.data != 1 or cfg().constant1): _checkConstantCondition(code, topOfStack, ifFalse, nextIsPop) if _is_unreachable(code, topOfStack, code.label, ifFalse): code.removeBranch(code.label) _jump(oparg, operand, codeSource, code) # JUMP_IF_FALSE(delta) # If TOS is false, increment the bytecode counter by delta. TOS is not changed. def _JUMP_IF_FALSE(oparg, operand, codeSource, code): _jump_conditional(oparg, operand, codeSource, code, 1, 1) def _JUMP_IF_TRUE(oparg, operand, codeSource, code): _jump_conditional(oparg, operand, codeSource, code, 0, 1) def _JUMP_FORWARD(oparg, operand, codeSource, code): _jump(oparg, operand, codeSource, code) code.remove_unreachable_code(code.label) # POP_JUMP_IF_FALSE(target) # If TOS is false, sets the bytecode counter to target. TOS is popped. def _POP_JUMP_IF_FALSE(oparg, operand, codeSource, code): _jump_conditional(oparg, operand, codeSource, code, 1, 0) _pop(oparg, operand, codeSource, code) def _POP_JUMP_IF_TRUE(oparg, operand, codeSource, code): _jump_conditional(oparg, operand, codeSource, code, 0, 0) _pop(oparg, operand, codeSource, code) def _JUMP_IF_FALSE_OR_POP(oparg, operand, codeSource, code): # FIXME: can the next one still be a pop ? _jump_conditional(oparg, operand, codeSource, code, 1, 0) # FIXME: should we really POP here ? We don't know whether the condition # is true or false... _pop(oparg, operand, codeSource, code) def _JUMP_IF_TRUE_OR_POP(oparg, operand, codeSource, code): _jump_conditional(oparg, operand, codeSource, code, 0, 0) # FIXME: same here _pop(oparg, operand, codeSource, code) def _RETURN_VALUE(oparg, operand, codeSource, code) : if not codeSource.calling_code : code.addReturn() def _EXEC_STMT(oparg, operand, codeSource, code) : if cfg().usesExec : if code.stack and code.stack[-1].isNone() : code.addWarning(msgs.USES_GLOBAL_EXEC) else : code.addWarning(msgs.USES_EXEC) def _YIELD_VALUE(oparg, operand, codeSource, code) : # FIXME: any kind of checking we need to do on a yield ? globals ? code.popStack() def _checkStrException(code, varType, item): if varType is types.StringType: code.addWarning(msgs.RAISE_STR_EXCEPTION % item.data) def _RAISE_VARARGS(oparg, operand, codeSource, code) : code.addRaise() if not cfg().badExceptions: return if oparg > 0 and len(code.stack) >= oparg: item = code.stack[-oparg] if item.type not in (Stack.TYPE_FUNC_RETURN, Stack.TYPE_UNKNOWN): if item.type is Stack.TYPE_GLOBAL: e, is_str = _getExceptionInfo(codeSource, item) if is_str: _checkStrException(code, e.type, item) elif e is not None and not _isexception(e): code.addWarning(msgs.RAISE_BAD_EXCEPTION % item.data) else: _checkStrException(code, item.getType(code.typeMap), item) def _SET_ADD(oparg, operand, codeSource, code): code.popStackItems(1) def _MAP_ADD(oparg, operand, codeSource, code): code.popStackItems(2) def _empty(oparg, operand, codeSource, code): pass def _unimplemented(oparg, operand, codeSource, code): raise NotImplementedError('No DISPATCH member for operand') # these op codes do not interact with the stack _PRINT_NEWLINE = _empty _LOAD_LOCALS = _empty _POP_BLOCK = _empty _BREAK_LOOP = _empty _SETUP_LOOP = _empty _CONTINUE_LOOP = _empty _STORE_DEREF = _empty _STOP_CODE = _empty _NOP = _empty # FIXME: all these could use an implementation _INPLACE_FLOOR_DIVIDE = _INPLACE_TRUE_DIVIDE = _unimplemented _EXTENDED_ARG = _unimplemented _PRINT_EXPR = _unimplemented _DELETE_SLICE0 = _unimplemented _STORE_SLICE3 = _unimplemented # new in 2.7 _BUILD_SET = _unimplemented # dispatched from pychecker/warn.py DISPATCH = [ None ] * 256 DISPATCH[ 0] = _STOP_CODE DISPATCH[ 1] = _POP_TOP DISPATCH[ 2] = _ROT_TWO DISPATCH[ 3] = _ROT_THREE DISPATCH[ 4] = _DUP_TOP DISPATCH[ 5] = _ROT_FOUR DISPATCH[ 9] = _NOP # since Python 2.4 DISPATCH[ 10] = _UNARY_POSITIVE DISPATCH[ 11] = _UNARY_NEGATIVE DISPATCH[ 12] = _UNARY_NOT DISPATCH[ 13] = _UNARY_CONVERT DISPATCH[ 15] = _UNARY_INVERT DISPATCH[ 18] = _LIST_APPEND DISPATCH[ 19] = _BINARY_POWER DISPATCH[ 20] = _BINARY_MULTIPLY DISPATCH[ 21] = _BINARY_DIVIDE DISPATCH[ 22] = _BINARY_MODULO DISPATCH[ 23] = _BINARY_ADD DISPATCH[ 24] = _BINARY_SUBTRACT DISPATCH[ 25] = _BINARY_SUBSCR DISPATCH[ 26] = _BINARY_FLOOR_DIVIDE DISPATCH[ 27] = _BINARY_TRUE_DIVIDE DISPATCH[ 28] = _INPLACE_FLOOR_DIVIDE DISPATCH[ 29] = _INPLACE_TRUE_DIVIDE DISPATCH[ 30] = _SLICE0 DISPATCH[ 31] = _SLICE1 DISPATCH[ 32] = _SLICE2 DISPATCH[ 33] = _SLICE3 DISPATCH[ 40] = _STORE_SLICE0 DISPATCH[ 41] = _STORE_SLICE1 DISPATCH[ 42] = _STORE_SLICE2 DISPATCH[ 43] = _STORE_SLICE3 DISPATCH[ 50] = _DELETE_SLICE0 DISPATCH[ 51] = _DELETE_SLICE1 DISPATCH[ 52] = _DELETE_SLICE2 DISPATCH[ 53] = _DELETE_SLICE3 DISPATCH[ 54] = _STORE_MAP # Since Python 2.6 DISPATCH[ 55] = _BINARY_ADD # INPLACE DISPATCH[ 56] = _BINARY_SUBTRACT # INPLACE DISPATCH[ 57] = _BINARY_MULTIPLY # INPLACE DISPATCH[ 58] = _BINARY_DIVIDE # INPLACE DISPATCH[ 59] = _BINARY_MODULO # INPLACE DISPATCH[ 60] = _STORE_SUBSCR DISPATCH[ 61] = _DELETE_SUBSCR DISPATCH[ 62] = _BINARY_LSHIFT DISPATCH[ 63] = _BINARY_RSHIFT DISPATCH[ 64] = _BINARY_AND DISPATCH[ 65] = _BINARY_XOR DISPATCH[ 66] = _BINARY_OR DISPATCH[ 67] = _BINARY_POWER # INPLACE DISPATCH[ 68] = _GET_ITER DISPATCH[ 70] = _PRINT_EXPR DISPATCH[ 71] = _PRINT_ITEM DISPATCH[ 72] = _PRINT_NEWLINE DISPATCH[ 73] = _PRINT_ITEM_TO DISPATCH[ 74] = _PRINT_NEWLINE_TO DISPATCH[ 75] = _BINARY_LSHIFT # INPLACE DISPATCH[ 76] = _BINARY_RSHIFT # INPLACE DISPATCH[ 77] = _BINARY_AND # INPLACE DISPATCH[ 78] = _BINARY_XOR # INPLACE DISPATCH[ 79] = _BINARY_OR # INPLACE DISPATCH[ 80] = _BREAK_LOOP DISPATCH[ 81] = _WITH_CLEANUP # Since Python 2.5 DISPATCH[ 82] = _LOAD_LOCALS DISPATCH[ 83] = _RETURN_VALUE DISPATCH[ 84] = _IMPORT_STAR DISPATCH[ 85] = _EXEC_STMT DISPATCH[ 86] = _YIELD_VALUE DISPATCH[ 87] = _POP_BLOCK DISPATCH[ 88] = _END_FINALLY DISPATCH[ 89] = _BUILD_CLASS DISPATCH[ 90] = _STORE_NAME DISPATCH[ 91] = _DELETE_NAME DISPATCH[ 92] = _UNPACK_SEQUENCE DISPATCH[ 93] = _FOR_ITER # changed from no arguments to taking an argument and 18 to 94 in 2.7 # Python svn revision 67818 DISPATCH[ 94] = _LIST_APPEND_2_7 DISPATCH[ 95] = _STORE_ATTR DISPATCH[ 96] = _DELETE_ATTR DISPATCH[ 97] = _STORE_GLOBAL DISPATCH[ 98] = _DELETE_GLOBAL DISPATCH[ 99] = _DUP_TOPX DISPATCH[100] = _LOAD_CONST DISPATCH[101] = _LOAD_NAME DISPATCH[102] = _BUILD_TUPLE DISPATCH[103] = _BUILD_LIST if utils.pythonVersion() >= utils.PYTHON_2_7: DISPATCH[104] = _BUILD_SET DISPATCH[105] = _BUILD_MAP DISPATCH[106] = _LOAD_ATTR DISPATCH[107] = _COMPARE_OP DISPATCH[108] = _IMPORT_NAME DISPATCH[109] = _IMPORT_FROM else: DISPATCH[104] = _BUILD_MAP DISPATCH[105] = _LOAD_ATTR DISPATCH[106] = _COMPARE_OP DISPATCH[107] = _IMPORT_NAME DISPATCH[108] = _IMPORT_FROM DISPATCH[110] = _JUMP_FORWARD if utils.pythonVersion() >= utils.PYTHON_2_7: DISPATCH[111] = _POP_JUMP_IF_FALSE DISPATCH[112] = _POP_JUMP_IF_TRUE else: DISPATCH[111] = _JUMP_IF_FALSE DISPATCH[112] = _JUMP_IF_TRUE DISPATCH[113] = _JUMP_ABSOLUTE if utils.pythonVersion() >= utils.PYTHON_2_7: DISPATCH[114] = _JUMP_IF_FALSE_OR_POP DISPATCH[115] = _JUMP_IF_TRUE_OR_POP else: DISPATCH[114] = _FOR_LOOP DISPATCH[116] = _LOAD_GLOBAL DISPATCH[119] = _CONTINUE_LOOP DISPATCH[120] = _SETUP_LOOP DISPATCH[121] = _SETUP_EXCEPT DISPATCH[122] = _SETUP_FINALLY DISPATCH[124] = _LOAD_FAST DISPATCH[125] = _STORE_FAST DISPATCH[126] = _DELETE_FAST DISPATCH[127] = _LINE_NUM DISPATCH[130] = _RAISE_VARARGS DISPATCH[131] = _CALL_FUNCTION DISPATCH[132] = _MAKE_FUNCTION DISPATCH[133] = _BUILD_SLICE DISPATCH[134] = _MAKE_CLOSURE DISPATCH[135] = _LOAD_CLOSURE DISPATCH[136] = _LOAD_DEREF DISPATCH[137] = _STORE_DEREF DISPATCH[140] = _CALL_FUNCTION_VAR DISPATCH[141] = _CALL_FUNCTION_KW DISPATCH[142] = _CALL_FUNCTION_VAR_KW # changed from 143 to 145 in 2.7, because 143 is now _SETUP_WITH # Python svn revision 72912 if utils.pythonVersion() >= utils.PYTHON_2_7: DISPATCH[143] = _SETUP_WITH DISPATCH[145] = _EXTENDED_ARG else: DISPATCH[143] = _EXTENDED_ARG # Added in 2.7 # Python svn revision 77422 DISPATCH[146] = _SET_ADD DISPATCH[147] = _MAP_ADD scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/OptionTypes.py0000644000175000017500000000663611242100540033043 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import Tkinter def bool(value): if value: return 1 return 0 class Base: "Base class for all OptionTypes" def __init__(self, name, default): self._name = name self._default = default self._var = None def name(self): return self._name def set(self, value): self._var.set(value) class Boolean(Base): "A option type for editing boolean values" def __init__(self, name, default): Base.__init__(self, name, default) def field(self, w): self._var = Tkinter.BooleanVar() if self._default: self._var.set(1) else: self._var.set(0) frame = Tkinter.Frame(w, name = self._name + "Frame") result = Tkinter.Checkbutton(frame, name=self._name, text=self._name, variable=self._var) result.grid(sticky=Tkinter.W) frame.columnconfigure(0, weight=1) return frame def arg(self): if bool(self._var.get()) != bool(self._default): if bool(self._var.get()): return "--" + self._name return "--no-" + self._name return None class Number(Base): "OptionType for editing numbers" def __init__(self, name, default): Base.__init__(self, name, default) def field(self, w): self._var = Tkinter.IntVar() self._var.set(self._default) frame = Tkinter.Frame(w, name = self._name + "Frame") label = Tkinter.Label(frame, text=self._name + ":") label.grid(row=0, column=0, sticky=Tkinter.W) entry = Tkinter.Entry(frame, name=self._name, textvariable=self._var, width=4) entry.grid(row=0, column=1, sticky=Tkinter.E) for i in range(2): frame.columnconfigure(i, weight=1) return frame def arg(self): if self._var.get() != self._default: return "--%s=%d" % (self._name, self._var.get()) return None class Text(Base): "OptionType for editing a little bit of text" def __init__(self, name, default): Base.__init__(self, name, default) def width(self): return int(min(15, len(self._default) * 1.20)) def field(self, w): self._var = Tkinter.StringVar() self._var.set(self._default) frame = Tkinter.Frame(w, name = self._name + "Frame") label = Tkinter.Label(frame, text=self._name + ":") label.grid(row=0, column=0, sticky=Tkinter.W) entry = Tkinter.Entry(frame, name=self._name, textvariable=self._var, width=self.width()) entry.grid(row=0, column=1, sticky=Tkinter.E) for i in range(2): frame.columnconfigure(i, weight=1) return frame def arg(self): if self._var.get() != self._default: return "--%s=%s" % (self._name, self._var.get()) return None def join(list): import string return string.join(list, ", ") class List(Text): "OptionType for editing a list of values" def __init__(self, name, default): Text.__init__(self, name, join(default)) def set(self, value): self._var.set(join(value)) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/printer.py0000644000175000017500000000300311242100540032212 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001, MetaSlash Inc. All rights reserved. "Helper functions for printing out info about objects" from pychecker import utils def printFunction(spaces, prefix, func, className = None) : params = '' argcount = func.func_code.co_argcount defaultArgStart = argcount if func.func_defaults != None : defaultArgStart = argcount - len(func.func_defaults) for i in range(0, argcount) : arg = func.func_code.co_varnames[i] if i >= defaultArgStart : arg = arg + " = %s" % utils.safestr(func.func_defaults[i - defaultArgStart]) params = params + "%s, " % arg params = "(%s)" % params[:-2] if className == None : className = "" else : className = className + "." print "%s%s%s%s%s" % (spaces, prefix, className, func.func_name, params) def module(module) : print "Module: ", module.moduleName if module.module == None : return print " Imports: ", module.modules.keys() print " Variables:", module.variables.keys() print "" for function in module.functions.values() : printFunction(" ", "Function: ", function.function) print "" for c in module.classes.values() : for method in c.methods.values() : if method != None : printFunction(" ", "", method.function, c.name) print "" def attrs(object) : for attr in dir(object) : print " %s: %s" % (attr, `getattr(object, attr)`) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/utils.py0000644000175000017500000002123711242100540031700 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. """ Utility functions. """ import re import sys import os import string import copy import imp import traceback import types from pychecker import msgs from pychecker import Config from pychecker.Warning import Warning VAR_ARGS_BITS = 8 MAX_ARGS_MASK = ((1 << VAR_ARGS_BITS) - 1) INIT = '__init__' LAMBDA = '' GENEXP = '' GENEXP25 = '' # number of instructions to check backwards if it was a return BACK_RETURN_INDEX = 4 _cfg = [] def cfg() : return _cfg[-1] def initConfig(cfg) : _cfg.append(cfg) def pushConfig() : newCfg = copy.copy(cfg()) _cfg.append(newCfg) def popConfig() : del _cfg[-1] def shouldUpdateArgs(operand) : return operand == Config.CHECKER_VAR def updateCheckerArgs(argStr, func, lastLineNum, warnings): """ @param argStr: list of space-separated options, as passed on the command line e.g 'blacklist=wrongname initattr no-classdoc' @type argStr: str @param func: 'suppressions' or code object @type func: str or {function.FakeCode} or {types.CodeType} @param lastLineNum: the last line number of the given function; compare to func.co_firstlineno if exists @type lastLineNum: int or {types.CodeType} @param warnings: list of warnings to append to @type warnings: list of L{Warning} @rtype: int @returns: 1 if the arguments were invalid, 0 if ok. """ try: argList = string.split(argStr) # if func is code, might trigger # TypeError: code.__cmp__(x,y) requires y to be a 'code', not a 'str' if argList and not type(func) == str: debug('func %r: pychecker args %r', func, argStr) # don't require long options to start w/--, we can add that for them for i in range(0, len(argList)): if argList[i][0] != '-': argList[i] = '--' + argList[i] cfg().processArgs(argList) return 1 except Config.UsageError, detail: # this gets triggered when parsing a bad __pychecker__ declaration warn = Warning(func, lastLineNum, msgs.INVALID_CHECKER_ARGS % detail) warnings.append(warn) return 0 def debug(formatString, *args): if cfg().debug: if args: if '%' in formatString: message = formatString % args else: args = [isinstance(a, str) and a or repr(a) for a in args] message = formatString + " " + " ".join(args) else: message = formatString print "DEBUG:", message PYTHON_1_5 = 0x10502 PYTHON_2_0 = 0x20000 PYTHON_2_1 = 0x20100 PYTHON_2_2 = 0x20200 PYTHON_2_3 = 0x20300 PYTHON_2_4 = 0x20400 PYTHON_2_5 = 0x20500 PYTHON_2_6 = 0x20600 PYTHON_2_7 = 0x20700 PYTHON_3_0 = 0x30000 def pythonVersion() : return sys.hexversion >> 8 def startswith(s, substr) : "Ugh, supporting python 1.5 is a pain" return s[0:len(substr)] == substr def endswith(s, substr) : "Ugh, supporting python 1.5 is a pain" return s[-len(substr):] == substr # generic method that can be slapped into any class, thus the self parameter def std_repr(self) : return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), safestr(self)) try: unicode, UnicodeError except NameError: class UnicodeError(Exception): pass def safestr(value): try: return str(value) except UnicodeError: return unicode(value) def _q_file(f): # crude hack!!! # imp.load_module requires a real file object, so we can't just # fiddle def lines and yield them import tempfile fd, newfname = tempfile.mkstemp(suffix=".py", text=True) newf = os.fdopen(fd, 'r+') os.unlink(newfname) for line in f: mat = re.match(r'(\s*def\s+\w+\s*)\[(html|plain)\](.*)', line) if mat is None: newf.write(line) else: newf.write(mat.group(1)+mat.group(3)+'\n') newf.seek(0) return newf def _q_find_module(p, path): if not cfg().quixote: return imp.find_module(p, path) else: for direc in path: try: return imp.find_module(p, [direc]) except ImportError: f = os.path.join(direc, p+".ptl") if os.path.exists(f): return _q_file(file(f)), f, ('.ptl', 'U', 1) def findModule(name, moduleDir=None) : """Returns the result of an imp.find_module(), ie, (file, filename, smt) name can be a module or a package name. It is *not* a filename.""" path = sys.path[:] if moduleDir: path.insert(0, moduleDir) packages = string.split(name, '.') for p in packages : # smt = (suffix, mode, type) handle, filename, smt = _q_find_module(p, path) if smt[-1] == imp.PKG_DIRECTORY : try : # package found - read path info from init file m = imp.load_module(p, handle, filename, smt) finally : if handle is not None : handle.close() # importing xml plays a trick, which replaces itself with _xmlplus # both have subdirs w/same name, but different modules in them # we need to choose the real (replaced) version if m.__name__ != p : try : handle, filename, smt = _q_find_module(m.__name__, path) m = imp.load_module(p, handle, filename, smt) finally : if handle is not None : handle.close() new_path = m.__path__ if type(new_path) == types.ListType : new_path = filename if new_path not in path : path.insert(1, new_path) elif smt[-1] != imp.PY_COMPILED: if p is not packages[-1] : if handle is not None : handle.close() raise ImportError, "No module named %s" % packages[-1] return handle, filename, smt # in case we have been given a package to check return handle, filename, smt def _getLineInFile(moduleName, moduleDir, linenum): line = '' handle, filename, smt = findModule(moduleName, moduleDir) if handle is None: return '' try: lines = handle.readlines() line = string.rstrip(lines[linenum - 1]) except (IOError, IndexError): pass handle.close() return line def importError(moduleName, moduleDir=None): exc_type, exc_value, tb = sys.exc_info() # First, try to get a nice-looking name for this exception type. exc_name = getattr(exc_type, '__name__', None) if not exc_name: # either it's a string exception or a user-defined exception class # show string or fully-qualified class name exc_name = safestr(exc_type) # Print a traceback, unless this is an ImportError. ImportError is # presumably the most common import-time exception, so this saves # the clutter of a traceback most of the time. Also, the locus of # the error is usually irrelevant for ImportError, so the lack of # traceback shouldn't be a problem. if exc_type is SyntaxError: # SyntaxErrors are special, we want to control how we format # the output and make it consistent for all versions of Python e = exc_value msg = '%s (%s, line %d)' % (e.msg, e.filename, e.lineno) line = _getLineInFile(moduleName, moduleDir, e.lineno) offset = e.offset if type(offset) is not types.IntType: offset = 0 exc_value = '%s\n %s\n %s^' % (msg, line, ' ' * offset) elif exc_type is not ImportError: sys.stderr.write(" Caught exception importing module %s:\n" % moduleName) try: tbinfo = traceback.extract_tb(tb) except: tbinfo = [] sys.stderr.write(" Unable to format traceback\n") for filename, line, func, text in tbinfo[1:]: sys.stderr.write(" File \"%s\", line %d" % (filename, line)) if func != "?": sys.stderr.write(", in %s()" % func) sys.stderr.write("\n") if text: sys.stderr.write(" %s\n" % text) # And finally print the exception type and value. # Careful formatting exc_value -- can fail for some user exceptions sys.stderr.write(" %s: " % exc_name) try: sys.stderr.write(safestr(exc_value) + '\n') except: sys.stderr.write('**error formatting exception value**\n') scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/Config.py0000644000175000017500000005042111242100540031742 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Configuration information for checker. """ import sys import os import getopt import string import re import time def get_warning_levels(): import types from pychecker import msgs WarningClass = msgs.WarningClass result = {} for name in vars(msgs).keys(): obj = getattr(msgs, name) if (obj is not WarningClass and isinstance(obj, types.ClassType) and issubclass(obj, WarningClass)): result[name.capitalize()] = obj return result _WARNING_LEVELS = get_warning_levels() _RC_FILE = ".pycheckrc" CHECKER_VAR = '__pychecker__' _VERSION = '0.8.18' _DEFAULT_BLACK_LIST = [ "Tkinter", "wxPython", "gtk", "GTK", "GDK", ] _DEFAULT_VARIABLE_IGNORE_LIST = [ '__version__', '__warningregistry__', '__all__', '__credits__', '__test__', '__author__', '__email__', '__revision__', '__id__', '__copyright__', '__license__', '__date__', ] _DEFAULT_UNUSED_LIST = [ '_', 'empty', 'unused', 'dummy', ] _DEFAULT_MISSING_ATTRS_LIST = [] # _OPTIONS = ( # (categoryName, [ # (shortArg, useValue, longArg, member, description), # ... # ]), # ... # ) _OPTIONS = ( ('Major Options', [ ('', 0, 'only', 'only', 'only warn about files passed on the command line'), ('e', 1, 'level', None, 'the maximum error level of warnings to be displayed'), ('#', 1, 'limit', 'limit', 'the maximum number of warnings to be displayed'), ('F', 1, 'config', None, 'specify .pycheckrc file to use'), ('', 0, 'quixote', None, 'support Quixote\'s PTL modules'), ('', 1, 'evil', 'evil', 'list of evil C extensions that crash the interpreter'), ('', 0, 'keepgoing', 'ignoreImportErrors', 'ignore import errors'), ]), ('Error Control', [ ('i', 0, 'import', 'importUsed', 'unused imports'), ('k', 0, 'pkgimport', 'packageImportUsed', 'unused imports from __init__.py'), ('M', 0, 'reimportself', 'reimportSelf', 'module imports itself'), ('X', 0, 'reimport', 'moduleImportErrors', 'reimporting a module'), ('x', 0, 'miximport', 'mixImport', 'module does import and from ... import'), ('l', 0, 'local', 'localVariablesUsed', 'unused local variables, except tuples'), ('t', 0, 'tuple', 'unusedLocalTuple', 'all unused local variables, including tuples'), ('9', 0, 'members', 'membersUsed', 'all unused class data members'), ('v', 0, 'var', 'allVariablesUsed', 'all unused module variables'), ('p', 0, 'privatevar', 'privateVariableUsed', 'unused private module variables'), ('g', 0, 'allglobals', 'reportAllGlobals', 'report each occurrence of global warnings'), ('n', 0, 'namedargs', 'namedArgs', 'functions called with named arguments (like keywords)'), ('a', 0, 'initattr', 'onlyCheckInitForMembers', 'Attributes (members) must be defined in __init__()'), ('I', 0, 'initsubclass', 'initDefinedInSubclass', 'Subclass.__init__() not defined'), ('u', 0, 'callinit', 'baseClassInitted', 'Baseclass.__init__() not called'), ('0', 0, 'abstract', 'abstractClasses', 'Subclass needs to override methods that only throw exceptions'), ('N', 0, 'initreturn', 'returnNoneFromInit', 'Return None from __init__()'), ('8', 0, 'unreachable', 'unreachableCode', 'unreachable code'), ('2', 0, 'constCond', 'constantConditions', 'a constant is used in a conditional statement'), ('1', 0, 'constant1', 'constant1', '1 is used in a conditional statement (if 1: or while 1:)'), ( '', 0, 'stringiter', 'stringIteration', 'check if iterating over a string'), ( '', 0, 'stringfind', 'stringFind', 'check improper use of string.find()'), ('A', 0, 'callattr', 'callingAttribute', 'Calling data members as functions'), ('y', 0, 'classattr', 'classAttrExists', 'class attribute does not exist'), ('S', 1, 'self', 'methodArgName', 'First argument to methods'), ('', 1, 'classmethodargs', 'classmethodArgNames', 'First argument to classmethods'), ('T', 0, 'argsused', 'argumentsUsed', 'unused method/function arguments'), ('z', 0, 'varargsused', 'varArgumentsUsed', 'unused method/function variable arguments'), ('G', 0, 'selfused', 'ignoreSelfUnused', 'ignore if self is unused in methods'), ('o', 0, 'override', 'checkOverridenMethods', 'check if overridden methods have the same signature'), ('', 0, 'special', 'checkSpecialMethods', 'check if __special__ methods exist and have the correct signature'), ('U', 0, 'reuseattr', 'redefiningFunction', 'check if function/class/method names are reused'), ('Y', 0, 'positive', 'unaryPositive', 'check if using unary positive (+) which is usually meaningless'), ('j', 0, 'moddefvalue', 'modifyDefaultValue', 'check if modify (call method) on a parameter that has a default value'), ( '', 0, 'changetypes', 'inconsistentTypes', 'check if variables are set to different types'), ( '', 0, 'unpack', 'unpackNonSequence', 'check if unpacking a non-sequence'), ( '', 0, 'unpacklen', 'unpackLength', 'check if unpacking sequence with the wrong length'), ( '', 0, 'badexcept', 'badExceptions', 'check if raising or catching bad exceptions'), ('4', 0, 'noeffect', 'noEffect', 'check if statement appears to have no effect'), ('', 0, 'modulo1', 'modulo1', 'check if using (expr % 1), it has no effect on integers and strings'), ('', 0, 'isliteral', 'isLiteral', "check if using (expr is const-literal), doesn't always work on integers and strings"), ('', 0, 'constattr', 'constAttr', "check if a constant string is passed to getattr()/setattr()"), ]), ('Possible Errors', [ ('r', 0, 'returnvalues', 'checkReturnValues', 'check consistent return values'), ('C', 0, 'implicitreturns', 'checkImplicitReturns', 'check if using implict and explicit return values'), ('O', 0, 'objattrs', 'checkObjectAttrs', 'check that attributes of objects exist'), ('7', 0, 'slots', 'slots', 'various warnings about incorrect usage of __slots__'), ('3', 0, 'properties', 'classicProperties', 'using properties with classic classes'), ( '', 0, 'emptyslots', 'emptySlots', 'check if __slots__ is empty'), ('D', 0, 'intdivide', 'intDivide', 'check if using integer division'), ('w', 0, 'shadow', 'shadows', 'check if local variable shadows a global'), ('s', 0, 'shadowbuiltin', 'shadowBuiltins', 'check if a variable shadows a builtin'), ]), ('Security', [ ( '', 0, 'input', 'usesInput', 'check if input() is used'), ('6', 0, 'exec', 'usesExec', 'check if the exec statement is used'), ]), ('Suppressions', [ ('q', 0, 'stdlib', 'ignoreStandardLibrary', 'ignore warnings from files under standard library'), ('b', 1, 'blacklist', 'blacklist', 'ignore warnings from the list of modules\n\t\t\t'), ('Z', 1, 'varlist', 'variablesToIgnore', 'ignore global variables not used if name is one of these values\n\t\t\t'), ('E', 1, 'unusednames', 'unusedNames', 'ignore unused locals/arguments if name is one of these values\n\t\t\t'), ('', 1, 'missingattrs', 'missingAttrs', 'ignore missing class attributes if name is one of these values\n\t\t\t'), ( '', 0, 'deprecated', 'deprecated', 'ignore use of deprecated modules/functions'), ]), ('Complexity', [ ('L', 1, 'maxlines', 'maxLines', 'maximum lines in a function'), ('B', 1, 'maxbranches', 'maxBranches', 'maximum branches in a function'), ('R', 1, 'maxreturns', 'maxReturns', 'maximum returns in a function'), ('J', 1, 'maxargs', 'maxArgs', 'maximum # of arguments to a function'), ('K', 1, 'maxlocals', 'maxLocals', 'maximum # of locals in a function'), ('5', 1, 'maxrefs', 'maxReferences', 'maximum # of identifier references (Law of Demeter)'), ('m', 0, 'moduledoc', 'noDocModule', 'no module doc strings'), ('c', 0, 'classdoc', 'noDocClass', 'no class doc strings'), ('f', 0, 'funcdoc', 'noDocFunc', 'no function/method doc strings'), ]), ('Debug', [ ( '', 0, 'rcfile', None, 'print a .pycheckrc file generated from command line args'), ('P', 0, 'printparse', 'printParse', 'print internal checker parse structures'), ('d', 0, 'debug', 'debug', 'turn on debugging for checker'), ('', 0, 'findevil', 'findEvil', 'print each class object to find one that crashes'), ('Q', 0, 'quiet', 'quiet', 'turn off all output except warnings'), ('V', 0, 'version', None, 'print the version of PyChecker and exit'), ]) ) def init() : GET_OPT_VALUE = (('', ''), (':', '='),) shortArgs, longArgs = "", [] for _, group in _OPTIONS : for opt in group: optStr = GET_OPT_VALUE[opt[1]] shortArgs = shortArgs + opt[0] + optStr[0] longArgs.append(opt[2] + optStr[1]) longArgs.append('no-' + opt[2] + optStr[1]) options = {} for _, group in _OPTIONS : for opt in group: shortArg, useValue, longArg, member, description = opt if shortArg != '' : options['-' + shortArg] = opt options['--no-' + longArg] = options['--' + longArg] = opt return shortArgs, longArgs, options _SHORT_ARGS, _LONG_ARGS, _OPTIONS_DICT = init() def _getRCfiles(filename) : """Return a list of .rc filenames, on Windows use the current directory on UNIX use the user's home directory """ files = [] home = os.environ.get('HOME') if home : files.append(home + os.sep + filename) files.append(filename) return files _RC_FILE_HEADER = '''# # .pycheckrc file created by PyChecker v%s @ %s # # It should be placed in your home directory (value of $HOME). # If $HOME is not set, it will look in the current directory. # ''' def outputRc(cfg) : output = _RC_FILE_HEADER % (_VERSION, time.ctime(time.time())) for name, group in _OPTIONS : for opt in group: shortArg, useValue, longArg, member, description = opt if member is None : continue description = string.strip(description) value = getattr(cfg, member) optStr = '# %s\n%s = %s\n\n' % (description, member, `value`) output = output + optStr return output class UsageError(Exception) : """Exception to indicate that the application should exit due to command line usage error.""" _SUPPRESSIONS_ERR = \ '''\nWarning, error processing defaults file: %s \%s must be a dictionary ({}) -- ignoring suppressions\n''' def _getSuppressions(name, dict, filename) : suppressions = dict.get(name, {}) if type(suppressions) != type({}) : print _SUPPRESSIONS_ERR % (filename, name) suppressions = {} return suppressions class Config : "Hold configuration information" def __init__(self) : "Initialize configuration with default values." # files to process (typically from cmd line) self.files = {} self.debug = 0 self.quiet = 0 self.only = 0 self.level = 0 self.limit = 10 self.ignoreImportErrors = 0 self.onlyCheckInitForMembers = 0 self.printParse = 0 self.quixote = 0 self.evil = [] self.findEvil = 0 self.noDocModule = 0 self.noDocClass = 0 self.noDocFunc = 0 self.reportAllGlobals = 0 self.allVariablesUsed = 0 self.privateVariableUsed = 1 self.membersUsed = 0 self.importUsed = 1 self.reimportSelf = 1 self.moduleImportErrors = 1 self.mixImport = 1 self.packageImportUsed = 1 self.localVariablesUsed = 1 self.unusedLocalTuple = 0 self.initDefinedInSubclass = 0 self.baseClassInitted = 1 self.abstractClasses = 1 self.callingAttribute = 0 self.classAttrExists = 1 self.namedArgs = 0 self.returnNoneFromInit = 1 self.unreachableCode = 0 self.constantConditions = 1 self.constant1 = 0 self.stringIteration = 1 self.inconsistentTypes = 0 self.unpackNonSequence = 1 self.unpackLength = 1 self.badExceptions = 1 self.noEffect = 1 self.deprecated = 1 self.modulo1 = 1 self.isLiteral = 1 self.stringFind = 1 self.unusedNames = _DEFAULT_UNUSED_LIST self.variablesToIgnore = _DEFAULT_VARIABLE_IGNORE_LIST self.blacklist = _DEFAULT_BLACK_LIST self.missingAttrs = _DEFAULT_MISSING_ATTRS_LIST self.ignoreStandardLibrary = 0 self.methodArgName = 'self' self.classmethodArgNames = ['cls', 'klass'] self.checkOverridenMethods = 1 self.checkSpecialMethods = 1 self.argumentsUsed = 1 self.varArgumentsUsed = 1 self.ignoreSelfUnused = 0 self.redefiningFunction = 1 self.maxLines = 200 self.maxBranches = 50 self.maxReturns = 10 self.maxArgs = 10 self.maxLocals = 40 self.maxReferences = 5 self.slots = 1 self.emptySlots = 1 self.classicProperties = 1 self.checkObjectAttrs = 1 self.checkReturnValues = 1 self.checkImplicitReturns = 1 self.intDivide = 1 self.shadows = 1 self.shadowBuiltins = 1 self.unaryPositive = 1 self.modifyDefaultValue = 1 self.usesExec = 0 self.usesInput = 1 self.constAttr = 1 def loadFile(self, filename): """ Load suppressions from the given file. @type filename: str @rtype: tuple of (dict, dict) """ suppressions = {} suppressionRegexs = {} try: tmpGlobals, tmpLocals = {}, {} execfile(filename, tmpGlobals, tmpLocals) suppressions = _getSuppressions('suppressions', tmpLocals, filename) regexs = _getSuppressions('suppressionRegexs', tmpLocals, filename) # debug them here, since the options in tmpLocals can turn off # debugging again # We don't have an active config here yet. Push ourselves, # since we first got loaded with command line arguments, # and so -d shows these suppression messages from pychecker import utils utils.initConfig(self) if suppressions: utils.debug('Loaded %d suppressions from %s', len(suppressions), filename) if suppressionRegexs: utils.debug('Loaded %d suppression regexs from %s', len(suppressionRegexs), filename) utils.popConfig() # now set our attributes based on the locals for key, value in tmpLocals.items(): if self.__dict__.has_key(key): self.__dict__[key] = value elif key not in ('suppressions', 'suppressionRegexs') and \ key[0] != '_': print "Warning, option (%s) doesn't exist, ignoring" % key for regex_str in regexs.keys(): regex = re.compile(regex_str) suppressionRegexs[regex] = regexs[regex_str] except IOError: pass # ignore if no file except Exception, detail: print "Warning, error loading defaults file:", filename, detail return suppressions, suppressionRegexs def loadFiles(self, filenames, oldSuppressions = None) : """ @type filenames: list of str @type oldSuppression: tuple of (dict, dict) @rtype: tuple of (dict, dict) """ if oldSuppressions is None : oldSuppressions = ({}, {}) suppressions = oldSuppressions[0] suppressionRegexs = oldSuppressions[1] for filename in filenames: updates = self.loadFile(filename) suppressions.update(updates[0]) suppressionRegexs.update(updates[1]) return suppressions, suppressionRegexs def processArgs(self, argList, otherConfigFiles = None) : try : args, files = getopt.getopt(argList, _SHORT_ARGS, _LONG_ARGS) except getopt.error, detail : raise UsageError, detail # setup files from cmd line for f in files: self.files[os.path.abspath(f)] = 1 if otherConfigFiles is None: otherConfigFiles = [] for arg, value in args : shortArg, useValue, longArg, member, description = _OPTIONS_DICT[arg] if member == None : # FIXME: this whole block is a hack if longArg == 'rcfile' : sys.stdout.write(outputRc(self)) continue elif longArg == 'quixote' : import quixote quixote.enable_ptl() self.quixote = 1 continue elif longArg == 'config' : otherConfigFiles.append(value) continue elif longArg == 'version' : # FIXME: it would be nice to define this in only one place print _VERSION sys.exit(0) elif longArg == 'level': normalizedValue = value.capitalize() if not _WARNING_LEVELS.has_key(normalizedValue): sys.stderr.write('Invalid warning level (%s). ' 'Must be one of: %s\n' % (value, _WARNING_LEVELS.keys())) sys.exit(1) self.level = _WARNING_LEVELS[normalizedValue].level continue elif value : newValue = value memberType = type(getattr(self, member)) if memberType == type(0) : newValue = int(newValue) elif memberType == type([]) : newValue = string.split(newValue, ',') elif memberType == type('') and \ newValue[0] in '\'"': try: newValue = eval(newValue) except: msg = 'Invalid option parameter: %s for %s\n' % \ (`newValue`, arg) sys.stderr.write(msg) setattr(self, member, newValue) elif arg[0:2] == '--' : setattr(self, member, arg[2:5] != 'no-') else : # for shortArgs we only toggle setattr(self, member, not getattr(self, member)) if self.variablesToIgnore.count(CHECKER_VAR) <= 0 : self.variablesToIgnore.append(CHECKER_VAR) return files def printArg(shortArg, longArg, description, defaultValue, useValue) : defStr = '' shortArgStr = ' ' if shortArg: shortArgStr = '-%s,' % shortArg if defaultValue != None : if not useValue : if defaultValue : defaultValue = 'on' else : defaultValue = 'off' defStr = ' [%s]' % defaultValue args = "%s --%s" % (shortArgStr, longArg) print " %-18s %s%s" % (args, description, defStr) def usage(cfg = None) : print "Usage for: checker.py [options] PACKAGE ...\n" print " PACKAGEs can be a python package, module or filename\n" print "Long options can be preceded with no- to turn off (e.g., no-namedargs)\n" print "Category" print " Options: Change warning for ... [default value]" if cfg is None : cfg = Config() for name, group in _OPTIONS : print print name + ":" for opt in group: shortArg, useValue, longArg, member, description = opt defValue = None if member != None : defValue = cfg.__dict__[member] printArg(shortArg, longArg, description, defValue, useValue) def setupFromArgs(argList): """ @param argList: the list of command-line arguments @type argList: list of str @rtype: list of L{Config}, list of str, tuple of (dict, dict) """ cfg = Config() try : otherConfigFiles = [] files = cfg.processArgs(argList, otherConfigFiles) suppressions = cfg.loadFiles(_getRCfiles(_RC_FILE)) if otherConfigFiles: suppressions = cfg.loadFiles(otherConfigFiles, suppressions) return cfg, files, suppressions except UsageError : usage(cfg) raise scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/Stack.py0000644000175000017500000001244611242100540031607 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2002, MetaSlash Inc. All rights reserved. """ Module to hold manipulation of elements on the stack. """ import types from pychecker import utils DATA_UNKNOWN = "-unknown-" LOCALS = 'locals' # These should really be defined by subclasses TYPE_UNKNOWN = "-unknown-" TYPE_FUNC_RETURN = "-return-value-" TYPE_ATTRIBUTE = "-attribute-" TYPE_COMPARISON = "-comparison-" TYPE_GLOBAL = "-global-" TYPE_EXCEPT = "-except-" class Item: """ Representation of data on the stack @ivar is_really_string: whether the stack item really is a string. """ def __init__(self, data, dataType, const=0, length=0): """ @param data: the actual data of the stack item @type dataType: type @param const: whether the item is a constant or not @type const: int @type length: int """ self.data = data self.type = dataType self.const = const self.length = length self.is_really_string = 0 def __str__(self) : if type(self.data) == types.TupleType: value = '(' for item in self.data: value = value + utils.safestr(item) + ', ' # strip off the ', ' for multiple items if len(self.data) > 1: value = value[:-2] return value + ')' return utils.safestr(self.data) def __repr__(self): return 'Stack Item: (%r, %r, %d)' % (self.data, self.type, self.const) def isNone(self): return (self.type != TYPE_UNKNOWN and self.data is None or (self.data == 'None' and not self.const)) def isImplicitNone(self) : return self.data is None and self.const def isMethodCall(self, c, methodArgName): return self.type == TYPE_ATTRIBUTE and c != None and \ len(self.data) == 2 and self.data[0] == methodArgName def isLocals(self): return self.type == types.DictType and self.data == LOCALS def setStringType(self, value = types.StringType): self.is_really_string = value == types.StringType def getType(self, typeMap): """ @type typeMap: dict of str -> list of str or L{pcmodules.Class} """ # FIXME: looks like StringType is used for real strings but also # for names of objects. Couldn't this be split to avoid # self.is_really_string ? if self.type != types.StringType or self.is_really_string: return self.type # FIXME: I assert here because there were if's to this effect, # and a return of type(self.data). Remove this assert later. assert type(self.data) == types.StringType # it's a StringType but not really a string # if it's constant, return type of data if self.const: return types.StringType # it's a non-constant StringType, so treat it as the name of a token # and look up the actual type in the typeMap localTypes = typeMap.get(self.data, []) if len(localTypes) == 1: return localTypes[0] return TYPE_UNKNOWN def getName(self): if self.type == TYPE_ATTRIBUTE and type(self.data) != types.StringType: strValue = "" # convert the tuple into a string ('self', 'data') -> self.data for item in self.data: strValue = '%s.%s' % (strValue, utils.safestr(item)) return strValue[1:] return utils.safestr(self.data) def addAttribute(self, attr): if type(self.data) == types.TupleType: self.data = self.data + (attr,) else: self.data = (self.data, attr) self.type = TYPE_ATTRIBUTE # FIXME: I haven't seen makeDict with anything else than (), 1 def makeDict(values=(), const=1): """ @param values: the values to make a dict out of @type values: FIXME: tuple of L{Item} ? @param const: whether the dict is constant @returns: A Stack.Item representing a dict @rtype: L{Item} """ values = tuple(values) if not values: values = ('', ) return Item(values, types.DictType, const, len(values)) def makeTuple(values=(), const=1): """ @param values: the values to make a tuple out of @type values: tuple of L{Item} @param const: whether the tuple is constant @returns: A Stack.Item representing a tuple @rtype: L{Item} """ return Item(tuple(values), types.TupleType, const, len(values)) # FIXME: I haven't seen makeList with anything else than const=1 def makeList(values=[], const=1): """ @param values: the values to make a list out of @type values: list of L{Item} @param const: whether the list is constant @returns: A Stack.Item representing a list @rtype: L{Item} """ return Item(values, types.ListType, const, len(values)) def makeFuncReturnValue(stackValue, argCount) : data = DATA_UNKNOWN # vars() without params == locals() if stackValue.type == TYPE_GLOBAL and \ (stackValue.data == LOCALS or (argCount == 0 and stackValue.data == 'vars')) : data = LOCALS return Item(data, TYPE_FUNC_RETURN) def makeComparison(stackItems, comparison) : return Item((stackItems[0], comparison, stackItems[1]), TYPE_COMPARISON) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/warn.py0000644000175000017500000007725611242100540031523 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2002, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Print out warnings from Python source files. """ import os.path import sys import string import types import traceback import imp import re from pychecker import OP from pychecker import Stack from pychecker import function from pychecker import python from pychecker import pcmodules from pychecker import msgs from pychecker import utils from pychecker import CodeChecks from pychecker.Warning import Warning def cfg() : return utils.cfg() def _checkSelfArg(method, warnings) : """Return a Warning if there is no self parameter or the first parameter to a method is not self.""" if not cfg().methodArgName: return code = method.function.func_code err = None if method.isStaticMethod(): if code.co_argcount > 0 and cfg().methodArgName == code.co_varnames[0]: err = msgs.SELF_IS_ARG % 'staticmethod' elif code.co_argcount < 1: err = msgs.NO_METHOD_ARGS % cfg().methodArgName else: if method.isClassMethod(): if code.co_varnames[0] not in cfg().classmethodArgNames: err = msgs.SELF_NOT_FIRST_ARG % \ (cfg().classmethodArgNames, 'class') elif code.co_varnames[0] != cfg().methodArgName: err = msgs.SELF_NOT_FIRST_ARG % (cfg().methodArgName, '') if err is not None : warnings.append(Warning(code, code, err)) def _checkNoSelfArg(func, warnings) : "Return a Warning if there is a self parameter to a function." code = func.function.func_code if code.co_argcount > 0 and cfg().methodArgName in code.co_varnames: warnings.append(Warning(code, code, msgs.SELF_IS_ARG % 'function')) def _checkSubclass(c1, c2): try: return issubclass(c1.classObject, c2.classObject) except (TypeError, AttributeError): return 0 _IGNORE_RETURN_TYPES = ( Stack.TYPE_FUNC_RETURN, Stack.TYPE_ATTRIBUTE, Stack.TYPE_GLOBAL, Stack.TYPE_COMPARISON, Stack.TYPE_UNKNOWN) def _checkReturnWarnings(code) : is_getattr = code.func_code.co_name in ('__getattr__', '__getattribute__') if is_getattr : for line, retval, dummy in code.returnValues : if retval.isNone() : err = msgs.DONT_RETURN_NONE % code.func_code.co_name code.addWarning(err, line+1) # there must be at least 2 real return values to check for consistency returnValuesLen = len(code.returnValues) if returnValuesLen < 2 : return # if the last return is implicit, check if there are non None returns lastReturn = code.returnValues[-1] # Python 2.4 optimizes the dead implicit return out, so we can't # distinguish implicit and explicit "return None" if utils.pythonVersion() < utils.PYTHON_2_4 and \ not code.starts_and_ends_with_finally and \ cfg().checkImplicitReturns and lastReturn[1].isImplicitNone(): for line, retval, dummy in code.returnValues[:-1] : if not retval.isNone() : code.addWarning(msgs.IMPLICIT_AND_EXPLICIT_RETURNS, lastReturn[0]+1) break # __get*__ funcs can return different types, don't warn about inconsistency if utils.startswith(code.func_code.co_name, '__get') and \ utils.endswith(code.func_code.co_name, '__') : return returnType, returnData = None, None for line, value, dummy in code.returnValues : if not value.isNone() : valueType = value.getType(code.typeMap) if returnType is None and valueType not in _IGNORE_RETURN_TYPES : returnData = value returnType = valueType continue # always ignore None, None can be returned w/any other type # FIXME: if we stored func return values, we could do better if returnType is not None and not value.isNone() and \ valueType not in _IGNORE_RETURN_TYPES and \ returnData.type not in _IGNORE_RETURN_TYPES : ok = returnType in (type(value.data), valueType) if ok : if returnType == types.TupleType : # FIXME: this isn't perfect, if len == 0 # the length can really be 0 OR unknown # we shouldn't check the lengths for equality # ONLY IF one of the lengths is truly unknown if returnData.length > 0 and value.length > 0: ok = returnData.length == value.length else : ok = _checkSubclass(returnType, valueType) or \ _checkSubclass(valueType, returnType) if not ok : code.addWarning(msgs.INCONSISTENT_RETURN_TYPE, line) def _checkComplex(code, maxValue, value, func, err) : if maxValue and value > maxValue : line = func.function.func_code.co_firstlineno code.addWarning(err % (func.function.__name__, value), line) def _checkCode(code, codeSource) : while code.index < code.maxCode : op, oparg, operand = code.popNextOp() dispatch_func = CodeChecks.DISPATCH[op] if dispatch_func is not None : try : dispatch_func(oparg, operand, codeSource, code) except NotImplementedError : raise NotImplementedError('No DISPATCH member for op %r' % op) def _name_unused(var) : if var in cfg().unusedNames : return 0 for name in cfg().unusedNames : if name != '_' and utils.startswith(var, name) : return 0 return 1 def _checkUnusedParam(var, line, func, code) : if line is not None and line == 0 and _name_unused(var) : if ((cfg().ignoreSelfUnused or var != cfg().methodArgName) and (cfg().varArgumentsUsed or func.varArgName() != var)) : code.addWarning(msgs.UNUSED_PARAMETER % var, code.func_code) def _handleNestedCode(func_code, code, codeSource): nested = not (codeSource.main or codeSource.in_class) if func_code.co_name == utils.LAMBDA or nested: utils.debug(' handling nested code %s under %r', func_code.co_name, codeSource.func) varnames = None if nested and func_code.co_name != utils.LAMBDA: varnames = func_code.co_varnames + \ codeSource.calling_code[-1].function.func_code.co_varnames # save the original return value and restore after checking returnValues = code.returnValues # we don't want suppressions from nested code to bleed into the # containing code block, or the next nested code on the same level utils.pushConfig() code.init(function.create_fake(func_code.co_name, func_code, {}, varnames)) _checkCode(code, codeSource) utils.popConfig() code.returnValues = returnValues def _findUnreachableCode(code) : # code after RETURN or RAISE is unreachable unless there's a branch to it unreachable = {} terminals = code.returnValues[:-1] + code.raiseValues terminals.sort(lambda a, b: cmp(a[2], b[2])) for line, dummy, i in terminals : if not code.branches.has_key(i) : unreachable[i] = line # find the index of the last return lastLine = lastItem = lastIndex = None if code.returnValues: lastLine, lastItem, lastIndex = code.returnValues[-1] if len(code.returnValues) >= 2 : lastIndex = code.returnValues[-2][2] if code.raiseValues : lastIndex = max(lastIndex, code.raiseValues[-1][2]) # remove last return if it's unreachable AND implicit if unreachable.get(lastIndex) == lastLine and lastItem and \ lastItem.isImplicitNone(): del code.returnValues[-1] del unreachable[lastIndex] if cfg().unreachableCode : for index in unreachable.keys() : try : if not OP.JUMP_FORWARD(ord(code.bytes[index])) : code.addWarning(msgs.CODE_UNREACHABLE, unreachable[index]) except IndexError : pass def _checkFunction(module, func, c = None, main = 0, in_class = 0) : """ Return a list of Warnings found in a function/method. @type module: L{pychecker.checker.PyCheckerModule} """ # always push a new config object, so we can pop at end of function utils.pushConfig() code = CodeChecks.Code() code.init(func) if main: for key in func.function.func_globals.keys(): code.unusedLocals[key] = -1 codeSource = CodeChecks.CodeSource(module, func, c, main, in_class, code) try : _checkCode(code, codeSource) if not in_class : _findUnreachableCode(code) # handle lambdas and nested functions codeSource.calling_code.append(func) for key in code.codeOrder: func_code = code.codeObjects[key] _handleNestedCode(func_code, code, codeSource) del codeSource.calling_code[-1] except (SystemExit, KeyboardInterrupt) : exc_type, exc_value, exc_tb = sys.exc_info() raise exc_type, exc_value except : exc_type, exc_value, exc_tb = sys.exc_info() exc_list = traceback.format_exception(exc_type, exc_value, exc_tb) for index in range(0, len(exc_list)) : exc_list[index] = string.replace(exc_list[index], "\n", "\n\t") code.addWarning(msgs.CHECKER_BROKEN % string.join(exc_list, "")) if cfg().checkReturnValues : _checkReturnWarnings(code) if cfg().localVariablesUsed : for var, line in code.unusedLocals.items() : if line is not None and line > 0 and _name_unused(var) : code.addWarning(msgs.UNUSED_LOCAL % var, line) if cfg().argumentsUsed : op = code.getFirstOp() if not (OP.RAISE_VARARGS(op) or OP.RETURN_VALUE(op)) : for var, line in code.unusedLocals.items() : _checkUnusedParam(var, line, func, code) # Check code complexity: # loops should be counted as one branch, but there are typically 3 # branches in byte code to setup a loop, so subtract off 2/3's of them # / 2 to approximate real branches branches = (len(code.branches.keys()) - (2 * code.loops)) / 2 lines = (code.getLineNum() - code.func_code.co_firstlineno) returns = len(code.returnValues) if not main and not in_class : args = code.func_code.co_argcount localCount = len(code.func_code.co_varnames) - args _checkComplex(code, cfg().maxArgs, args, func, msgs.TOO_MANY_ARGS) _checkComplex(code, cfg().maxLocals, localCount, func, msgs.TOO_MANY_LOCALS) _checkComplex(code, cfg().maxLines, lines, func, msgs.FUNC_TOO_LONG) _checkComplex(code, cfg().maxReturns, returns, func, msgs.TOO_MANY_RETURNS) _checkComplex(code, cfg().maxBranches, branches, func, msgs.TOO_MANY_BRANCHES) if not (main or in_class) : utils.popConfig() func.returnValues = code.returnValues # FIXME: I don't think code.codeObjects.values() ever gets used, # but if it does, and needs to be in order, then use code.codeOrder here. return (code.warnings, code.globalRefs, code.functionsCalled, code.codeObjects.values(), code.returnValues) def _getUnused(module, globalRefs, dict, msg, filterPrefix = None) : "Return a list of warnings for unused globals" warnings = [] for ref in dict.keys() : check = not filterPrefix or utils.startswith(ref, filterPrefix) if check and globalRefs.get(ref) == None : lineInfo = module.moduleLineNums.get(ref) if lineInfo: warnings.append(Warning(lineInfo[0], lineInfo[1], msg % ref)) return warnings def _get_func_info(method) : try: fc = getattr(method.im_func, 'func_code', None) if fc is not None : return fc.co_filename, fc.co_firstlineno except AttributeError: # if the object derives from any object in 2.2, # the builtin methods are wrapper_descriptors and # have no im_func attr pass return None, None _DOT_INIT = '.' + utils.INIT def _baseInitCalled(classInitInfo, base, functionsCalled) : baseInit = getattr(base, utils.INIT, None) if baseInit is None or _get_func_info(baseInit) == classInitInfo : return 1 initName = utils.safestr(base) + _DOT_INIT if functionsCalled.has_key(initName) : return 1 # ok, do this the hard way, there may be aliases, so check here names = string.split(initName, '.') # first look in our list of PyCheckerModules moduleName = names[0] moduleDir = os.path.dirname(classInitInfo[0]) pcmodule = pcmodules.getPCModule(moduleName, moduleDir) if pcmodule: obj = pcmodule.module else: # fall back to looking in sys.modules try: # i think this can raise an exception if the module is a library # (.so) obj = sys.modules[names[0]] except KeyError: return 1 for i in range(1, len(names)) : obj = getattr(obj, names[i], None) if obj is None: return 0 if functionsCalled.has_key(string.join(names[i:], '.')) : return 1 return 0 def _checkBaseClassInit(moduleFilename, c, func_code, funcInfo) : """ Return a list of warnings that occur for each base class whose __init__() is not called @param funcInfo: triple of functions called, code objects, return values @type funcInfo: triple """ warnings = [] functionsCalled, _, returnValues = funcInfo for line, stackItem, dummy in returnValues : if stackItem.data != None : if not stackItem.isNone() or cfg().returnNoneFromInit : warn = Warning(func_code, line, msgs.RETURN_FROM_INIT) warnings.append(warn) classInit = getattr(c.classObject, utils.INIT, None) if cfg().baseClassInitted and classInit is not None : classInitInfo = _get_func_info(classInit) for base in getattr(c.classObject, '__bases__', None) or (): if not _baseInitCalled(classInitInfo, base, functionsCalled): warn = Warning(moduleFilename, func_code, msgs.BASE_CLASS_NOT_INIT % utils.safestr(base)) warnings.append(warn) return warnings def _checkOverridenMethods(func, baseClasses, warnings) : for baseClass in baseClasses : if func.func_name != utils.INIT and \ not function.same_signature(func, baseClass) : err = msgs.METHOD_SIGNATURE_MISMATCH % (func.func_name, utils.safestr(baseClass)) warnings.append(Warning(func.func_code, func.func_code, err)) break def _updateFunctionWarnings(module, func, c, warnings, globalRefs, main = 0, in_class = 0) : """ Update function warnings and global references. @type module: L{pychecker.checker.PyCheckerModule} @type func: L{function.Function} """ newWarnings, newGlobalRefs, funcs, codeObjects, returnValues = \ _checkFunction(module, func, c, main, in_class) warnings.extend(newWarnings) globalRefs.update(newGlobalRefs) return funcs, codeObjects, returnValues def getBlackList(moduleList) : blacklist = [] for badBoy in moduleList : if badBoy[-3:] == ".py": badBoy = badBoy[0:-3] try : handle, path, flags = imp.find_module(badBoy) if handle: handle.close() # apparently, imp.find_module can return None, path, (triple) # This happened to me with twisted 2.2.0 in a separate path if path: blacklist.append(normalize_path(path)) except ImportError : pass return blacklist def getStandardLibraries() : """ Return a list of standard libraries. @rtype: list of str or None """ if cfg().ignoreStandardLibrary : try : from distutils import sysconfig std_libs = [ sysconfig.get_python_lib(plat_specific=0), sysconfig.get_python_lib(plat_specific=1) ] ret = [] for std_lib in std_libs: path = os.path.split(std_lib) if path[1] == 'site-packages' : ret.append(path[0]) return ret except ImportError : return None def normalize_path(path): return os.path.normpath(os.path.normcase(path)) def removeWarnings(warnings, blacklist, std_lib, cfg): """ @param blacklist: list of absolute paths not to warn for @type blacklist: str @param std_lib: list of standard library directories @type std_lib: list of str or None """ utils.debug('filtering %d warnings with blacklist', len(warnings)) if std_lib is not None: std_lib = [normalize_path(p) for p in std_lib] for index in range(len(warnings) - 1, -1, -1): filename = normalize_path(warnings[index].file) # the blacklist contains paths to packages and modules we do not # want warnings for # when we find a match, make sure we continue the warnings for loop found = False for path in blacklist: if not found and filename.startswith(path): found = True del warnings[index] if found: continue if std_lib: found = False for path in std_lib: if not found and utils.startswith(filename, path) : found = True del warnings[index] if found: continue elif cfg.only: # ignore files not specified on the cmd line if requested if os.path.abspath(filename) not in cfg.files: del warnings[index] continue # filter by warning/error level if requested if cfg.level and warnings[index].level < cfg.level: del warnings[index] if cfg.limit: # sort by severity first, then normal sort (by file/line) warnings.sort(lambda a, b: cmp(a.level, b.level) or cmp(a, b)) # strip duplicates lastWarning = None for index in range(len(warnings)-1, -1, -1): warning = warnings[index] # remove duplicate warnings if lastWarning is not None and cmp(lastWarning, warning) == 0: del warnings[index] else: lastWarning = warning num_ignored = len(warnings) - cfg.limit if num_ignored > 0: del warnings[:-cfg.limit] msg = msgs.TOO_MANY_WARNINGS % num_ignored warnings.append(Warning('', 0, msg)) utils.debug('kept %d warnings with blacklist', len(warnings)) return warnings class _SuppressionError(Exception) : pass def _updateSuppressions(suppress, warnings) : if not utils.updateCheckerArgs(suppress, 'suppressions', 0, warnings) : utils.popConfig() raise _SuppressionError _CLASS_NAME_RE = re.compile("(\\..+)?") def getSuppression(name, suppressions, warnings): """ @type name: str @type suppressions: tuple of (dict of str -> str, dict of _sre.SRE_Pattern -> str) @type warnings: list of L{Warning.Warning} @returns: the suppression options for the given name @rtype: str """ try: utils.pushConfig() # cheesy hack to deal with new-style classes. i don't see a # better way to get the name, '<' is an invalid identifier, so # we can reliably check it and extract name from: # [.identifier[.identifier]...] matches = _CLASS_NAME_RE.match(name) if matches: # pull out the names and make a complete identifier (ignore None) name = string.join(filter(None, matches.groups()), '') suppress = suppressions[0].get(name, None) if suppress is not None: _updateSuppressions(suppress, warnings) regexList = suppressions[1].keys() regexList.sort() for regex in regexList: match = regex.match(name) if match and match.group() == name: suppress = 1 _updateSuppressions(suppressions[1][regex], warnings) if not suppress : utils.popConfig() return suppress except _SuppressionError : return None def _findFunctionWarnings(module, globalRefs, warnings, suppressions) : """ @type module: L{pychecker.checker.PyCheckerModule} """ for func in module.functions.values() : func_code = func.function.func_code utils.debug("function:", func_code) name = '%s.%s' % (module.moduleName, func.function.__name__) suppress = getSuppression(name, suppressions, warnings) if cfg().noDocFunc and func.function.__doc__ == None : err = msgs.NO_FUNC_DOC % func.function.__name__ # FIXME: is there a good reason why this passes func_code as line ? warnings.append(Warning(module.filename(), func_code, err)) _checkNoSelfArg(func, warnings) _updateFunctionWarnings(module, func, None, warnings, globalRefs) if suppress is not None : utils.popConfig() def _getModuleFromFilename(module, filename): if module.filename() != filename: for m in module.modules.values(): if m.filename() == filename: return m return module # Create object for non-2.2 interpreters, any class object will do try: if object: pass except NameError: object = _SuppressionError # Create property for pre-2.2 interpreters try : if property: pass except NameError: property = None def _findClassWarnings(module, c, class_code, globalRefs, warnings, suppressions) : utils.debug("class:", class_code) try: className = utils.safestr(c.classObject) except TypeError: # goofy __getattr__ return classSuppress = getSuppression(className, suppressions, warnings) baseClasses = c.allBaseClasses() for base in baseClasses : baseModule = utils.safestr(base) if '.' in baseModule : # make sure we handle import x.y.z packages = string.split(baseModule, '.') baseModuleDir = string.join(packages[:-1], '.') globalRefs[baseModuleDir] = baseModule # handle class variables if class_code is not None : func = function.create_fake(c.name, class_code) _updateFunctionWarnings(module, func, c, warnings, globalRefs, 0, 1) filename = module.filename() func_code = None for method in c.methods.values() : if method == None : continue func_code = method.function.func_code utils.debug("class %s: method:" % className, func_code) try: name = utils.safestr(c.classObject) + '.' + method.function.func_name except AttributeError: # func_name may not exist continue methodSuppress = getSuppression(name, suppressions, warnings) if cfg().checkSpecialMethods: funcname = method.function.func_name if funcname[:2] == '__' == funcname[-2:] and \ funcname != '__init__': err = None argCount = python.SPECIAL_METHODS.get(funcname, -1) if argCount != -1: # if the args are None, it can be any # of args if argCount is not None: minArgs = maxArgs = argCount err = CodeChecks.getFunctionArgErr(funcname, func_code.co_argcount, minArgs, maxArgs) else: err = msgs.NOT_SPECIAL_METHOD % funcname if err is not None: warnings.append(Warning(filename, func_code, err)) if cfg().checkOverridenMethods : _checkOverridenMethods(method.function, baseClasses, warnings) if cfg().noDocFunc and method.function.__doc__ == None : err = msgs.NO_FUNC_DOC % method.function.__name__ # FIXME: is there a good reason why this passes func_code as line ? warnings.append(Warning(filename, func_code, err)) _checkSelfArg(method, warnings) tmpModule = _getModuleFromFilename(module, func_code.co_filename) funcInfo = _updateFunctionWarnings(tmpModule, method, c, warnings, globalRefs) if func_code.co_name == utils.INIT : # this is a constructor if utils.INIT in dir(c.classObject) : warns = _checkBaseClassInit(filename, c, func_code, funcInfo) warnings.extend(warns) elif cfg().initDefinedInSubclass : err = msgs.NO_INIT_IN_SUBCLASS % c.name warnings.append(Warning(filename, c.getFirstLine(), err)) if methodSuppress is not None : utils.popConfig() if c.memberRefs and cfg().membersUsed : memberList = c.memberRefs.keys() memberList.sort() err = msgs.UNUSED_MEMBERS % (string.join(memberList, ', '), c.name) warnings.append(Warning(filename, c.getFirstLine(), err)) try: newStyleClass = issubclass(c.classObject, object) except TypeError: # FIXME: perhaps this should warn b/c it may be a class??? newStyleClass = 0 slots = c.statics.get('__slots__') if slots is not None and cfg().slots: lineNum = c.lineNums['__slots__'] if not newStyleClass: err = msgs.USING_SLOTS_IN_CLASSIC_CLASS % c.name warnings.append(Warning(filename, lineNum, err)) elif cfg().emptySlots: try: if len(slots.data) == 0: err = msgs.EMPTY_SLOTS % c.name warnings.append(Warning(filename, lineNum, err)) except AttributeError: # happens when slots is an instance of a class w/o __len__ pass if not newStyleClass and property is not None and cfg().classicProperties: for static in c.statics.keys(): if type(getattr(c.classObject, static, None)) == property: err = msgs.USING_PROPERTIES_IN_CLASSIC_CLASS % (static, c.name) warnings.append(Warning(filename, c.lineNums[static], err)) coerceMethod = c.methods.get('__coerce__') if newStyleClass and coerceMethod: lineNum = coerceMethod.function.func_code.co_firstlineno err = msgs.USING_COERCE_IN_NEW_CLASS % c.name warnings.append(Warning(filename, lineNum, err)) for newClassMethodName in python.NEW_STYLE_CLASS_METHODS: newClassMethod = c.methods.get(newClassMethodName) if not newStyleClass and newClassMethod: lineNum = newClassMethod.function.func_code.co_firstlineno err = msgs.USING_NEW_STYLE_METHOD_IN_OLD_CLASS % (newClassMethodName, c.name) warnings.append(Warning(filename, lineNum, err)) if cfg().noDocClass and c.classObject.__doc__ == None : method = c.methods.get(utils.INIT, None) if method != None : func_code = method.function.func_code # FIXME: check to make sure this is in our file, # not a base class file??? err = msgs.NO_CLASS_DOC % c.classObject.__name__ warnings.append(Warning(filename, func_code, err)) # we have to do this here, b/c checkFunction doesn't popConfig for classes # this allows us to have __pychecker__ apply to all methods # when defined at class scope if class_code is not None : utils.popConfig() if classSuppress is not None : utils.popConfig() def find(moduleList, initialCfg, suppressions=None): "Return a list of warnings found in the module list" if suppressions is None : suppressions = {}, {} utils.initConfig(initialCfg) utils.debug('Finding warnings in %d modules' % len(moduleList)) warnings = [] before = 0 for module in moduleList : if module.moduleName in cfg().blacklist : continue modSuppress = getSuppression(module.moduleName, suppressions, warnings) globalRefs, classCodes = {}, {} # mainCode can be null if there was a syntax error if module.mainCode != None : utils.debug("module:", module) before = len(warnings) funcInfo = _updateFunctionWarnings(module, module.mainCode, None, warnings, globalRefs, 1) if before != len(warnings): utils.debug("module: %r __main__ triggered %d warnings", module, len(warnings) - before) for code in funcInfo[1] : classCodes[code.co_name] = code before = len(warnings) _findFunctionWarnings(module, globalRefs, warnings, suppressions) if before != len(warnings): utils.debug("module: %r functions triggered %d warnings", module, len(warnings) - before) before = len(warnings) for c in module.classes.values(): _findClassWarnings(module, c, classCodes.get(c.name), globalRefs, warnings, suppressions) if before != len(warnings): utils.debug("module: %r classes triggered %d warnings", module, len(warnings) - before) if cfg().noDocModule and \ module.module != None and module.module.__doc__ == None: warnings.append(Warning(module.filename(), 1, msgs.NO_MODULE_DOC)) utils.debug("module: %r module doc triggered 1 warning") before = len(warnings) if cfg().allVariablesUsed or cfg().privateVariableUsed: prefix = None if not cfg().allVariablesUsed: prefix = "_" for ignoreVar in cfg().variablesToIgnore + cfg().unusedNames: globalRefs[ignoreVar] = ignoreVar warnings.extend(_getUnused(module, globalRefs, module.variables, msgs.VAR_NOT_USED, prefix)) if before != len(warnings): utils.debug("module: %r unused variables triggered %d warnings", module, len(warnings) - before) before = len(warnings) if cfg().importUsed: if module.moduleName != utils.INIT or cfg().packageImportUsed: # always ignore readline module, if [raw_]input() is used if globalRefs.has_key('input') or \ globalRefs.has_key('raw_input'): globalRefs['readline'] = 0 warnings.extend(_getUnused(module, globalRefs, module.modules, msgs.IMPORT_NOT_USED)) if before != len(warnings): utils.debug("module: %r unused imports triggered %d warnings", module, len(warnings) - before) # we have to do this here, b/c checkFunction doesn't popConfig for # classes this allows us to have __pychecker__ apply to all methods # when defined at class scope if module.mainCode != None: utils.popConfig() if modSuppress is not None: utils.popConfig() std_lib = None if cfg().ignoreStandardLibrary: std_lib = getStandardLibraries() ret = removeWarnings(warnings, getBlackList(cfg().blacklist), std_lib, cfg()) utils.debug('Found %d warnings in %d modules' % (len(ret), len(moduleList))) return ret if 0: # if you want to test w/psyco, include this import psyco psyco.bind(_checkCode) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/msgs.py0000644000175000017500000002141611242100540031510 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Warning Messages for PyChecker """ import UserString class WarningClass: level = 0 def __init__(self, msg, level_offset=None): self.msg = msg if level_offset is not None: self.level += level_offset def __mod__(self, args): result = UserString.UserString(self.msg % args) result.level = self.level return result def __str__(self): return self.msg class Internal(WarningClass): level = 100 class Error(WarningClass): level = 90 class Security(WarningClass): level = 90 class Warning(WarningClass): level = 70 class Unused(WarningClass): level = 50 class Deprecated(WarningClass): level = 40 class Style(WarningClass): level = 10 TOO_MANY_WARNINGS = WarningClass("%d errors suppressed, use -#/--limit to increase the number of errors displayed") CHECKER_BROKEN = Internal("INTERNAL ERROR -- STOPPED PROCESSING FUNCTION --\n\t%s") INVALID_CHECKER_ARGS = Internal("Invalid warning suppression arguments --\n\t%s") NO_MODULE_DOC = Style("No module doc string") NO_CLASS_DOC = Style("No doc string for class %s") NO_FUNC_DOC = Style("No doc string for function %s") VAR_NOT_USED = Unused("Variable (%s) not used") IMPORT_NOT_USED = Unused("Imported module (%s) not used") UNUSED_LOCAL = Unused("Local variable (%s) not used") UNUSED_PARAMETER = Unused("Parameter (%s) not used") UNUSED_MEMBERS = Unused("Members (%s) not used in class (%s)") NO_LOCAL_VAR = Unused("No local variable (%s)") VAR_USED_BEFORE_SET = Warning("Variable (%s) used before being set") REDEFINING_ATTR = Warning("Redefining attribute (%s) original line (%d)") MODULE_IMPORTED_AGAIN = Warning("Module (%s) re-imported") MODULE_MEMBER_IMPORTED_AGAIN = Warning("Module member (%s) re-imported") MODULE_MEMBER_ALSO_STAR_IMPORTED = Warning("Module member (%s) re-imported with *") MIX_IMPORT_AND_FROM_IMPORT = Warning("Using import and from ... import for (%s)") IMPORT_SELF = Warning("Module (%s) imports itself") NO_METHOD_ARGS = Error("No method arguments, should have %s as argument") SELF_NOT_FIRST_ARG = Error("%s is not first %smethod argument") SELF_IS_ARG = Error("self is argument in %s") RETURN_FROM_INIT = Error("Cannot return a value from __init__") NO_CTOR_ARGS = Error("Instantiating an object with arguments, but no constructor") GLOBAL_DEFINED_NOT_DECLARED = Warning("Global variable (%s) not defined in module scope") INVALID_GLOBAL = Error("No global (%s) found") INVALID_METHOD = Error("No method (%s) found") INVALID_CLASS_ATTR = Warning("No class attribute (%s) found") INVALID_SET_CLASS_ATTR = Warning("Setting class attribute (%s) not set in __init__") INVALID_MODULE_ATTR = Error("No module attribute (%s) found") LOCAL_SHADOWS_GLOBAL = Warning("Local variable (%s) shadows global defined on line %d") VARIABLE_SHADOWS_BUILTIN = Warning("(%s) shadows builtin") USING_METHOD_AS_ATTR = Warning("Using method (%s) as an attribute (not invoked)") OBJECT_HAS_NO_ATTR = Warning("Object (%s) has no attribute (%s)") METHOD_SIGNATURE_MISMATCH = Warning("Overridden method (%s) doesn't match signature in class (%s)") INVALID_ARG_COUNT1 = Error("Invalid arguments to (%s), got %d, expected %d") INVALID_ARG_COUNT2 = Error("Invalid arguments to (%s), got %d, expected at least %d") INVALID_ARG_COUNT3 = Error("Invalid arguments to (%s), got %d, expected between %d and %d") FUNC_DOESNT_SUPPORT_KW = Error("Function (%s) doesn't support **kwArgs") FUNC_DOESNT_SUPPORT_KW_ARG = Error("Function (%s) doesn't support **kwArgs for name (%s)") FUNC_USES_NAMED_ARGS = Warning("Function (%s) uses named arguments") BASE_CLASS_NOT_INIT = Warning("Base class (%s) __init__() not called") NO_INIT_IN_SUBCLASS = Warning("No __init__() in subclass (%s)") METHODS_NEED_OVERRIDE = Error("Methods (%s) in %s need to be overridden in a subclass") FUNC_TOO_LONG = Style("Function (%s) has too many lines (%d)") TOO_MANY_BRANCHES = Style("Function (%s) has too many branches (%d)") TOO_MANY_RETURNS = Style("Function (%s) has too many returns (%d)") TOO_MANY_ARGS = Style("Function (%s) has too many arguments (%d)") TOO_MANY_LOCALS = Style("Function (%s) has too many local variables (%d)") TOO_MANY_REFERENCES = Style('Law of Demeter violated, more than %d references for (%s)') IMPLICIT_AND_EXPLICIT_RETURNS = Warning("Function returns a value and also implicitly returns None") INCONSISTENT_RETURN_TYPE = Warning("Function return types are inconsistent") INCONSISTENT_TYPE = Warning("Variable (%s) already has types %s and set to %s") CODE_UNREACHABLE = Error("Code appears to be unreachable") CONSTANT_CONDITION = Warning("Using a conditional statement with a constant value (%s)") STRING_ITERATION = Warning("Iterating over a string (%s)") DONT_RETURN_NONE = Error("%s should not return None, raise an exception if not found") IS_LITERAL = Warning("Using is%s %s, may not always work") INVALID_FORMAT = Error("Invalid format string, problem starts near: '%s'") INVALID_FORMAT_COUNT = Error("Format string argument count (%d) doesn't match arguments (%d)") TOO_MANY_STARS_IN_FORMAT = Error("Too many *s in format flags") USING_STAR_IN_FORMAT_MAPPING = Error("Can't use * in formats when using a mapping (dictionary), near: '%s'") CANT_MIX_MAPPING_IN_FORMATS = Error("Can't mix tuple/mapping (dictionary) formats in same format string") INTEGER_DIVISION = Warning("Using integer division (%s / %s) may return integer or float") MODULO_1 = Warning("... % 1 may be constant") USING_TUPLE_ACCESS_TO_LIST = Error("Using a tuple instead of slice as list accessor for (%s)") BOOL_COMPARE = Warning("Comparisons with %s are not necessary and may not work as expected") SHOULDNT_ASSIGN_BUILTIN = Deprecated("Should not assign to %s, it is (or will be) a builtin") SHOULDNT_ASSIGN_NAME = Deprecated("Should not assign to %s, it is similar to builtin %s") SET_VAR_TO_ITSELF = Warning("Setting %s to itself has no effect") MODIFY_VAR_NOOP = Warning("%s %s %s has no effect") DIVIDE_VAR_BY_ITSELF = Warning("%s %s %s is always 1 or ZeroDivisionError") XOR_VAR_WITH_ITSELF = Warning("%s %s %s is always 0") STMT_WITH_NO_EFFECT = Error("Operator (%s) doesn't exist, statement has no effect") POSSIBLE_STMT_WITH_NO_EFFECT = Error("Statement appears to have no effect") UNARY_POSITIVE_HAS_NO_EFFECT = Error("Unary positive (+) usually has no effect") LIST_APPEND_ARGS = Error("[].append() only takes 1 argument in Python 1.6 and above for (%s)") LOCAL_DELETED = Error("(%s) cannot be used after being deleted on line %d") LOCAL_ALREADY_DELETED = Error("Local variable (%s) has already been deleted on line %d") VAR_DELETED_BEFORE_SET = Error("Variable (%s) deleted before being set") CATCH_BAD_EXCEPTION = Warning("Catching a non-Exception object (%s)") CATCH_STR_EXCEPTION = Deprecated("Catching string exceptions are deprecated (%s)") RAISE_BAD_EXCEPTION = Warning("Raising an exception on a non-Exception object (%s)") RAISE_STR_EXCEPTION = Deprecated("Raising string exceptions are deprecated (%s)") SET_EXCEPT_TO_BUILTIN = Error("Setting exception to builtin (%s), consider () around exceptions") USING_KEYWORD = Warning("Using identifier (%s) which will become a keyword in version %s") MODIFYING_DEFAULT_ARG = Warning("Modifying parameter (%s) with a default value may have unexpected consequences") USING_SELF_IN_REPR = Warning("Using `self` in __repr__ method") USING_NONE_RETURN_VALUE = Error("Using the return value from (%s) which is always None") WRONG_UNPACK_SIZE = Error("Unpacking %d values into %d variables") WRONG_UNPACK_FUNCTION = Error("Unpacking function (%s) which returns %d values into %d variables") UNPACK_NON_SEQUENCE = Error("Unpacking a non-sequence (%s) of type %s") NOT_SPECIAL_METHOD = Warning("%s is not a special method") USING_COERCE_IN_NEW_CLASS = Error("Using __coerce__ in new-style class (%s) will not work for binary operations") USING_NEW_STYLE_METHOD_IN_OLD_CLASS = Error("Using %s in old-style class (%s) does not work") USING_PROPERTIES_IN_CLASSIC_CLASS = Error("Using property (%s) in classic class %s may not work") USING_SLOTS_IN_CLASSIC_CLASS = Error("Using __slots__ in classic class %s has no effect, consider deriving from object") EMPTY_SLOTS = Warning("__slots__ are empty in %s") USES_EXEC = Security("Using the exec statement") USES_GLOBAL_EXEC = Security("Using the exec statement in global namespace") USES_INPUT = Security("Using input() is a security problem, consider using raw_input()") USING_DEPRECATED_MODULE = Deprecated("%s module is deprecated") USING_DEPRECATED_ATTR = Deprecated("%s is deprecated") USING_INSECURE_FUNC = Security("%s() is a security problem") USE_INSTEAD = ", consider using %s" USES_CONST_ATTR = Warning("Passing a constant string to %s, consider direct reference") BAD_STRING_FIND = Error("string.find() returns an integer, consider checking >= 0 or < 0 for not found") scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/function.py0000644000175000017500000002101511242100540032357 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2002, MetaSlash Inc. All rights reserved. """ Object to hold information about functions. Also contain a pseudo Python function object """ import string _ARGS_ARGS_FLAG = 4 _KW_ARGS_FLAG = 8 _CO_FLAGS_MASK = _ARGS_ARGS_FLAG + _KW_ARGS_FLAG class _ReturnValues: """ I am a base class that can track return values. @ivar returnValues: tuple of (line number, stack item, index to next instruction) @type returnValues: tuple of (int, L{pychecker.Stack.Item}, int) """ def __init__(self): self.returnValues = None def returnsNoValue(self): returnValues = self.returnValues # if unset, we don't know if returnValues is None: return 0 # it's an empty list, that means no values if not returnValues: return 1 # make sure each value is not None for rv in returnValues: if not rv[1].isNone(): return 0 return returnValues[-1][1].isImplicitNone() class FakeCode : "This is a holder class for code objects (so we can modify them)" def __init__(self, code, varnames = None) : """ @type code: L{types.CodeType} """ for attr in dir(code): try: setattr(self, attr, getattr(code, attr)) except: pass if varnames is not None: self.co_varnames = varnames class FakeFunction(_ReturnValues): """ This is a holder class for turning non-scoped code (for example at module-global level, or generator expressions) into a function. Pretends to be a normal callable and can be used as constructor argument to L{Function} """ def __init__(self, name, code, func_globals = {}, varnames = None) : _ReturnValues.__init__(self) self.func_name = self.__name__ = name self.func_doc = self.__doc__ = "ignore" self.func_code = FakeCode(code, varnames) self.func_defaults = None self.func_globals = func_globals def __str__(self): return self.func_name def __repr__(self): return '%s from %r' % (self.func_name, self.func_code.co_filename) class Function(_ReturnValues): """ Class to hold all information about a function @ivar function: the function to wrap @type function: callable @ivar isMethod: whether the callable is a method @type isMethod: int (used as bool) @ivar minArgs: the minimum number of arguments that should be passed to this function @type minArgs: int @ivar minArgs: the maximum number of arguments that should be passed to this function, or None in case of *args/unlimited @type maxArgs: int or None @ivar supportsKW: whether the function supports keyword arguments. @type supportsKW: int (used as bool) """ def __init__(self, function, isMethod=0): """ @param function: the function to wrap @type function: callable or L{FakeFunction} @param isMethod: whether the callable is a method @type isMethod: int (used as bool) """ _ReturnValues.__init__(self) self.function = function self.isMethod = isMethod # co_argcount is the number of positional arguments (including # arguments with default values) self.minArgs = self.maxArgs = function.func_code.co_argcount # func_defaults is a tuple containing default argument values for those # arguments that have defaults, or None if no arguments have a default # value if function.func_defaults is not None: self.minArgs = self.minArgs - len(function.func_defaults) # if function uses *args, there is no max # args try: # co_flags is an integer encoding a number of flags for the # interpreter. if function.func_code.co_flags & _ARGS_ARGS_FLAG != 0: self.maxArgs = None self.supportsKW = function.func_code.co_flags & _KW_ARGS_FLAG except AttributeError: # this happens w/Zope self.supportsKW = 0 def __str__(self): return self.function.func_name def __repr__(self): # co_filename is the filename from which the code was compiled # co_firstlineno is the first line number of the function return '<%s from %r:%d>' % (self.function.func_name, self.function.func_code.co_filename, self.function.func_code.co_firstlineno) def arguments(self): """ @returns: a list of argument names to this function @rtype: list of str """ # see http://docs.python.org/reference/datamodel.html#types # for more info on func_code # co_argcount is the number of positional arguments (including # arguments with default values) numArgs = self.function.func_code.co_argcount if self.maxArgs is None: # co_varnames has the name of the *args variable after the # positional arguments numArgs = numArgs + 1 if self.supportsKW: # co_varnames has the name of the **kwargs variable after the # positional arguments and *args variable numArgs = numArgs + 1 # co_varnames is a tuple containing the names of the local variables # (starting with the argument names) # FIXME: a generator seems to have .0 as the first member here, # and then the generator variable as the second. # should we special-case that here ? return self.function.func_code.co_varnames[:numArgs] def isParam(self, name): """ @type name: str @returns: Whether the given name is the name of an argument to the function @rtype: bool """ return name in self.arguments() def isStaticMethod(self): return self.isMethod and isinstance(self.function, type(create_fake)) def isClassMethod(self): try: return self.isMethod and self.function.im_self is not None except AttributeError: return 0 def defaultValue(self, name): """ @type name: str @returns: the default value for the function parameter with the given name. """ func_code = self.function.func_code arg_names = list(func_code.co_varnames[:func_code.co_argcount]) i = arg_names.index(name) if i < self.minArgs: raise ValueError return self.function.func_defaults[i - self.minArgs] def varArgName(self): """ @returns: the name of the *args parameter of the function. @rtype: str """ if self.maxArgs is not None: return None func_code = self.function.func_code return func_code.co_varnames[func_code.co_argcount] def create_fake(name, code, func_globals = {}, varnames = None) : return Function(FakeFunction(name, code, func_globals, varnames)) def create_from_file(file, filename, module): """ @type filename: str @returns: a function that represents the __main__ entry point, if there was a file @rtype: L{Function} """ if file is None: return create_fake(filename, compile('', filename, 'exec')) # Make sure the file is at the beginning # if python compiled the file, it will be at the end file.seek(0) # Read in the source file, see py_compile.compile() for games w/src str codestr = file.read() codestr = string.replace(codestr, "\r\n", "\n") codestr = string.replace(codestr, "\r", "\n") if codestr and codestr[-1] != '\n': codestr = codestr + '\n' code = compile(codestr, filename, 'exec') return Function(FakeFunction('__main__', code, module.__dict__)) def _co_flags_equal(o1, o2) : return (o1.co_flags & _CO_FLAGS_MASK) == (o2.co_flags & _CO_FLAGS_MASK) def same_signature(func, object) : '''Return a boolean value if the has the same signature as a function with the same name in (ie, an overriden method)''' try : baseMethod = getattr(object, func.func_name) base_func_code = baseMethod.im_func.func_code except AttributeError : return 1 return _co_flags_equal(base_func_code, func.func_code) and \ base_func_code.co_argcount == func.func_code.co_argcount scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/checker.py0000755000175000017500000003144711242100540032153 0ustar andreasandreas#!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Check python source code files for possible errors and print warnings Contact Info: http://pychecker.sourceforge.net/ pychecker-list@lists.sourceforge.net """ import string import types import sys import imp import os import glob # see __init__.py for meaning, this must match the version there LOCAL_MAIN_VERSION = 3 def setupNamespace(path) : # remove pychecker if it's the first component, it needs to be last if sys.path[0][-9:] == 'pychecker' : del sys.path[0] # make sure pychecker is last in path, so we can import checker_path = os.path.dirname(os.path.dirname(path)) if checker_path not in sys.path : sys.path.append(checker_path) def setupSysPathForDevelopment(): import pychecker this_module = sys.modules[__name__] # in 2.2 and older, this_module might not have __file__ at all if not hasattr(this_module, '__file__'): return this_path = os.path.normpath(os.path.dirname(this_module.__file__)) pkg_path = os.path.normpath(os.path.dirname(pychecker.__file__)) if pkg_path != this_path: # pychecker was probably found in site-packages, insert this # directory before the other one so we can do development and run # our local version and not the version from site-packages. pkg_dir = os.path.dirname(pkg_path) i = 0 for p in sys.path: if os.path.normpath(p) == pkg_dir: sys.path.insert(i-1, os.path.dirname(this_path)) break i = i + 1 del sys.modules['pychecker'] if __name__ == '__main__' : setupNamespace(sys.argv[0]) setupSysPathForDevelopment() from pychecker import utils from pychecker import printer from pychecker import warn from pychecker import OP from pychecker import Config from pychecker import function from pychecker import msgs from pychecker import pcmodules from pychecker.Warning import Warning _cfg = None _VERSION_MISMATCH_ERROR = ''' There seem to be two versions of PyChecker being used. One is probably in python/site-packages, the other in a local directory. If you want to run the local version, you must remove the version from site-packages. Or you can install the current version by doing python setup.py install. ''' def cfg() : return utils.cfg() def _flattenList(list) : "Returns a list which contains no lists" new_list = [] for element in list : if type(element) == types.ListType : new_list.extend(_flattenList(element)) else : new_list.append(element) return new_list def getModules(arg_list) : """ arg_list is a list of arguments to pychecker; arguments can represent a module name, a filename, or a wildcard file specification. Returns a list of (module name, dirPath) that can be imported, where dirPath is the on-disk path to the module name for that argument. dirPath can be None (in case the given argument is an actual module). """ new_arguments = [] for arg in arg_list : # is this a wildcard filespec? (necessary for windows) if '*' in arg or '?' in arg or '[' in arg : arg = glob.glob(arg) new_arguments.append(arg) PY_SUFFIXES = ['.py'] PY_SUFFIX_LENS = [3] if _cfg.quixote: PY_SUFFIXES.append('.ptl') PY_SUFFIX_LENS.append(4) modules = [] for arg in _flattenList(new_arguments) : # if arg is an actual module, return None for the directory arg_dir = None # is it a .py file? for suf, suflen in zip(PY_SUFFIXES, PY_SUFFIX_LENS): if len(arg) > suflen and arg[-suflen:] == suf: arg_dir = os.path.dirname(arg) if arg_dir and not os.path.exists(arg) : print 'File or pathname element does not exist: "%s"' % arg continue module_name = os.path.basename(arg)[:-suflen] arg = module_name modules.append((arg, arg_dir)) return modules def getAllModules(): """ Returns a list of all modules that should be checked. @rtype: list of L{pcmodules.PyCheckerModule} """ modules = [] for module in pcmodules.getPCModules(): if module.check: modules.append(module) return modules _BUILTIN_MODULE_ATTRS = { 'sys': [ 'ps1', 'ps2', 'tracebacklimit', 'exc_type', 'exc_value', 'exc_traceback', 'last_type', 'last_value', 'last_traceback', ], } def fixupBuiltinModules(needs_init=0): for moduleName in sys.builtin_module_names : # Skip sys since it will reset sys.stdout in IDLE and cause # stdout to go to the real console rather than the IDLE console. # FIXME: this breaks test42 # if moduleName == 'sys': # continue if needs_init: _ = pcmodules.PyCheckerModule(moduleName, 0) # builtin modules don't have a moduleDir module = pcmodules.getPCModule(moduleName) if module is not None : try : m = imp.init_builtin(moduleName) except ImportError : pass else : extra_attrs = _BUILTIN_MODULE_ATTRS.get(moduleName, []) module.attributes = [ '__dict__' ] + dir(m) + extra_attrs def _printWarnings(warnings, stream=None): if stream is None: stream = sys.stdout warnings.sort() lastWarning = None for warning in warnings : if lastWarning is not None: # ignore duplicate warnings if cmp(lastWarning, warning) == 0: continue # print blank line between files if lastWarning.file != warning.file: stream.write("\n") lastWarning = warning warning.output(stream, removeSysPath=True) class NullModule: def __getattr__(self, unused_attr): return None def install_ignore__import__(): _orig__import__ = None def __import__(name, globals=None, locals=None, fromlist=None): if globals is None: globals = {} if locals is None: locals = {} if fromlist is None: fromlist = () try: pymodule = _orig__import__(name, globals, locals, fromlist) except ImportError: pymodule = NullModule() if not _cfg.quiet: modname = '.'.join((name,) + fromlist) sys.stderr.write("Can't import module: %s, ignoring.\n" % modname) return pymodule # keep the orig __import__ around so we can call it import __builtin__ _orig__import__ = __builtin__.__import__ __builtin__.__import__ = __import__ def processFiles(files, cfg=None, pre_process_cb=None): """ @type files: list of str @type cfg: L{Config.Config} @param pre_process_cb: callable notifying of module name, filename @type pre_process_cb: callable taking (str, str) """ warnings = [] # insert this here, so we find files in the local dir before std library if sys.path[0] != '' : sys.path.insert(0, '') # ensure we have a config object, it's necessary global _cfg if cfg is not None: _cfg = cfg elif _cfg is None: _cfg = Config.Config() if _cfg.ignoreImportErrors: install_ignore__import__() utils.initConfig(_cfg) utils.debug('Processing %d files' % len(files)) for file, (moduleName, moduleDir) in zip(files, getModules(files)): if callable(pre_process_cb): pre_process_cb("module %s (%s)" % (moduleName, file)) # create and load the PyCheckerModule, tricking sys.path temporarily oldsyspath = sys.path[:] sys.path.insert(0, moduleDir) pcmodule = pcmodules.PyCheckerModule(moduleName, moduleDir=moduleDir) loaded = pcmodule.load() sys.path = oldsyspath if not loaded: w = Warning(pcmodule.filename(), 1, msgs.Internal("NOT PROCESSED UNABLE TO IMPORT")) warnings.append(w) utils.debug('Processed %d files' % len(files)) utils.popConfig() return warnings # only used by TKInter options.py def getWarnings(files, cfg = None, suppressions = None): warnings = processFiles(files, cfg) fixupBuiltinModules() return warnings + warn.find(getAllModules(), _cfg, suppressions) def _print_processing(name) : if not _cfg.quiet : sys.stderr.write("Processing %s...\n" % name) def main(argv) : __pychecker__ = 'no-miximport' import pychecker if LOCAL_MAIN_VERSION != pychecker.MAIN_MODULE_VERSION : sys.stderr.write(_VERSION_MISMATCH_ERROR) sys.exit(100) # remove empty arguments argv = filter(None, argv) # if the first arg starts with an @, read options from the file # after the @ (this is mostly for windows) if len(argv) >= 2 and argv[1][0] == '@': # read data from the file command_file = argv[1][1:] try: f = open(command_file, 'r') command_line = f.read() f.close() except IOError, err: sys.stderr.write("Unable to read commands from file: %s\n %s\n" % \ (command_file, err)) sys.exit(101) # convert to an argv list, keeping argv[0] and the files to process argv = argv[:1] + string.split(command_line) + argv[2:] global _cfg _cfg, files, suppressions = Config.setupFromArgs(argv[1:]) utils.initConfig(_cfg) if not files : return 0 # Now that we've got the args, update the list of evil C objects for evil_doer in _cfg.evil: pcmodules.EVIL_C_OBJECTS[evil_doer] = None # insert this here, so we find files in the local dir before std library sys.path.insert(0, '') utils.debug('main: Finding import warnings') importWarnings = processFiles(files, _cfg, _print_processing) utils.debug('main: Found %d import warnings' % len(importWarnings)) fixupBuiltinModules() if _cfg.printParse : for module in getAllModules() : printer.module(module) utils.debug('main: Finding warnings') # suppressions is a tuple of suppressions, suppressionRegexs dicts warnings = warn.find(getAllModules(), _cfg, suppressions) utils.debug('main: Found %d warnings' % len(warnings)) if not _cfg.quiet : print "\nWarnings...\n" if warnings or importWarnings : _printWarnings(importWarnings + warnings) return 1 if not _cfg.quiet : print "None" return 0 # FIXME: this is a nasty side effect for import checker if __name__ == '__main__' : try : sys.exit(main(sys.argv)) except Config.UsageError : sys.exit(127) else : _orig__import__ = None _suppressions = None _warnings_cache = {} def _get_unique_warnings(warnings): for i in range(len(warnings)-1, -1, -1): w = warnings[i].format() if _warnings_cache.has_key(w): del warnings[i] else: _warnings_cache[w] = 1 return warnings def __import__(name, globals=None, locals=None, fromlist=None): if globals is None: globals = {} if locals is None: locals = {} if fromlist is None: fromlist = [] check = not sys.modules.has_key(name) and name[:10] != 'pychecker.' pymodule = _orig__import__(name, globals, locals, fromlist) if check : try : # FIXME: can we find a good moduleDir ? module = pcmodules.PyCheckerModule(pymodule.__name__) if module.initModule(pymodule): warnings = warn.find([module], _cfg, _suppressions) _printWarnings(_get_unique_warnings(warnings)) else : print 'Unable to load module', pymodule.__name__ except Exception: name = getattr(pymodule, '__name__', utils.safestr(pymodule)) # FIXME: can we use it here ? utils.importError(name) return pymodule def _init() : global _cfg, _suppressions, _orig__import__ args = string.split(os.environ.get('PYCHECKER', '')) _cfg, files, _suppressions = Config.setupFromArgs(args) utils.initConfig(_cfg) fixupBuiltinModules(1) # keep the orig __import__ around so we can call it import __builtin__ _orig__import__ = __builtin__.__import__ __builtin__.__import__ = __import__ if not os.environ.get('PYCHECKER_DISABLED') : _init() scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/python.py0000644000175000017500000004425611242100540032067 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Setup a lot of info about Python builtin types, functions, methods, etc. """ import types import sys from pychecker import utils from pychecker import Stack from pychecker import Warning BOOL = types.IntType # name (type, args: min, max, kwArgs? GLOBAL_FUNC_INFO = { '__import__': (types.ModuleType, 1, 4), 'abs': (Stack.TYPE_UNKNOWN, 1, 1), 'apply': (Stack.TYPE_UNKNOWN, 2, 3), 'buffer': (types.BufferType, 1, 3), 'callable': (BOOL, 1, 1), 'chr': (types.StringType, 1, 1), 'cmp': (types.IntType, 2, 2), 'coerce': ([ types.NoneType, types.TupleType ], 2, 2), 'compile': (types.CodeType, 3, 3), 'complex': (types.ComplexType, 1, 2, ['real', 'imag']), 'delattr': (types.NoneType, 2, 2), 'dir': (types.ListType, 0, 1), 'divmod': (types.TupleType, 2, 2), 'eval': (Stack.TYPE_UNKNOWN, 1, 3), 'execfile': (types.NoneType, 1, 3), 'filter': (types.ListType, 2, 2), 'float': (types.FloatType, 1, 1), 'getattr': (Stack.TYPE_UNKNOWN, 2, 3), 'globals': (types.DictType, 0, 0), 'hasattr': (BOOL, 2, 2), 'hash': (types.IntType, 1, 1), 'hex': (types.StringType, 1, 1), 'id': (types.IntType, 1, 1), 'input': (Stack.TYPE_UNKNOWN, 0, 1), 'int': (types.IntType, 1, 2, ['x']), 'intern': (types.StringType, 1, 1), 'isinstance': (BOOL, 2, 2), 'issubclass': (BOOL, 2, 2), 'len': (types.IntType, 1, 1), 'list': (types.ListType, 1, 1, ['sequence']), 'locals': (types.DictType, 0, 0), 'long': (types.LongType, 1, 2, ['x']), 'map': (types.ListType, 2, None), 'max': (Stack.TYPE_UNKNOWN, 1, None), 'min': (Stack.TYPE_UNKNOWN, 1, None), 'oct': (types.StringType, 1, 1), 'open': (types.FileType, 1, 3, ['name', 'mode', 'buffering']), 'ord': (types.IntType, 1, 1), 'pow': (Stack.TYPE_UNKNOWN, 2, 3), 'range': (types.ListType, 1, 3), 'raw_input': (types.StringType, 0, 1), 'reduce': (Stack.TYPE_UNKNOWN, 2, 3), 'reload': (types.ModuleType, 1, 1), 'repr': (types.StringType, 1, 1), 'round': (types.FloatType, 1, 2), 'setattr': (types.NoneType, 3, 3), 'slice': (types.SliceType, 1, 3), 'str': (types.StringType, 1, 1), 'tuple': (types.TupleType, 1, 1), 'type': (types.TypeType, 1, 1), 'vars': (types.DictType, 0, 1), 'xrange': (types.ListType, 1, 3), } if hasattr(types, 'UnicodeType') : GLOBAL_FUNC_INFO['unichr'] = (types.UnicodeType, 1, 1) GLOBAL_FUNC_INFO['unicode'] = (types.UnicodeType, 1, 3, ['string', 'encoding', 'errors']) if utils.pythonVersion() >= utils.PYTHON_2_2 : GLOBAL_FUNC_INFO['compile'] = (types.CodeType, 3, 5) GLOBAL_FUNC_INFO['dict'] = (types.DictType, 0, 1, ['items']) GLOBAL_FUNC_INFO['file'] = GLOBAL_FUNC_INFO['open'] GLOBAL_FUNC_INFO['float'] = (types.FloatType, 0, 1, ['x']) GLOBAL_FUNC_INFO['int'] = (types.IntType, 0, 2, ['x']) GLOBAL_FUNC_INFO['list'] = (types.ListType, 0, 1, ['sequence']) GLOBAL_FUNC_INFO['long'] = (types.LongType, 0, 2, ['x']) GLOBAL_FUNC_INFO['str'] = (types.StringType, 0, 1, ['object']) # FIXME: type doesn't take 2 args, only 1 or 3 GLOBAL_FUNC_INFO['type'] = (types.TypeType, 1, 3, ['name', 'bases', 'dict']) GLOBAL_FUNC_INFO['tuple'] = (types.TupleType, 0, 1, ['sequence']) GLOBAL_FUNC_INFO['classmethod'] = (types.MethodType, 1, 1) GLOBAL_FUNC_INFO['iter'] = (Stack.TYPE_UNKNOWN, 1, 2) GLOBAL_FUNC_INFO['property'] = (Stack.TYPE_UNKNOWN, 0, 4, ['fget', 'fset', 'fdel', 'doc']) GLOBAL_FUNC_INFO['super'] = (Stack.TYPE_UNKNOWN, 1, 2) GLOBAL_FUNC_INFO['staticmethod'] = (types.MethodType, 1, 1) GLOBAL_FUNC_INFO['unicode'] = (types.UnicodeType, 0, 3, ['string', 'encoding', 'errors']) GLOBAL_FUNC_INFO['bool'] = (BOOL, 1, 1, ['x']) if utils.pythonVersion() >= utils.PYTHON_2_3: GLOBAL_FUNC_INFO['dict'] = (types.DictType, 0, 1, []) if utils.pythonVersion() >= utils.PYTHON_2_5: GLOBAL_FUNC_INFO['max'] = (Stack.TYPE_UNKNOWN, 1, None, ['key']) GLOBAL_FUNC_INFO['min'] = (Stack.TYPE_UNKNOWN, 1, None, ['key']) def tryAddGlobal(name, *args): if globals().has_key(name): GLOBAL_FUNC_INFO[name] = args zipMinArgs = 1 if utils.pythonVersion() >= utils.PYTHON_2_4: zipMinArgs = 0 tryAddGlobal('zip', types.ListType, zipMinArgs, None) tryAddGlobal('enumerate', types.TupleType, 1, 1, ['sequence']) # sum() could also return float/long tryAddGlobal('sum', types.IntType, 1, 2, ['start']) # sorted() and reversed() always return an iterator (FIXME: support iterator) tryAddGlobal('sorted', Stack.TYPE_UNKNOWN, 1, 1) tryAddGlobal('reversed', Stack.TYPE_UNKNOWN, 1, 1) tryAddGlobal('all', BOOL, 1, 1) tryAddGlobal('any', BOOL, 1, 1) _STRING_METHODS = { 'capitalize': (types.StringType, 0, 0), 'center': (types.StringType, 1, 1), 'count': (types.IntType, 1, 1), 'encode': (types.StringType, 0, 2), 'endswith': (BOOL, 1, 3), 'expandtabs': (types.StringType, 0, 1), 'find': (types.IntType, 1, 3), 'index': (types.IntType, 1, 3), 'isalnum': (BOOL, 0, 0), 'isalpha': (BOOL, 0, 0), 'isdigit': (BOOL, 0, 0), 'islower': (BOOL, 0, 0), 'isspace': (BOOL, 0, 0), 'istitle': (BOOL, 0, 0), 'isupper': (BOOL, 0, 0), 'join': (types.StringType, 1, 1), 'ljust': (types.StringType, 1, 1), 'lower': (types.StringType, 0, 0), 'lstrip': (types.StringType, 0, 0), 'replace': (types.StringType, 2, 3), 'rfind': (types.IntType, 1, 3), 'rindex': (types.IntType, 1, 3), 'rjust': (types.StringType, 1, 1), 'rstrip': (types.StringType, 0, 0), 'split': (types.ListType, 0, 2), 'splitlines': (types.ListType, 0, 1), 'startswith': (BOOL, 1, 3), 'strip': (types.StringType, 0, 0), 'swapcase': (types.StringType, 0, 0), 'title': (types.StringType, 0, 0), 'translate': (types.StringType, 1, 2), 'upper': (types.StringType, 0, 0), } if utils.pythonVersion() >= utils.PYTHON_2_2 : _STRING_METHODS['decode'] = (types.UnicodeType, 0, 2) _STRING_METHODS['zfill'] = (types.StringType, 1, 1) if utils.pythonVersion() >= utils.PYTHON_2_4: _STRING_METHODS['rsplit'] = (types.StringType, 0, 2) _STRING_METHODS['center'] = (types.StringType, 1, 2), _STRING_METHODS['ljust'] = (types.StringType, 1, 2), _STRING_METHODS['rjust'] = (types.StringType, 1, 2), BUILTIN_METHODS = { types.DictType : { 'clear': (types.NoneType, 0, 0), 'copy': (types.DictType, 0, 0), 'get': (Stack.TYPE_UNKNOWN, 1, 2), 'has_key': (BOOL, 1, 1), 'items': (types.ListType, 0, 0), 'keys': (types.ListType, 0, 0), 'popitem': (types.TupleType, 0, 0), 'setdefault': (Stack.TYPE_UNKNOWN, 1, 2), 'update': (types.NoneType, 1, 1), 'values': (types.ListType, 0, 0), }, types.ListType : { 'append': (types.NoneType, 1, 1), 'count': (types.IntType, 1, 1), 'extend': (types.NoneType, 1, 1), 'index': (types.IntType, 1, 1), 'insert': (types.NoneType, 2, 2), 'pop': (Stack.TYPE_UNKNOWN, 0, 1), 'remove': (types.NoneType, 1, 1), 'reverse': (types.NoneType, 0, 0), 'sort': (types.NoneType, 0, 1), }, types.FileType : { 'close': (types.NoneType, 0, 0), 'fileno': (types.IntType, 0, 0), 'flush': (types.NoneType, 0, 0), 'isatty': (BOOL, 0, 0), 'read': (types.StringType, 0, 1), 'readinto': (types.NoneType, 1, 1), 'readline': (types.StringType, 0, 1), 'readlines': (types.ListType, 0, 1), 'seek': (types.NoneType, 1, 2), 'tell': (types.IntType, 0, 0), 'truncate': (types.NoneType, 0, 1), 'write': (types.NoneType, 1, 1), 'writelines': (types.NoneType, 1, 1), 'xreadlines': (types.ListType, 0, 0), }, } if utils.pythonVersion() >= utils.PYTHON_2_4: GLOBAL_FUNC_INFO['set'] = (Stack.TYPE_UNKNOWN, 0, 1) GLOBAL_FUNC_INFO['frozenset'] = (Stack.TYPE_UNKNOWN, 0, 1) kwargs = ['cmp', 'key', 'reverse'] BUILTIN_METHODS[types.ListType]['sort'] = (types.NoneType, 0, 3, kwargs) BUILTIN_METHODS[types.DictType]['update'] = (types.NoneType, 1, 1, []) if hasattr({}, 'pop'): BUILTIN_METHODS[types.DictType]['pop'] = (Stack.TYPE_UNKNOWN, 1, 2) if utils.pythonVersion() >= utils.PYTHON_2_5: _STRING_METHODS['partition'] = (types.TupleType, 1, 1) _STRING_METHODS['rpartition'] = (types.TupleType, 1, 1) if utils.pythonVersion() >= utils.PYTHON_2_6: GLOBAL_FUNC_INFO['bin'] = (types.StringType, 1, 1) GLOBAL_FUNC_INFO['bytesarray'] = (bytearray, 0, 1) GLOBAL_FUNC_INFO['bytes'] = (bytes, 0, 1) GLOBAL_FUNC_INFO['format'] = (types.StringType, 1, 2) GLOBAL_FUNC_INFO['next'] = (Stack.TYPE_UNKNOWN, 1, 2) GLOBAL_FUNC_INFO['print'] = (types.NoneType, 0, None, ['sep', 'end', 'file']) def _setupBuiltinMethods() : if utils.pythonVersion() >= utils.PYTHON_2_2 : PY22_DICT_METHODS = { 'iteritems': (types.ListType, 0, 0), 'iterkeys': (types.ListType, 0, 0), 'itervalues': (types.ListType, 0, 0), } BUILTIN_METHODS[types.DictType].update(PY22_DICT_METHODS) try : BUILTIN_METHODS[types.ComplexType] = \ { 'conjugate': (types.ComplexType, 0, 0), } except AttributeError : pass if len(dir('')) > 0 : BUILTIN_METHODS[types.StringType] = _STRING_METHODS try : BUILTIN_METHODS[types.UnicodeType] = _STRING_METHODS except AttributeError : pass _setupBuiltinMethods() MUTABLE_TYPES = (types.ListType, types.DictType, types.InstanceType,) # identifiers which will become a keyword in a future version FUTURE_KEYWORDS = { 'yield': '2.2', 'with': '2.5', 'as': '2.5' } METHODLESS_OBJECTS = { types.NoneType : None, types.IntType : None, types.LongType : None, types.FloatType : None, types.BufferType : None, types.TupleType : None, types.EllipsisType : None, } def _setupBuiltinAttrs() : item = Stack.Item(None, None) BUILTIN_ATTRS[types.MethodType] = dir(item.__init__) del item if utils.pythonVersion() >= utils.PYTHON_2_2 : # FIXME: I'm sure more types need to be added here BUILTIN_ATTRS[types.StringType] = dir(''.__class__) BUILTIN_ATTRS[types.ListType] = dir([].__class__) BUILTIN_ATTRS[types.DictType] = dir({}.__class__) try : import warnings _MSG = "xrange object's 'start', 'stop' and 'step' attributes are deprecated" warnings.filterwarnings('ignore', _MSG) del warnings, _MSG except (ImportError, AssertionError): pass BUILTIN_ATTRS[types.XRangeType] = dir(xrange(0)) try: BUILTIN_ATTRS[types.ComplexType] = dir(complex(0, 1)) except: pass try: BUILTIN_ATTRS[types.UnicodeType] = dir(unicode('')) except: pass try: BUILTIN_ATTRS[types.CodeType] = dir(_setupBuiltinAttrs.func_code) except: pass try: BUILTIN_ATTRS[types.FileType] = dir(sys.__stdin__) except: pass try: raise TypeError except TypeError : try: tb = sys.exc_info()[2] BUILTIN_ATTRS[types.TracebackType] = dir(tb) BUILTIN_ATTRS[types.FrameType] = dir(tb.tb_frame) except: pass tb = None BUILTIN_ATTRS = { types.StringType : dir(''), types.TypeType : dir(type(type)), types.ListType : dir([]), types.DictType : dir({}), types.FunctionType : dir(_setupBuiltinAttrs), types.BuiltinFunctionType : dir(len), types.BuiltinMethodType : dir([].append), types.ClassType : dir(Stack.Item), types.UnboundMethodType : dir(Stack.Item.__init__), types.LambdaType : dir(lambda: None), types.SliceType : dir(slice(0)), } # have to setup the rest this way to support different versions of Python _setupBuiltinAttrs() PENDING_DEPRECATED_MODULES = { 'string': None, 'types': None, } DEPRECATED_MODULES = { 'FCNTL': 'fcntl', 'gopherlib': None, 'macfs': 'Carbon.File or Carbon.Folder', 'posixfile': 'fcntl', 'pre': None, 'regsub': 're', 'statcache': 'os.stat()', 'stringold': None, 'tzparse': None, 'TERMIOS': 'termios', 'whrandom':'random', 'xmllib': 'xml.sax', # C Modules 'mpz': None, 'pcre': None, 'pypcre': None, 'rgbimg': None, 'strop': None, 'xreadlines': 'file', } DEPRECATED_ATTRS = { 'array.read': None, 'array.write': None, 'operator.isCallable': None, 'operator.sequenceIncludes': None, 'pty.master_open': None, 'pty.slave_open': None, 'random.stdgamma': 'random.gammavariate', 'rfc822.AddrlistClass': 'rfc822.AddressList', 'string.atof': None, 'string.atoi': None, 'string.atol': None, 'string.zfill': None, 'sys.exc_traceback': None, 'sys.exit_thread': None, 'tempfile.mktemp': None, 'tempfile.template': None, } # FIXME: can't check these right now, maybe later DEPRECATED_METHODS = { 'email.Message.get_type': 'email.Message.get_content_type', 'email.Message.get_subtype': 'email.Message.get_content_subtype', 'email.Message.get_main_type': 'email.Message.get_content_maintype', 'htmllib.HTMLParser.do_nextid': None, 'pstats.Stats.ignore': None, 'random.Random.cunifvariate': None, 'random.Random.stdgamma': 'Random.gammavariate', } _OS_AND_POSIX_FUNCS = { 'tempnam': None, 'tmpnam': None } SECURITY_FUNCS = { 'os' : _OS_AND_POSIX_FUNCS, 'posix': _OS_AND_POSIX_FUNCS } SPECIAL_METHODS = { '__call__': None, # any number > 1 '__cmp__': 2, '__coerce__': 2, '__contains__': 2, '__del__': 1, '__hash__': 1, '__iter__': 1, '__len__': 1, '__new__': None, # new-style class constructor '__nonzero__': 1, '__hex__': 1, '__oct__': 1, '__repr__': 1, '__str__': 1, '__invert__': 1, '__neg__': 1, '__pos__': 1, '__abs__': 1, '__complex__': 1, '__int__': 1, '__long__': 1, '__float__': 1, '__unicode__': 1, '__eq__': 2, '__ne__': 2, '__ge__': 2, '__gt__': 2, '__le__': 2, '__lt__': 2, '__getattribute__': 2, # only in new-style classes '__get__': 3, '__set__': 3, '__delete__': 2, '__getattr__': 2, '__setattr__': 3, '__delattr__': 2, '__getitem__': 2, '__setitem__': 3, '__delitem__': 2, '__getslice__': 3, '__setslice__': 4, '__delslice__': 3, # getslice is deprecated '__add__': 2, '__radd__': 2, '__iadd__': 2, '__sub__': 2, '__rsub__': 2, '__isub__': 2, '__mul__': 2, '__rmul__': 2, '__imul__': 2, '__div__': 2, '__rdiv__': 2, '__idiv__': 2, # __pow__: 2 or 3 __ipow__: 2 or 3 '__pow__': 3, '__rpow__': 2, '__ipow__': 3, '__truediv__': 2, '__rtruediv__': 2, '__itruediv__': 2, '__floordiv__': 2, '__rfloordiv__': 2, '__ifloordiv__': 2, '__mod__': 2, '__rmod__': 2, '__imod__': 2, '__divmod__': 2, '__rdivmod__': 2, # no inplace op for divmod() '__lshift__': 2, '__rlshift__': 2, '__ilshift__': 2, '__rshift__': 2, '__rrshift__': 2, '__irshift__': 2, '__and__': 2, '__rand__': 2, '__iand__': 2, '__xor__': 2, '__rxor__': 2, '__ixor__': 2, '__or__': 2, '__ror__': 2, '__ior__': 2, # these are related to pickling '__getstate__': 1, '__setstate__': 2, '__copy__': 1, '__deepcopy__': 2, '__getinitargs__': 1, '__getnewargs__': 1, '__reduce__': 1, '__reduce_ex__': 2, } if utils.pythonVersion() >= utils.PYTHON_2_5: SPECIAL_METHODS['__enter__'] = 1 SPECIAL_METHODS['__exit__'] = 4 NEW_STYLE_CLASS_METHODS = ['__getattribute__', '__set__', '__get__', '__delete__'] scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/pychecker/Warning.py0000644000175000017500000000476711242100540032156 0ustar andreasandreas# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (c) 2001, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Warning class to hold info about each warning. """ class Warning : """ Class which holds warning information. @ivar file: file where the warning was found. @type file: str @ivar line: line number where the warning was found. @type line: int @type err: L{msgs.WarningClass} """ def __init__(self, file, line, err) : """ @param file: an object from which the file where the warning was found can be derived @type file: L{types.CodeType}, L{function.FakeCode} or str @param line: the line where the warning was found; if file was str, then line will be a code object. @type line: int or L{types.CodeType} or None @type err: L{msgs.WarningClass} """ if hasattr(file, "function") : # file is a function.FakeCode file = file.function.func_code.co_filename elif hasattr(file, "co_filename") : # file is a types.CodeType file = file.co_filename elif hasattr(line, "co_filename") : # file was a str file = line.co_filename if file[:2] == './' : file = file[2:] self.file = file if hasattr(line, "co_firstlineno") : line = line.co_firstlineno if line == None : line = 1 self.line = line self.err = err self.level = err.level def __cmp__(self, warn) : if warn == None : return 1 if not self.file and not self.line: return 1 if self.file != warn.file : return cmp(self.file, warn.file) if self.line != warn.line : return cmp(self.line, warn.line) return cmp(self.err, warn.err) def format(self, removeSysPath=True) : if not self.file and not self.line: return str(self.err) file = self.file if removeSysPath: import sys for path in sys.path: if not path or path == '.': continue if file.startswith(path): file = '[system path]' + file[len(path):] return "%s:%d: %s" % (file, self.line, self.err) def output(self, stream, removeSysPath=True) : stream.write(self.format(removeSysPath) + "\n") scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPythonErrorChecker.py0000644000175000017500000000065411242100540033656 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- if __name__ == "__main__": from SCRIBES.Utils import fork_process fork_process() from os import nice nice(19) from sys import argv, path python_path = argv[1] path.insert(0, python_path) from gobject import MainLoop, threads_init threads_init() from signal import signal, SIGINT, SIG_IGN signal(SIGINT, SIG_IGN) from Manager import Manager Manager() MainLoop().run() scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/PyChecker.py0000644000175000017500000000471111242100540030436 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "pycheck", self.__check_cb) self.connect(manager, "stop", self.__stop_cb) def __init_attributes(self, manager): self.__manager = manager self.__stale_session = () from os.path import join from sys import prefix from SCRIBES.Utils import get_current_folder cwd = get_current_folder(globals()) self.__checker = join(cwd, "pychecker", "checker.py") self.__python = join(prefix, "bin", "python") self.__flags = "-T -s -w -Q -r -C -G --only --no-noeffect -M -L900 -B99 -R99 -J99 -k99" return def __check(self, data): from Exceptions import StaleSessionError, FileChangedError try: filename, editor_id, session_id, modification_time = data[0], data[1], data[2], data[3] from Utils import validate_session, update_python_environment_with validate_session(filename, self.__stale_session, editor_id, session_id, modification_time) update_python_environment_with(filename) error_data = self.__get_errors(filename) emit = self.__manager.emit if error_data: line, error_message = error_data[0], error_data[1].strip() error_data = line, error_message, editor_id, session_id, modification_time emit("finished", error_data) else: emit("finished", (0, "", editor_id, session_id, modification_time)) except FileChangedError: self.__manager.emit("ignored") except StaleSessionError: self.__manager.emit("ignored") return False def __get_errors(self, filename): from pipes import quote command = "%s %s %s %s" % (self.__python, self.__checker, self.__flags, quote(filename)) errors = self.__execute(command) if not errors: return () error_lines = errors.splitlines() cannot_import = [error for error in error_lines if error.endswith("UNABLE TO IMPORT")] if cannot_import: return () error_data = error_lines[0].split(":")[1:] print error_data return error_data def __execute(self, command): from subprocess import Popen, PIPE process = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) result = process.communicate() return result[0] # retcode = process.wait() # return retcode, result def __check_cb(self, manager, data): from gobject import idle_add idle_add(self.__check, data) return False def __stop_cb(self, manager, data): self.__stale_session = data return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/PyFlakesChecker.py0000644000175000017500000000375611242100540031574 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from ScribesPyflakes import checker class Checker(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "flakes-check", self.__check_cb) self.connect(manager, "stop", self.__stop_cb) def __init_attributes(self, manager): self.__manager = manager self.__stale_session = () return def __check(self, data): from Exceptions import StaleSessionError, FileChangedError try: filename, editor_id, session_id, check_type, modification_time, tree = data from Utils import validate_session validate_session(filename, self.__stale_session, editor_id, session_id, modification_time) messages = checker.Checker(tree, filename).messages messages.sort(lambda a, b: cmp(a.lineno, b.lineno)) emit = self.__manager.emit ignore_errors = ("ImportStarUsed", ) if messages: messages = [(warning.lineno, warning.message % warning.message_args, warning) for warning in messages if not (warning.__class__.__name__ in ignore_errors)] if messages: from Utils import reformat_error error_message = messages[0][0], reformat_error(messages[0][1]), editor_id, session_id, modification_time emit("finished", error_message) else: if check_type == 2: emit("finished", (0, "", editor_id, session_id, modification_time)) else: # emit("pycheck", (filename, editor_id, session_id, modification_time)) emit("pylint-check", (filename, editor_id, session_id, modification_time)) except FileChangedError: self.__manager.emit("ignored") except StaleSessionError: self.__manager.emit("ignored") except (SyntaxError, IndentationError): self.__manager.emit("ignored") except Exception: self.__manager.emit("ignored") return False def __check_cb(self, manager, data): from gobject import idle_add idle_add(self.__check, data) return False def __stop_cb(self, manager, data): self.__stale_session = data return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/PyLinter.py0000644000175000017500000001433711242100540030334 0ustar andreasandreasfrom ScribesPylint.checkers import BaseRawChecker from ScribesPylint.interfaces import ILinter, IRawChecker from ScribesPylint.utils import MessagesHandlerMixIn, ReportsHandlerMixIn #from poo import * class Linter(MessagesHandlerMixIn, ReportsHandlerMixIn, BaseRawChecker): __implements__ = (ILinter, IRawChecker) name = 'master' priority = 0 level = 0 msgs = {} may_be_disabled = False def __init__(self): # init options # visit variables from ScribesPylint.reporters.text import ParseableTextReporter self.reporter = ParseableTextReporter() self.base_name = None self.base_file = None self.current_name = None self.current_file = None self.stats = None self.__checkers = [] MessagesHandlerMixIn.__init__(self) ReportsHandlerMixIn.__init__(self) BaseRawChecker.__init__(self) self.register_checker(self) self.__register_checkers() self.set_reporter(self.reporter) # Error messages to ignore due to unreliability. self.reporter.ignore = ("E1103", "E0611", "E1101") #("E0611", "E1101", "E0203") # Warning or error messages to reveal. self.reporter.reveal = ( "W0101", "W0102", "W0104", "W0107", "W0211", "W0231", "W0233", "W0301", "W0311", "W0331", "W0333", "W0404", "W0406", "W0410", "W0601", "W0602", "W0604", "C0121", "C0202", "C0203", ) def check(self, filename, modification_time): from Utils import update_python_environment_with update_python_environment_with(filename) self.reporter.error_messages = [] from os.path import basename, dirname module = basename(filename).strip(".py") self.current_name = module self.current_file = filename self.base_file = dirname(filename) self.base_name = basename(self.base_file) rawcheckers = [] from ScribesPylint.utils import PyLintASTWalker walker = PyLintASTWalker() from ScribesPylint.logilab.common.interface import implements from ScribesPylint.interfaces import IASTNGChecker for checker in self.sort_checkers(): checker.open() if implements(checker, IASTNGChecker): walker.add_checker(checker) if implements(checker, IRawChecker) and checker is not self: #XXX rawcheckers.append(checker) self.set_current_module(module, filename) astng = self.get_astng(filename, module, modification_time) messages = self.check_astng_module(astng, walker, rawcheckers) del astng del walker self.set_current_module("") self.__checkers.reverse() for checker in self.__checkers: checker.close() return messages def get_astng(self, filepath, modname, modification_time): """return a astng representation for a module""" try: from ScribesPylint.logilab.astng.manager import ASTNGManager manager = ASTNGManager(borg=False) manager.brain = {} manager.reset_cache() manager.brain = {} from Utils import file_has_changed if file_has_changed(filepath, modification_time): return None astng = manager.astng_from_file(filepath) except (SyntaxError, IndentationError): return None except Exception: return None return astng def check_astng_module(self, astng, walker, rawcheckers): if astng is None: return None from ScribesPylint.logilab.common.fileutils import norm_open stream = norm_open(astng.file) for checker in rawcheckers: stream.seek(0) checker.process_module(stream) walker.walk(astng) return self.reporter.error_messages def __register_checkers(self): from ScribesPylint.checkers.base import register register(self) from ScribesPylint.checkers.classes import register register(self) from ScribesPylint.checkers.exceptions import register register(self) from ScribesPylint.checkers.format import register register(self) from ScribesPylint.checkers.imports import register register(self) from ScribesPylint.checkers.newstyle import register register(self) from ScribesPylint.checkers.string_format import register register(self) from ScribesPylint.checkers.typecheck import register register(self) from ScribesPylint.checkers.variables import register register(self) return False def sort_checkers(self, checkers=None): if checkers is None: checkers = self.__checkers graph = {} cls_instance = {} for checker in checkers: graph[checker.__class__] = set(checker.needs_checkers) cls_instance[checker.__class__] = checker from ScribesPylint.logilab.common.graph import ordered_nodes checkers = [cls_instance.get(cls) for cls in ordered_nodes(graph)] checkers.remove(self) checkers.insert(0, self) return checkers def set_reporter(self, reporter): """set the reporter used to display messages and reports""" self.reporter = reporter reporter.linter = self def open(self): """initialize counters""" self.stats = {'by_module' : {}, 'by_msg' : {},} from ScribesPylint.utils import MSG_TYPES for msg_cat in MSG_TYPES.values(): self.stats[msg_cat] = 0 def register_checker(self, checker): self.__checkers.append(checker) if hasattr(checker, 'reports'): for r_id, r_title, r_cb in checker.reports: self.register_report(r_id, r_title, r_cb, checker) if hasattr(checker, 'msgs'): self.register_messages(checker) checker.load_defaults() def set_current_module(self, modname, filepath=None): """set the name of the currently analyzed module and init statistics for it """ if not modname and filepath is None: return self.current_name = modname self.current_file = filepath or modname self.stats['by_module'][modname] = {} self.stats['by_module'][modname]['statement'] = 0 from ScribesPylint.utils import MSG_TYPES for msg_cat in MSG_TYPES.values(): self.stats['by_module'][modname][msg_cat] = 0 # XXX hack, to be correct we need to keep module_msgs_state # for every analyzed module (the problem stands with localized # messages which are only detected in the .close step) if modname: self._module_msgs_state = {} self._module_msg_cats_state = {} def _get_checkers(self): # compute checkers needed according to activated messages and reports neededcheckers = set() for checker in self.__checkers: for msgid in checker.msgs: if self._msgs_state.get(msgid, True): neededcheckers.add(checker) break else: for reportid, _, _ in checker.reports: if self.is_report_enabled(reportid): neededcheckers.add(checker) break return self.sort_checkers(neededcheckers) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/Manager.py0000644000175000017500000000157711242100540030142 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self): Signal.__init__(self) from ProcessMonitor import Monitor Monitor(self) from DBusService import DBusService DBusService(self) from PyChecker import Checker Checker(self) from PyLintChecker import Checker Checker(self) from PyFlakesChecker import Checker Checker(self) from SyntaxChecker import Checker Checker(self) from JobSpooler import Spooler Spooler(self) from gobject import timeout_add timeout_add(1000, self.__response) def quit(self): from os import _exit _exit(0) return False def check(self, data): self.emit("new-job", data) return False def stop(self, data): self.emit("stop", data) return False def __response(self): # Keep this process as responsive as possible to events and signals. from SCRIBES.Utils import response response() return True scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ProcessMonitor.py0000644000175000017500000000063311242100540031546 0ustar andreasandreasclass Monitor(object): def __init__(self, manager): self.__manager = manager from SCRIBES.Globals import session_bus session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0='net.sourceforge.Scribes') def __name_change_cb(self, *args): self.__manager.quit() return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/JobSpooler.py0000644000175000017500000000160211242100540030633 0ustar andreasandreasclass Spooler(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("new-job", self.__new_job_cb) manager.connect_after("finished", self.__finished_cb) manager.connect("ignored", self.__ignored_cb) def __init_attributes(self, manager): self.__manager = manager from collections import deque self.__jobs = deque() self.__busy = False return def __check(self): if self.__busy or not self.__jobs: return False self.__send(self.__jobs.pop()) return False def __send(self, data): self.__busy = True self.__manager.emit("syntax-check", data) return False def __new_job_cb(self, manager, data): self.__jobs.appendleft(data) self.__check() return False def __finished_cb(self, *args): self.__busy = False self.__check() return False def __ignored_cb(self, *args): self.__busy = False self.__check() return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPyflakes/0000755000175000017500000000000011242100540031275 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPyflakes/__init__.py0000644000175000017500000000002711242100540033405 0ustar andreasandreas __version__ = '0.4.0' scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPyflakes/messages.py0000644000175000017500000000536311242100540033465 0ustar andreasandreas# (c) 2005 Divmod, Inc. See LICENSE file for details class Message(object): message = '' message_args = () def __init__(self, filename, lineno): self.filename = filename self.lineno = lineno def __str__(self): return '%s:%s: %s' % (self.filename, self.lineno, self.message % self.message_args) class UnusedImport(Message): message = '%r imported but unused' def __init__(self, filename, lineno, name): Message.__init__(self, filename, lineno) self.message_args = (name,) class RedefinedWhileUnused(Message): message = 'redefinition of unused %r from line %r' def __init__(self, filename, lineno, name, orig_lineno): Message.__init__(self, filename, lineno) self.message_args = (name, orig_lineno) class ImportShadowedByLoopVar(Message): message = 'import %r from line %r shadowed by loop variable' def __init__(self, filename, lineno, name, orig_lineno): Message.__init__(self, filename, lineno) self.message_args = (name, orig_lineno) class ImportStarUsed(Message): message = "'from %s import *' used; unable to detect undefined names" def __init__(self, filename, lineno, modname): Message.__init__(self, filename, lineno) self.message_args = (modname,) class UndefinedName(Message): message = 'undefined name %r' def __init__(self, filename, lineno, name): Message.__init__(self, filename, lineno) self.message_args = (name,) class UndefinedExport(Message): message = 'undefined name %r in __all__' def __init__(self, filename, lineno, name): Message.__init__(self, filename, lineno) self.message_args = (name,) class UndefinedLocal(Message): message = "local variable %r (defined in enclosing scope on line %r) referenced before assignment" def __init__(self, filename, lineno, name, orig_lineno): Message.__init__(self, filename, lineno) self.message_args = (name, orig_lineno) class DuplicateArgument(Message): message = 'duplicate argument %r in function definition' def __init__(self, filename, lineno, name): Message.__init__(self, filename, lineno) self.message_args = (name,) class RedefinedFunction(Message): message = 'redefinition of function %r from line %r' def __init__(self, filename, lineno, name, orig_lineno): Message.__init__(self, filename, lineno) self.message_args = (name, orig_lineno) class LateFutureImport(Message): message = 'future import(s) %r after other statements' def __init__(self, filename, lineno, names): Message.__init__(self, filename, lineno) self.message_args = (names,) class UnusedVariable(Message): """ Indicates that a variable has been explicity assigned to but not actually used. """ message = 'local variable %r is assigned to but never used' def __init__(self, filename, lineno, names): Message.__init__(self, filename, lineno) self.message_args = (names,) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPyflakes/checker.py0000644000175000017500000003645011242100540033263 0ustar andreasandreas# -*- test-case-name: pyflakes -*- # (c) 2005-2008 Divmod, Inc. # See LICENSE file for details import __builtin__ import os.path from compiler import ast import messages class Binding(object): """ Represents the binding of a value to a name. The checker uses this to keep track of which names have been bound and which names have not. See L{Assignment} for a special type of binding that is checked with stricter rules. @ivar used: pair of (L{Scope}, line-number) indicating the scope and line number that this binding was last used """ def __init__(self, name, source): self.name = name self.source = source self.used = False def __str__(self): return self.name def __repr__(self): return '<%s object %r from line %r at 0x%x>' % (self.__class__.__name__, self.name, self.source.lineno, id(self)) class UnBinding(Binding): '''Created by the 'del' operator.''' class Importation(Binding): """ A binding created by an import statement. @ivar fullName: The complete name given to the import statement, possibly including multiple dotted components. @type fullName: C{str} """ def __init__(self, name, source): self.fullName = name name = name.split('.')[0] super(Importation, self).__init__(name, source) class Argument(Binding): """ Represents binding a name as an argument. """ class Assignment(Binding): """ Represents binding a name with an explicit assignment. The checker will raise warnings for any Assignment that isn't used. Also, the checker does not consider assignments in tuple/list unpacking to be Assignments, rather it treats them as simple Bindings. """ class FunctionDefinition(Binding): pass class ExportBinding(Binding): """ A binding created by an C{__all__} assignment. If the names in the list can be determined statically, they will be treated as names for export and additional checking applied to them. The only C{__all__} assignment that can be recognized is one which takes the value of a literal list containing literal strings. For example:: __all__ = ["foo", "bar"] Names which are imported and not otherwise used but appear in the value of C{__all__} will not have an unused import warning reported for them. """ def names(self): """ Return a list of the names referenced by this binding. """ names = [] if isinstance(self.source, ast.List): for node in self.source.nodes: if isinstance(node, ast.Const): names.append(node.value) return names class Scope(dict): importStarred = False # set to True when import * is found def __repr__(self): return '<%s at 0x%x %s>' % (self.__class__.__name__, id(self), dict.__repr__(self)) def __init__(self): super(Scope, self).__init__() class ClassScope(Scope): pass class FunctionScope(Scope): """ I represent a name scope for a function. @ivar globals: Names declared 'global' in this function. """ def __init__(self): super(FunctionScope, self).__init__() self.globals = {} class ModuleScope(Scope): pass # Globally defined names which are not attributes of the __builtin__ module. _MAGIC_GLOBALS = ['__file__', '__builtins__'] class Checker(object): """ I check the cleanliness and sanity of Python code. @ivar _deferredFunctions: Tracking list used by L{deferFunction}. Elements of the list are two-tuples. The first element is the callable passed to L{deferFunction}. The second element is a copy of the scope stack at the time L{deferFunction} was called. @ivar _deferredAssignments: Similar to C{_deferredFunctions}, but for callables which are deferred assignment checks. """ nodeDepth = 0 traceTree = False def __init__(self, tree, filename='(none)'): self._deferredFunctions = [] self._deferredAssignments = [] self.dead_scopes = [] self.messages = [] self.filename = filename self.scopeStack = [ModuleScope()] self.futuresAllowed = True self.handleChildren(tree) self._runDeferred(self._deferredFunctions) # Set _deferredFunctions to None so that deferFunction will fail # noisily if called after we've run through the deferred functions. self._deferredFunctions = None self._runDeferred(self._deferredAssignments) # Set _deferredAssignments to None so that deferAssignment will fail # noisly if called after we've run through the deferred assignments. self._deferredAssignments = None del self.scopeStack[1:] self.popScope() self.check_dead_scopes() def deferFunction(self, callable): ''' Schedule a function handler to be called just before completion. This is used for handling function bodies, which must be deferred because code later in the file might modify the global scope. When `callable` is called, the scope at the time this is called will be restored, however it will contain any new bindings added to it. ''' self._deferredFunctions.append((callable, self.scopeStack[:])) def deferAssignment(self, callable): """ Schedule an assignment handler to be called just after deferred function handlers. """ self._deferredAssignments.append((callable, self.scopeStack[:])) def _runDeferred(self, deferred): """ Run the callables in C{deferred} using their associated scope stack. """ for handler, scope in deferred: self.scopeStack = scope handler() def scope(self): return self.scopeStack[-1] scope = property(scope) def popScope(self): self.dead_scopes.append(self.scopeStack.pop()) def check_dead_scopes(self): """ Look at scopes which have been fully examined and report names in them which were imported but unused. """ for scope in self.dead_scopes: export = isinstance(scope.get('__all__'), ExportBinding) if export: all = scope['__all__'].names() if os.path.split(self.filename)[1] != '__init__.py': # Look for possible mistakes in the export list undefined = set(all) - set(scope) for name in undefined: self.report( messages.UndefinedExport, scope['__all__'].source.lineno, name) else: all = [] # Look for imported names that aren't used. for importation in scope.itervalues(): if isinstance(importation, Importation): if not importation.used and importation.name not in all: self.report( messages.UnusedImport, importation.source.lineno, importation.name) def pushFunctionScope(self): self.scopeStack.append(FunctionScope()) def pushClassScope(self): self.scopeStack.append(ClassScope()) def report(self, messageClass, *args, **kwargs): self.messages.append(messageClass(self.filename, *args, **kwargs)) def handleChildren(self, tree): for node in tree.getChildNodes(): self.handleNode(node, tree) def handleNode(self, node, parent): node.parent = parent if self.traceTree: print ' ' * self.nodeDepth + node.__class__.__name__ self.nodeDepth += 1 nodeType = node.__class__.__name__.upper() if nodeType not in ('STMT', 'FROM'): self.futuresAllowed = False try: handler = getattr(self, nodeType) handler(node) finally: self.nodeDepth -= 1 if self.traceTree: print ' ' * self.nodeDepth + 'end ' + node.__class__.__name__ def ignore(self, node): pass STMT = PRINT = PRINTNL = TUPLE = LIST = ASSTUPLE = ASSATTR = \ ASSLIST = GETATTR = SLICE = SLICEOBJ = IF = CALLFUNC = DISCARD = \ RETURN = ADD = MOD = SUB = NOT = UNARYSUB = INVERT = ASSERT = COMPARE = \ SUBSCRIPT = AND = OR = TRYEXCEPT = RAISE = YIELD = DICT = LEFTSHIFT = \ RIGHTSHIFT = KEYWORD = TRYFINALLY = WHILE = EXEC = MUL = DIV = POWER = \ FLOORDIV = BITAND = BITOR = BITXOR = LISTCOMPFOR = LISTCOMPIF = \ AUGASSIGN = BACKQUOTE = UNARYADD = GENEXPR = GENEXPRFOR = GENEXPRIF = \ IFEXP = handleChildren CONST = PASS = CONTINUE = BREAK = ELLIPSIS = ignore def addBinding(self, lineno, value, reportRedef=True): '''Called when a binding is altered. - `lineno` is the line of the statement responsible for the change - `value` is the optional new value, a Binding instance, associated with the binding; if None, the binding is deleted if it exists. - if `reportRedef` is True (default), rebinding while unused will be reported. ''' if (isinstance(self.scope.get(value.name), FunctionDefinition) and isinstance(value, FunctionDefinition)): self.report(messages.RedefinedFunction, lineno, value.name, self.scope[value.name].source.lineno) if not isinstance(self.scope, ClassScope): for scope in self.scopeStack[::-1]: existing = scope.get(value.name) if (isinstance(existing, Importation) and not existing.used and (not isinstance(value, Importation) or value.fullName == existing.fullName) and reportRedef): self.report(messages.RedefinedWhileUnused, lineno, value.name, scope[value.name].source.lineno) if isinstance(value, UnBinding): try: del self.scope[value.name] except KeyError: self.report(messages.UndefinedName, lineno, value.name) else: self.scope[value.name] = value def WITH(self, node): """ Handle C{with} by checking the target of the statement (which can be an identifier, a list or tuple of targets, an attribute, etc) for undefined names and defining any it adds to the scope and by continuing to process the suite within the statement. """ # Check the "foo" part of a "with foo as bar" statement. Do this no # matter what, since there's always a "foo" part. self.handleNode(node.expr, node) if node.vars is not None: self.handleNode(node.vars, node) self.handleChildren(node.body) def GLOBAL(self, node): """ Keep track of globals declarations. """ if isinstance(self.scope, FunctionScope): self.scope.globals.update(dict.fromkeys(node.names)) def LISTCOMP(self, node): for qual in node.quals: self.handleNode(qual, node) self.handleNode(node.expr, node) GENEXPRINNER = LISTCOMP def FOR(self, node): """ Process bindings for loop variables. """ vars = [] def collectLoopVars(n): if hasattr(n, 'name'): vars.append(n.name) else: for c in n.getChildNodes(): collectLoopVars(c) collectLoopVars(node.assign) for varn in vars: if (isinstance(self.scope.get(varn), Importation) # unused ones will get an unused import warning and self.scope[varn].used): self.report(messages.ImportShadowedByLoopVar, node.lineno, varn, self.scope[varn].source.lineno) self.handleChildren(node) def NAME(self, node): """ Locate the name in locals / function / globals scopes. """ # try local scope importStarred = self.scope.importStarred try: self.scope[node.name].used = (self.scope, node.lineno) except KeyError: pass else: return # try enclosing function scopes for scope in self.scopeStack[-2:0:-1]: importStarred = importStarred or scope.importStarred if not isinstance(scope, FunctionScope): continue try: scope[node.name].used = (self.scope, node.lineno) except KeyError: pass else: return # try global scope importStarred = importStarred or self.scopeStack[0].importStarred try: self.scopeStack[0][node.name].used = (self.scope, node.lineno) except KeyError: if ((not hasattr(__builtin__, node.name)) and node.name not in _MAGIC_GLOBALS and not importStarred): if (os.path.basename(self.filename) == '__init__.py' and node.name == '__path__'): # the special name __path__ is valid only in packages pass else: self.report(messages.UndefinedName, node.lineno, node.name) def FUNCTION(self, node): if getattr(node, "decorators", None) is not None: self.handleChildren(node.decorators) self.addBinding(node.lineno, FunctionDefinition(node.name, node)) self.LAMBDA(node) def LAMBDA(self, node): for default in node.defaults: self.handleNode(default, node) def runFunction(): args = [] def addArgs(arglist): for arg in arglist: if isinstance(arg, tuple): addArgs(arg) else: if arg in args: self.report(messages.DuplicateArgument, node.lineno, arg) args.append(arg) self.pushFunctionScope() addArgs(node.argnames) for name in args: self.addBinding(node.lineno, Argument(name, node), reportRedef=False) self.handleNode(node.code, node) def checkUnusedAssignments(): """ Check to see if any assignments have not been used. """ for name, binding in self.scope.iteritems(): if (not binding.used and not name in self.scope.globals and isinstance(binding, Assignment)): self.report(messages.UnusedVariable, binding.source.lineno, name) self.deferAssignment(checkUnusedAssignments) self.popScope() self.deferFunction(runFunction) def CLASS(self, node): """ Check names used in a class definition, including its decorators, base classes, and the body of its definition. Additionally, add its name to the current scope. """ if getattr(node, "decorators", None) is not None: self.handleChildren(node.decorators) for baseNode in node.bases: self.handleNode(baseNode, node) self.addBinding(node.lineno, Binding(node.name, node)) self.pushClassScope() self.handleChildren(node.code) self.popScope() def ASSNAME(self, node): if node.flags == 'OP_DELETE': if isinstance(self.scope, FunctionScope) and node.name in self.scope.globals: del self.scope.globals[node.name] else: self.addBinding(node.lineno, UnBinding(node.name, node)) else: # if the name hasn't already been defined in the current scope if isinstance(self.scope, FunctionScope) and node.name not in self.scope: # for each function or module scope above us for scope in self.scopeStack[:-1]: if not isinstance(scope, (FunctionScope, ModuleScope)): continue # if the name was defined in that scope, and the name has # been accessed already in the current scope, and hasn't # been declared global if (node.name in scope and scope[node.name].used and scope[node.name].used[0] is self.scope and node.name not in self.scope.globals): # then it's probably a mistake self.report(messages.UndefinedLocal, scope[node.name].used[1], node.name, scope[node.name].source.lineno) break if isinstance(node.parent, (ast.For, ast.ListCompFor, ast.GenExprFor, ast.AssTuple, ast.AssList)): binding = Binding(node.name, node) elif (node.name == '__all__' and isinstance(self.scope, ModuleScope) and isinstance(node.parent, ast.Assign)): binding = ExportBinding(node.name, node.parent.expr) else: binding = Assignment(node.name, node) if node.name in self.scope: binding.used = self.scope[node.name].used self.addBinding(node.lineno, binding) def ASSIGN(self, node): self.handleNode(node.expr, node) for subnode in node.nodes[::-1]: self.handleNode(subnode, node) def IMPORT(self, node): for name, alias in node.names: name = alias or name importation = Importation(name, node) self.addBinding(node.lineno, importation) def FROM(self, node): if node.modname == '__future__': if not self.futuresAllowed: self.report(messages.LateFutureImport, node.lineno, [n[0] for n in node.names]) else: self.futuresAllowed = False for name, alias in node.names: if name == '*': self.scope.importStarred = True self.report(messages.ImportStarUsed, node.lineno, node.modname) continue name = alias or name importation = Importation(name, node) if node.modname == '__future__': importation.used = (self.scope, node.lineno) self.addBinding(node.lineno, importation) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/0000755000175000017500000000000011242100540030776 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/__init__.py0000644000175000017500000000206711242100540033114 0ustar andreasandreas# 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. """ Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr """ import pkg_resources pkg_resources.declare_namespace(__name__) file_path = globals()["__path__"][0] from sys import path if not file_path in path: path.insert(0, file_path) from warnings import filterwarnings filterwarnings("ignore", category=DeprecationWarning) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/0000755000175000017500000000000011242100540033023 5ustar andreasandreas././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/__in0000644000175000017500000000374611242100540033664 0ustar andreasandreas# 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. """utilities methods and classes for reporters Copyright (c) 2000-2003 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr """ import sys CMPS = ['=', '-', '+'] def diff_string(old, new): """given a old and new int value, return a string representing the difference """ diff = abs(old - new) diff_str = "%s%s" % (CMPS[cmp(old, new)], diff and ('%.2f' % diff) or '') return diff_str class EmptyReport(Exception): """raised when a report is empty and so should not be displayed""" class BaseReporter: """base class for reporters""" extension = '' def __init__(self, output=None): self.linter = None self.include_ids = None self.section = 0 self.out = None self.set_output(output) def set_output(self, output=None): """set output stream""" if output is None: output = sys.stdout self.out = output def writeln(self, string=''): """write a line in the output buffer""" # print >> self.out, string pass def display_results(self, layout): """display results encapsulated in the layout tree""" self.section = 0 if self.include_ids and hasattr(layout, 'report_id'): layout.children[0].children[0].data += ' (%s)' % layout.report_id self._display(layout) def _display(self, layout): """display the layout""" raise NotImplementedError() ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/text.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/text0000644000175000017500000001165711242100540033744 0ustar andreasandreas# Copyright (c) 2003-2007 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). # 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. """Plain text reporters: :text: the default one grouping messages by module :parseable: standard parseable output with full module path on each message (for editor integration) :colorized: an ANSI colorized text reporter """ import os import sys #from logilab.common.ureports import TextWriter from logilab.common.textutils import colorize_ansi from ScribesPylint.interfaces import IReporter from ScribesPylint.reporters import BaseReporter TITLE_UNDERLINES = ['', '=', '-', '.'] class TextReporter(BaseReporter): """reports messages and layouts in plain text """ __implements__ = IReporter extension = 'txt' def __init__(self, output=sys.stdout): BaseReporter.__init__(self, output) self._modules = {} def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" module, obj, line = location[1:] if not self._modules.has_key(module): if module: self.writeln('************* Module %s' % module) self._modules[module] = 1 else: self.writeln('************* %s' % module) if obj: obj = ':%s' % obj if self.include_ids: sigle = msg_id else: sigle = msg_id[0] self.writeln('%s:%3s%s: %s' % (sigle, line, obj, msg)) def _display(self, layout): """launch layouts display""" #print >> self.out #TextWriter().format(layout, self.out) class ParseableTextReporter(TextReporter): """a reporter very similar to TextReporter, but display messages in a form recognized by most text editors : :: """ line_format = '%(path)s:%(line)s: [%(sigle)s%(obj)s] %(msg)s' def __init__(self, output=sys.stdout, relative=True): TextReporter.__init__(self, output) if relative: self._prefix = os.getcwd() + os.sep else: self._prefix = '' self.ignore = () self.reveal = () self.error_messages = [] def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" # Show error message when pylint borks. # if msg_id.startswith("F") or msg_id.startswith("I"): print msg_id, location[-1], msg, location[0] if msg_id in self.ignore: return # We only care about selected errors and warnings. if not ((msg_id in self.reveal) or (msg_id.startswith("E"))): return path, _, obj, line = location if obj: obj = ', %s' % obj msg = msg.strip(" \t\n\r").split() msg_strings = [string for string in msg if string.strip(" \t\n\r")] msg = " ".join(msg_strings) self.error_messages.append((line, msg, obj, msg_id)) class VSTextReporter(ParseableTextReporter): """Visual studio text reporter""" line_format = '%(path)s(%(line)s): [%(sigle)s%(obj)s] %(msg)s' class ColorizedTextReporter(TextReporter): """Simple TextReporter that colorizes text output""" COLOR_MAPPING = { "I" : ("green", None), 'C' : (None, "bold"), 'R' : ("magenta", "bold, italic"), 'W' : ("blue", None), 'E' : ("red", "bold"), 'F' : ("red", "bold, underline"), 'S' : ("yellow", "inverse"), # S stands for module Separator } def __init__(self, output=sys.stdout, color_mapping = None): TextReporter.__init__(self, output) self.color_mapping = color_mapping or \ dict(ColorizedTextReporter.COLOR_MAPPING) def _get_decoration(self, msg_id): """Returns the tuple color, style associated with msg_id as defined in self.color_mapping """ try: return self.color_mapping[msg_id[0]] except KeyError: return None, None def add_message(self, msg_id, location, msg): """manage message of different types, and colorize output using ansi escape codes """ module, obj, line = location[1:] if not self._modules.has_key(module): color, style = self._get_decoration('S') if module: modsep = colorize_ansi('************* Module %s' % module, color, style) else: modsep = colorize_ansi('************* %s' % module, color, style) self.writeln(modsep) self._modules[module] = 1 if obj: obj = ':%s' % obj if self.include_ids: sigle = msg_id else: sigle = msg_id[0] color, style = self._get_decoration(sigle) msg = colorize_ansi(msg, color, style) sigle = colorize_ansi(sigle, color, style) self.writeln('%s:%3s%s: %s' % (sigle, line, obj, msg)) ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/html.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/html0000644000175000017500000000436511242100540033722 0ustar andreasandreas# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2006 LOGILAB S.A. (Paris, FRANCE). # 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. """HTML reporter""" import sys from cgi import escape from logilab.common.ureports import HTMLWriter, Section, Table from ScribesPylint.interfaces import IReporter from ScribesPylint.reporters import BaseReporter class HTMLReporter(BaseReporter): """report messages and layouts in HTML""" __implements__ = IReporter extension = 'html' def __init__(self, output=sys.stdout): BaseReporter.__init__(self, output) self.msgs = [] def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" module, obj, line = location[1:] if self.include_ids: sigle = msg_id else: sigle = msg_id[0] self.msgs += [sigle, module, obj, str(line), escape(msg)] def set_output(self, output=None): """set output stream messages buffered for old output is processed first""" if self.out and self.msgs: self._display(Section()) BaseReporter.set_output(self, output) def _display(self, layout): """launch layouts display overridden from BaseReporter to add insert the messages section (in add_message, message is not displayed, just collected so it can be displayed in an html table) """ if self.msgs: # add stored messages to the layout msgs = ['type', 'module', 'object', 'line', 'message'] msgs += self.msgs sect = Section('Messages') layout.append(sect) sect.append(Table(cols=5, children=msgs, rheaders=1)) self.msgs = [] HTMLWriter().format(layout, self.out) ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/guireporter.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/reporters/guir0000644000175000017500000000174011242100540033716 0ustar andreasandreas""" reporter used by gui.py """ import sys from ScribesPylint.interfaces import IReporter from ScribesPylint.reporters import BaseReporter from logilab.common.ureports import TextWriter class GUIReporter(BaseReporter): """saves messages""" __implements__ = IReporter extension = '' def __init__(self, gui, output=sys.stdout): """init""" BaseReporter.__init__(self, output) self.msgs = [] self.gui = gui def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" module, obj, line = location[1:] if self.include_ids: sigle = msg_id else: sigle = msg_id[0] full_msg = [sigle, module, obj, str(line), msg] self.msgs += [[sigle, module, obj, str(line)]] self.gui.msg_queue.put(full_msg) def _display(self, layout): """launch layouts display""" TextWriter().format(layout, self.out) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/0000755000175000017500000000000011242100540032565 5ustar andreasandreas././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/__ini0000644000175000017500000001122111242100540033562 0ustar andreasandreas# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """utilities methods and classes for checkers Base id of standard checkers (used in msg and report ids): 01: base 02: classes 03: format 04: import 05: misc 06: variables 07: exceptions 08: similar 09: design_analysis 10: newstyle 11: typecheck The raw_metrics checker has no number associated since it doesn't emit any messages nor reports. XXX not true, emit a 07 report ! """ import tokenize from os import listdir from os.path import dirname, join, isdir, splitext from logilab.astng.utils import ASTWalker from logilab.common.configuration import OptionsProviderMixIn from ScribesPylint.reporters import diff_string, EmptyReport def table_lines_from_stats(stats, old_stats, columns): """get values listed in from and , and return a formated list of values, designed to be given to a ureport.Table object """ lines = [] for m_type in columns: new = stats[m_type] format = str if isinstance(new, float): format = lambda num: '%.3f' % num old = old_stats.get(m_type) if old is not None: diff_str = diff_string(old, new) old = format(old) else: old, diff_str = 'NC', 'NC' lines += (m_type.replace('_', ' '), format(new), old, diff_str) return lines class BaseChecker(OptionsProviderMixIn, ASTWalker): """base class for checkers""" # checker name (you may reuse an existing one) name = None # options level (0 will be displaying in --help, 1 in --long-help) level = 1 # ordered list of options to control the ckecker behaviour options = () # checker that should be run before this one needs_checkers = () # messages issued by this checker msgs = {} # reports issued by this checker reports = () def __init__(self, linter=None): """checker instances should have the linter as argument linter is an object implementing ILinter """ ASTWalker.__init__(self, self) self.name = self.name.lower() OptionsProviderMixIn.__init__(self) self.linter = linter def add_message(self, msg_id, line=None, node=None, args=None): """add a message of a given type""" self.linter.add_message(msg_id, line, node, args) def package_dir(self): """return the base directory for the analysed package""" return dirname(self.linter.base_file) # dummy methods implementing the IChecker interface def open(self): """called before visiting project (i.e set of modules)""" def close(self): """called after visiting project (i.e set of modules)""" class BaseRawChecker(BaseChecker): """base class for raw checkers""" def process_module(self, stream): """process a module the module's content is accessible via the stream object stream must implement the readline method """ self.process_tokens(tokenize.generate_tokens(stream.readline)) def process_tokens(self, tokens): """should be overridden by subclasses""" raise NotImplementedError() PY_EXTS = ('.py', '.pyc', '.pyo', '.pyw', '.so', '.dll') def initialize(linter): """initialize linter with checkers in this package """ package_load(linter, __path__[0]) def package_load(linter, directory): """load all module and package in the given directory, looking for a 'register' function in each one, used to register pylint checkers """ globs = globals() imported = {} for filename in listdir(directory): basename, extension = splitext(filename) if not imported.has_key(basename) and ( (extension in PY_EXTS and basename != '__init__') or ( not extension and not basename == 'CVS' and isdir(join(directory, basename)))): try: module = __import__(basename, globs, globs, None) except ValueError: # empty module name (usually emacs auto-save files) continue except ImportError: import sys print >> sys.stderr, "Problem importing module: %s" % filename else: if hasattr(module, 'register'): module.register(linter) imported[basename] = 1 __all__ = ('CheckerHandler', 'BaseChecker', 'initialize', 'package_load') ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/design_analysis.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/desig0000644000175000017500000003254611242100540033615 0ustar andreasandreas# Copyright (c) 2003-2006 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """check for signs of poor design see http://intranet.logilab.fr/jpl/view?rql=Any%20X%20where%20X%20eid%201243 FIXME: missing 13, 15, 16 """ from logilab.astng import Function, If, InferenceError from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker import re # regexp for ignored argument name IGNORED_ARGUMENT_NAMES = re.compile('_.*') def class_is_abstract(klass): """return true if the given class node should be considered as an abstract class """ for attr in klass.values(): if isinstance(attr, Function): if attr.is_abstract(pass_is_abstract=False): return True return False MSGS = { 'R0901': ('Too many ancestors (%s/%s)', 'Used when class has too many parent classes, try to reduce \ this to get a more simple (and so easier to use) class.'), 'R0902': ('Too many instance attributes (%s/%s)', 'Used when class has too many instance attributes, try to reduce \ this to get a more simple (and so easier to use) class.'), 'R0903': ('Too few public methods (%s/%s)', 'Used when class has too few public methods, so be sure it\'s \ really worth it.'), 'R0904': ('Too many public methods (%s/%s)', 'Used when class has too many public methods, try to reduce \ this to get a more simple (and so easier to use) class.'), 'R0911': ('Too many return statements (%s/%s)', 'Used when a function or method has too many return statement, \ making it hard to follow.'), 'R0912': ('Too many branches (%s/%s)', 'Used when a function or method has too many branches, \ making it hard to follow.'), 'R0913': ('Too many arguments (%s/%s)', 'Used when a function or method takes too many arguments.'), 'R0914': ('Too many local variables (%s/%s)', 'Used when a function or method has too many local variables.'), 'R0915': ('Too many statements (%s/%s)', 'Used when a function or method has too many statements. You \ should then split it in smaller functions / methods.'), 'R0921': ('Abstract class not referenced', 'Used when an abstract class is not used as ancestor anywhere.'), 'R0922': ('Abstract class is only referenced %s times', 'Used when an abstract class is used less than X times as \ ancestor.'), 'R0923': ('Interface not implemented', 'Used when an interface class is not implemented anywhere.'), } class MisdesignChecker(BaseChecker): """checks for sign of poor/misdesign: * number of methods, attributes, local variables... * size, complexity of functions, methods """ __implements__ = (IASTNGChecker,) # configuration section name name = 'design' # messages msgs = MSGS priority = -2 # configuration options options = (('max-args', {'default' : 5, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of arguments for function / method'} ), ('ignored-argument-names', {'default' : IGNORED_ARGUMENT_NAMES, 'type' :'regexp', 'metavar' : '', 'help' : 'Argument names that match this expression will be ' 'ignored. Default to name with leading underscore'} ), ('max-locals', {'default' : 15, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of locals for function / method body'} ), ('max-returns', {'default' : 6, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of return / yield for function / ' 'method body'} ), ('max-branchs', {'default' : 12, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of branch for function / method body'} ), ('max-statements', {'default' : 50, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of statements in function / method ' 'body'} ), ('max-parents', {'default' : 7, 'type' : 'int', 'metavar' : '', 'help' : 'Maximum number of parents for a class (see R0901).'} ), ('max-attributes', {'default' : 7, 'type' : 'int', 'metavar' : '', 'help' : 'Maximum number of attributes for a class \ (see R0902).'} ), ('min-public-methods', {'default' : 2, 'type' : 'int', 'metavar' : '', 'help' : 'Minimum number of public methods for a class \ (see R0903).'} ), ('max-public-methods', {'default' : 20, 'type' : 'int', 'metavar' : '', 'help' : 'Maximum number of public methods for a class \ (see R0904).'} ), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) self.stats = None self._returns = None self._branchs = None self._used_abstracts = None self._used_ifaces = None self._abstracts = None self._ifaces = None self._stmts = 0 def open(self): """initialize visit variables""" self.stats = self.linter.add_stats() self._returns = [] self._branchs = [] self._used_abstracts = {} self._used_ifaces = {} self._abstracts = [] self._ifaces = [] def close(self): """check that abstract/interface classes are used""" for abstract in self._abstracts: if not abstract in self._used_abstracts: self.add_message('R0921', node=abstract) elif self._used_abstracts[abstract] < 2: self.add_message('R0922', node=abstract, args=self._used_abstracts[abstract]) for iface in self._ifaces: if not iface in self._used_ifaces: self.add_message('R0923', node=iface) def visit_class(self, node): """check size of inheritance hierarchy and number of instance attributes """ self._inc_branch() # Is the total inheritance hierarchy is 7 or less? nb_parents = len(list(node.ancestors())) if nb_parents > self.config.max_parents: self.add_message('R0901', node=node, args=(nb_parents, self.config.max_parents)) # Does the class contain less than 20 attributes for # non-GUI classes (40 for GUI)? # FIXME detect gui classes if len(node.instance_attrs) > self.config.max_attributes: self.add_message('R0902', node=node, args=(len(node.instance_attrs), self.config.max_attributes)) # update abstract / interface classes structures if class_is_abstract(node): self._abstracts.append(node) elif node.type == 'interface' and node.name != 'Interface': self._ifaces.append(node) for parent in node.ancestors(False): if parent.name == 'Interface': continue self._used_ifaces[parent] = 1 try: for iface in node.interfaces(): self._used_ifaces[iface] = 1 except InferenceError: # XXX log ? pass for parent in node.ancestors(): try: self._used_abstracts[parent] += 1 except KeyError: self._used_abstracts[parent] = 1 def leave_class(self, node): """check number of public methods""" nb_public_methods = 0 for method in node.methods(): if not method.name.startswith('_'): nb_public_methods += 1 # Does the class contain less than 20 public methods ? if nb_public_methods > self.config.max_public_methods: self.add_message('R0904', node=node, args=(nb_public_methods, self.config.max_public_methods)) # stop here for exception, metaclass and interface classes if node.type != 'class': return # Does the class contain more than 5 public methods ? if nb_public_methods < self.config.min_public_methods: self.add_message('R0903', node=node, args=(nb_public_methods, self.config.min_public_methods)) def visit_function(self, node): """check function name, docstring, arguments, redefinition, variable names, max locals """ self._inc_branch() # init branch and returns counters self._returns.append(0) self._branchs.append(0) # check number of arguments args = node.args.args if args is not None: ignored_args_num = len( [arg for arg in args if self.config.ignored_argument_names.match(arg.name)]) argnum = len(args) - ignored_args_num if argnum > self.config.max_args: self.add_message('R0913', node=node, args=(len(args), self.config.max_args)) else: ignored_args_num = 0 # check number of local variables locnum = len(node.locals) - ignored_args_num if locnum > self.config.max_locals: self.add_message('R0914', node=node, args=(locnum, self.config.max_locals)) # init statements counter self._stmts = 1 def leave_function(self, node): """most of the work is done here on close: checks for max returns, branch, return in __init__ """ returns = self._returns.pop() if returns > self.config.max_returns: self.add_message('R0911', node=node, args=(returns, self.config.max_returns)) branchs = self._branchs.pop() if branchs > self.config.max_branchs: self.add_message('R0912', node=node, args=(branchs, self.config.max_branchs)) # check number of statements if self._stmts > self.config.max_statements: self.add_message('R0915', node=node, args=(self._stmts, self.config.max_statements)) def visit_return(self, _): """count number of returns""" if not self._returns: return # return outside function, reported by the base checker self._returns[-1] += 1 def visit_default(self, node): """default visit method -> increments the statements counter if necessary """ if node.is_statement: self._stmts += 1 def visit_tryexcept(self, node): """increments the branchs counter""" branchs = len(node.handlers) if node.orelse: branchs += 1 self._inc_branch(branchs) self._stmts += branchs def visit_tryfinally(self, _): """increments the branchs counter""" self._inc_branch(2) self._stmts += 2 def visit_if(self, node): """increments the branchs counter""" branchs = 1 # don't double count If nodes coming from some 'elif' if node.orelse and (len(node.orelse)>1 or not isinstance(node.orelse[0], If)): branchs += 1 self._inc_branch(branchs) self._stmts += branchs def visit_while(self, node): """increments the branchs counter""" branchs = 1 if node.orelse: branchs += 1 self._inc_branch(branchs) visit_for = visit_while def _inc_branch(self, branchsnum=1): """increments the branchs counter""" branchs = self._branchs for i in xrange(len(branchs)): branchs[i] += branchsnum # FIXME: make a nice report... def register(linter): """required method to auto register this checker """ linter.register_checker(MisdesignChecker(linter)) ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/similar.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/simil0000644000175000017500000002450011242100540033626 0ustar andreasandreas# pylint: disable=W0622 # Copyright (c) 2004-2006 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """a similarities / code duplication command line tool and pylint checker """ from __future__ import generators import sys from logilab.common.compat import set, izip, sum, enumerate from logilab.common.ureports import Table from ScribesPylint.interfaces import IRawChecker from ScribesPylint.checkers import BaseChecker, table_lines_from_stats class Similar: """finds copy-pasted lines of code in a project""" def __init__(self, min_lines=4, ignore_comments=False, ignore_docstrings=False): self.min_lines = min_lines self.ignore_comments = ignore_comments self.ignore_docstrings = ignore_docstrings self.linesets = [] def append_stream(self, streamid, stream): """append a file to search for similarities""" self.linesets.append(LineSet(streamid, stream.readlines(), self.ignore_comments, self.ignore_docstrings)) def run(self): """start looking for similarities and display results on stdout""" self._display_sims(self._compute_sims()) def _compute_sims(self): """compute similarities in appended files""" no_duplicates = {} for num, lineset1, idx1, lineset2, idx2 in self._iter_sims(): duplicate = no_duplicates.setdefault(num, []) for couples in duplicate: if (lineset1, idx1) in couples or (lineset2, idx2) in couples: couples.add( (lineset1, idx1) ) couples.add( (lineset2, idx2) ) break else: duplicate.append( set([(lineset1, idx1), (lineset2, idx2)]) ) sims = [] for num, ensembles in no_duplicates.iteritems(): for couples in ensembles: sims.append( (num, couples) ) sims.sort() sims.reverse() return sims def _display_sims(self, sims): """display computed similarities on stdout""" nb_lignes_dupliquees = 0 for num, couples in sims: print print num, "similar lines in", len(couples), "files" couples = list(couples) couples.sort() for lineset, idx in couples: print "==%s:%s" % (lineset.name, idx) # pylint: disable=W0631 for line in lineset._real_lines[idx:idx+num]: print " ", line, nb_lignes_dupliquees += num * (len(couples)-1) nb_total_lignes = sum([len(lineset) for lineset in self.linesets]) print "TOTAL lines=%s duplicates=%s percent=%s" \ % (nb_total_lignes, nb_lignes_dupliquees, nb_lignes_dupliquees*1. / nb_total_lignes) def _find_common(self, lineset1, lineset2): """find similarities in the two given linesets""" lines1 = lineset1.enumerate_stripped lines2 = lineset2.enumerate_stripped find = lineset2.find index1 = 0 min_lines = self.min_lines while index1 < len(lineset1): skip = 1 num = 0 for index2 in find( lineset1[index1] ): non_blank = 0 for num, ((_, line1), (_, line2)) in enumerate( izip(lines1(index1), lines2(index2))): if line1 != line2: if non_blank > min_lines: yield num, lineset1, index1, lineset2, index2 skip = max(skip, num) break if line1: non_blank += 1 else: # we may have reach the end num += 1 if non_blank > min_lines: yield num, lineset1, index1, lineset2, index2 skip = max(skip, num) index1 += skip def _iter_sims(self): """iterate on similarities among all files, by making a cartesian product """ for idx, lineset in enumerate(self.linesets[:-1]): for lineset2 in self.linesets[idx+1:]: for sim in self._find_common(lineset, lineset2): yield sim def stripped_lines(lines, ignore_comments, ignore_docstrings): strippedlines = [] docstring = None for line in lines: line = line.strip() if ignore_docstrings: if not docstring and \ (line.startswith('"""') or line.startswith("'''")): docstring = line[:3] line = line[3:] if docstring: if line.endswith(docstring): docstring = None line = '' # XXX cut when a line begins with code but end with a comment if ignore_comments and line.startswith('#'): line = '' strippedlines.append(line) return strippedlines class LineSet: """Holds and indexes all the lines of a single source file""" def __init__(self, name, lines, ignore_comments=False, ignore_docstrings=False): self.name = name self._real_lines = lines self._stripped_lines = stripped_lines(lines, ignore_comments, ignore_docstrings) self._index = self._mk_index() def __str__(self): return '' % self.name def __len__(self): return len(self._real_lines) def __getitem__(self, index): return self._stripped_lines[index] def __cmp__(self, other): return cmp(self.name, other.name) def __hash__(self): return id(self) def enumerate_stripped(self, start_at=0): """return an iterator on stripped lines, starting from a given index if specified, else 0 """ idx = start_at if start_at: lines = self._stripped_lines[start_at:] else: lines = self._stripped_lines for line in lines: #if line: yield idx, line idx += 1 def find(self, stripped_line): """return positions of the given stripped line in this set""" return self._index.get(stripped_line, ()) def _mk_index(self): """create the index for this set""" index = {} for line_no, line in enumerate(self._stripped_lines): if line: index.setdefault(line, []).append( line_no ) return index MSGS = {'R0801': ('Similar lines in %s files\n%s', 'Indicates that a set of similar lines has been detected \ among multiple file. This usually means that the code should \ be refactored to avoid this duplication.')} def report_similarities(sect, stats, old_stats): """make a layout with some stats about duplication""" lines = ['', 'now', 'previous', 'difference'] lines += table_lines_from_stats(stats, old_stats, ('nb_duplicated_lines', 'percent_duplicated_lines')) sect.append(Table(children=lines, cols=4, rheaders=1, cheaders=1)) # wrapper to get a pylint checker from the similar class class SimilarChecker(BaseChecker, Similar): """checks for similarities and duplicated code. This computation may be memory / CPU intensive, so you should disable it if you experiments some problems. """ __implements__ = (IRawChecker,) # configuration section name name = 'similarities' # messages msgs = MSGS # configuration options # for available dict keys/values see the optik parser 'add_option' method options = (('min-similarity-lines', {'default' : 4, 'type' : "int", 'metavar' : '', 'help' : 'Minimum lines number of a similarity.'}), ('ignore-comments', {'default' : True, 'type' : 'yn', 'metavar' : '', 'help': 'Ignore comments when computing similarities.'} ), ('ignore-docstrings', {'default' : True, 'type' : 'yn', 'metavar' : '', 'help': 'Ignore docstrings when computing similarities.'} ), ) # reports reports = ( ('R0801', 'Duplication', report_similarities), ) # XXX actually a Refactoring message def __init__(self, linter=None): BaseChecker.__init__(self, linter) Similar.__init__(self, min_lines=4, ignore_comments=True, ignore_docstrings=True) self.stats = None def set_option(self, optname, value, action=None, optdict=None): """method called to set an option (registered in the options list) overridden to report options setting to Similar """ BaseChecker.set_option(self, optname, value, action, optdict) if optname == 'min-similarity-lines': self.min_lines = self.config.min_similarity_lines elif optname == 'ignore-comments': self.ignore_comments = self.config.ignore_comments elif optname == 'ignore-docstrings': self.ignore_docstrings = self.config.ignore_docstrings def open(self): """init the checkers: reset linesets and statistics information""" self.linesets = [] self.stats = self.linter.add_stats(nb_duplicated_lines=0, percent_duplicated_lines=0) def process_module(self, stream): """process a module the module's content is accessible via the stream object stream must implements the readlines method """ self.append_stream(self.linter.current_name, stream) def close(self): """compute and display similarities on closing (i.e. end of parsing)""" total = sum([len(lineset) for lineset in self.linesets]) duplicated = 0 stats = self.stats for num, couples in self._compute_sims(): msg = [] for lineset, idx in couples: msg.append("==%s:%s" % (lineset.name, idx)) msg.sort() # pylint: disable=W0631 for line in lineset._real_lines[idx:idx+num]: msg.append(line.rstrip()) self.add_message('R0801', args=(len(couples), '\n'.join(msg))) duplicated += num * (len(couples) - 1) stats['nb_duplicated_lines'] = duplicated stats['percent_duplicated_lines'] = total and duplicated * 100. / total def register(linter): """required method to auto register this checker """ linter.register_checker(SimilarChecker(linter)) def usage(status=0): """display command line usage information""" print "finds copy pasted blocks in a set of files" print print 'Usage: similar [-d|--duplicates min_duplicated_lines] \ [--ignore-comments] file1...' sys.exit(status) def run(argv=None): """standalone command line access point""" if argv is None: argv = sys.argv[1:] from getopt import getopt s_opts = 'hd:' l_opts = ('help', 'duplicates=', 'ignore-comments') min_lines = 4 ignore_comments = False opts, args = getopt(argv, s_opts, l_opts) for opt, val in opts: if opt in ('-d', '--duplicates'): min_lines = int(val) elif opt in ('-h', '--help'): usage() elif opt == '--ignore-comments': ignore_comments = True if not args: usage(1) sim = Similar(min_lines, ignore_comments) for filename in args: sim.append_stream(filename, open(filename)) sim.run() if __name__ == '__main__': run() ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/variables.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/varia0000644000175000017500000004250711242100540033622 0ustar andreasandreas# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """variables checkers for Python code """ from copy import copy from logilab.common.compat import enumerate from logilab import astng from logilab.astng import are_exclusive, builtin_lookup from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker from ScribesPylint.checkers.utils import PYMETHODS, is_ancestor_name, is_builtin, \ is_defined_before, is_error, is_func_default, is_func_decorator, assign_parent def overridden_method(klass, name): """get overridden method if any""" try: parent = klass.local_attr_ancestors(name).next() except (StopIteration, KeyError): return None try: meth_node = parent[name] except KeyError: # We have found an ancestor defining but it's not in the local # dictionary. This may happen with astng built from living objects. return None if isinstance(meth_node, astng.Function): return meth_node return None MSGS = { 'E0601': ('Using variable %r before assignment', 'Used when a local variable is accessed before it\'s \ assignment.'), 'E0602': ('Undefined variable %r', 'Used when an undefined variable is accessed.'), 'E0611': ('No name %r in module %r', 'Used when a name cannot be found in a module.'), 'W0601': ('Global variable %r undefined at the module level', 'Used when a variable is defined through the "global" statement \ but the variable is not defined in the module scope.'), 'W0602': ('Using global for %r but no assignment is done', 'Used when a variable is defined through the "global" statement \ but no assignment to this variable is done.'), 'W0603': ('Using the global statement', # W0121 'Used when you use the "global" statement to update a global \ variable. PyLint just try to discourage this \ usage. That doesn\'t mean you can not use it !'), 'W0604': ('Using the global statement at the module level', # W0103 'Used when you use the "global" statement at the module level \ since it has no effect'), 'W0611': ('Unused import %s', 'Used when an imported module or variable is not used.'), 'W0612': ('Unused variable %r', 'Used when a variable is defined but not used.'), 'W0613': ('Unused argument %r', 'Used when a function or method argument is not used.'), 'W0614': ('Unused import %s from wildcard import', 'Used when an imported module or variable is not used from a \ \'from X import *\' style import.'), 'W0621': ('Redefining name %r from outer scope (line %s)', 'Used when a variable\'s name hide a name defined in the outer \ scope.'), 'W0622': ('Redefining built-in %r', 'Used when a variable or function override a built-in.'), 'W0631': ('Using possibly undefined loop variable %r', 'Used when an loop variable (i.e. defined by a for loop or \ a list comprehension or a generator expression) is used outside \ the loop.'), } class VariablesChecker(BaseChecker): """checks for * unused variables / imports * undefined variables * redefinition of variable from builtins or from an outer scope * use of variable before assignment """ __implements__ = IASTNGChecker name = 'variables' msgs = MSGS priority = -1 options = ( ("init-import", {'default': 0, 'type' : 'yn', 'metavar' : '', 'help' : 'Tells whether we should check for unused import in \ __init__ files.'}), ("dummy-variables-rgx", {'default': ('_|dummy'), 'type' :'regexp', 'metavar' : '', 'help' : 'A regular expression matching names used \ for dummy variables (i.e. not used).'}), ("additional-builtins", {'default': (), 'type' : 'csv', 'metavar' : '', 'help' : 'List of additional names supposed to be defined in \ builtins. Remember that you should avoid to define new builtins when possible.' }), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) self._to_consume = None self._checking_mod_attr = None self._vars = None def visit_module(self, node): """visit module : update consumption analysis variable checks globals doesn't overrides builtins """ self._to_consume = [(copy(node.locals), {}, 'module')] self._vars = [] for name, stmts in node.locals.items(): if is_builtin(name): # do not print Redefining builtin for additional builtins self.add_message('W0622', args=name, node=stmts[0]) def leave_module(self, node): """leave module: check globals """ assert len(self._to_consume) == 1 not_consumed = self._to_consume.pop()[0] # don't check unused imports in __init__ files if not self.config.init_import and node.package: return for name, stmts in not_consumed.items(): stmt = stmts[0] if isinstance(stmt, astng.Import): self.add_message('W0611', args=name, node=stmt) elif isinstance(stmt, astng.From) and stmt.modname != '__future__': if stmt.names[0][0] == '*': self.add_message('W0614', args=name, node=stmt) else: self.add_message('W0611', args=name, node=stmt) del self._to_consume del self._vars def visit_class(self, node): """visit class: update consumption analysis variable """ self._to_consume.append((copy(node.locals), {}, 'class')) def leave_class(self, _): """leave class: update consumption analysis variable """ # do not check for not used locals here (no sense) self._to_consume.pop() def visit_lambda(self, node): """visit lambda: update consumption analysis variable """ self._to_consume.append((copy(node.locals), {}, 'lambda')) def leave_lambda(self, _): """leave lambda: update consumption analysis variable """ # do not check for not used locals here self._to_consume.pop() def visit_genexpr(self, node): """visit genexpr: update consumption analysis variable """ self._to_consume.append((copy(node.locals), {}, 'genexpr')) def leave_genexpr(self, _): """leave genexpr: update consumption analysis variable """ # do not check for not used locals here self._to_consume.pop() def visit_function(self, node): """visit function: update consumption analysis variable and check locals """ globs = node.root().globals for name, stmt in node.items(): if globs.has_key(name) and not isinstance(stmt, astng.Global): line = globs[name][0].lineno self.add_message('W0621', args=(name, line), node=stmt) elif is_builtin(name): # do not print Redefining builtin for additional builtins self.add_message('W0622', args=name, node=stmt) self._to_consume.append((copy(node.locals), {}, 'function')) self._vars.append({}) def leave_function(self, node): """leave function: check function's locals are consumed""" not_consumed = self._to_consume.pop()[0] self._vars.pop(0) # don't check arguments of function which are only raising an exception if is_error(node): return # don't check arguments of abstract methods or within an interface is_method = node.is_method() klass = node.parent.frame() if is_method and (klass.type == 'interface' or node.is_abstract()): return authorized_rgx = self.config.dummy_variables_rgx overridden = marker = [] argnames = node.argnames() for name, stmts in not_consumed.iteritems(): # ignore some special names specified by user configuration if authorized_rgx.match(name): continue # ignore names imported by the global statement # FIXME: should only ignore them if it's assigned latter stmt = stmts[0] if isinstance(stmt, astng.Global): continue # care about functions with unknown argument (builtins) if name in argnames: if is_method: # don't warn for the first argument of a (non static) method if node.type != 'staticmethod' and name == argnames[0]: continue # don't warn for argument of an overridden method if overridden is marker: overridden = overridden_method(klass, node.name) if overridden is not None and name in overridden.argnames(): continue if node.name in PYMETHODS and node.name not in ('__init__', '__new__'): continue # don't check callback arguments XXX should be configurable if node.name.startswith('cb_') or node.name.endswith('_cb'): continue self.add_message('W0613', args=name, node=stmt) else: self.add_message('W0612', args=name, node=stmt) def visit_global(self, node): """check names imported exists in the global scope""" frame = node.frame() if isinstance(frame, astng.Module): self.add_message('W0604', node=node) return module = frame.root() default_message = True for name in node.names: try: assign_nodes = module.getattr(name) except astng.NotFoundError: # unassigned global, skip assign_nodes = [] for anode in assign_nodes: if anode.parent is None: # node returned for builtin attribute such as __file__, # __doc__, etc... continue if anode.frame() is frame: # same scope level assignment break else: # global but no assignment self.add_message('W0602', args=name, node=node) default_message = False if not assign_nodes: continue for anode in assign_nodes: if anode.parent is None: self.add_message('W0622', args=name, node=node) break if anode.frame() is module: # module level assignment break else: # global undefined at the module scope self.add_message('W0601', args=name, node=node) default_message = False if default_message: self.add_message('W0603', node=node) def _loopvar_name(self, node, name): # filter variables according to node's scope # XXX used to filter parents but don't remember why, and removing this # fixes a W0631 false positive reported by Paul Hachmann on 2008/12 on # python-projects (added to func_use_for_or_listcomp_var test) #astmts = [stmt for stmt in node.lookup(name)[1] # if hasattr(stmt, 'ass_type')] and # not stmt.statement().parent_of(node)] astmts = [stmt for stmt in node.lookup(name)[1] if hasattr(stmt, 'ass_type')] # filter variables according their respective scope if not astmts or astmts[0].statement().parent_of(node): _astmts = [] else: _astmts = astmts[:1] for i, stmt in enumerate(astmts[1:]): if astmts[i].statement().parent_of(stmt): continue _astmts.append(stmt) astmts = _astmts if len(astmts) == 1: ass = astmts[0].ass_type() if isinstance(ass, (astng.For, astng.Comprehension, astng.GenExpr)) \ and not ass.statement() is node.statement(): self.add_message('W0631', args=name, node=node) def visit_assname(self, node): if isinstance(node.ass_type(), astng.AugAssign): self.visit_name(node) def visit_delname(self, node): self.visit_name(node) def visit_name(self, node): """check that a name is defined if the current scope and doesn't redefine a built-in """ stmt = node.statement() if stmt.fromlineno is None: # name node from a astng built from live code, skip assert not stmt.root().file.endswith('.py') return name = node.name frame = stmt.scope() # if the name node is used as a function default argument's value or as # a decorator, then start from the parent frame of the function instead # of the function frame - and thus open an inner class scope if (is_func_default(node) or is_func_decorator(node) or is_ancestor_name(frame, node)): start_index = len(self._to_consume) - 2 else: start_index = len(self._to_consume) - 1 # iterates through parent scopes, from the inner to the outer base_scope_type = self._to_consume[start_index][-1] for i in range(start_index, -1, -1): to_consume, consumed, scope_type = self._to_consume[i] # if the current scope is a class scope but it's not the inner # scope, ignore it. This prevents to access this scope instead of # the globals one in function members when there are some common # names. The only exception is when the starting scope is a # genexpr and its direct outer scope is a class if scope_type == 'class' and i != start_index and not ( base_scope_type == 'genexpr' and i == start_index-1): # XXX find a way to handle class scope in a smoother way continue # the name has already been consumed, only check it's not a loop # variable used outside the loop if consumed.has_key(name): self._loopvar_name(node, name) break # mark the name as consumed if it's defined in this scope # (i.e. no KeyError is raised by "to_consume[name]") try: consumed[name] = to_consume[name] except KeyError: continue else: # checks for use before assignment defnode = assign_parent(to_consume[name][0]) if defnode is not None: defstmt = defnode.statement() defframe = defstmt.frame() maybee0601 = True if not frame is defframe: maybee0601 = False elif defframe.parent is None: # we are at the module level, check the name is not # defined in builtins if name in defframe.scope_attrs or builtin_lookup(name)[1]: maybee0601 = False else: # we are in a local scope, check the name is not # defined in global or builtin scope if defframe.root().lookup(name)[1]: maybee0601 = False if (maybee0601 and stmt.fromlineno <= defstmt.fromlineno and not is_defined_before(node) and not are_exclusive(stmt, defstmt, ('NameError', 'Exception', 'BaseException'))): if defstmt is stmt and isinstance(node, (astng.DelName, astng.AssName)): self.add_message('E0602', args=name, node=node) elif self._to_consume[-1][-1] != 'lambda': # E0601 may *not* occurs in lambda scope self.add_message('E0601', args=name, node=node) if not isinstance(node, astng.AssName): # Aug AssName del to_consume[name] else: del consumed[name] # check it's not a loop variable used outside the loop self._loopvar_name(node, name) break else: # we have not found the name, if it isn't a builtin, that's an # undefined name ! if not (name in astng.Module.scope_attrs or is_builtin(name) or name in self.config.additional_builtins): self.add_message('E0602', args=name, node=node) def visit_import(self, node): """check modules attribute accesses""" for name, _ in node.names: parts = name.split('.') try: module = node.infer_name_module(parts[0]).next() except astng.ResolveError: continue self._check_module_attrs(node, module, parts[1:]) def visit_from(self, node): """check modules attribute accesses""" name_parts = node.modname.split('.') try: module = node.root().import_module(name_parts[0]) except KeyboardInterrupt: raise except: return module = self._check_module_attrs(node, module, name_parts[1:]) if not module: return for name, _ in node.names: if name == '*': continue self._check_module_attrs(node, module, name.split('.')) ## def leave_getattr(self, node): ## """check modules attribute accesses ## this function is a "leave_" because when parsing 'a.b.c' ## we want to check the innermost expression first. ## """ ## if isinstance(node.expr, astng.Name): ## try: ## module = node.expr.infer().next() ## except astng.InferenceError: ## return ## if not isinstance(module, astng.Module): ## # Not a module, don't check ## return ## elif self._checking_mod_attr is not None: ## module = self._checking_mod_attr ## else: ## return ## self._checking_mod_attr = self._check_module_attrs(node, module, ## [node.attrname]) ## def leave_default(self, node): ## """by default, reset the _checking_mod_attr attribute""" ## self._checking_mod_attr = None def _check_module_attrs(self, node, module, module_names): """check that module_names (list of string) are accessible through the given module if the latest access name corresponds to a module, return it """ assert isinstance(module, astng.Module), module while module_names: name = module_names.pop(0) if name == '__dict__': module = None break try: module = module.getattr(name)[0].infer().next() except astng.NotFoundError: self.add_message('E0611', args=(name, module.name), node=node) return None except astng.InferenceError: return None if module_names: # FIXME: other message if name is not the latest part of # module_names ? modname = module and module.name or '__dict__' self.add_message('E0611', node=node, args=('.'.join(module_names), modname)) return None if isinstance(module, astng.Module): return module return None def register(linter): """required method to auto register this checker""" linter.register_checker(VariablesChecker(linter)) ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/logging.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/loggi0000644000175000017500000001014711242100540033614 0ustar andreasandreas# Copyright (c) 2009-2010 Google, Inc. # 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. """checker for use of Python logging """ from logilab import astng from ScribesPylint import checkers from ScribesPylint import interfaces from logilab.common.compat import set EAGER_STRING_INTERPOLATION = 'W6501' CHECKED_CONVENIENCE_FUNCTIONS = set([ 'critical', 'debug', 'error', 'exception', 'fatal', 'info', 'warn', 'warning']) class LoggingChecker(checkers.BaseChecker): """Checks use of the logging module.""" __implements__ = interfaces.IASTNGChecker name = 'logging' msgs = {EAGER_STRING_INTERPOLATION: ('Specify string format arguments as logging function parameters', 'Used when a logging statement has a call form of ' '"logging.(format_string % (format_args...))". ' 'Such calls should leave string interpolation to the logging ' 'method itself and be written ' '"logging.(format_string, format_args...)" ' 'so that the program may avoid incurring the cost of the ' 'interpolation in those cases in which no message will be ' 'logged. For more, see ' 'http://www.python.org/dev/peps/pep-0282/.') } def visit_module(self, unused_node): """Clears any state left in this checker from last module checked.""" # The code being checked can just as easily "import logging as foo", # so it is necessary to process the imports and store in this field # what name the logging module is actually given. self._logging_name = None def visit_import(self, node): """Checks to see if this module uses Python's built-in logging.""" for module, as_name in node.names: if module == 'logging': if as_name: self._logging_name = as_name else: self._logging_name = 'logging' def visit_callfunc(self, node): """Checks calls to (simple forms of) logging methods.""" if (not isinstance(node.func, astng.Getattr) or not isinstance(node.func.expr, astng.Name) or node.func.expr.name != self._logging_name): return self._CheckConvenienceMethods(node) self._CheckLogMethod(node) def _CheckConvenienceMethods(self, node): """Checks calls to logging convenience methods (like logging.warn).""" if node.func.attrname not in CHECKED_CONVENIENCE_FUNCTIONS: return if not node.args: # Either no args, or star args, or double-star args. Beyond the # scope of this checker in any case. return if isinstance(node.args[0], astng.BinOp) and node.args[0].op == '%': self.add_message(EAGER_STRING_INTERPOLATION, node=node) def _CheckLogMethod(self, node): """Checks calls to logging.log(level, format, *format_args).""" if node.func.attrname != 'log': return if len(node.args) < 2: # Either a malformed call or something with crazy star args or # double-star args magic. Beyond the scope of this checker. return if isinstance(node.args[1], astng.BinOp) and node.args[1].op == '%': self.add_message(EAGER_STRING_INTERPOLATION, node=node) def register(linter): """Required method to auto-register this checker.""" linter.register_checker(LoggingChecker(linter)) ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/newstyle.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/newst0000644000175000017500000001032211242100540033646 0ustar andreasandreas# Copyright (c) 2005-2006 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """check for new / old style related problems """ from logilab import astng from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker MSGS = { 'E1001': ('Use __slots__ on an old style class', 'Used when an old style class use the __slots__ attribute.'), 'E1002': ('Use super on an old style class', 'Used when an old style class use the super builtin.'), 'E1003': ('Bad first argument %r given to super class', 'Used when another argument than the current class is given as \ first argument of the super builtin.'), 'W1001': ('Use of "property" on an old style class', 'Used when PyLint detect the use of the builtin "property" \ on an old style class while this is relying on new style \ classes features'), } class NewStyleConflictChecker(BaseChecker): """checks for usage of new style capabilities on old style classes and other new/old styles conflicts problems * use of property, __slots__, super * "super" usage """ __implements__ = (IASTNGChecker,) # configuration section name name = 'newstyle' # messages msgs = MSGS priority = -2 # configuration options options = () # def __init__(self, linter=None): # BaseChecker.__init__(self, linter) def visit_class(self, node): """check __slots__ usage """ if '__slots__' in node and not node.newstyle: self.add_message('E1001', node=node) def visit_callfunc(self, node): """check property usage""" parent = node.parent.frame() if (isinstance(parent, astng.Class) and not parent.newstyle and isinstance(node.func, astng.Name)): name = node.func.name if name == 'property': self.add_message('W1001', node=node) def visit_function(self, node): """check use of super""" # ignore actual functions or method within a new style class if not node.is_method(): return klass = node.parent.frame() for stmt in node.nodes_of_class(astng.CallFunc): expr = stmt.func if not isinstance(expr, astng.Getattr): continue call = expr.expr # skip the test if using super if isinstance(call, astng.CallFunc) and \ isinstance(call.func, astng.Name) and \ call.func.name == 'super': if not klass.newstyle: # super should not be used on an old style class self.add_message('E1002', node=node) else: # super first arg should be the class try: supcls = (call.args and call.args[0].infer().next() or None) except astng.InferenceError: continue if klass is not supcls: supcls = getattr(supcls, 'name', supcls) self.add_message('E1003', node=node, args=supcls) def register(linter): """required method to auto register this checker """ linter.register_checker(NewStyleConflictChecker(linter)) ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/imports.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/impor0000644000175000017500000003137411242100540033646 0ustar andreasandreas# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """imports checkers for Python code""" from logilab.common.graph import get_cycles, DotBackend from logilab.common.modutils import is_standard_module from logilab.common.ureports import VerbatimText, Paragraph from logilab.common.compat import sorted, enumerate, set from logilab import astng from logilab.astng import are_exclusive from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker, EmptyReport def get_first_import(context, name, base, level=0): """return the node where [base.] is imported or None if not found """ for node in context.values(): if isinstance(node, astng.Import): if name in [iname[0] for iname in node.names]: return node if isinstance(node, astng.From): if base == node.modname and level == node.level and \ name in [iname[0] for iname in node.names]: return node # utilities to represents import dependencies as tree and dot graph ########### def filter_dependencies_info(dep_info, package_dir, mode='external'): """filter external or internal dependencies from dep_info (return a new dictionary containing the filtered modules only) """ if mode == 'external': filter_func = lambda x: not is_standard_module(x, (package_dir,)) else: assert mode == 'internal' filter_func = lambda x: is_standard_module(x, (package_dir,)) result = {} for importee, importers in dep_info.items(): if filter_func(importee): result[importee] = importers return result def make_tree_defs(mod_files_list): """get a list of 2-uple (module, list_of_files_which_import_this_module), it will return a dictionary to represent this as a tree """ tree_defs = {} for mod, files in mod_files_list: node = (tree_defs, ()) for prefix in mod.split('.'): node = node[0].setdefault(prefix, [{}, []]) node[1] += files return tree_defs def repr_tree_defs(data, indent_str=None): """return a string which represents imports as a tree""" lines = [] nodes = data.items() for i, (mod, (sub, files)) in enumerate(sorted(nodes, key=lambda x: x[0])): if not files: files = '' else: files = '(%s)' % ','.join(files) if indent_str is None: lines.append('%s %s' % (mod, files)) sub_indent_str = ' ' else: lines.append('%s\-%s %s' % (indent_str, mod, files)) if i == len(nodes)-1: sub_indent_str = '%s ' % indent_str else: sub_indent_str = '%s| ' % indent_str if sub: lines.append(repr_tree_defs(sub, sub_indent_str)) return '\n'.join(lines) def dependencies_graph(filename, dep_info): """write dependencies as a dot (graphviz) file """ done = {} printer = DotBackend(filename[:-4], rankdir = "LR") printer.emit('URL="." node[shape="box"]') for modname, dependencies in dep_info.items(): done[modname] = 1 printer.emit_node(modname) for modname in dependencies: if not done.has_key(modname): done[modname] = 1 printer.emit_node(modname) for depmodname, dependencies in dep_info.items(): for modname in dependencies: printer.emit_edge(modname, depmodname) printer.generate(filename) def make_graph(filename, dep_info, sect, gtype): """generate a dependencies graph and add some information about it in the report's section """ dependencies_graph(filename, dep_info) sect.append(Paragraph('%simports graph has been written to %s' % (gtype, filename))) # the import checker itself ################################################### MSGS = { 'F0401': ('Unable to import %r' , 'Used when pylint has been unable to import a module.'), 'R0401': ('Cyclic import (%s)', 'Used when a cyclic import between two or more modules is \ detected.'), 'W0401': ('Wildcard import %s', 'Used when `from module import *` is detected.'), 'W0402': ('Uses of a deprecated module %r', 'Used a module marked as deprecated is imported.'), 'W0403': ('Relative import %r, should be %r', 'Used when an import relative to the package directory is \ detected.'), 'W0404': ('Reimport %r (imported line %s)', 'Used when a module is reimported multiple times.'), 'W0406': ('Module import itself', 'Used when a module is importing itself.'), 'W0410': ('__future__ import is not the first non docstring statement', 'Python 2.5 and greater require __future__ import to be the \ first non docstring statement in the module.'), } class ImportsChecker(BaseChecker): """checks for * external modules dependencies * relative / wildcard imports * cyclic imports * uses of deprecated modules """ __implements__ = IASTNGChecker name = 'imports' msgs = MSGS priority = -2 options = (('deprecated-modules', {'default' : ('regsub','string', 'TERMIOS', 'Bastion', 'rexec'), 'type' : 'csv', 'metavar' : '', 'help' : 'Deprecated modules which should not be used, \ separated by a comma'} ), ('import-graph', {'default' : '', 'type' : 'string', 'metavar' : '', 'help' : 'Create a graph of every (i.e. internal and \ external) dependencies in the given file (report RP0402 must not be disabled)'} ), ('ext-import-graph', {'default' : '', 'type' : 'string', 'metavar' : '', 'help' : 'Create a graph of external dependencies in the \ given file (report RP0402 must not be disabled)'} ), ('int-import-graph', {'default' : '', 'type' : 'string', 'metavar' : '', 'help' : 'Create a graph of internal dependencies in the \ given file (report RP0402 must not be disabled)'} ), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) self.stats = None self.import_graph = None self.__int_dep_info = self.__ext_dep_info = None self.reports = (('RP0401', 'External dependencies', self.report_external_dependencies), ('RP0402', 'Modules dependencies graph', self.report_dependencies_graph), ) def open(self): """called before visiting project (i.e set of modules)""" self.linter.add_stats(dependencies={}) self.linter.add_stats(cycles=[]) self.stats = self.linter.stats self.import_graph = {} def close(self): """called before visiting project (i.e set of modules)""" # don't try to compute cycles if the associated message is disabled if self.linter.is_message_enabled('R0401'): for cycle in get_cycles(self.import_graph): self.add_message('R0401', args=' -> '.join(cycle)) def visit_import(self, node): """triggered when an import statement is seen""" modnode = node.root() for name, _ in node.names: importedmodnode = self.get_imported_module(modnode, node, name) if importedmodnode is None: continue self._check_relative_import(modnode, node, importedmodnode, name) self._add_imported_module(node, importedmodnode.name) self._check_deprecated_module(node, name) self._check_reimport(node, name) def visit_from(self, node): """triggered when a from statement is seen""" basename = node.modname if basename == '__future__': # check if this is the first non-docstring statement in the module prev = node.previous_sibling() if prev: # consecutive future statements are possible if not (isinstance(prev, astng.From) and prev.modname == '__future__'): self.add_message('W0410', node=node) return modnode = node.root() importedmodnode = self.get_imported_module(modnode, node, basename) if importedmodnode is None: return self._check_relative_import(modnode, node, importedmodnode, basename) self._check_deprecated_module(node, basename) for name, _ in node.names: if name == '*': self.add_message('W0401', args=basename, node=node) continue self._add_imported_module(node, '%s.%s' % (importedmodnode.name, name)) self._check_reimport(node, name, basename, node.level) def get_imported_module(self, modnode, importnode, modname): try: return importnode.do_import_module(modname) except astng.InferenceError, ex: if str(ex).startswith('module importing itself'): # XXX return modnode else: self.add_message("F0401", args=modname, node=importnode) return def _check_relative_import(self, modnode, importnode, importedmodnode, importedasname): """check relative import. node is either an Import or From node, modname the imported module name. """ if importedmodnode.file is None: return False # built-in module if modnode is importedmodnode: return False # module importing itself if modnode.absolute_import_activated() or getattr(importnode, 'level', None): return False if importedmodnode.name != importedasname: # this must be a relative import... self.add_message('W0403', args=(importedasname, importedmodnode.name), node=importnode) def _add_imported_module(self, node, importedmodname): """notify an imported module, used to analyze dependencies""" context_name = node.root().name if context_name == importedmodname: # module importing itself ! self.add_message('W0406', node=node) elif not is_standard_module(importedmodname): # handle dependencies importedmodnames = self.stats['dependencies'].setdefault( importedmodname, set()) if not context_name in importedmodnames: importedmodnames.add(context_name) if is_standard_module( importedmodname, (self.package_dir(),) ): # update import graph mgraph = self.import_graph.setdefault(context_name, set()) if not importedmodname in mgraph: mgraph.add(importedmodname) def _check_deprecated_module(self, node, mod_path): """check if the module is deprecated""" # XXX rewrite for mod_name in self.config.deprecated_modules: if mod_path.startswith(mod_name) and \ (len(mod_path) == len(mod_name) or mod_path[len(mod_name)] == '.'): self.add_message('W0402', node=node, args=mod_path) def _check_reimport(self, node, name, basename=None, level=0): """check if the import is necessary (i.e. not already done)""" # XXX rewrite frame = node.frame() first = get_first_import(frame, name, basename, level) if isinstance(first, (astng.Import, astng.From)) and first is not node \ and not are_exclusive(first, node): self.add_message('W0404', node=node, args=(name, first.fromlineno)) else: root = node.root() if root is frame: return first = get_first_import(root, name, basename) if not isinstance(first, (astng.Import, astng.From)): return if first is not node and not are_exclusive(first, node): self.add_message('W0404', node=node, args=(name, first.fromlineno)) def report_external_dependencies(self, sect, _, dummy): """return a verbatim layout for displaying dependencies""" dep_info = make_tree_defs(self._external_dependencies_info().items()) if not dep_info: raise EmptyReport() tree_str = repr_tree_defs(dep_info) sect.append(VerbatimText(tree_str)) def report_dependencies_graph(self, sect, _, dummy): """write dependencies as a dot (graphviz) file""" dep_info = self.stats['dependencies'] if not dep_info or not (self.config.import_graph or self.config.ext_import_graph or self.config.int_import_graph): raise EmptyReport() filename = self.config.import_graph if filename: make_graph(filename, dep_info, sect, '') filename = self.config.ext_import_graph if filename: make_graph(filename, self._external_dependencies_info(), sect, 'external ') filename = self.config.int_import_graph if filename: make_graph(filename, self._internal_dependencies_info(), sect, 'internal ') def _external_dependencies_info(self): """return cached external dependencies information or build and cache them """ if self.__ext_dep_info is None: self.__ext_dep_info = filter_dependencies_info( self.stats['dependencies'], self.package_dir(), 'external') return self.__ext_dep_info def _internal_dependencies_info(self): """return cached internal dependencies information or build and cache them """ if self.__int_dep_info is None: self.__int_dep_info = filter_dependencies_info( self.stats['dependencies'], self.package_dir(), 'internal') return self.__int_dep_info def register(linter): """required method to auto register this checker """ linter.register_checker(ImportsChecker(linter)) ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/raw_metrics.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/raw_m0000644000175000017500000001075011242100540033620 0ustar andreasandreas# 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. """ Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr Raw metrics checker """ import tokenize # pylint now requires pylint >= 2.2, so this is no longer necessary #if not hasattr(tokenize, 'NL'): # raise ValueError("tokenize.NL doesn't exist -- tokenize module too old") from logilab.common.ureports import Table from ScribesPylint.interfaces import IRawChecker from ScribesPylint.checkers import BaseRawChecker, EmptyReport from ScribesPylint.reporters import diff_string def report_raw_stats(sect, stats, old_stats): """calculate percentage of code / doc / comment / empty """ total_lines = stats['total_lines'] if not total_lines: raise EmptyReport() sect.description = '%s lines have been analyzed' % total_lines lines = ('type', 'number', '%', 'previous', 'difference') for node_type in ('code', 'docstring', 'comment', 'empty'): key = node_type + '_lines' total = stats[key] percent = float(total * 100) / total_lines old = old_stats.get(key, None) if old is not None: diff_str = diff_string(old, total) else: old, diff_str = 'NC', 'NC' lines += (node_type, str(total), '%.2f' % percent, str(old), diff_str) sect.append(Table(children=lines, cols=5, rheaders=1)) class RawMetricsChecker(BaseRawChecker): """does not check anything but gives some raw metrics : * total number of lines * total number of code lines * total number of docstring lines * total number of comments lines * total number of empty lines """ __implements__ = (IRawChecker,) # configuration section name name = 'metrics' # configuration options options = ( ) # messages msgs = {} # reports reports = ( ('RP0701', 'Raw metrics', report_raw_stats), ) def __init__(self, linter): BaseRawChecker.__init__(self, linter) self.stats = None def open(self): """init statistics""" self.stats = self.linter.add_stats(total_lines=0, code_lines=0, empty_lines=0, docstring_lines=0, comment_lines=0) def process_tokens(self, tokens): """update stats""" i = 0 tokens = list(tokens) while i < len(tokens): i, lines_number, line_type = get_type(tokens, i) self.stats['total_lines'] += lines_number self.stats[line_type] += lines_number JUNK = (tokenize.NL, tokenize.INDENT, tokenize.NEWLINE, tokenize.ENDMARKER) def get_type(tokens, start_index): """return the line type : docstring, comment, code, empty""" i = start_index tok_type = tokens[i][0] start = tokens[i][2] pos = start line_type = None while i < len(tokens) and tokens[i][2][0] == start[0]: tok_type = tokens[i][0] pos = tokens[i][3] if line_type is None: if tok_type == tokenize.STRING: line_type = 'docstring_lines' elif tok_type == tokenize.COMMENT: line_type = 'comment_lines' elif tok_type in JUNK: pass else: line_type = 'code_lines' i += 1 if line_type is None: line_type = 'empty_lines' elif i < len(tokens) and tok_type == tokenize.NEWLINE: i += 1 return i, pos[0] - start[0] + 1, line_type def register(linter): """ required method to auto register this checker """ linter.register_checker(RawMetricsChecker(linter)) ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/format.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/forma0000644000175000017500000003456411242100540033630 0ustar andreasandreas# Copyright (c) 2003-2010 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # 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. """Python code format's checker. By default try to follow Guido's style guide : http://www.python.org/doc/essays/styleguide.html Some parts of the process_token method is based from The Tab Nanny std module. """ import re import tokenize if not hasattr(tokenize, 'NL'): raise ValueError("tokenize.NL doesn't exist -- tokenize module too old") from logilab.common.textutils import pretty_match from logilab.astng import nodes from ScribesPylint.interfaces import IRawChecker, IASTNGChecker from ScribesPylint.checkers import BaseRawChecker from ScribesPylint.checkers.misc import guess_encoding, is_ascii MSGS = { 'C0301': ('Line too long (%s/%s)', 'Used when a line is longer than a given number of characters.'), 'C0302': ('Too many lines in module (%s)', # was W0302 'Used when a module has too much lines, reducing its readability.' ), 'W0311': ('Bad indentation. Found %s %s, expected %s', 'Used when an unexpected number of indentation\'s tabulations or ' 'spaces has been found.'), 'W0312': ('Found indentation with %ss instead of %ss', 'Used when there are some mixed tabs and spaces in a module.'), 'W0301': ('Unnecessary semicolon', # was W0106 'Used when a statement is ended by a semi-colon (";"), which \ isn\'t necessary (that\'s python, not C ;).'), 'F0321': ('Format detection error in %r', 'Used when an unexpected error occurred in bad format detection.' 'Please report the error if it occurs.'), 'C0321': ('More than one statement on a single line', 'Used when more than on statement are found on the same line.'), 'C0322': ('Operator not preceded by a space\n%s', 'Used when one of the following operator (!= | <= | == | >= | < ' '| > | = | \+= | -= | \*= | /= | %) is not preceded by a space.'), 'C0323': ('Operator not followed by a space\n%s', 'Used when one of the following operator (!= | <= | == | >= | < ' '| > | = | \+= | -= | \*= | /= | %) is not followed by a space.'), 'C0324': ('Comma not followed by a space\n%s', 'Used when a comma (",") is not followed by a space.'), 'W0331': ('Use of the <> operator', 'Used when the deprecated "<>" operator is used instead \ of "!=".'), 'W0332': ('Use l as long integer identifier', 'Used when a lower case "l" is used to mark a long integer. You ' 'should use a upper case "L" since the letter "l" looks too much ' 'like the digit "1"'), 'W0333': ('Use of the `` operator', 'Used when the deprecated "``" (backtick) operator is used ' 'instead of the str() function.'), } # simple quoted string rgx SQSTRING_RGX = r'"([^"\\]|\\.)*?"' # simple apostrophed rgx SASTRING_RGX = r"'([^'\\]|\\.)*?'" # triple quoted string rgx TQSTRING_RGX = r'"""([^"]|("(?!"")))*?(""")' # triple apostrophed string rgx # FIXME english please TASTRING_RGX = r"'''([^']|('(?!'')))*?(''')" # finally, the string regular expression STRING_RGX = re.compile('(%s)|(%s)|(%s)|(%s)' % (TQSTRING_RGX, TASTRING_RGX, SQSTRING_RGX, SASTRING_RGX), re.MULTILINE|re.DOTALL) COMMENT_RGX = re.compile("#.*$", re.M) OPERATORS = r'!=|<=|==|>=|<|>|=|\+=|-=|\*=|/=|%' OP_RGX_MATCH_1 = r'[^(]*(?|=|\+|-|\*|/|!|%%|&|\|)(%s).*' % OPERATORS OP_RGX_SEARCH_1 = r'(?|=|\+|-|\*|/|!|%%|&|\|)(%s)' % OPERATORS OP_RGX_MATCH_2 = r'[^(]*(%s)(?!\s|=|>|<).*' % OPERATORS OP_RGX_SEARCH_2 = r'(%s)(?!\s|=|>)' % OPERATORS BAD_CONSTRUCT_RGXS = ( (re.compile(OP_RGX_MATCH_1, re.M), re.compile(OP_RGX_SEARCH_1, re.M), 'C0322'), (re.compile(OP_RGX_MATCH_2, re.M), re.compile(OP_RGX_SEARCH_2, re.M), 'C0323'), (re.compile(r'.*,[^(\s|\]|}|\))].*', re.M), re.compile(r',[^\s)]', re.M), 'C0324'), ) def get_string_coords(line): """return a list of string positions (tuple (start, end)) in the line """ result = [] for match in re.finditer(STRING_RGX, line): result.append( (match.start(), match.end()) ) return result def in_coords(match, string_coords): """return true if the match is in the string coord""" mstart = match.start() for start, end in string_coords: if mstart >= start and mstart < end: return True return False def check_line(line, writer): """check a line for a bad construction if it founds one, return a message describing the problem else return None """ cleanstr = COMMENT_RGX.sub('', STRING_RGX.sub('', line)) for rgx_match, rgx_search, msg_id in BAD_CONSTRUCT_RGXS: if rgx_match.match(cleanstr): string_positions = get_string_coords(line) for match in re.finditer(rgx_search, line): if not in_coords(match, string_positions): return msg_id, pretty_match(match, line.rstrip()) #writer.add_message('F0321', line=line, args=line) class FormatChecker(BaseRawChecker): """checks for : * unauthorized constructions * strict indentation * line length * use of <> instead of != """ __implements__ = (IRawChecker, IASTNGChecker) # configuration section name name = 'format' # messages msgs = MSGS # configuration options # for available dict keys/values see the optik parser 'add_option' method options = (('max-line-length', {'default' : 80, 'type' : "int", 'metavar' : '', 'help' : 'Maximum number of characters on a single line.'}), ('max-module-lines', {'default' : 1000, 'type' : 'int', 'metavar' : '', 'help': 'Maximum number of lines in a module'} ), ('indent-string', {'default' : ' ', 'type' : "string", 'metavar' : '', 'help' : 'String used as indentation unit. This is usually \ " " (4 spaces) or "\\t" (1 tab).'}), ) def __init__(self, linter=None): BaseRawChecker.__init__(self, linter) self._lines = None self._visited_lines = None def process_module(self, stream): """extracts encoding from the stream and decodes each line, so that international text's lenght properly calculated. """ data = stream.read() line_generator = stream.readline ascii, lineno = is_ascii(data) if not ascii: encoding = guess_encoding(data) if encoding is not None: line_generator = lambda: stream.readline().decode(encoding, 'replace') del data stream.seek(0) self.process_tokens(tokenize.generate_tokens(line_generator)) def new_line(self, tok_type, line, line_num, junk): """a new line has been encountered, process it if necessary""" if not tok_type in junk: self._lines[line_num] = line.split('\n')[0] self.check_lines(line, line_num) def process_tokens(self, tokens): """process tokens and search for : _ non strict indentation (i.e. not always using the parameter as indent unit) _ too long lines (i.e. longer than ) _ optionally bad construct (if given, bad_construct must be a compiled regular expression). """ indent = tokenize.INDENT dedent = tokenize.DEDENT newline = tokenize.NEWLINE junk = (tokenize.COMMENT, tokenize.NL) indents = [0] check_equal = 0 line_num = 0 previous = None self._lines = {} self._visited_lines = {} for (tok_type, token, start, _, line) in tokens: if start[0] != line_num: if previous is not None and previous[0] == tokenize.OP and previous[1] == ';': self.add_message('W0301', line=previous[2]) previous = None line_num = start[0] self.new_line(tok_type, line, line_num, junk) if tok_type not in (indent, dedent, newline) + junk: previous = tok_type, token, start[0] if tok_type == tokenize.OP: if token == '<>': self.add_message('W0331', line=line_num) elif tok_type == tokenize.NUMBER: if token.endswith('l'): self.add_message('W0332', line=line_num) elif tok_type == newline: # a program statement, or ENDMARKER, will eventually follow, # after some (possibly empty) run of tokens of the form # (NL | COMMENT)* (INDENT | DEDENT+)? # If an INDENT appears, setting check_equal is wrong, and will # be undone when we see the INDENT. check_equal = 1 elif tok_type == indent: check_equal = 0 self.check_indent_level(token, indents[-1]+1, line_num) indents.append(indents[-1]+1) elif tok_type == dedent: # there's nothing we need to check here! what's important is # that when the run of DEDENTs ends, the indentation of the # program statement (or ENDMARKER) that triggered the run is # equal to what's left at the top of the indents stack check_equal = 1 if len(indents) > 1: del indents[-1] elif check_equal and tok_type not in junk: # this is the first "real token" following a NEWLINE, so it # must be the first token of the next program statement, or an # ENDMARKER; the "line" argument exposes the leading whitespace # for this statement; in the case of ENDMARKER, line is an empty # string, so will properly match the empty string with which the # "indents" stack was seeded check_equal = 0 self.check_indent_level(line, indents[-1], line_num) line_num -= 1 # to be ok with "wc -l" if line_num > self.config.max_module_lines: self.add_message('C0302', args=line_num, line=1) def visit_default(self, node): """check the node line number and check it if not yet done""" if not node.is_statement: return if not node.root().pure_python: return # XXX block visit of child nodes prev_sibl = node.previous_sibling() if prev_sibl is not None: prev_line = prev_sibl.fromlineno else: prev_line = node.parent.statement().fromlineno line = node.fromlineno assert line, node if prev_line == line and self._visited_lines.get(line) != 2: # py2.5 try: except: finally: if not (isinstance(node, nodes.TryExcept) and isinstance(node.parent, nodes.TryFinally) and node.fromlineno == node.parent.fromlineno): self.add_message('C0321', node=node) self._visited_lines[line] = 2 return if self._visited_lines.has_key(line): return try: tolineno = node.blockstart_tolineno except AttributeError: tolineno = node.tolineno assert tolineno, node lines = [] for line in xrange(line, tolineno + 1): self._visited_lines[line] = 1 try: lines.append(self._lines[line].rstrip()) except KeyError: lines.append('') try: msg_def = check_line('\n'.join(lines), self) if msg_def: self.add_message(msg_def[0], node=node, args=msg_def[1]) except KeyError: # FIXME: internal error ! pass def visit_backquote(self, node): self.add_message('W0333', node=node) def check_lines(self, lines, i): """check lines have less than a maximum number of characters """ max_chars = self.config.max_line_length for line in lines.splitlines(): if len(line) > max_chars: self.add_message('C0301', line=i, args=(len(line), max_chars)) i += 1 def check_indent_level(self, string, expected, line_num): """return the indent level of the string """ indent = self.config.indent_string if indent == '\\t': # \t is not interpreted in the configuration file indent = '\t' level = 0 unit_size = len(indent) while string[:unit_size] == indent: string = string[unit_size:] level += 1 suppl = '' while string and string[0] in ' \t': if string[0] != indent[0]: if string[0] == '\t': args = ('tab', 'space') else: args = ('space', 'tab') self.add_message('W0312', args=args, line=line_num) return level suppl += string[0] string = string [1:] if level != expected or suppl: i_type = 'spaces' if indent[0] == '\t': i_type = 'tabs' self.add_message('W0311', line=line_num, args=(level * unit_size + len(suppl), i_type, expected * unit_size)) def register(linter): """required method to auto register this checker """ linter.register_checker(FormatChecker(linter)) ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/misc.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/misc.0000644000175000017500000001102611242100540033521 0ustar andreasandreas# pylint: disable=W0511 # 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. """ Copyright (c) 2000-2010 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr Check source code is ascii only or has an encoding declaration (PEP 263) """ import re from ScribesPylint.interfaces import IRawChecker from ScribesPylint.checkers import BaseChecker def is_ascii(string): """return true if non ascii characters are detected in the given string and line number where non-ascii has been encountered. """ for i, line in enumerate(string.splitlines()): if line and max([ord(char) for char in line]) >= 128: return False, i + 1 return True, 0 # regexp matching both emacs and vim declaration ENCODING_RGX = re.compile("[^#]*#*.*coding[:=]\s*([^\s]+)") def guess_encoding(string): """try to guess encoding from a python file as string return None if not found """ assert type(string) is type(''), type(string) # check for UTF-8 byte-order mark if string.startswith('\xef\xbb\xbf'): return 'UTF-8' first_lines = string.split('\n', 2)[:2] for line in first_lines: # check for emacs / vim encoding declaration match = ENCODING_RGX.match(line) if match is not None: return match.group(1) MSGS = { 'E0501': ('Non ascii characters found but no encoding specified (PEP 263)', 'Used when some non ascii characters are detected but now \ encoding is specified, as explicited in the PEP 263.'), 'E0502': ('Wrong encoding specified (%s)', 'Used when a known encoding is specified but the file doesn\'t \ seem to be actually in this encoding.'), 'E0503': ('Unknown encoding specified (%s)', 'Used when an encoding is specified, but it\'s unknown to Python.' ), 'W0511': ('%s', 'Used when a warning note as FIXME or XXX is detected.'), } class EncodingChecker(BaseChecker): """checks for: * warning notes in the code like FIXME, XXX * PEP 263: source code with non ascii character but no encoding declaration """ __implements__ = IRawChecker # configuration section name name = 'miscellaneous' msgs = MSGS options = (('notes', {'type' : 'csv', 'metavar' : '', 'default' : ('FIXME', 'XXX', 'TODO'), 'help' : 'List of note tags to take in consideration, \ separated by a comma.' }), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) def process_module(self, stream): """inspect the source file to found encoding problem or fixmes like notes """ # source encoding data = stream.read() ascii, lineno = is_ascii(data) if not ascii: encoding = guess_encoding(data) if encoding is None: self.add_message('E0501', line=lineno) else: try: unicode(data, encoding) except UnicodeError: self.add_message('E0502', args=encoding, line=1) except LookupError: self.add_message('E0503', args=encoding, line=1) del data # warning notes in the code stream.seek(0) notes = [] for note in self.config.notes: notes.append(re.compile(note)) linenum = 1 for line in stream.readlines(): for note in notes: match = note.search(line) if match: self.add_message('W0511', args=line[match.start():-1], line=linenum) break linenum += 1 def register(linter): """required method to auto register this checker""" linter.register_checker(EncodingChecker(linter)) ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/exceptions.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/excep0000644000175000017500000001762311242100540033625 0ustar andreasandreas# Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # 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. """exceptions handling (raising, catching, exceptions classes) checker """ import sys from logilab.common.compat import enumerate from logilab import astng from logilab.astng import YES, Instance, unpack_infer from ScribesPylint.checkers import BaseChecker from ScribesPylint.checkers.utils import is_empty, is_raising from ScribesPylint.interfaces import IASTNGChecker MSGS = { 'E0701': ( 'Bad except clauses order (%s)', 'Used when except clauses are not in the correct order (from the \ more specific to the more generic). If you don\'t fix the order, \ some exceptions may not be catched by the most specific handler.'), 'E0702': ('Raising %s while only classes, instances or string are allowed', 'Used when something which is neither a class, an instance or a \ string is raised (i.e. a `TypeError` will be raised).'), 'E0711': ('NotImplemented raised - should raise NotImplementedError', 'Used when NotImplemented is raised instead of \ NotImplementedError'), 'W0701': ('Raising a string exception', 'Used when a string exception is raised.'), 'W0702': ('No exception type(s) specified', 'Used when an except clause doesn\'t specify exceptions type to \ catch.'), 'W0703': ('Catch "Exception"', 'Used when an except catches Exception instances.'), 'W0704': ('Except doesn\'t do anything', 'Used when an except clause does nothing but "pass" and there is\ no "else" clause.'), 'W0710': ('Exception doesn\'t inherit from standard "Exception" class', 'Used when a custom exception class is raised but doesn\'t \ inherit from the builtin "Exception" class.'), } if sys.version_info < (2, 5): MSGS['E0710'] = ('Raising a new style class', 'Used when a new style class is raised since it\'s not \ possible with python < 2.5.') else: MSGS['E0710'] = ('Raising a new style class which doesn\'t inherit from \ BaseException', 'Used when a new style class which doesn\'t inherit from \ BaseException raised since it\'s not possible with \ python < 2.5.') class ExceptionsChecker(BaseChecker): """checks for * excepts without exception filter * type of raise argument : string, Exceptions, other values """ __implements__ = IASTNGChecker name = 'exceptions' msgs = MSGS priority = -4 options = () def visit_raise(self, node): """visit raise possibly inferring value""" # ignore empty raise if node.type is None: return expr = node.type if self._check_raise_value(node, expr): return else: try: value = unpack_infer(expr).next() except astng.InferenceError: return self._check_raise_value(node, value) def _check_raise_value(self, node, expr): """check for bad values, string exception and class inheritance """ value_found = True if isinstance(expr, astng.Const): value = expr.value if isinstance(value, str): self.add_message('W0701', node=node) else: self.add_message('E0702', node=node, args=value.__class__.__name__) elif (isinstance(expr, astng.Name) and \ expr.name in ('None', 'True', 'False')) or \ isinstance(expr, (astng.List, astng.Dict, astng.Tuple, astng.Module, astng.Function)): self.add_message('E0702', node=node, args=expr.name) elif isinstance(expr, astng.Name) and expr.name == 'NotImplemented': self.add_message('E0711', node=node) elif isinstance(expr, astng.BinOp) and expr.op == '%': self.add_message('W0701', node=node) elif isinstance(expr, (Instance, astng.Class)): if isinstance(expr, Instance): expr = expr._proxied if (isinstance(expr, astng.Class) and not inherit_from_std_ex(expr) and expr.root().name != '__builtin__'): if expr.newstyle: self.add_message('E0710', node=node) else: self.add_message('W0710', node=node) else: value_found = False else: value_found = False return value_found def visit_tryexcept(self, node): """check for empty except""" exceptions_classes = [] nb_handlers = len(node.handlers) for index, handler in enumerate(node.handlers): # single except doing nothing but "pass" without else clause if nb_handlers == 1 and is_empty(handler.body) and not node.orelse: self.add_message('W0704', node=handler.type or handler.body[0]) if handler.type is None: if nb_handlers == 1 and not is_raising(handler.body): self.add_message('W0702', node=handler.body[0]) # check if a "except:" is followed by some other # except elif index < (nb_handlers - 1): msg = 'empty except clause should always appears last' self.add_message('E0701', node=node, args=msg) else: try: excs = list(unpack_infer(handler.type)) except astng.InferenceError: continue for exc in excs: # XXX skip other non class nodes if exc is YES or not isinstance(exc, astng.Class): continue exc_ancestors = [anc for anc in exc.ancestors() if isinstance(anc, astng.Class)] for previous_exc in exceptions_classes: if previous_exc in exc_ancestors: msg = '%s is an ancestor class of %s' % ( previous_exc.name, exc.name) self.add_message('E0701', node=handler.type, args=msg) if (exc.name == 'Exception' and exc.root().name == 'exceptions' and nb_handlers == 1 and not is_raising(handler.body)): self.add_message('W0703', node=handler.type) exceptions_classes += excs def inherit_from_std_ex(node): """return true if the given class node is subclass of exceptions.Exception """ if node.name in ('Exception', 'BaseException') \ and node.root().name == 'exceptions': return True for parent in node.ancestors(recurs=False): if inherit_from_std_ex(parent): return True return False def register(linter): """required method to auto register this checker""" linter.register_checker(ExceptionsChecker(linter)) ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/utils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/utils0000644000175000017500000001723111242100540033654 0ustar andreasandreas# pylint: disable=W0611 # # Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """some functions that may be useful for various checkers """ from logilab import astng from logilab.common.compat import set try: # python >= 2.4 COMP_NODE_TYPES = (astng.ListComp, astng.GenExpr) FOR_NODE_TYPES = (astng.For, astng.Comprehension, astng.Comprehension) except AttributeError: COMP_NODE_TYPES = astng.ListComp FOR_NODE_TYPES = (astng.For, astng.Comprehension) def safe_infer(node): """return the inferred value for the given node. Return None if inference failed or if there is some ambiguity (more than one node has been inferred) """ try: inferit = node.infer() value = inferit.next() except astng.InferenceError: return try: inferit.next() return # None if there is ambiguity on the inferred node except StopIteration: return value def is_super(node): """return True if the node is referencing the "super" builtin function """ if getattr(node, 'name', None) == 'super' and \ node.root().name == '__builtin__': return True return False def is_error(node): """return true if the function does nothing but raising an exception""" for child_node in node.get_children(): if isinstance(child_node, astng.Raise): return True return False def is_raising(body): """return true if the given statement node raise an exception""" for node in body: if isinstance(node, astng.Raise): return True return False def is_empty(body): """return true if the given node does nothing but 'pass'""" return len(body) == 1 and isinstance(body[0], astng.Pass) builtins = __builtins__.copy() SPECIAL_BUILTINS = ('__builtins__',) # '__path__', '__file__') def is_builtin(name): # was is_native_builtin """return true if could be considered as a builtin defined by python """ if builtins.has_key(name): return True if name in SPECIAL_BUILTINS: return True return False def is_defined_before(var_node, comp_node_types=COMP_NODE_TYPES): """return True if the variable node is defined by a parent node (list or generator comprehension, lambda) or in a previous sibling node one the same line (statement_defining ; statement_using) """ varname = var_node.name _node = var_node.parent while _node: if isinstance(_node, comp_node_types): for ass_node in _node.nodes_of_class(astng.AssName): if ass_node.name == varname: return True elif isinstance(_node, astng.For): for ass_node in _node.target.nodes_of_class(astng.AssName): if ass_node.name == varname: return True elif isinstance(_node, astng.With): if _node.vars is None: # quickfix : case in which 'with' is used without 'as' return False if _node.vars.name == varname: return True elif isinstance(_node, (astng.Lambda, astng.Function)): if _node.args.is_argument(varname): return True if getattr(_node, 'name', None) == varname: return True break _node = _node.parent # possibly multiple statements on the same line using semi colon separator stmt = var_node.statement() _node = stmt.previous_sibling() lineno = stmt.fromlineno while _node and _node.fromlineno == lineno: for ass_node in _node.nodes_of_class(astng.AssName): if ass_node.name == varname: return True for imp_node in _node.nodes_of_class( (astng.From, astng.Import)): if varname in [name[1] or name[0] for name in imp_node.names]: return True _node = _node.previous_sibling() return False def is_func_default(node): """return true if the given Name node is used in function default argument's value """ parent = node.scope() if isinstance(parent, astng.Function): for default_node in parent.args.defaults: for default_name_node in default_node.nodes_of_class(astng.Name): if default_name_node is node: return True return False def is_func_decorator(node): """return true if the name is used in function decorator""" parent = node.parent while parent is not None: if isinstance(parent, astng.Decorators): return True if parent.is_statement or isinstance(parent, astng.Lambda): break parent = parent.parent return False def is_ancestor_name(frame, node): """return True if `frame` is a astng.Class node with `node` in the subtree of its bases attribute """ try: bases = frame.bases except AttributeError: return False for base in bases: if node in base.nodes_of_class(astng.Name): return True return False def assign_parent(node): """return the higher parent which is not an AssName, Tuple or List node """ while node and isinstance(node, (astng.AssName, astng.Tuple, astng.List)): node = node.parent return node def overrides_an_abstract_method(class_node, name): """return True if pnode is a parent of node""" for ancestor in class_node.ancestors(): if name in ancestor and isinstance(ancestor[name], astng.Function) and \ ancestor[name].is_abstract(pass_is_abstract=False): return True return False def overrides_a_method(class_node, name): """return True if is a method overridden from an ancestor""" for ancestor in class_node.ancestors(): if name in ancestor and isinstance(ancestor[name], astng.Function): return True return False PYMETHODS = set(('__new__', '__init__', '__del__', '__hash__', '__str__', '__repr__', '__len__', '__iter__', '__delete__', '__get__', '__set__', '__getitem__', '__setitem__', '__delitem__', '__contains__', '__getattribute__', '__getattr__', '__setattr__', '__delattr__', '__call__', '__enter__', '__exit__', '__cmp__', '__ge__', '__gt__', '__le__', '__lt__', '__eq__', '__nonzero__', '__neg__', '__invert__', '__mul__', '__imul__', '__rmul__', '__div__', '__idiv__', '__rdiv__', '__add__', '__iadd__', '__radd__', '__sub__', '__isub__', '__rsub__', '__pow__', '__ipow__', '__rpow__', '__mod__', '__imod__', '__rmod__', '__and__', '__iand__', '__rand__', '__or__', '__ior__', '__ror__', '__xor__', '__ixor__', '__rxor__', # XXX To be continued )) ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/string_format.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/strin0000644000175000017500000002570011242100540033653 0ustar andreasandreas# Copyright (c) 2009-2010 Arista Networks, Inc. - James Lingard # Copyright (c) 2004-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # 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. """Checker for string formatting operations. """ import string from logilab import astng from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker from logilab.common.compat import set MSGS = { 'E9900': ("Unsupported format character %r (%#02x) at index %d", "Used when a unsupported format character is used in a format\ string."), 'E9901': ("Format string ends in middle of conversion specifier", "Used when a format string terminates before the end of a \ conversion specifier."), 'E9902': ("Mixing named and unnamed conversion specifiers in format string", "Used when a format string contains both named (e.g. '%(foo)d') \ and unnamed (e.g. '%d') conversion specifiers. This is also \ used when a named conversion specifier contains * for the \ minimum field width and/or precision."), 'E9903': ("Expected mapping for format string, not %s", "Used when a format string that uses named conversion specifiers \ is used with an argument that is not a mapping."), 'W9900': ("Format string dictionary key should be a string, not %s", "Used when a format string that uses named conversion specifiers \ is used with a dictionary whose keys are not all strings."), 'W9901': ("Unused key %r in format string dictionary", "Used when a format string that uses named conversion specifiers \ is used with a dictionary that conWtains keys not required by the \ format string."), 'E9904': ("Missing key %r in format string dictionary", "Used when a format string that uses named conversion specifiers \ is used with a dictionary that doesn't contain all the keys \ required by the format string."), 'E9905': ("Too many arguments for format string", "Used when a format string that uses unnamed conversion \ specifiers is given too few arguments."), 'E9906': ("Not enough arguments for format string", "Used when a format string that uses unnamed conversion \ specifiers is given too many arguments"), } class IncompleteFormatStringException(Exception): """A format string ended in the middle of a format specifier.""" pass class UnsupportedFormatCharacterException(Exception): """A format character in a format string is not one of the supported format characters.""" def __init__(self, index): Exception.__init__(self, index) self.index = index def parse_format_string(format_string): """Parses a format string, returning a tuple of (keys, num_args), where keys is the set of mapping keys in the format string, and num_args is the number of arguments required by the format string. Raises IncompleteFormatStringException or UnsupportedFormatCharacterException if a parse error occurs.""" keys = set() num_args = 0 def next_char(i): i += 1 if i == len(format_string): raise IncompleteFormatStringException return (i, format_string[i]) i = 0 while i < len(format_string): c = format_string[i] if c == '%': i, c = next_char(i) # Parse the mapping key (optional). key = None if c == '(': depth = 1 i, c = next_char(i) key_start = i while depth != 0: if c == '(': depth += 1 elif c == ')': depth -= 1 i, c = next_char(i) key_end = i - 1 key = format_string[key_start:key_end] # Parse the conversion flags (optional). while c in '#0- +': i, c = next_char(i) # Parse the minimum field width (optional). if c == '*': num_args += 1 i, c = next_char(i) else: while c in string.digits: i, c = next_char(i) # Parse the precision (optional). if c == '.': i, c = next_char(i) if c == '*': num_args += 1 i, c = next_char(i) else: while c in string.digits: i, c = next_char(i) # Parse the length modifier (optional). if c in 'hlL': i, c = next_char(i) # Parse the conversion type (mandatory). if c not in 'diouxXeEfFgGcrs%': raise UnsupportedFormatCharacterException(i) if key: keys.add(key) elif c != '%': num_args += 1 i += 1 return keys, num_args class StringFormatChecker(BaseChecker): """Checks string formatting operations to ensure that the format string is valid and the arguments match the format string. """ __implements__ = (IASTNGChecker,) name = 'string_format' msgs = MSGS def visit_binop(self, node): if node.op != '%': return f = node.left args = node.right if isinstance(f, astng.Const) and isinstance(f.value, basestring): format_string = f.value try: required_keys, required_num_args = \ parse_format_string(format_string) except UnsupportedFormatCharacterException, e: c = format_string[e.index] self.add_message('E9900', node=node, args=(c, ord(c), e.index)) except IncompleteFormatStringException: self.add_message('E9901', node=node) else: if required_keys and required_num_args: # The format string uses both named and unnamed format # specifiers. self.add_message('E9902', node=node) elif required_keys: # The format string uses only named format specifiers. # Check that the RHS of the % operator is a mapping object # that contains precisely the set of keys required by the # format string. if isinstance(args, astng.Dict): keys = set() unknown_keys = False for k, v in args.items: if isinstance(k, astng.Const): key = k.value if isinstance(key, basestring): keys.add(key) else: self.add_message('W9900', node=node, args=key) else: # One of the keys was something other than a # constant. Since we can't tell what it is, # supress checks for missing keys in the # dictionary. unknown_keys = True if not unknown_keys: for key in required_keys: if key not in keys: self.add_message('E9904', node=node, args=key) for key in keys: if key not in required_keys: self.add_message('W9901', node=node, args=key) elif (isinstance(args, astng.Const) or isinstance(args, astng.Tuple) or isinstance(args, astng.List) or isinstance(args, astng.ListComp) or isinstance(args, astng.GenExpr) or isinstance(args, astng.Backquote) or isinstance(args, astng.Lambda)): type_name = type(args).__name__ self.add_message('E9903', node=node, args=type_name) else: # The RHS of the format specifier is a name or # expression. It may be a mapping object, so # there's nothing we can check. pass else: # The format string uses only unnamed format specifiers. # Check that the number of arguments passed to the RHS of # the % operator matches the number required by the format # string. if isinstance(args, astng.Tuple): num_args = len(args.elts) elif (isinstance(args, astng.Const) or isinstance(args, astng.Dict) or isinstance(args, astng.List) or isinstance(args, astng.ListComp) or isinstance(args, astng.GenExpr) or isinstance(args, astng.Backquote) or isinstance(args, astng.Lambda) or isinstance(args, astng.Function)): num_args = 1 else: # The RHS of the format specifier is a name or # expression. It could be a tuple of unknown size, so # there's nothing we can check. num_args = None if num_args is not None: if num_args > required_num_args: self.add_message('E9905', node=node) elif num_args < required_num_args: self.add_message('E9906', node=node) def register(linter): """required method to auto register this checker """ linter.register_checker(StringFormatChecker(linter)) ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/typecheck.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/typec0000644000175000017500000003071011242100540033635 0ustar andreasandreas# Copyright (c) 2006-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """try to find more bugs in the code using astng inference capabilities """ from logilab.common.compat import set from logilab import astng from logilab.astng import InferenceError, NotFoundError, YES, Instance from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker from ScribesPylint.checkers.utils import safe_infer, is_super MSGS = { 'E1101': ('%s %r has no %r member', 'Used when a variable is accessed for an unexistent member.'), 'E1102': ('%s is not callable', 'Used when an object being called has been inferred to a non \ callable object'), 'E1103': ('%s %r has no %r member (but some types could not be inferred)', 'Used when a variable is accessed for an unexistent member, but \ astng was not able to interpret all possible types of this \ variable.'), 'E1111': ('Assigning to function call which doesn\'t return', 'Used when an assignment is done on a function call but the \ inferred function doesn\'t return anything.'), 'W1111': ('Assigning to function call which only returns None', 'Used when an assignment is done on a function call but the \ inferred function returns nothing but None.'), 'E1120': ('No value passed for parameter %s in function call', 'Used when a function call passes too few arguments.'), 'E1121': ('Too many positional arguments for function call', 'Used when a function call passes too many positional \ arguments.'), 'E1122': ('Duplicate keyword argument %r in function call', 'Used when a function call passes the same keyword argument \ multiple times.'), 'E1123': ('Passing unexpected keyword argument %r in function call', 'Used when a function call passes a keyword argument that \ doesn\'t correspond to one of the function\'s parameter names.'), 'E1124': ('Multiple values passed for parameter %r in function call', 'Used when a function call would result in assigning multiple \ values to a function parameter, one value from a positional \ argument and one from a keyword argument.'), } class TypeChecker(BaseChecker): """try to find bugs in the code using type inference """ __implements__ = (IASTNGChecker,) # configuration section name name = 'typecheck' # messages msgs = MSGS priority = -1 # configuration options options = (('ignore-mixin-members', {'default' : True, 'type' : 'yn', 'metavar': '', 'help' : 'Tells whether missing members accessed in mixin \ class should be ignored. A mixin class is detected if its name ends with \ "mixin" (case insensitive).'} ), ('ignored-classes', {'default' : ('SQLObject',), 'type' : 'csv', 'metavar' : '', 'help' : 'List of classes names for which member attributes \ should not be checked (useful for classes with attributes dynamically set).'} ), ('zope', {'default' : False, 'type' : 'yn', 'metavar': '', 'help' : 'When zope mode is activated, add a predefined set \ of Zope acquired attributes to generated-members.'} ), ('generated-members', {'default' : ( 'REQUEST', 'acl_users', 'aq_parent'), 'type' : 'csv', 'metavar' : '', 'help' : 'List of members which are set dynamically and \ missed by pylint inference system, and so shouldn\'t trigger E0201 when \ accessed.'} ), ) def open(self): # do this in open since config not fully initialized in __init__ self.generated_members = list(self.config.generated_members) if self.config.zope: self.generated_members.extend(('REQUEST', 'acl_users', 'aq_parent')) def visit_assattr(self, node): if isinstance(node.ass_type(), astng.AugAssign): self.visit_getattr(node) def visit_delattr(self, node): self.visit_getattr(node) def visit_getattr(self, node): """check that the accessed attribute exists to avoid to much false positives for now, we'll consider the code as correct if a single of the inferred nodes has the accessed attribute. function/method, super call and metaclasses are ignored """ if node.attrname in self.generated_members: # attribute is marked as generated, stop here return try: infered = list(node.expr.infer()) except InferenceError: return # list of (node, nodename) which are missing the attribute missingattr = set() ignoremim = self.config.ignore_mixin_members inference_failure = False for owner in infered: # skip yes object if owner is YES: inference_failure = True continue # skip None anyway if isinstance(owner, astng.Const) and owner.value is None: continue # XXX "super" / metaclass call if is_super(owner) or getattr(owner, 'type', None) == 'metaclass': continue name = getattr(owner, 'name', 'None') if name in self.config.ignored_classes: continue if ignoremim and name[-5:].lower() == 'mixin': continue try: if not [n for n in owner.getattr(node.attrname) if not isinstance(n.statement(), astng.AugAssign)]: missingattr.add((owner, name)) continue except AttributeError: # XXX method / function continue except NotFoundError: if isinstance(owner, Instance) and owner.has_dynamic_getattr(): continue # explicit skipping of optparse'Values class if owner.name == 'Values' and \ owner.root().name in ('optik', 'optparse'): continue missingattr.add((owner, name)) continue # stop on the first found break else: # we have not found any node with the attributes, display the # message for infered nodes done = set() for owner, name in missingattr: if isinstance(owner, Instance): actual = owner._proxied else: actual = owner if actual in done: continue done.add(actual) if inference_failure: msgid = 'E1103' else: msgid = 'E1101' self.add_message(msgid, node=node, args=(owner.display_type(), name, node.attrname)) def visit_assign(self, node): """check that if assigning to a function call, the function is possibly returning something valuable """ if not isinstance(node.value, astng.CallFunc): return function_node = safe_infer(node.value.func) # skip class, generator and incomplete function definition if not (isinstance(function_node, astng.Function) and function_node.root().fully_defined()): return if function_node.is_generator() \ or function_node.is_abstract(pass_is_abstract=False): return returns = list(function_node.nodes_of_class(astng.Return, skip_klass=astng.Function)) if len(returns) == 0: self.add_message('E1111', node=node) else: for rnode in returns: if not (isinstance(rnode.value, astng.Const) and rnode.value.value is None): break else: self.add_message('W1111', node=node) def visit_callfunc(self, node): """check that called functions/methods are inferred to callable objects, and that the arguments passed to the function match the parameters in the inferred function's definition """ # Build the set of keyword arguments, checking for duplicate keywords, # and count the positional arguments. keyword_args = set() num_positional_args = 0 for arg in node.args: if isinstance(arg, astng.Keyword): keyword = arg.arg if keyword in keyword_args: self.add_message('E1122', node=node, args=keyword) keyword_args.add(keyword) else: num_positional_args += 1 called = safe_infer(node.func) # only function, generator and object defining __call__ are allowed if called is not None and not called.callable(): self.add_message('E1102', node=node, args=node.func.as_string()) # Note that BoundMethod is a subclass of UnboundMethod (huh?), so must # come first in this 'if..else'. if isinstance(called, astng.BoundMethod): # Bound methods have an extra implicit 'self' argument. num_positional_args += 1 elif isinstance(called, astng.UnboundMethod): if called.decorators is not None: for d in called.decorators.nodes: if isinstance(d, astng.Name) and (d.name == 'classmethod'): # Class methods have an extra implicit 'cls' argument. num_positional_args += 1 break elif (isinstance(called, astng.Function) or isinstance(called, astng.Lambda)): pass else: return if called.args.args is None: # Built-in functions have no argument information. return if len( called.argnames() ) != len( set( called.argnames() ) ): # Duplicate parameter name (see E9801). We can't really make sense # of the function call in this case, so just return. return # Analyze the list of formal parameters. num_mandatory_parameters = len(called.args.args) - len(called.args.defaults) parameters = [] parameter_name_to_index = {} for i, arg in enumerate(called.args.args): if isinstance(arg, astng.Tuple): name = None # Don't store any parameter names within the tuple, since those # are not assignable from keyword arguments. else: if isinstance(arg, astng.Keyword): name = arg.arg else: assert isinstance(arg, astng.AssName) # This occurs with: # def f( (a), (b) ): pass name = arg.name parameter_name_to_index[name] = i if i >= num_mandatory_parameters: defval = called.args.defaults[i - num_mandatory_parameters] else: defval = None parameters.append([(name, defval), False]) # Match the supplied arguments against the function parameters. # 1. Match the positional arguments. for i in range(num_positional_args): if i < len(parameters): parameters[i][1] = True elif called.args.vararg is not None: # The remaining positional arguments get assigned to the *args # parameter. break else: # Too many positional arguments. self.add_message('E1121', node=node) break # 2. Match the keyword arguments. for keyword in keyword_args: if keyword in parameter_name_to_index: i = parameter_name_to_index[keyword] if parameters[i][1]: # Duplicate definition of function parameter. self.add_message('E1124', node=node, args=keyword) else: parameters[i][1] = True elif called.args.kwarg is not None: # The keyword argument gets assigned to the **kwargs parameter. pass else: # Unexpected keyword argument. self.add_message('E1123', node=node, args=keyword) # 3. Match the *args, if any. Note that Python actually processes # *args _before_ any keyword arguments, but we wait until after # looking at the keyword arguments so as to make a more conservative # guess at how many values are in the *args sequence. if node.starargs is not None: for i in range(num_positional_args, len(parameters)): [(name, defval), assigned] = parameters[i] # Assume that *args provides just enough values for all # non-default parameters after the last parameter assigned by # the positional arguments but before the first parameter # assigned by the keyword arguments. This is the best we can # get without generating any false positives. if (defval is not None) or assigned: break parameters[i][1] = True # 4. Match the **kwargs, if any. if node.kwargs is not None: for i, [(name, defval), assigned] in enumerate(parameters): # Assume that *kwargs provides values for all remaining # unassigned named parameters. if name is not None: parameters[i][1] = True else: # **kwargs can't assign to tuples. pass # Check that any parameters without a default have been assigned # values. for [(name, defval), assigned] in parameters: if (defval is None) and not assigned: if name is None: display_name = '' else: display_name = repr(name) self.add_message('E1120', node=node, args=display_name) def register(linter): """required method to auto register this checker """ linter.register_checker(TypeChecker(linter)) ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/classes.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/class0000644000175000017500000005450311242100540033624 0ustar andreasandreas# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """classes checker for Python code """ from __future__ import generators from logilab import astng from logilab.astng import YES, Instance, are_exclusive from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.checkers import BaseChecker from ScribesPylint.checkers.utils import PYMETHODS, overrides_a_method def class_is_abstract(node): """return true if the given class node should be considered as an abstract class """ for method in node.methods(): if method.parent.frame() is node: if method.is_abstract(pass_is_abstract=False): return True return False MSGS = { 'F0202': ('Unable to check methods signature (%s / %s)', 'Used when PyLint has been unable to check methods signature \ compatibility for an unexpected reason. Please report this kind \ if you don\'t make sense of it.'), 'E0202': ('An attribute inherited from %s hide this method', 'Used when a class defines a method which is hidden by an \ instance attribute from an ancestor class.'), 'E0203': ('Access to member %r before its definition line %s', 'Used when an instance member is accessed before it\'s actually\ assigned.'), 'W0201': ('Attribute %r defined outside __init__', 'Used when an instance attribute is defined outside the __init__\ method.'), 'W0212': ('Access to a protected member %s of a client class', # E0214 'Used when a protected member (i.e. class member with a name \ beginning with an underscore) is access outside the class or a \ descendant of the class where it\'s defined.'), 'E0211': ('Method has no argument', 'Used when a method which should have the bound instance as \ first argument has no argument defined.'), 'E0213': ('Method should have "self" as first argument', 'Used when a method has an attribute different the "self" as\ first argument. This is considered as an error since this is\ a so common convention that you shouldn\'t break it!'), 'C0202': ('Class method should have "cls" as first argument', # E0212 'Used when a class method has an attribute different than "cls"\ as first argument, to easily differentiate them from regular \ instance methods.'), 'C0203': ('Metaclass method should have "mcs" as first argument', # E0214 'Used when a metaclass method has an attribute different the \ "mcs" as first argument.'), 'W0211': ('Static method with %r as first argument', 'Used when a static method has "self" or "cls" as first argument.' ), 'R0201': ('Method could be a function', 'Used when a method doesn\'t use its bound instance, and so could\ be written as a function.' ), 'E0221': ('Interface resolved to %s is not a class', 'Used when a class claims to implement an interface which is not \ a class.'), 'E0222': ('Missing method %r from %s interface' , 'Used when a method declared in an interface is missing from a \ class implementing this interface'), 'W0221': ('Arguments number differs from %s method', 'Used when a method has a different number of arguments than in \ the implemented interface or in an overridden method.'), 'W0222': ('Signature differs from %s method', 'Used when a method signature is different than in the \ implemented interface or in an overridden method.'), 'W0223': ('Method %r is abstract in class %r but is not overridden', 'Used when an abstract method (i.e. raise NotImplementedError) is \ not overridden in concrete class.' ), 'F0220': ('failed to resolve interfaces implemented by %s (%s)', # W0224 'Used when a PyLint as failed to find interfaces implemented by \ a class'), 'W0231': ('__init__ method from base class %r is not called', 'Used when an ancestor class method has an __init__ method \ which is not called by a derived class.'), 'W0232': ('Class has no __init__ method', 'Used when a class has no __init__ method, neither its parent \ classes.'), 'W0233': ('__init__ method from a non direct base class %r is called', 'Used when an __init__ method is called on a class which is not \ in the direct ancestors for the analysed class.'), } class ClassChecker(BaseChecker): """checks for : * methods without self as first argument * overridden methods signature * access only to existent members via self * attributes not defined in the __init__ method * supported interfaces implementation * unreachable code """ __implements__ = (IASTNGChecker,) # configuration section name name = 'classes' # messages msgs = MSGS priority = -2 # configuration options options = (('ignore-iface-methods', {'default' : (#zope interface 'isImplementedBy', 'deferred', 'extends', 'names', 'namesAndDescriptions', 'queryDescriptionFor', 'getBases', 'getDescriptionFor', 'getDoc', 'getName', 'getTaggedValue', 'getTaggedValueTags', 'isEqualOrExtendedBy', 'setTaggedValue', 'isImplementedByInstancesOf', # twisted 'adaptWith', # logilab.common interface 'is_implemented_by'), 'type' : 'csv', 'metavar' : '', 'help' : 'List of interface methods to ignore, \ separated by a comma. This is used for instance to not check methods defines \ in Zope\'s Interface base class.'} ), ('defining-attr-methods', {'default' : ('__init__', '__new__', 'setUp'), 'type' : 'csv', 'metavar' : '', 'help' : 'List of method names used to declare (i.e. assign) \ instance attributes.'} ), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) self._accessed = [] self._first_attrs = [] self._meth_could_be_func = None def visit_class(self, node): """init visit variable _accessed and check interfaces """ self._accessed.append({}) self._check_bases_classes(node) self._check_interfaces(node) # if not an interface, exception, metaclass if node.type == 'class': try: node.local_attr('__init__') except astng.NotFoundError: self.add_message('W0232', args=node, node=node) def leave_class(self, cnode): """close a class node: check that instance attributes are defined in __init__ and check access to existent members """ # checks attributes are defined in an allowed method such as __init__ defining_methods = self.config.defining_attr_methods for attr, nodes in cnode.instance_attrs.items(): nodes = [n for n in nodes if not isinstance(n.statement(), (astng.Delete, astng.AugAssign))] if not nodes: continue # error detected by typechecking attr_defined = False # check if any method attr is defined in is a defining method for node in nodes: if node.frame().name in defining_methods: attr_defined = True if not attr_defined: # check attribute is defined in a parent's __init__ for parent in cnode.instance_attr_ancestors(attr): attr_defined = False # check if any parent method attr is defined in is a defining method for node in parent.instance_attrs[attr]: if node.frame().name in defining_methods: attr_defined = True if attr_defined: # we're done :) break else: # check attribute is defined as a class attribute try: cnode.local_attr(attr) except astng.NotFoundError: self.add_message('W0201', args=attr, node=node) # check access to existent members on non metaclass classes accessed = self._accessed.pop() if cnode.type != 'metaclass': self._check_accessed_members(cnode, accessed) def visit_function(self, node): """check method arguments, overriding""" # ignore actual functions if not node.is_method(): return klass = node.parent.frame() self._meth_could_be_func = True # check first argument is self if this is actually a method self._check_first_arg_for_type(node, klass.type == 'metaclass') if node.name == '__init__': self._check_init(node) return # check signature if the method overloads inherited method for overridden in klass.local_attr_ancestors(node.name): # get astng for the searched method try: meth_node = overridden[node.name] except KeyError: # we have found the method but it's not in the local # dictionary. # This may happen with astng build from living objects continue if not isinstance(meth_node, astng.Function): continue self._check_signature(node, meth_node, 'overridden') break # check if the method overload an attribute try: overridden = klass.instance_attr(node.name)[0] # XXX # we may be unable to get owner class if this is a monkey # patched method while overridden.parent and not isinstance(overridden, astng.Class): overridden = overridden.parent.frame() self.add_message('E0202', args=overridden.name, node=node) except astng.NotFoundError: pass def leave_function(self, node): """on method node, check if this method couldn't be a function ignore class, static and abstract methods, initializer, methods overridden from a parent class and any kind of method defined in an interface for this warning """ if node.is_method(): if node.args.args is not None: self._first_attrs.pop() class_node = node.parent.frame() if (self._meth_could_be_func and node.type == 'method' and not node.name in PYMETHODS and not (node.is_abstract() or overrides_a_method(class_node, node.name)) and class_node.type != 'interface'): self.add_message('R0201', node=node) def visit_getattr(self, node): """check if the getattr is an access to a class member if so, register it. Also check for access to protected class member from outside its class (but ignore __special__ methods) """ attrname = node.attrname if self._first_attrs and isinstance(node.expr, astng.Name) and \ node.expr.name == self._first_attrs[-1]: self._accessed[-1].setdefault(attrname, []).append(node) elif attrname[0] == '_' and not attrname == '_' and not ( attrname.startswith('__') and attrname.endswith('__')): # XXX move this in a reusable function klass = node.frame() while klass is not None and not isinstance(klass, astng.Class): if klass.parent is None: klass = None else: klass = klass.parent.frame() # XXX infer to be more safe and less dirty ?? # in classes, check we are not getting a parent method # through the class object or through super callee = node.expr.as_string() if klass is None or not (callee == klass.name or callee in klass.basenames or (isinstance(node.expr, astng.CallFunc) and isinstance(node.expr.func, astng.Name) and node.expr.func.name == 'super')): self.add_message('W0212', node=node, args=attrname) def visit_name(self, node): """check if the name handle an access to a class member if so, register it """ if self._first_attrs and (node.name == self._first_attrs[-1] or not self._first_attrs[-1]): self._meth_could_be_func = False def _check_accessed_members(self, node, accessed): """check that accessed members are defined""" # XXX refactor, probably much simpler now that E0201 is in type checker for attr, nodes in accessed.items(): # deactivate "except doesn't do anything", that's expected # pylint: disable=W0704 # is it a class attribute ? try: node.local_attr(attr) # yes, stop here continue except astng.NotFoundError: pass # is it an instance attribute of a parent class ? try: node.instance_attr_ancestors(attr).next() # yes, stop here continue except StopIteration: pass # is it an instance attribute ? try: defstmts = node.instance_attr(attr) except astng.NotFoundError: pass else: if len(defstmts) == 1: defstmt = defstmts[0] # check that if the node is accessed in the same method as # it's defined, it's accessed after the initial assignment frame = defstmt.frame() lno = defstmt.fromlineno for _node in nodes: if _node.frame() is frame and _node.fromlineno < lno \ and not are_exclusive(_node.statement(), defstmt, ('AttributeError', 'Exception', 'BaseException')): self.add_message('E0203', node=_node, args=(attr, lno)) def _check_first_arg_for_type(self, node, metaclass=0): """check the name of first argument, expect: * 'self' for a regular method * 'cls' for a class method * 'mcs' for a metaclass * not one of the above for a static method """ # don't care about functions with unknown argument (builtins) if node.args.args is None: return first_arg = node.args.args and node.argnames()[0] self._first_attrs.append(first_arg) first = self._first_attrs[-1] # static method if node.type == 'staticmethod': if first_arg in ('self', 'cls', 'mcs'): self.add_message('W0211', args=first, node=node) self._first_attrs[-1] = None # class / regular method with no args elif not node.args.args: self.add_message('E0211', node=node) # metaclass method elif metaclass: if first != 'mcs': self.add_message('C0203', node=node) # class method elif node.type == 'classmethod': if first != 'cls': self.add_message('C0202', node=node) # regular method without self as argument elif first != 'self': self.add_message('E0213', node=node) def _check_bases_classes(self, node): """check that the given class node implements abstract methods from base classes """ # check if this class abstract if class_is_abstract(node): return for method in node.methods(): owner = method.parent.frame() if owner is node: continue # owner is not this class, it must be a parent class # check that the ancestor's method is not abstract if method.is_abstract(pass_is_abstract=False): self.add_message('W0223', node=node, args=(method.name, owner.name)) def _check_interfaces(self, node): """check that the given class node really implements declared interfaces """ e0221_hack = [False] def iface_handler(obj): """filter interface objects, it should be classes""" if not isinstance(obj, astng.Class): e0221_hack[0] = True self.add_message('E0221', node=node, args=(obj.as_string(),)) return False return True ignore_iface_methods = self.config.ignore_iface_methods try: for iface in node.interfaces(handler_func=iface_handler): for imethod in iface.methods(): name = imethod.name if name.startswith('_') or name in ignore_iface_methods: # don't check method beginning with an underscore, # usually belonging to the interface implementation continue # get class method astng try: method = node_method(node, name) except astng.NotFoundError: self.add_message('E0222', args=(name, iface.name), node=node) continue # ignore inherited methods if method.parent.frame() is not node: continue # check signature self._check_signature(method, imethod, '%s interface' % iface.name) except astng.InferenceError: if e0221_hack[0]: return implements = Instance(node).getattr('__implements__')[0] assignment = implements.parent assert isinstance(assignment, astng.Assign) # assignment.expr can be a Name or a Tuple or whatever. # Use as_string() for the message # FIXME: in case of multiple interfaces, find which one could not # be resolved self.add_message('F0220', node=implements, args=(node.name, assignment.value.as_string())) def _check_init(self, node): """check that the __init__ method call super or ancestors'__init__ method """ klass_node = node.parent.frame() to_call = _ancestors_to_call(klass_node) not_called_yet = dict(to_call) for stmt in node.nodes_of_class(astng.CallFunc): expr = stmt.func if not isinstance(expr, astng.Getattr) \ or expr.attrname != '__init__': continue # skip the test if using super if isinstance(expr.expr, astng.CallFunc) and \ isinstance(expr.expr.func, astng.Name) and \ expr.expr.func.name == 'super': return try: klass = expr.expr.infer().next() if klass is YES: continue try: del not_called_yet[klass] except KeyError: if klass not in to_call: self.add_message('W0233', node=expr, args=klass.name) except astng.InferenceError: continue for klass in not_called_yet.keys(): if klass.name == 'object': continue self.add_message('W0231', args=klass.name, node=node) def _check_signature(self, method1, refmethod, class_type): """check that the signature of the two given methods match class_type is in 'class', 'interface' """ if not (isinstance(method1, astng.Function) and isinstance(refmethod, astng.Function)): self.add_message('F0202', args=(method1, refmethod), node=method1) return # don't care about functions with unknown argument (builtins) if method1.args.args is None or refmethod.args.args is None: return if len(method1.args.args) != len(refmethod.args.args): self.add_message('W0221', args=class_type, node=method1) elif len(method1.args.defaults) < len(refmethod.args.defaults): self.add_message('W0222', args=class_type, node=method1) def _ancestors_to_call(klass_node, method='__init__'): """return a dictionary where keys are the list of base classes providing the queried method, and so that should/may be called from the method node """ to_call = {} for base_node in klass_node.ancestors(recurs=False): try: base_node.local_attr(method) to_call[base_node] = 1 except astng.NotFoundError: continue return to_call def node_method(node, method_name): """get astng for on the given class node, ensuring it is a Function node """ for n in node.local_attr(method_name): if isinstance(n, astng.Function): return n raise astng.NotFoundError(method_name) def register(linter): """required method to auto register this checker """ linter.register_checker(ClassChecker(linter)) ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/base.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/checkers/base.0000644000175000017500000007577711242100540033527 0ustar andreasandreas# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # Copyright (c) 2009-2010 Arista Networks, Inc. # http://www.logilab.fr/ -- mailto:contact@logilab.fr # 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. """basic checker for Python code""" from logilab import astng from logilab.common.compat import any, set from logilab.common.ureports import Table from logilab.astng import are_exclusive from ScribesPylint.interfaces import IASTNGChecker from ScribesPylint.reporters import diff_string from ScribesPylint.checkers import BaseChecker, EmptyReport import re # regex for class/function/variable/constant name CLASS_NAME_RGX = re.compile('[A-Z_][a-zA-Z0-9]+$') MOD_NAME_RGX = re.compile('(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$') CONST_NAME_RGX = re.compile('(([A-Z_][A-Z0-9_]*)|(__.*__))$') COMP_VAR_RGX = re.compile('[A-Za-z_][A-Za-z0-9_]*$') DEFAULT_NAME_RGX = re.compile('[a-z_][a-z0-9_]*$') # do not require a doc string on system methods NO_REQUIRED_DOC_RGX = re.compile('__.*__') del re def in_loop(node): """return True if the node is inside a kind of for loop""" parent = node.parent while parent is not None: if isinstance(parent, (astng.For, astng.ListComp, astng.GenExpr)): return True parent = parent.parent return False def in_nested_list(nested_list, obj): """return true if the object is an element of or of a nested list """ for elmt in nested_list: if isinstance(elmt, (list, tuple)): if in_nested_list(elmt, obj): return True elif elmt == obj: return True return False def report_by_type_stats(sect, stats, old_stats): """make a report of * percentage of different types documented * percentage of different types with a bad name """ # percentage of different types documented and/or with a bad name nice_stats = {} for node_type in ('module', 'class', 'method', 'function'): try: total = stats[node_type] except KeyError: raise EmptyReport() nice_stats[node_type] = {} if total != 0: try: documented = total - stats['undocumented_'+node_type] percent = (documented * 100.) / total nice_stats[node_type]['percent_documented'] = '%.2f' % percent except KeyError: nice_stats[node_type]['percent_documented'] = 'NC' try: percent = (stats['badname_'+node_type] * 100.) / total nice_stats[node_type]['percent_badname'] = '%.2f' % percent except KeyError: nice_stats[node_type]['percent_badname'] = 'NC' lines = ('type', 'number', 'old number', 'difference', '%documented', '%badname') for node_type in ('module', 'class', 'method', 'function'): new = stats[node_type] old = old_stats.get(node_type, None) if old is not None: diff_str = diff_string(old, new) else: old, diff_str = 'NC', 'NC' lines += (node_type, str(new), str(old), diff_str, nice_stats[node_type].get('percent_documented', '0'), nice_stats[node_type].get('percent_badname', '0')) sect.append(Table(children=lines, cols=6, rheaders=1)) class _BasicChecker(BaseChecker): __implements__ = IASTNGChecker name = 'basic' class BasicErrorChecker(_BasicChecker): msgs = { 'E0100': ('__init__ method is a generator', 'Used when the special class method __init__ is turned into a ' 'generator by a yield in its body.'), 'E0101': ('Explicit return in __init__', 'Used when the special class method __init__ has an explicit \ return value.'), 'E0102': ('%s already defined line %s', 'Used when a function / class / method is redefined.'), 'E0103': ('%r not properly in loop', 'Used when break or continue keywords are used outside a loop.'), 'E0104': ('Return outside function', 'Used when a "return" statement is found outside a function or ' 'method.'), 'E0105': ('Yield outside function', 'Used when a "yield" statement is found outside a function or ' 'method.'), 'E0106': ('Return with argument inside generator', 'Used when a "return" statement with an argument is found ' 'outside in a generator function or method (e.g. with some ' '"yield" statements).'), 'E0107': ("Use of the non-existent %s operator", "Used when you attempt to use the C-style pre-increment or" "pre-decrement operator -- and ++, which doesn't exist in Python."), } def __init__(self, linter): _BasicChecker.__init__(self, linter) self._returns = None def open(self): self._returns = [] def visit_class(self, node): self._check_redefinition('class', node) def visit_function(self, node): self._returns.append([]) self._check_redefinition(node.is_method() and 'method' or 'function', node) def leave_function(self, node): """most of the work is done here on close: checks for max returns, branch, return in __init__ """ returns = self._returns.pop() if node.is_method() and node.name == '__init__': if node.is_generator(): self.add_message('E0100', node=node) else: values = [r.value for r in returns] if [v for v in values if not (v is None or (isinstance(v, astng.Const) and v.value is None) or (isinstance(v, astng.Name) and v.name == 'None'))]: self.add_message('E0101', node=node) elif node.is_generator(): # make sure we don't mix non-None returns and yields for retnode in returns: if isinstance(retnode, astng.Return) and \ isinstance(retnode.value, astng.Const) and \ retnode.value.value is not None: self.add_message('E0106', node=node, line=retnode.fromlineno) def visit_return(self, node): # if self._returns is empty, we're outside a function if not self._returns: self.add_message('E0104', node=node) return self._returns[-1].append(node) def visit_yield(self, node): # if self._returns is empty, we're outside a function if not self._returns: self.add_message('E0105', node=node) return self._returns[-1].append(node) def visit_continue(self, node): self._check_in_loop(node, 'continue') def visit_break(self, node): self._check_in_loop(node, 'break') def visit_unaryop(self, node): """check use of the non-existent ++ adn -- operator operator""" if ((node.op in '+-') and isinstance(node.operand, astng.UnaryOp) and (node.operand.op == node.op)): self.add_message('E0107', node=node, args=node.op*2) def _check_in_loop(self, node, node_name): """check that a node is inside a for or while loop""" _node = node.parent while _node: if isinstance(_node, (astng.For, astng.While)): break _node = _node.parent else: self.add_message('E0103', node=node, args=node_name) def _check_redefinition(self, redeftype, node): """check for redefinition of a function / method / class name""" defined_self = node.parent.frame()[node.name] if defined_self is not node and not are_exclusive(node, defined_self): self.add_message('E0102', node=node, args=(redeftype, defined_self.fromlineno)) class BasicChecker(_BasicChecker): """checks for : * doc strings * modules / classes / functions / methods / arguments / variables name * number of arguments, local variables, branches, returns and statements in functions, methods * required module attributes * dangerous default values as arguments * redefinition of function / method / class * uses of the global statement """ __implements__ = IASTNGChecker name = 'basic' msgs = { 'W0101': ('Unreachable code', 'Used when there is some code behind a "return" or "raise" \ statement, which will never be accessed.'), 'W0102': ('Dangerous default value %s as argument', 'Used when a mutable value as list or dictionary is detected in \ a default value for an argument.'), 'W0104': ('Statement seems to have no effect', 'Used when a statement doesn\'t have (or at least seems to) \ any effect.'), 'W0105': ('String statement has no effect', 'Used when a string is used as a statement (which of course \ has no effect). This is a particular case of W0104 with its \ own message so you can easily disable it if you\'re using \ those strings as documentation, instead of comments.'), 'W0108': ('Lambda may not be necessary', 'Used when the body of a lambda expression is a function call \ on the same argument list as the lambda itself; such lambda \ expressions are in all but a few cases replaceable with the \ function being called in the body of the lambda.'), 'W0109': ("Duplicate key %r in dictionary", "Used when a dictionary expression binds the same key multiple \ times."), 'W0122': ('Use of the exec statement', 'Used when you use the "exec" statement, to discourage its \ usage. That doesn\'t mean you can not use it !'), 'W0141': ('Used builtin function %r', 'Used when a black listed builtin function is used (see the ' 'bad-function option). Usual black listed functions are the ones ' 'like map, or filter , where Python offers now some cleaner ' 'alternative like list comprehension.'), 'W0142': ('Used * or ** magic', 'Used when a function or method is called using `*args` or ' '`**kwargs` to dispatch arguments. This doesn\'t improve ' 'readability and should be used with care.'), 'W0150': ("%s statement in finally block may swallow exception", "Used when a break or a return statement is found inside the \ finally clause of a try...finally block: the exceptions raised \ in the try clause will be silently swallowed instead of being \ re-raised."), 'W0199': ('Assert called on a 2-uple. Did you mean \'assert x,y\'?', 'A call of assert on a tuple will always evaluate to true if ' 'the tuple is not empty, and will always evaluate to false if ' 'it is.'), 'C0121': ('Missing required attribute "%s"', # W0103 'Used when an attribute required for modules is missing.'), } options = (('required-attributes', {'default' : (), 'type' : 'csv', 'metavar' : '', 'help' : 'Required attributes for module, separated by a ' 'comma'} ), ('bad-functions', {'default' : ('map', 'filter', 'apply', 'input'), 'type' :'csv', 'metavar' : '', 'help' : 'List of builtins function names that should not be ' 'used, separated by a comma'} ), ) reports = ( ('RP0101', 'Statistics by type', report_by_type_stats), ) def __init__(self, linter): _BasicChecker.__init__(self, linter) self.stats = None self._tryfinallys = None def open(self): """initialize visit variables and statistics """ self._tryfinallys = [] self.stats = self.linter.add_stats(module=0, function=0, method=0, class_=0) def visit_module(self, node): """check module name, docstring and required arguments """ self.stats['module'] += 1 self._check_required_attributes(node, self.config.required_attributes) def visit_class(self, node): """check module name, docstring and redefinition increment branch counter """ self.stats['class'] += 1 def visit_discard(self, node): """check for various kind of statements without effect""" expr = node.value if isinstance(expr, astng.Const) and isinstance(expr.value, basestring): # treat string statement in a separated message self.add_message('W0105', node=node) return # ignore if this is : # * a function call (can't predicate side effects) # * the unique children of a try/except body # * a yield (which are wrapped by a discard node in _ast XXX) if not (any(expr.nodes_of_class((astng.CallFunc, astng.Yield))) or isinstance(node.parent, astng.TryExcept) and node.parent.body == [node]): self.add_message('W0104', node=node) def visit_lambda(self, node): """check whether or not the lambda is suspicious """ # if the body of the lambda is a call expression with the same # argument list as the lambda itself, then the lambda is # possibly unnecessary and at least suspicious. if node.args.defaults: # If the arguments of the lambda include defaults, then a # judgment cannot be made because there is no way to check # that the defaults defined by the lambda are the same as # the defaults defined by the function called in the body # of the lambda. return call = node.body if not isinstance(call, astng.CallFunc): # The body of the lambda must be a function call expression # for the lambda to be unnecessary. return # XXX are lambda still different with astng >= 0.18 ? # *args and **kwargs need to be treated specially, since they # are structured differently between the lambda and the function # call (in the lambda they appear in the args.args list and are # indicated as * and ** by two bits in the lambda's flags, but # in the function call they are omitted from the args list and # are indicated by separate attributes on the function call node). ordinary_args = list(node.args.args) if node.args.kwarg: if (not call.kwargs or not isinstance(call.kwargs, astng.Name) or node.args.kwarg != call.kwargs.name): return elif call.kwargs: return if node.args.vararg: if (not call.starargs or not isinstance(call.starargs, astng.Name) or node.args.vararg != call.starargs.name): return elif call.starargs: return # The "ordinary" arguments must be in a correspondence such that: # ordinary_args[i].name == call.args[i].name. if len(ordinary_args) != len(call.args): return for i in xrange(len(ordinary_args)): if not isinstance(call.args[i], astng.Name): return if node.args.args[i].name != call.args[i].name: return self.add_message('W0108', line=node.fromlineno, node=node) def visit_function(self, node): """check function name, docstring, arguments, redefinition, variable names, max locals """ self.stats[node.is_method() and 'method' or 'function'] += 1 # check default arguments'value self._check_defaults(node) def visit_return(self, node): """1 - check is the node has a right sibling (if so, that's some unreachable code) 2 - check is the node is inside the finally clause of a try...finally block """ self._check_unreachable(node) # Is it inside final body of a try...finally bloc ? self._check_not_in_finally(node, 'return', (astng.Function,)) def visit_continue(self, node): """check is the node has a right sibling (if so, that's some unreachable code) """ self._check_unreachable(node) def visit_break(self, node): """1 - check is the node has a right sibling (if so, that's some unreachable code) 2 - check is the node is inside the finally clause of a try...finally block """ # 1 - Is it right sibling ? self._check_unreachable(node) # 2 - Is it inside final body of a try...finally bloc ? self._check_not_in_finally(node, 'break', (astng.For, astng.While,)) def visit_raise(self, node): """check is the node has a right sibling (if so, that's some unreachable code) """ self._check_unreachable(node) def visit_exec(self, node): """just print a warning on exec statements""" self.add_message('W0122', node=node) def visit_callfunc(self, node): """visit a CallFunc node -> check if this is not a blacklisted builtin call and check for * or ** use """ if isinstance(node.func, astng.Name): name = node.func.name # ignore the name if it's not a builtin (i.e. not defined in the # locals nor globals scope) if not (node.frame().has_key(name) or node.root().has_key(name)): if name in self.config.bad_functions: self.add_message('W0141', node=node, args=name) if node.starargs or node.kwargs: scope = node.scope() if isinstance(scope, astng.Function): toprocess = [(n, vn) for (n, vn) in ((node.starargs, scope.args.vararg), (node.kwargs, scope.args.kwarg)) if n] if toprocess: for cfnode, fargname in toprocess[:]: if getattr(cfnode, 'name', None) == fargname: toprocess.remove((cfnode, fargname)) if not toprocess: return # W0142 can be skipped self.add_message('W0142', node=node.func) def visit_assert(self, node): """check the use of an assert statement on a tuple.""" if node.fail is None and isinstance(node.test, astng.Tuple) and \ len(node.test.elts) == 2: self.add_message('W0199', line=node.fromlineno, node=node) def visit_dict(self, node): """check duplicate key in dictionary""" keys = set() for k, v in node.items: if isinstance(k, astng.Const): key = k.value if key in keys: self.add_message('W0109', node=node, args=key) keys.add(key) def visit_tryfinally(self, node): """update try...finally flag""" self._tryfinallys.append(node) def leave_tryfinally(self, node): """update try...finally flag""" self._tryfinallys.pop() def _check_unreachable(self, node): """check unreachable code""" unreach_stmt = node.next_sibling() if unreach_stmt is not None: self.add_message('W0101', node=unreach_stmt) def _check_defaults(self, node): """check for dangerous default values as arguments""" for default in node.args.defaults: try: value = default.infer().next() except astng.InferenceError: continue if isinstance(value, (astng.Dict, astng.List)): if value is default: msg = default.as_string() else: msg = '%s (%s)' % (default.as_string(), value.as_string()) self.add_message('W0102', node=node, args=(msg,)) def _check_required_attributes(self, node, attributes): """check for required attributes""" for attr in attributes: if not node.has_key(attr): self.add_message('C0121', node=node, args=attr) def _check_not_in_finally(self, node, node_name, breaker_classes=()): """check that a node is not inside a finally clause of a try...finally statement. If we found before a try...finally bloc a parent which its type is in breaker_classes, we skip the whole check.""" # if self._tryfinallys is empty, we're not a in try...finally bloc if not self._tryfinallys: return # the node could be a grand-grand...-children of the try...finally _parent = node.parent _node = node while _parent and not isinstance(_parent, breaker_classes): if hasattr(_parent, 'finalbody') and _node in _parent.finalbody: self.add_message('W0150', node=node, args=node_name) return _node = _parent _parent = _node.parent class NameChecker(_BasicChecker): msgs = { 'C0102': ('Black listed name "%s"', 'Used when the name is listed in the black list (unauthorized \ names).'), 'C0103': ('Invalid name "%s" (should match %s)', 'Used when the name doesn\'t match the regular expression \ associated to its type (constant, variable, class...).'), } options = (('module-rgx', {'default' : MOD_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'module names'} ), ('const-rgx', {'default' : CONST_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'module level names'} ), ('class-rgx', {'default' : CLASS_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'class names'} ), ('function-rgx', {'default' : DEFAULT_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'function names'} ), ('method-rgx', {'default' : DEFAULT_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'method names'} ), ('attr-rgx', {'default' : DEFAULT_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'instance attribute names'} ), ('argument-rgx', {'default' : DEFAULT_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'argument names'}), ('variable-rgx', {'default' : DEFAULT_NAME_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'variable names'} ), ('inlinevar-rgx', {'default' : COMP_VAR_RGX, 'type' :'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match correct ' 'list comprehension / generator expression variable \ names'} ), # XXX use set ('good-names', {'default' : ('i', 'j', 'k', 'ex', 'Run', '_'), 'type' :'csv', 'metavar' : '', 'help' : 'Good variable names which should always be accepted,' ' separated by a comma'} ), ('bad-names', {'default' : ('foo', 'bar', 'baz', 'toto', 'tutu', 'tata'), 'type' :'csv', 'metavar' : '', 'help' : 'Bad variable names which should always be refused, ' 'separated by a comma'} ), ) def open(self): self.stats = self.linter.add_stats(badname_module=0, badname_class=0, badname_function=0, badname_method=0, badname_attr=0, badname_const=0, badname_variable=0, badname_inlinevar=0, badname_argument=0) def visit_module(self, node): self._check_name('module', node.name.split('.')[-1], node) def visit_class(self, node): self._check_name('class', node.name, node) for attr, anodes in node.instance_attrs.items(): self._check_name('attr', attr, anodes[0]) def visit_function(self, node): self._check_name(node.is_method() and 'method' or 'function', node.name, node) # check arguments name args = node.args.args if args is not None: self._recursive_check_names(args, node) def visit_assname(self, node): """check module level assigned names""" frame = node.frame() ass_type = node.ass_type() if isinstance(ass_type, (astng.Comprehension, astng.Comprehension)): self._check_name('inlinevar', node.name, node) elif isinstance(frame, astng.Module): if isinstance(ass_type, astng.Assign) and not in_loop(ass_type): self._check_name('const', node.name, node) elif isinstance(frame, astng.Function): # global introduced variable aren't in the function locals if node.name in frame: self._check_name('variable', node.name, node) def _recursive_check_names(self, args, node): """check names in a possibly recursive list """ for arg in args: #if type(arg) is type(''): if isinstance(arg, astng.AssName): self._check_name('argument', arg.name, node) else: self._recursive_check_names(arg.elts, node) def _check_name(self, node_type, name, node): """check for a name using the type's regexp""" if name in self.config.good_names: return if name in self.config.bad_names: self.stats['badname_' + node_type] += 1 self.add_message('C0102', node=node, args=name) return regexp = getattr(self.config, node_type + '_rgx') if regexp.match(name) is None: self.add_message('C0103', node=node, args=(name, regexp.pattern)) self.stats['badname_' + node_type] += 1 class DocStringChecker(_BasicChecker): msgs = { 'C0111': ('Missing docstring', # W0131 'Used when a module, function, class or method has no docstring.\ Some special methods like __init__ doesn\'t necessary require a \ docstring.'), 'C0112': ('Empty docstring', # W0132 'Used when a module, function, class or method has an empty \ docstring (it would be too easy ;).'), } options = (('no-docstring-rgx', {'default' : NO_REQUIRED_DOC_RGX, 'type' : 'regexp', 'metavar' : '', 'help' : 'Regular expression which should only match ' 'functions or classes name which do not require a ' 'docstring'} ), ) def open(self): self.stats = self.linter.add_stats(undocumented_module=0, undocumented_function=0, undocumented_method=0, undocumented_class=0) def visit_module(self, node): self._check_docstring('module', node) def visit_class(self, node): if self.config.no_docstring_rgx.match(node.name) is None: self._check_docstring('class', node) def visit_function(self, node): if self.config.no_docstring_rgx.match(node.name) is None: ftype = node.is_method() and 'method' or 'function' if isinstance(node.parent.frame(), astng.Class): overridden = False # check if node is from a method overridden by its ancestor for ancestor in node.parent.frame().ancestors(): if node.name in ancestor and \ isinstance(ancestor[node.name], astng.Function): overridden = True break if not overridden: self._check_docstring(ftype, node) else: self._check_docstring(ftype, node) def _check_docstring(self, node_type, node): """check the node has a non empty docstring""" docstring = node.doc if docstring is None: self.stats['undocumented_'+node_type] += 1 self.add_message('C0111', node=node) elif not docstring.strip(): self.stats['undocumented_'+node_type] += 1 self.add_message('C0112', node=node) class PassChecker(_BasicChecker): """check is the pass statement is really necessary""" msgs = {'W0107': ('Unnecessary pass statement', 'Used when a "pass" statement that can be avoided is ' 'encountered.)'), } def visit_pass(self, node): if len(node.parent.child_sequence(node)) > 1: self.add_message('W0107', node=node) def register(linter): """required method to auto register this checker""" linter.register_checker(BasicErrorChecker(linter)) linter.register_checker(BasicChecker(linter)) # linter.register_checker(NameChecker(linter)) # linter.register_checker(DocStringChecker(linter)) linter.register_checker(PassChecker(linter)) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/interfaces.py0000644000175000017500000000543711242100540033504 0ustar andreasandreas# 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. """ Copyright (c) 2002-2003 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr Interfaces for PyLint objects """ __revision__ = "$Id: interfaces.py,v 1.9 2004-04-24 12:14:53 syt Exp $" from logilab.common.interface import Interface class IChecker(Interface): """This is an base interface, not designed to be used elsewhere than for sub interfaces definition. """ def open(self): """called before visiting project (i.e set of modules)""" def close(self): """called after visiting project (i.e set of modules)""" ## def open_module(self): ## """called before visiting a module""" ## def close_module(self): ## """called after visiting a module""" class IRawChecker(IChecker): """interface for checker which need to parse the raw file """ def process_module(self, stream): """ process a module the module's content is accessible via the stream object """ class IASTNGChecker(IChecker): """ interface for checker which prefers receive events according to statement type """ class ILinter(Interface): """interface for the linter class the linter class will generate events to its registered checkers. Each checker may interact with the linter instance using this API """ def register_checker(self, checker): """register a new checker class checker is a class implementing IrawChecker or / and IASTNGChecker """ def add_message(self, msg_id, line=None, node=None, args=None): """add the message corresponding to the given id. If provided, msg is expanded using args astng checkers should provide the node argument, raw checkers should provide the line argument. """ class IReporter(Interface): """ reporter collect messages and display results encapsulated in a layout """ def add_message(self, msg_id, location, msg): """add a message of a given type msg_id is a message identifier location is a 3-uple (module, object, line) msg is the actual message """ def display_results(self, layout): """display results encapsulated in the layout tree """ __all__ = ('IRawChecker', 'IStatable', 'ILinter', 'IReporter') scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/COPYING0000644000175000017500000004310511242100540032034 0ustar andreasandreas GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/config.py0000644000175000017500000001261711242100540032624 0ustar andreasandreas# 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. """ Copyright (c) 2003-2006 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr utilities for PyLint configuration : _ pylintrc _ pylint.d (PYLINT_HOME) """ import pickle import os import sys from os.path import exists, isfile, join, expanduser, abspath, dirname # pylint home is used to save old runs results ################################ USER_HOME = expanduser('~') if os.environ.has_key('PYLINTHOME'): PYLINT_HOME = os.environ['PYLINTHOME'] if USER_HOME == '~': USER_HOME = dirname(PYLINT_HOME) elif USER_HOME == '~': PYLINT_HOME = ".pylint.d" else: PYLINT_HOME = join(USER_HOME, '.pylint.d') if not exists(PYLINT_HOME): try: os.mkdir(PYLINT_HOME) except OSError: print >> sys.stderr, 'Unable to create directory %s' % PYLINT_HOME def get_pdata_path(base_name, recurs): """return the path of the file which should contain old search data for the given base_name with the given options values """ base_name = base_name.replace(os.sep, '_') return join(PYLINT_HOME, "%s%s%s"%(base_name, recurs, '.stats')) def load_results(base): """try to unpickle and return data from file if it exists and is not corrupted return an empty dictionary if it doesn't exists """ data_file = get_pdata_path(base, 1) try: return pickle.load(open(data_file)) except: return {} def save_results(results, base): """pickle results""" data_file = get_pdata_path(base, 1) try: pickle.dump(results, open(data_file, 'w')) except (IOError, OSError), ex: print >> sys.stderr, 'Unable to create file %s: %s' % (data_file, ex) # location of the configuration file ########################################## def find_pylintrc(): """search the pylint rc file and return its path if it find it, else None """ # is there a pylint rc file in the current directory ? if exists('pylintrc'): return abspath('pylintrc') if isfile('__init__.py'): curdir = abspath(os.getcwd()) while isfile(join(curdir, '__init__.py')): curdir = abspath(join(curdir, '..')) if isfile(join(curdir, 'pylintrc')): return join(curdir, 'pylintrc') if os.environ.has_key('PYLINTRC') and exists(os.environ['PYLINTRC']): pylintrc = os.environ['PYLINTRC'] else: user_home = expanduser('~') if user_home == '~' or user_home == '/root': pylintrc = ".pylintrc" else: pylintrc = join(user_home, '.pylintrc') if not isfile(pylintrc): if isfile('/etc/pylintrc'): pylintrc = '/etc/pylintrc' else: pylintrc = None return pylintrc PYLINTRC = find_pylintrc() ENV_HELP = ''' The following environment variables are used : * PYLINTHOME path to the directory where data of persistent run will be stored. If not found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working directory) . The current PYLINTHOME is %(PYLINT_HOME)s. * PYLINTRC path to the configuration file. If not found, it will use the first existent file in ~/.pylintrc, /etc/pylintrc. The current PYLINTRC is %(PYLINTRC)s. ''' % globals() # evaluation messages ######################################################### def get_note_message(note): """return a message according to note note is a float < 10 (10 is the highest note) """ assert note <= 10, "Note is %.2f. Either you cheated, or pylint's \ broken!" % note if note < 0: msg = 'You have to do something quick !' elif note < 1: msg = 'Hey! This is really dreadful. Or maybe pylint is buggy?' elif note < 2: msg = "Come on! You can't be proud of this code" elif note < 3: msg = 'Hum... Needs work.' elif note < 4: msg = 'Wouldn\'t you be a bit lazy?' elif note < 5: msg = 'A little more work would make it acceptable.' elif note < 6: msg = 'Just the bare minimum. Give it a bit more polish. ' elif note < 7: msg = 'This is okay-ish, but I\'m sure you can do better.' elif note < 8: msg = 'If you commit now, people should not be making nasty \ comments about you on c.l.py' elif note < 9: msg = 'That\'s pretty good. Good work mate.' elif note < 10: msg = 'So close to being perfect...' else: msg = 'Wow ! Now this deserves our uttermost respect.\nPlease send \ your code to python-projects@logilab.org' return msg scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/utils.py0000644000175000017500000003646311242100540032524 0ustar andreasandreas# Copyright (c) 2003-2010 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """some various utilities and helper classes, most of them used in the main pylint class """ import sys #from os import linesep from os.path import dirname, basename, splitext, exists, isdir, join, normpath from logilab.common.modutils import modpath_from_file, get_module_files, \ file_from_modpath from logilab.common.textutils import normalize_text from logilab.common.configuration import rest_format_section from logilab.common.ureports import Section from logilab.common.compat import set from logilab.astng import nodes, Module from ScribesPylint.checkers import EmptyReport class UnknownMessage(Exception): """raised when a unregistered message id is encountered""" MSG_TYPES = { 'I' : 'info', 'C' : 'convention', 'R' : 'refactor', 'W' : 'warning', 'E' : 'error', 'F' : 'fatal' } MSG_TYPES_LONG = dict([(v, k) for k, v in MSG_TYPES.iteritems()]) MSG_TYPES_STATUS = { 'I' : 0, 'C' : 16, 'R' : 8, 'W' : 4, 'E' : 2, 'F' : 1 } def sort_msgs(msgids): """sort message identifiers according to their category first""" msg_order = 'EWRCIF' def cmp_func(msgid1, msgid2): """comparison function for two message identifiers""" if msgid1[0] != msgid2[0]: return cmp(msg_order.index(msgid1[0]), msg_order.index(msgid2[0])) else: return cmp(msgid1, msgid2) msgids.sort(cmp_func) return msgids def get_module_and_frameid(node): """return the module name and the frame id in the module""" frame = node.frame() module, obj = '', [] while frame: if isinstance(frame, Module): module = frame.name else: obj.append(getattr(frame, 'name', '')) try: frame = frame.parent.frame() except AttributeError: frame = None obj.reverse() return module, '.'.join(obj) def category_id(id): id = id.upper() if id in MSG_TYPES: return id return MSG_TYPES_LONG.get(id) class Message: def __init__(self, checker, msgid, msg, descr): assert len(msgid) == 5, 'Invalid message id %s' % msgid assert msgid[0] in MSG_TYPES, \ 'Bad message type %s in %r' % (msgid[0], msgid) self.msgid = msgid self.msg = msg self.descr = descr self.checker = checker class MessagesHandlerMixIn: """a mix-in class containing all the messages related methods for the main lint class """ def __init__(self): # dictionary of registered messages self._messages = {} self._msgs_state = {} self._module_msgs_state = {} # None self._msgs_by_category = {} self.msg_status = 0 def register_messages(self, checker): """register a dictionary of messages Keys are message ids, values are a 2-uple with the message type and the message itself message ids should be a string of len 4, where the to first characters are the checker id and the two last the message id in this checker """ msgs_dict = checker.msgs chkid = None for msgid, (msg, msgdescr) in msgs_dict.items(): # avoid duplicate / malformed ids assert not self._messages.has_key(msgid), \ 'Message id %r is already defined' % msgid assert chkid is None or chkid == msgid[1:3], \ 'Inconsistent checker part in message id %r' % msgid chkid = msgid[1:3] self._messages[msgid] = Message(checker, msgid, msg, msgdescr) self._msgs_by_category.setdefault(msgid[0], []).append(msgid) def get_message_help(self, msgid, checkerref=False): """return the help string for the given message id""" msg = self.check_message_id(msgid) desc = normalize_text(' '.join(msg.descr.split()), indent=' ') if checkerref: desc += ' This message belongs to the %s checker.' % \ msg.checker.name title = msg.msg if title != '%s': title = title.splitlines()[0] return ':%s: *%s*\n%s' % (msg.msgid, title, desc) return ':%s:\n%s' % (msg.msgid, desc) def disable(self, msgid, scope='package', line=None): """don't output message of the given id""" assert scope in ('package', 'module') # msgid is a category? catid = category_id(msgid) if catid is not None: for msgid in self._msgs_by_category.get(catid): self.disable(msgid, scope, line) return # msgid is a checker name? if msgid.lower() in self._checkers: for checker in self._checkers[msgid.lower()]: for msgid in checker.msgs: self.disable(msgid, scope, line) return # msgid is report id? if msgid.lower().startswith('rp'): self.disable_report(msgid) return # msgid is a msgid. msg = self.check_message_id(msgid) if scope == 'module': assert line > 0 try: self._module_msgs_state[msg.msgid][line] = False except KeyError: self._module_msgs_state[msg.msgid] = {line: False} if msgid != 'I0011': self.add_message('I0011', line=line, args=msg.msgid) else: msgs = self._msgs_state msgs[msg.msgid] = False # sync configuration object self.config.disable_msg = [mid for mid, val in msgs.items() if not val] def enable(self, msgid, scope='package', line=None): """reenable message of the given id""" assert scope in ('package', 'module') catid = category_id(msgid) # msgid is a category? if catid is not None: for msgid in self._msgs_by_category.get(catid): self.enable(msgid, scope, line) return # msgid is a checker name? if msgid.lower() in self._checkers: for checker in self._checkers[msgid.lower()]: for msgid in checker.msgs: self.enable(msgid, scope, line) return # msgid is report id? if msgid.lower().startswith('rp'): self.enable_report(msgid) return # msgid is a msgid. msg = self.check_message_id(msgid) if scope == 'module': assert line > 0 try: self._module_msgs_state[msg.msgid][line] = True except KeyError: self._module_msgs_state[msg.msgid] = {line: True} self.add_message('I0012', line=line, args=msg.msgid) else: msgs = self._msgs_state msgs[msg.msgid] = True # sync configuration object self.config.enable = [mid for mid, val in msgs.items() if val] def check_message_id(self, msgid): """raise UnknownMessage if the message id is not defined""" msgid = msgid.upper() try: return self._messages[msgid] except KeyError: raise UnknownMessage('No such message id %s' % msgid) def is_message_enabled(self, msgid, line=None): """return true if the message associated to the given message id is enabled """ if line is None: return self._msgs_state.get(msgid, True) try: return self._module_msgs_state[msgid][line] except (KeyError, TypeError): return self._msgs_state.get(msgid, True) def add_message(self, msgid, line=None, node=None, args=None): """add the message corresponding to the given id. If provided, msg is expanded using args astng checkers should provide the node argument, raw checkers should provide the line argument. """ if line is None and node is not None: line = node.fromlineno # should this message be displayed if not self.is_message_enabled(msgid, line): return # update stats msg_cat = MSG_TYPES[msgid[0]] self.msg_status |= MSG_TYPES_STATUS[msgid[0]] self.stats[msg_cat] += 1 self.stats['by_module'][self.current_name][msg_cat] += 1 try: self.stats['by_msg'][msgid] += 1 except KeyError: self.stats['by_msg'][msgid] = 1 msg = self._messages[msgid].msg # expand message ? if args: msg %= args # get module and object if node is None: module, obj = self.current_name, '' path = self.current_file else: module, obj = get_module_and_frameid(node) path = node.root().file # add the message self.reporter.add_message(msgid, (path, module, obj, line or 1), msg) def help_message(self, msgids): """display help messages for the given message identifiers""" for msgid in msgids: try: print self.get_message_help(msgid, True) print except UnknownMessage, ex: print ex print continue def print_full_documentation(self): """output a full documentation in ReST format""" by_checker = {} for checker in self.sort_checkers(): if checker.name == 'master': prefix = 'Main ' if checker.options: for section, options in checker.options_by_section(): if section is None: title = 'General options' else: title = '%s options' % section.capitalize() print title print '~' * len(title) rest_format_section(sys.stdout, None, options) print else: try: by_checker[checker.name][0] += checker.options_and_values() by_checker[checker.name][1].update(checker.msgs) by_checker[checker.name][2] += checker.reports except KeyError: by_checker[checker.name] = [list(checker.options_and_values()), dict(checker.msgs), list(checker.reports)] for checker, (options, msgs, reports) in by_checker.items(): prefix = '' title = '%s checker' % checker print title print '-' * len(title) if options: title = 'Options' print title print '~' * len(title) rest_format_section(sys.stdout, None, options) print if msgs: title = ('%smessages' % prefix).capitalize() print title print '~' * len(title) for msgid in sort_msgs(msgs.keys()): print self.get_message_help(msgid, False) print if reports: title = ('%sreports' % prefix).capitalize() print title print '~' * len(title) for report in reports: print ':%s: %s' % report[:2] print print def list_messages(self): """output full messages list documentation in ReST format""" msgids = [] for checker in self.sort_checkers(): for msgid in checker.msgs.keys(): msgids.append(msgid) msgids.sort() for msgid in msgids: print self.get_message_help(msgid, False) print class ReportsHandlerMixIn: """a mix-in class containing all the reports and stats manipulation related methods for the main lint class """ def __init__(self): self._reports = {} self._reports_state = {} def register_report(self, reportid, r_title, r_cb, checker): """register a report reportid is the unique identifier for the report r_title the report's title r_cb the method to call to make the report checker is the checker defining the report """ reportid = reportid.upper() self._reports.setdefault(checker, []).append( (reportid, r_title, r_cb) ) def enable_report(self, reportid): """disable the report of the given id""" reportid = reportid.upper() self._reports_state[reportid] = True def disable_report(self, reportid): """disable the report of the given id""" reportid = reportid.upper() self._reports_state[reportid] = False def is_report_enabled(self, reportid): """return true if the report associated to the given identifier is enabled """ return self._reports_state.get(reportid, True) def make_reports(self, stats, old_stats): """render registered reports""" if self.config.files_output: filename = 'pylint_global.' + self.reporter.extension self.reporter.set_output(open(filename, 'w')) sect = Section('Report', '%s statements analysed.'% (self.stats['statement'])) checkers = self.sort_checkers(self._reports) checkers.reverse() for checker in checkers: for reportid, r_title, r_cb in self._reports[checker]: if not self.is_report_enabled(reportid): continue report_sect = Section(r_title) try: r_cb(report_sect, stats, old_stats) except EmptyReport: continue report_sect.report_id = reportid sect.append(report_sect) self.reporter.display_results(sect) def add_stats(self, **kwargs): """add some stats entries to the statistic dictionary raise an AssertionError if there is a key conflict """ for key, value in kwargs.items(): if key[-1] == '_': key = key[:-1] assert not self.stats.has_key(key) self.stats[key] = value return self.stats def expand_modules(files_or_modules, black_list): """take a list of files/modules/packages and return the list of tuple (file, module name) which have to be actually checked """ result = [] errors = [] for something in files_or_modules: if exists(something): # this is a file or a directory try: modname = '.'.join(modpath_from_file(something)) except ImportError: modname = splitext(basename(something))[0] if isdir(something): filepath = join(something, '__init__.py') else: filepath = something else: # suppose it's a module or package modname = something try: filepath = file_from_modpath(modname.split('.')) if filepath is None: errors.append( {'key' : 'F0003', 'mod': modname} ) continue except ImportError, ex: errors.append( {'key': 'F0001', 'mod': modname, 'ex': ex} ) continue filepath = normpath(filepath) result.append( {'path': filepath, 'name': modname, 'basepath': filepath, 'basename': modname} ) if not (modname.endswith('.__init__') or modname == '__init__') \ and '__init__.py' in filepath: for subfilepath in get_module_files(dirname(filepath), black_list): if filepath == subfilepath: continue submodname = '.'.join(modpath_from_file(subfilepath)) result.append( {'path': subfilepath, 'name': submodname, 'basepath': filepath, 'basename': modname} ) return result, errors class PyLintASTWalker(object): def __init__(self): # callbacks per node types self.nbstatements = 1 self.visit_events = {} self.leave_events = {} def add_checker(self, checker): hasvdefault = False vcids = set() hasldefault = False lcids = set() for member in dir(checker): if member.startswith('visit_'): cid = member[6:] if cid != 'default': cbs = self.visit_events.setdefault(cid, []) cbs.append(getattr(checker, member)) vcids.add(cid) else: hasvdefault = getattr(checker, member) elif member.startswith('leave_'): cid = member[6:] if cid != 'default': cbs = self.leave_events.setdefault(cid, []) cbs.append(getattr(checker, member)) lcids.add(cid) else: hasldefault = getattr(checker, member) if hasvdefault: for cls in nodes.ALL_NODE_CLASSES: cid = cls.__name__.lower() if cid not in vcids: cbs = self.visit_events.setdefault(cid, []) cbs.append(hasvdefault) if hasldefault: for cls in nodes.ALL_NODE_CLASSES: cid = cls.__name__.lower() if cid not in lcids: cbs = self.leave_events.setdefault(cid, []) cbs.append(hasldefault) def walk(self, astng): """call visit events of astng checkers for the given node, recurse on its children, then leave events. """ cid = astng.__class__.__name__.lower() if astng.is_statement: self.nbstatements += 1 # generate events for this node on each checker for cb in self.visit_events.get(cid, ()): cb(astng) # recurse on children for child in astng.get_children(): self.walk(child) for cb in self.leave_events.get(cid, ()): cb(astng) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/lint.py0000644000175000017500000007534011242100540032327 0ustar andreasandreas# Copyright (c) 2003-2010 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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. """ %prog [options] module_or_package Check that a module satisfy a coding standard (and more !). %prog --help Display this help message and exit. %prog --help-msg [,] Display help messages about given message identifiers and exit. """ # import this first to avoid builtin namespace pollution #from ScribesPylint.checkers import utils import sys import os import re import tokenize from warnings import warn from logilab.common.configuration import UnsupportedAction, OptionsManagerMixIn from logilab.common.optik_ext import check_csv from logilab.common.modutils import load_module_from_name from logilab.common.interface import implements from logilab.common.textutils import splitstrip from logilab.common.fileutils import norm_open from logilab.common.ureports import Table, Text, Section from logilab.common.graph import ordered_nodes from logilab.common.__pkginfo__ import version as common_version from logilab.common.compat import set from logilab.astng import MANAGER, nodes from logilab.astng.__pkginfo__ import version as astng_version from ScribesPylint.utils import PyLintASTWalker, UnknownMessage, MessagesHandlerMixIn, \ ReportsHandlerMixIn, MSG_TYPES, expand_modules from ScribesPylint.interfaces import ILinter, IRawChecker, IASTNGChecker from ScribesPylint.checkers import BaseRawChecker, EmptyReport, \ table_lines_from_stats from ScribesPylint.reporters.text import TextReporter, ParseableTextReporter, \ VSTextReporter, ColorizedTextReporter from ScribesPylint.reporters.html import HTMLReporter from pylint import config #from ScribesPylint.__pkginfo__ import version OPTION_RGX = re.compile('\s*#*\s*pylint:(.*)') REPORTER_OPT_MAP = {'text': TextReporter, 'parseable': ParseableTextReporter, 'msvs': VSTextReporter, 'colorized': ColorizedTextReporter, 'html': HTMLReporter,} # Python Linter class ######################################################### MSGS = { 'F0001': ('%s', 'Used when an error occurred preventing the analysis of a \ module (unable to find it for instance).'), 'F0002': ('%s: %s', 'Used when an unexpected error occurred while building the ASTNG \ representation. This is usually accompanied by a traceback. \ Please report such errors !'), 'F0003': ('ignored builtin module %s', 'Used to indicate that the user asked to analyze a builtin module\ which has been skipped.'), 'F0004': ('unexpected inferred value %s', 'Used to indicate that some value of an unexpected type has been \ inferred.'), 'I0001': ('Unable to run raw checkers on built-in module %s', 'Used to inform that a built-in module has not been checked \ using the raw checkers.'), 'I0010': ('Unable to consider inline option %r', 'Used when an inline option is either badly formatted or can\'t \ be used inside modules.'), 'I0011': ('Locally disabling %s', 'Used when an inline option disables a message or a messages \ category.'), 'I0012': ('Locally enabling %s', 'Used when an inline option enables a message or a messages \ category.'), 'I0013': ('Ignoring entire file', 'Used to inform that the file will not be checked'), 'E0001': ('%s', 'Used when a syntax error is raised for a module.'), 'E0011': ('Unrecognized file option %r', 'Used when an unknown inline option is encountered.'), 'E0012': ('Bad option value %r', 'Used when a bad value for an inline option is encountered.'), } class PyLinter(OptionsManagerMixIn, MessagesHandlerMixIn, ReportsHandlerMixIn, BaseRawChecker): """lint Python modules using external checkers. This is the main checker controlling the other ones and the reports generation. It is itself both a raw checker and an astng checker in order to: * handle message activation / deactivation at the module level * handle some basic but necessary stats'data (number of classes, methods...) """ __implements__ = (ILinter, IRawChecker) name = 'master' priority = 0 level = 0 msgs = MSGS may_be_disabled = False options = (('ignore', {'type' : 'csv', 'metavar' : '', 'dest' : 'black_list', 'default' : ('CVS',), 'help' : 'Add to the black list. It \ should be a base name, not a path. You may set this option multiple times.'}), ('persistent', {'default': True, 'type' : 'yn', 'metavar' : '', 'level': 1, 'help' : 'Pickle collected data for later comparisons.'}), ('load-plugins', {'type' : 'csv', 'metavar' : '', 'default' : (), 'level': 1, 'help' : 'List of plugins (as comma separated values of \ python modules names) to load, usually to register additional checkers.'}), ('output-format', {'default': 'text', 'type': 'choice', 'metavar' : '', 'choices': ('text', 'parseable', 'msvs', 'colorized', 'html'), 'short': 'f', 'group': 'Reports', 'help' : 'Set the output format. Available formats are text,\ parseable, colorized, msvs (visual studio) and html'}), ('include-ids', {'type' : 'yn', 'metavar' : '', 'default' : 0, 'short': 'i', 'group': 'Reports', 'help' : 'Include message\'s id in output'}), ('files-output', {'default': 0, 'type' : 'yn', 'metavar' : '', 'group': 'Reports', 'level': 1, 'help' : 'Put messages in a separate file for each module / \ package specified on the command line instead of printing them on stdout. \ Reports (if any) will be written in a file name "pylint_global.[txt|html]".'}), ('reports', {'default': 1, 'type' : 'yn', 'metavar' : '', 'short': 'r', 'group': 'Reports', 'help' : 'Tells whether to display a full report or only the\ messages'}), ('evaluation', {'type' : 'string', 'metavar' : '', 'group': 'Reports', 'level': 1, 'default': '10.0 - ((float(5 * error + warning + refactor + \ convention) / statement) * 10)', 'help' : 'Python expression which should return a note less \ than 10 (10 is the highest note). You have access to the variables errors \ warning, statement which respectively contain the number of errors / warnings\ messages and the total number of statements analyzed. This is used by the \ global evaluation report (R0004).'}), ('comment', {'default': 0, 'type' : 'yn', 'metavar' : '', 'group': 'Reports', 'level': 1, 'help' : 'Add a comment according to your evaluation note. \ This is used by the global evaluation report (R0004).'}), ('enable', {'type' : 'csv', 'metavar': '', 'short': 'e', 'group': 'Messages control', 'help' : 'Enable the message, report, category or checker with the ' 'given id(s). You can either give multiple identifier ' 'separated by comma (,) or put this option multiple time.'}), ('disable', {'type' : 'csv', 'metavar': '', 'short': 'd', 'group': 'Messages control', 'help' : 'Disable the message, report, category or checker ' 'with the given id(s). You can either give multiple identifier' ' separated by comma (,) or put this option multiple time ' '(only on the command line, not in the configuration file ' 'where it should appear only once).'}), ) option_groups = ( ('Messages control', 'Options controling analysis messages'), ('Reports', 'Options related to output formating and reporting'), ) def __init__(self, options=(), reporter=None, option_groups=(), pylintrc=None): # some stuff has to be done before ancestors initialization... # # checkers / reporter / astng manager self.reporter = None self._checkers = {} self._ignore_file = False # visit variables self.base_name = None self.base_file = None self.current_name = None self.current_file = None self.stats = None # init options self.options = options + PyLinter.options self.option_groups = option_groups + PyLinter.option_groups version = 0.3 self._options_methods = { 'enable': self.enable, 'disable': self.disable} self._bw_options_methods = {'disable-msg': self.disable, 'enable-msg': self.enable} full_version = '%%prog %s, \nastng %s, common %s\nPython %s' % ( version, astng_version, common_version, sys.version) OptionsManagerMixIn.__init__(self, usage=__doc__, version=full_version, config_file=pylintrc or config.PYLINTRC) MessagesHandlerMixIn.__init__(self) ReportsHandlerMixIn.__init__(self) BaseRawChecker.__init__(self) # provided reports self.reports = (('RP0001', 'Messages by category', report_total_messages_stats), ('RP0002', '% errors / warnings by module', report_messages_by_module_stats), ('RP0003', 'Messages', report_messages_stats), ('RP0004', 'Global evaluation', self.report_evaluation), ) self.register_checker(self) self._dynamic_plugins = [] self.load_provider_defaults() self.set_reporter(reporter or TextReporter(sys.stdout)) def load_plugin_modules(self, modnames): """take a list of module names which are pylint plugins and load and register them """ for modname in modnames: if modname in self._dynamic_plugins: continue self._dynamic_plugins.append(modname) module = load_module_from_name(modname) module.register(self) def set_reporter(self, reporter): """set the reporter used to display messages and reports""" self.reporter = reporter reporter.linter = self def set_option(self, optname, value, action=None, optdict=None): """overridden from configuration.OptionsProviderMixin to handle some special options """ if optname in self._options_methods or optname in self._bw_options_methods: if value: try: meth = self._options_methods[optname] except KeyError: meth = self._bw_options_methods[optname] warn('%s is deprecated, replace it by %s' % ( optname, optname.split('-')[0]), DeprecationWarning) value = check_csv(None, optname, value) if isinstance(value, (list, tuple)): for _id in value : meth(_id) else : meth(value) elif optname == 'output-format': self.set_reporter(REPORTER_OPT_MAP[value.lower()]()) try: BaseRawChecker.set_option(self, optname, value, action, optdict) except UnsupportedAction: print >> sys.stderr, 'option %s can\'t be read from config file' % \ optname # checkers manipulation methods ############################################ def register_checker(self, checker): """register a new checker checker is an object implementing IRawChecker or / and IASTNGChecker """ assert checker.priority <= 0, 'checker priority can\'t be >= 0' self._checkers.setdefault(checker.name, []).append(checker) if hasattr(checker, 'reports'): for r_id, r_title, r_cb in checker.reports: self.register_report(r_id, r_title, r_cb, checker) self.register_options_provider(checker) if hasattr(checker, 'msgs'): self.register_messages(checker) checker.load_defaults() def disable_noerror_messages(self): for msgcat, msgids in self._msgs_by_category.iteritems(): if msgcat == 'E': for msgid in msgids: self.enable(msgid) else: for msgid in msgids: self.disable(msgid) # block level option handling ############################################# # # see func_block_disable_msg.py test case for expected behaviour def process_tokens(self, tokens): """process tokens from the current module to search for module/block level options """ comment = tokenize.COMMENT newline = tokenize.NEWLINE for (tok_type, _, start, _, line) in tokens: if tok_type not in (comment, newline): continue match = OPTION_RGX.search(line) if match is None: continue if match.group(1).strip() == "disable-all": self.add_message('I0013', line=start[0]) self._ignore_file = True return try: opt, value = match.group(1).split('=', 1) except ValueError: self.add_message('I0010', args=match.group(1).strip(), line=start[0]) continue opt = opt.strip() if opt in self._options_methods or opt in self._bw_options_methods: try: meth = self._options_methods[opt] except KeyError: meth = self._bw_options_methods[opt] warn('%s is deprecated, replace it by %s (%s)' % ( opt, opt.split('-')[0], self.current_file), DeprecationWarning) for msgid in splitstrip(value): try: meth(msgid, 'module', start[0]) except UnknownMessage: self.add_message('E0012', args=msgid, line=start[0]) else: self.add_message('E0011', args=opt, line=start[0]) def collect_block_lines(self, node, msg_state): """walk ast to collect block level options line numbers""" # recurse on children (depth first) for child in node.get_children(): self.collect_block_lines(child, msg_state) first = node.fromlineno last = node.tolineno # first child line number used to distinguish between disable # which are the first child of scoped node with those defined later. # For instance in the code below: # # 1. def meth8(self): # 2. """test late disabling""" # 3. # pylint: disable=E1102 # 4. print self.blip # 5. # pylint: disable=E1101 # 6. print self.bla # # E1102 should be disabled from line 1 to 6 while E1101 from line 5 to 6 # # this is necessary to disable locally messages applying to class / # function using their fromlineno if isinstance(node, (nodes.Module, nodes.Class, nodes.Function)) and node.body: firstchildlineno = node.body[0].fromlineno else: firstchildlineno = last for msgid, lines in msg_state.iteritems(): for lineno, state in lines.items(): if first <= lineno <= last: if lineno > firstchildlineno: state = True # set state for all lines for this block first, last = node.block_range(lineno) for line in xrange(first, last+1): # do not override existing entries if not line in self._module_msgs_state.get(msgid, ()): if line in lines: # state change in the same block state = lines[line] try: self._module_msgs_state[msgid][line] = state except KeyError: self._module_msgs_state[msgid] = {line: state} del lines[lineno] # code checking methods ################################################### def sort_checkers(self, checkers=None): if checkers is None: checkers = [checker for checkers in self._checkers.values() for checker in checkers] graph = {} cls_instance = {} for checker in checkers: graph[checker.__class__] = set(checker.needs_checkers) cls_instance[checker.__class__] = checker checkers = [cls_instance.get(cls) for cls in ordered_nodes(graph)] checkers.remove(self) checkers.insert(0, self) return checkers def _get_checkers(self): # compute checkers needed according to activated messages and reports neededcheckers = set() for checkers in self._checkers.values(): for checker in checkers: for msgid in checker.msgs: if self._msgs_state.get(msgid, True): neededcheckers.add(checker) break else: for reportid, _, _ in checker.reports: if self.is_report_enabled(reportid): neededcheckers.add(checker) break return self.sort_checkers(neededcheckers) def check(self, files_or_modules): """main checking entry: check a list of files or modules from their name. """ self.reporter.include_ids = self.config.include_ids if not isinstance(files_or_modules, (list, tuple)): files_or_modules = (files_or_modules,) checkers = self._get_checkers() rawcheckers = [] walker = PyLintASTWalker() # notify global begin for checker in checkers: checker.open() if implements(checker, IASTNGChecker): walker.add_checker(checker) if implements(checker, IRawChecker) and checker is not self: #XXX rawcheckers.append(checker) # build ast and check modules or packages for descr in self.expand_files(files_or_modules): modname, filepath = descr['name'], descr['path'] self.set_current_module(modname, filepath) # get the module representation astng = self.get_astng(filepath, modname) if astng is None: continue self.base_name = descr['basename'] self.base_file = descr['basepath'] if self.config.files_output: reportfile = 'pylint_%s.%s' % (modname, self.reporter.extension) self.reporter.set_output(open(reportfile, 'w')) self._ignore_file = False # fix the current file (if the source file was not available or # if it's actually a c extension) self.current_file = astng.file self.check_astng_module(astng, walker, rawcheckers) # notify global end self.set_current_module('') self.stats['statement'] = walker.nbstatements checkers.reverse() for checker in checkers: checker.close() def expand_files(self, modules): """get modules and errors from a list of modules and handle errors """ result, errors = expand_modules(modules, self.config.black_list) for error in errors: message = modname = error["mod"] key = error["key"] self.set_current_module(modname) if key == "F0001": message = str(error["ex"]).replace(os.getcwd() + os.sep, '') self.add_message(key, args=message) return result def set_current_module(self, modname, filepath=None): """set the name of the currently analyzed module and init statistics for it """ if not modname and filepath is None: return self.current_name = modname self.current_file = filepath or modname self.stats['by_module'][modname] = {} self.stats['by_module'][modname]['statement'] = 0 for msg_cat in MSG_TYPES.values(): self.stats['by_module'][modname][msg_cat] = 0 # XXX hack, to be correct we need to keep module_msgs_state # for every analyzed module (the problem stands with localized # messages which are only detected in the .close step) if modname: self._module_msgs_state = {} self._module_msg_cats_state = {} def get_astng(self, filepath, modname): """return a astng representation for a module""" try: return MANAGER.astng_from_file(filepath, modname) except SyntaxError, ex: self.add_message('E0001', line=ex.lineno, args=ex.msg) except KeyboardInterrupt: raise except Exception, ex: #if __debug__: # import traceback # traceback.print_exc() self.add_message('F0002', args=(ex.__class__, ex)) def check_astng_module(self, astng, walker, rawcheckers): """check a module from its astng representation, real work""" # call raw checkers if possible if not astng.pure_python: self.add_message('I0001', args=astng.name) else: #assert astng.file.endswith('.py') stream = norm_open(astng.file) # invoke IRawChecker interface on self to fetch module/block # level options self.process_module(stream) if self._ignore_file: return False # walk ast to collect line numbers orig_state = self._module_msgs_state.copy() self._module_msgs_state = {} self.collect_block_lines(astng, orig_state) for checker in rawcheckers: stream.seek(0) checker.process_module(stream) # generate events to astng checkers walker.walk(astng) return True # IASTNGChecker interface ################################################# def open(self): """initialize counters""" self.stats = { 'by_module' : {}, 'by_msg' : {}, } for msg_cat in MSG_TYPES.values(): self.stats[msg_cat] = 0 def close(self): """close the whole package /module, it's time to make reports ! if persistent run, pickle results for later comparison """ if self.base_name is not None: # load old results if any old_stats = config.load_results(self.base_name) if self.config.reports: self.make_reports(self.stats, old_stats) elif self.config.output_format == 'html': self.reporter.display_results(Section()) # save results if persistent run if self.config.persistent: config.save_results(self.stats, self.base_name) # specific reports ######################################################## def report_evaluation(self, sect, stats, old_stats): """make the global evaluation report""" # check with at least check 1 statements (usually 0 when there is a # syntax error preventing pylint from further processing) if stats['statement'] == 0: raise EmptyReport() # get a global note for the code evaluation = self.config.evaluation try: note = eval(evaluation, {}, self.stats) except Exception, ex: msg = 'An exception occurred while rating: %s' % ex else: stats['global_note'] = note msg = 'Your code has been rated at %.2f/10' % note if old_stats.has_key('global_note'): msg += ' (previous run: %.2f/10)' % old_stats['global_note'] if self.config.comment: msg = '%s\n%s' % (msg, config.get_note_message(note)) sect.append(Text(msg)) # some reporting functions #################################################### def report_total_messages_stats(sect, stats, old_stats): """make total errors / warnings report""" lines = ['type', 'number', 'previous', 'difference'] lines += table_lines_from_stats(stats, old_stats, ('convention', 'refactor', 'warning', 'error')) sect.append(Table(children=lines, cols=4, rheaders=1)) def report_messages_stats(sect, stats, _): """make messages type report""" if not stats['by_msg']: # don't print this report when we didn't detected any errors raise EmptyReport() in_order = [(value, msg_id) for msg_id, value in stats['by_msg'].items() if not msg_id.startswith('I')] in_order.sort() in_order.reverse() lines = ('message id', 'occurrences') for value, msg_id in in_order: lines += (msg_id, str(value)) sect.append(Table(children=lines, cols=2, rheaders=1)) def report_messages_by_module_stats(sect, stats, _): """make errors / warnings by modules report""" if len(stats['by_module']) == 1: # don't print this report when we are analysing a single module raise EmptyReport() by_mod = {} for m_type in ('fatal', 'error', 'warning', 'refactor', 'convention'): total = stats[m_type] for module in stats['by_module'].keys(): mod_total = stats['by_module'][module][m_type] if total == 0: percent = 0 else: percent = float((mod_total)*100) / total by_mod.setdefault(module, {})[m_type] = percent sorted_result = [] for module, mod_info in by_mod.items(): sorted_result.append((mod_info['error'], mod_info['warning'], mod_info['refactor'], mod_info['convention'], module)) sorted_result.sort() sorted_result.reverse() lines = ['module', 'error', 'warning', 'refactor', 'convention'] for line in sorted_result: if line[0] == 0 and line[1] == 0: break lines.append(line[-1]) for val in line[:-1]: lines.append('%.2f' % val) if len(lines) == 5: raise EmptyReport() sect.append(Table(children=lines, cols=5, rheaders=1)) # utilities ################################################################### # this may help to import modules using gettext try: __builtins__._ = str except AttributeError: __builtins__['_'] = str def preprocess_options(args, search_for): """look for some options (keys of ) which have to be processed before others values of are callback functions to call when the option is found """ i = 0 while i < len(args): arg = args[i] if arg.startswith('--'): try: option, val = arg[2:].split('=', 1) except ValueError: option, val = arg[2:], None try: cb, takearg = search_for[option] del args[i] if takearg and val is None: val = args[i] del args[i] cb(option, val) except KeyError: i += 1 else: i += 1 class Run: """helper class to use as main for pylint : run(*sys.argv[1:]) """ LinterClass = PyLinter option_groups = ( ('Commands', 'Options which are actually commands. Options in this \ group are mutually exclusive.'), ) def __init__(self, args, reporter=None, exit=True): self._rcfile = None self._plugins = [] preprocess_options(args, { # option: (callback, takearg) 'rcfile': (self.cb_set_rcfile, True), 'load-plugins': (self.cb_add_plugins, True), }) self.linter = linter = self.LinterClass(( ('rcfile', {'action' : 'callback', 'callback' : lambda *args: 1, 'type': 'string', 'metavar': '', 'help' : 'Specify a configuration file.'}), ('init-hook', {'action' : 'callback', 'type' : 'string', 'metavar': '', 'callback' : cb_init_hook, 'level': 1, 'help' : 'Python code to execute, usually for sys.path \ manipulation such as pygtk.require().'}), ('help-msg', {'action' : 'callback', 'type' : 'string', 'metavar': '', 'callback' : self.cb_help_message, 'group': 'Commands', 'help' : '''Display a help message for the given message id and \ exit. The value may be a comma separated list of message ids.'''}), ('list-msgs', {'action' : 'callback', 'metavar': '', 'callback' : self.cb_list_messages, 'group': 'Commands', 'level': 1, 'help' : "Generate pylint's messages."}), ('full-documentation', {'action' : 'callback', 'metavar': '', 'callback' : self.cb_full_documentation, 'group': 'Commands', 'level': 1, 'help' : "Generate pylint's full documentation."}), ('generate-rcfile', {'action' : 'callback', 'callback' : self.cb_generate_config, 'group': 'Commands', 'help' : '''Generate a sample configuration file according to \ the current configuration. You can put other options before this one to get \ them in the generated configuration.'''}), ('generate-man', {'action' : 'callback', 'callback' : self.cb_generate_manpage, 'group': 'Commands', 'help' : "Generate pylint's man page.",'hide': True}), ('errors-only', {'action' : 'callback', 'callback' : self.cb_error_mode, 'short': 'E', 'help' : '''In error mode, checkers without error messages are \ disabled and for others, only the ERROR messages are displayed, and no reports \ are done by default'''}), ('profile', {'type' : 'yn', 'metavar' : '', 'default': False, 'hide': True, 'help' : 'Profiled execution.'}), ), option_groups=self.option_groups, reporter=reporter, pylintrc=self._rcfile) # register standard checkers from pylint import checkers checkers.initialize(linter) # load command line plugins linter.load_plugin_modules(self._plugins) # add some help section linter.add_help_section('Environment variables', config.ENV_HELP, level=1) linter.add_help_section('Output', ''' Using the default text output, the message format is : MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE There are 5 kind of message types : * (C) convention, for programming standard violation * (R) refactor, for bad code smell * (W) warning, for python specific problems * (E) error, for probable bugs in the code * (F) fatal, if an error occurred which prevented pylint from doing further processing. ''', level=1) linter.add_help_section('Output status code', ''' Pylint should leave with following status code: * 0 if everything went fine * 1 if a fatal message was issued * 2 if an error message was issued * 4 if a warning message was issued * 8 if a refactor message was issued * 16 if a convention message was issued * 32 on usage error status 1 to 16 will be bit-ORed so you can know which different categories has been issued by analysing pylint output status code ''', level=1) # read configuration linter.disable('W0704') linter.read_config_file() # is there some additional plugins in the file configuration, in config_parser = linter.cfgfile_parser if config_parser.has_option('MASTER', 'load-plugins'): plugins = splitstrip(config_parser.get('MASTER', 'load-plugins')) linter.load_plugin_modules(plugins) # now we can load file config and command line, plugins (which can # provide options) have been registered linter.load_config_file() if reporter: # if a custom reporter is provided as argument, it may be overridden # by file parameters, so re-set it here, but before command line # parsing so it's still overrideable by command line option linter.set_reporter(reporter) args = linter.load_command_line_configuration(args) if not args: print linter.help() sys.exit(32) # insert current working directory to the python path to have a correct # behaviour sys.path.insert(0, os.getcwd()) if self.linter.config.profile: print >> sys.stderr, '** profiled run' from hotshot import Profile, stats prof = Profile('stones.prof') prof.runcall(linter.check, args) prof.close() data = stats.load('stones.prof') data.strip_dirs() data.sort_stats('time', 'calls') data.print_stats(30) else: linter.check(args) sys.path.pop(0) if exit: sys.exit(self.linter.msg_status) def cb_set_rcfile(self, name, value): """callback for option preprocessing (i.e. before optik parsing)""" self._rcfile = value def cb_add_plugins(self, name, value): """callback for option preprocessing (i.e. before optik parsing)""" self._plugins.extend(splitstrip(value)) def cb_error_mode(self, *args, **kwargs): """error mode: * disable all but error messages * disable the 'miscellaneous' checker which can be safely deactivated in debug * disable reports * do not save execution information """ self.linter.disable_noerror_messages() self.linter.disable('miscellaneous') self.linter.set_option('reports', False) self.linter.set_option('persistent', False) def cb_generate_config(self, *args, **kwargs): """optik callback for sample config file generation""" self.linter.generate_config(skipsections=('COMMANDS',)) sys.exit(0) def cb_generate_manpage(self, *args, **kwargs): """optik callback for sample config file generation""" from pylint import __pkginfo__ self.linter.generate_manpage(__pkginfo__) sys.exit(0) def cb_help_message(self, option, optname, value, parser): """optik callback for printing some help about a particular message""" self.linter.help_message(splitstrip(value)) sys.exit(0) def cb_full_documentation(self, option, optname, value, parser): """optik callback for printing full documentation""" self.linter.print_full_documentation() sys.exit(0) def cb_list_messages(self, option, optname, value, parser): # FIXME """optik callback for printing available messages""" self.linter.list_messages() sys.exit(0) def cb_init_hook(option, optname, value, parser): """exec arbitrary code to set sys.path for instance""" exec value if __name__ == '__main__': Run(sys.argv[1:]) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/0000755000175000017500000000000011242100540032407 5ustar andreasandreas././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/__init0000644000175000017500000000000111242100540033562 0ustar andreasandreas ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000755000175000017500000000000011242100540033620 5ustar andreasandreas././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/pytest.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000006625311242100540033636 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """pytest is a tool that eases test running and debugging. To be able to use pytest, you should either write tests using the logilab.common.testlib's framework or the unittest module of the Python's standard library. You can customize pytest's behaviour by defining a ``pytestconf.py`` file somewhere in your test directory. In this file, you can add options or change the way tests are run. To add command line options, you must define a ``update_parser`` function in your ``pytestconf.py`` file. The function must accept a single parameter that will be the OptionParser's instance to customize. If you wish to customize the tester, you'll have to define a class named ``CustomPyTester``. This class should extend the default `PyTester` class defined in the pytest module. Take a look at the `PyTester` and `DjangoTester` classes for more information about what can be done. For instance, if you wish to add a custom -l option to specify a loglevel, you could define the following ``pytestconf.py`` file :: import logging from logilab.common.pytest import PyTester def update_parser(parser): parser.add_option('-l', '--loglevel', dest='loglevel', action='store', choices=('debug', 'info', 'warning', 'error', 'critical'), default='critical', help="the default log level possible choices are " "('debug', 'info', 'warning', 'error', 'critical')") return parser class CustomPyTester(PyTester): def __init__(self, cvg, options): super(CustomPyTester, self).__init__(cvg, options) loglevel = options.loglevel.upper() logger = logging.getLogger('erudi') logger.setLevel(logging.getLevelName(loglevel)) In your TestCase class you can then get the value of a specific option with the ``optval`` method:: class MyTestCase(TestCase): def test_foo(self): loglevel = self.optval('loglevel') # ... You can also tag your tag your test for fine filtering With those tag:: from logilab.common.testlib import tag, TestCase class Exemple(TestCase): @tag('rouge', 'carre') def toto(self): pass @tag('carre', 'vert') def tata(self): pass @tag('rouge') def titi(test): pass you can filter the function with a simple python expression * ``toto`` and ``titi`` match ``rouge`` * ``toto``, ``tata`` and ``titi``, match ``rouge or carre`` * ``tata`` and ``titi`` match``rouge ^ carre`` * ``titi`` match ``rouge and not carre`` """ __docformat__ = "restructuredtext en" PYTEST_DOC = """%prog [OPTIONS] [testfile [testpattern]] examples: pytest path/to/mytests.py pytest path/to/mytests.py TheseTests pytest path/to/mytests.py TheseTests.test_thisone pytest path/to/mytests.py -m '(not long and database) or regr' pytest one (will run both test_thisone and test_thatone) pytest path/to/mytests.py -s not (will skip test_notthisone) pytest --coverage test_foo.py (only if logilab.devtools is available) """ import os, sys, re import os.path as osp from time import time, clock import warnings from logilab.common.fileutils import abspath_listdir from logilab.common import testlib, STD_BLACKLIST import doctest import unittest import imp try: import django from logilab.common.modutils import modpath_from_file, load_module_from_modpath DJANGO_FOUND = True except ImportError: DJANGO_FOUND = False CONF_FILE = 'pytestconf.py' ## coverage hacks, do not read this, do not read this, do not read this # hey, but this is an aspect, right ?!!! class TraceController(object): nesting = 0 def pause_tracing(cls): if not cls.nesting: cls.tracefunc = staticmethod(getattr(sys, '__settrace__', sys.settrace)) cls.oldtracer = getattr(sys, '__tracer__', None) sys.__notrace__ = True cls.tracefunc(None) cls.nesting += 1 pause_tracing = classmethod(pause_tracing) def resume_tracing(cls): cls.nesting -= 1 assert cls.nesting >= 0 if not cls.nesting: cls.tracefunc(cls.oldtracer) delattr(sys, '__notrace__') resume_tracing = classmethod(resume_tracing) pause_tracing = TraceController.pause_tracing resume_tracing = TraceController.resume_tracing def nocoverage(func): if hasattr(func, 'uncovered'): return func func.uncovered = True def not_covered(*args, **kwargs): pause_tracing() try: return func(*args, **kwargs) finally: resume_tracing() not_covered.uncovered = True return not_covered ## end of coverage hacks # monkeypatch unittest and doctest (ouch !) unittest.TestCase = testlib.TestCase unittest.main = testlib.unittest_main unittest._TextTestResult = testlib.SkipAwareTestResult unittest.TextTestRunner = testlib.SkipAwareTextTestRunner unittest.TestLoader = testlib.NonStrictTestLoader unittest.TestProgram = testlib.SkipAwareTestProgram if sys.version_info >= (2, 4): doctest.DocTestCase.__bases__ = (testlib.TestCase,) else: unittest.FunctionTestCase.__bases__ = (testlib.TestCase,) TESTFILE_RE = re.compile("^((unit)?test.*|smoketest)\.py$") def this_is_a_testfile(filename): """returns True if `filename` seems to be a test file""" return TESTFILE_RE.match(osp.basename(filename)) TESTDIR_RE = re.compile("^(unit)?tests?$") def this_is_a_testdir(dirpath): """returns True if `filename` seems to be a test directory""" return TESTDIR_RE.match(osp.basename(dirpath)) def load_pytest_conf(path, parser): """loads a ``pytestconf.py`` file and update default parser and / or tester. """ namespace = {} execfile(path, namespace) if 'update_parser' in namespace: namespace['update_parser'](parser) return namespace.get('CustomPyTester', PyTester) def project_root(parser, projdir=os.getcwd()): """try to find project's root and add it to sys.path""" previousdir = curdir = osp.abspath(projdir) testercls = PyTester conf_file_path = osp.join(curdir, CONF_FILE) if osp.isfile(conf_file_path): testercls = load_pytest_conf(conf_file_path, parser) while this_is_a_testdir(curdir) or \ osp.isfile(osp.join(curdir, '__init__.py')): newdir = osp.normpath(osp.join(curdir, os.pardir)) if newdir == curdir: break previousdir = curdir curdir = newdir conf_file_path = osp.join(curdir, CONF_FILE) if osp.isfile(conf_file_path): testercls = load_pytest_conf(conf_file_path, parser) return previousdir, testercls class GlobalTestReport(object): """this class holds global test statistics""" def __init__(self): self.ran = 0 self.skipped = 0 self.failures = 0 self.errors = 0 self.ttime = 0 self.ctime = 0 self.modulescount = 0 self.errmodules = [] def feed(self, filename, testresult, ttime, ctime): """integrates new test information into internal statistics""" ran = testresult.testsRun self.ran += ran self.skipped += len(getattr(testresult, 'skipped', ())) self.failures += len(testresult.failures) self.errors += len(testresult.errors) self.ttime += ttime self.ctime += ctime self.modulescount += 1 if not testresult.wasSuccessful(): problems = len(testresult.failures) + len(testresult.errors) self.errmodules.append((filename[:-3], problems, ran)) def failed_to_test_module(self, filename): """called when the test module could not be imported by unittest """ self.errors += 1 self.modulescount += 1 self.ran += 1 self.errmodules.append((filename[:-3], 1, 1)) def skip_module(self, filename): self.modulescount += 1 self.ran += 1 self.errmodules.append((filename[:-3], 0, 0)) def __str__(self): """this is just presentation stuff""" line1 = ['Ran %s test cases in %.2fs (%.2fs CPU)' % (self.ran, self.ttime, self.ctime)] if self.errors: line1.append('%s errors' % self.errors) if self.failures: line1.append('%s failures' % self.failures) if self.skipped: line1.append('%s skipped' % self.skipped) modulesok = self.modulescount - len(self.errmodules) if self.errors or self.failures: line2 = '%s modules OK (%s failed)' % (modulesok, len(self.errmodules)) descr = ', '.join(['%s [%s/%s]' % info for info in self.errmodules]) line3 = '\nfailures: %s' % descr elif modulesok: line2 = 'All %s modules OK' % modulesok line3 = '' else: return '' return '%s\n%s%s' % (', '.join(line1), line2, line3) def remove_local_modules_from_sys(testdir): """remove all modules from cache that come from `testdir` This is used to avoid strange side-effects when using the testall() mode of pytest. For instance, if we run pytest on this tree:: A/test/test_utils.py B/test/test_utils.py we **have** to clean sys.modules to make sure the correct test_utils module is ran in B """ for modname, mod in sys.modules.items(): if mod is None: continue if not hasattr(mod, '__file__'): # this is the case of some built-in modules like sys, imp, marshal continue modfile = mod.__file__ # if modfile is not an absolute path, it was probably loaded locally # during the tests if not osp.isabs(modfile) or modfile.startswith(testdir): del sys.modules[modname] class PyTester(object): """encapsulates testrun logic""" def __init__(self, cvg, options): self.report = GlobalTestReport() self.cvg = cvg self.options = options self.firstwrite = True self._errcode = None def show_report(self): """prints the report and returns appropriate exitcode""" # everything has been ran, print report print "*" * 79 print self.report def get_errcode(self): # errcode set explicitly if self._errcode is not None: return self._errcode return self.report.failures + self.report.errors def set_errcode(self, errcode): self._errcode = errcode errcode = property(get_errcode, set_errcode) def testall(self, exitfirst=False): """walks through current working directory, finds something which can be considered as a testdir and runs every test there """ here = os.getcwd() for dirname, dirs, _ in os.walk(here): for skipped in STD_BLACKLIST: if skipped in dirs: dirs.remove(skipped) basename = osp.basename(dirname) if this_is_a_testdir(basename): print "going into", dirname # we found a testdir, let's explore it ! if not self.testonedir(dirname, exitfirst): break dirs[:] = [] if self.report.ran == 0: print "no test dir found testing here:", here # if no test was found during the visit, consider # the local directory as a test directory even if # it doesn't have a traditional test directory name self.testonedir(here) def testonedir(self, testdir, exitfirst=False): """finds each testfile in the `testdir` and runs it return true when all tests has been executed, false if exitfirst and some test has failed. """ for filename in abspath_listdir(testdir): if this_is_a_testfile(filename): if self.options.exitfirst and not self.options.restart: # overwrite restart file try: restartfile = open(testlib.FILE_RESTART, "w") restartfile.close() except Exception, e: print >> sys.__stderr__, "Error while overwriting \ succeeded test file :", osp.join(os.getcwd(),testlib.FILE_RESTART) raise e # run test and collect information prog = self.testfile(filename, batchmode=True) if exitfirst and (prog is None or not prog.result.wasSuccessful()): return False self.firstwrite = True # clean local modules remove_local_modules_from_sys(testdir) return True def testfile(self, filename, batchmode=False): """runs every test in `filename` :param filename: an absolute path pointing to a unittest file """ here = os.getcwd() dirname = osp.dirname(filename) if dirname: os.chdir(dirname) # overwrite restart file if it has not been done already if self.options.exitfirst and not self.options.restart and self.firstwrite: try: restartfile = open(testlib.FILE_RESTART, "w") restartfile.close() except Exception, e: print >> sys.__stderr__, "Error while overwriting \ succeeded test file :", osp.join(os.getcwd(),testlib.FILE_RESTART) raise e modname = osp.basename(filename)[:-3] try: print >> sys.stderr, (' %s ' % osp.basename(filename)).center(70, '=') except TypeError: # < py 2.4 bw compat print >> sys.stderr, (' %s ' % osp.basename(filename)).center(70) try: tstart, cstart = time(), clock() try: testprog = testlib.unittest_main(modname, batchmode=batchmode, cvg=self.cvg, options=self.options, outstream=sys.stderr) except KeyboardInterrupt: raise except SystemExit, exc: self.errcode = exc.code raise except testlib.SkipTest: print "Module skipped:", filename self.report.skip_module(filename) return None except Exception: self.report.failed_to_test_module(filename) print >> sys.stderr, 'unhandled exception occurred while testing', modname import traceback traceback.print_exc(file=sys.stderr) return None tend, cend = time(), clock() ttime, ctime = (tend - tstart), (cend - cstart) self.report.feed(filename, testprog.result, ttime, ctime) return testprog finally: if dirname: os.chdir(here) class DjangoTester(PyTester): def load_django_settings(self, dirname): """try to find project's setting and load it""" curdir = osp.abspath(dirname) previousdir = curdir while not osp.isfile(osp.join(curdir, 'settings.py')) and \ osp.isfile(osp.join(curdir, '__init__.py')): newdir = osp.normpath(osp.join(curdir, os.pardir)) if newdir == curdir: raise AssertionError('could not find settings.py') previousdir = curdir curdir = newdir # late django initialization settings = load_module_from_modpath(modpath_from_file(osp.join(curdir, 'settings.py'))) from django.core.management import setup_environ setup_environ(settings) settings.DEBUG = False self.settings = settings # add settings dir to pythonpath since it's the project's root if curdir not in sys.path: sys.path.insert(1, curdir) def before_testfile(self): # Those imports must be done **after** setup_environ was called from django.test.utils import setup_test_environment from django.test.utils import create_test_db setup_test_environment() create_test_db(verbosity=0) self.dbname = self.settings.TEST_DATABASE_NAME def after_testfile(self): # Those imports must be done **after** setup_environ was called from django.test.utils import teardown_test_environment from django.test.utils import destroy_test_db teardown_test_environment() print 'destroying', self.dbname destroy_test_db(self.dbname, verbosity=0) def testall(self, exitfirst=False): """walks through current working directory, finds something which can be considered as a testdir and runs every test there """ for dirname, dirs, files in os.walk(os.getcwd()): for skipped in ('CVS', '.svn', '.hg'): if skipped in dirs: dirs.remove(skipped) if 'tests.py' in files: if not self.testonedir(dirname, exitfirst): break dirs[:] = [] else: basename = osp.basename(dirname) if basename in ('test', 'tests'): print "going into", dirname # we found a testdir, let's explore it ! if not self.testonedir(dirname, exitfirst): break dirs[:] = [] def testonedir(self, testdir, exitfirst=False): """finds each testfile in the `testdir` and runs it return true when all tests has been executed, false if exitfirst and some test has failed. """ # special django behaviour : if tests are splitted in several files, # remove the main tests.py file and tests each test file separately testfiles = [fpath for fpath in abspath_listdir(testdir) if this_is_a_testfile(fpath)] if len(testfiles) > 1: try: testfiles.remove(osp.join(testdir, 'tests.py')) except ValueError: pass for filename in testfiles: # run test and collect information prog = self.testfile(filename, batchmode=True) if exitfirst and (prog is None or not prog.result.wasSuccessful()): return False # clean local modules remove_local_modules_from_sys(testdir) return True def testfile(self, filename, batchmode=False): """runs every test in `filename` :param filename: an absolute path pointing to a unittest file """ here = os.getcwd() dirname = osp.dirname(filename) if dirname: os.chdir(dirname) self.load_django_settings(dirname) modname = osp.basename(filename)[:-3] print >>sys.stderr, (' %s ' % osp.basename(filename)).center(70, '=') try: try: tstart, cstart = time(), clock() self.before_testfile() testprog = testlib.unittest_main(modname, batchmode=batchmode, cvg=self.cvg) tend, cend = time(), clock() ttime, ctime = (tend - tstart), (cend - cstart) self.report.feed(filename, testprog.result, ttime, ctime) return testprog except SystemExit: raise except Exception, exc: import traceback traceback.print_exc() self.report.failed_to_test_module(filename) print 'unhandled exception occurred while testing', modname print 'error: %s' % exc return None finally: self.after_testfile() if dirname: os.chdir(here) def make_parser(): """creates the OptionParser instance """ from optparse import OptionParser parser = OptionParser(usage=PYTEST_DOC) parser.newargs = [] def rebuild_cmdline(option, opt, value, parser): """carry the option to unittest_main""" parser.newargs.append(opt) def rebuild_and_store(option, opt, value, parser): """carry the option to unittest_main and store the value on current parser """ parser.newargs.append(opt) setattr(parser.values, option.dest, True) def capture_and_rebuild(option, opt, value, parser): warnings.simplefilter('ignore', DeprecationWarning) rebuild_cmdline(option, opt, value, parser) # pytest options parser.add_option('-t', dest='testdir', default=None, help="directory where the tests will be found") parser.add_option('-d', dest='dbc', default=False, action="store_true", help="enable design-by-contract") # unittest_main options provided and passed through pytest parser.add_option('-v', '--verbose', callback=rebuild_cmdline, action="callback", help="Verbose output") parser.add_option('-i', '--pdb', callback=rebuild_and_store, dest="pdb", action="callback", help="Enable test failure inspection (conflicts with --coverage)") parser.add_option('-x', '--exitfirst', callback=rebuild_and_store, dest="exitfirst", default=False, action="callback", help="Exit on first failure " "(only make sense when pytest run one test file)") parser.add_option('-R', '--restart', callback=rebuild_and_store, dest="restart", default=False, action="callback", help="Restart tests from where it failed (implies exitfirst) " "(only make sense if tests previously ran with exitfirst only)") parser.add_option('-c', '--capture', callback=capture_and_rebuild, action="callback", help="Captures and prints standard out/err only on errors " "(only make sense when pytest run one test file)") parser.add_option('--color', callback=rebuild_cmdline, action="callback", help="colorize tracebacks") parser.add_option('-p', '--printonly', # XXX: I wish I could use the callback action but it # doesn't seem to be able to get the value # associated to the option action="store", dest="printonly", default=None, help="Only prints lines matching specified pattern (implies capture) " "(only make sense when pytest run one test file)") parser.add_option('-s', '--skip', # XXX: I wish I could use the callback action but it # doesn't seem to be able to get the value # associated to the option action="store", dest="skipped", default=None, help="test names matching this name will be skipped " "to skip several patterns, use commas") parser.add_option('-q', '--quiet', callback=rebuild_cmdline, action="callback", help="Minimal output") parser.add_option('-P', '--profile', default=None, dest='profile', help="Profile execution and store data in the given file") parser.add_option('-m', '--match', default=None, dest='tags_pattern', help="only execute test whose tag match the current pattern") try: from logilab.devtools.lib.coverage import Coverage parser.add_option('--coverage', dest="coverage", default=False, action="store_true", help="run tests with pycoverage (conflicts with --pdb)") except ImportError: pass if DJANGO_FOUND: parser.add_option('-J', '--django', dest='django', default=False, action="store_true", help='use pytest for django test cases') return parser def parseargs(parser): """Parse the command line and return (options processed), (options to pass to unittest_main()), (explicitfile or None). """ # parse the command line options, args = parser.parse_args() if options.pdb and getattr(options, 'coverage', False): parser.error("'pdb' and 'coverage' options are exclusive") filenames = [arg for arg in args if arg.endswith('.py')] if filenames: if len(filenames) > 1: parser.error("only one filename is acceptable") explicitfile = filenames[0] args.remove(explicitfile) else: explicitfile = None # someone wants DBC testlib.ENABLE_DBC = options.dbc newargs = parser.newargs if options.printonly: newargs.extend(['--printonly', options.printonly]) if options.skipped: newargs.extend(['--skip', options.skipped]) # restart implies exitfirst if options.restart: options.exitfirst = True # append additional args to the new sys.argv and let unittest_main # do the rest newargs += args return options, explicitfile def run(): parser = make_parser() rootdir, testercls = project_root(parser) options, explicitfile = parseargs(parser) # mock a new command line sys.argv[1:] = parser.newargs covermode = getattr(options, 'coverage', None) cvg = None if not '' in sys.path: sys.path.insert(0, '') if covermode: # control_import_coverage(rootdir) from logilab.devtools.lib.coverage import Coverage cvg = Coverage([rootdir]) cvg.erase() cvg.start() if DJANGO_FOUND and options.django: tester = DjangoTester(cvg, options) else: tester = testercls(cvg, options) if explicitfile: cmd, args = tester.testfile, (explicitfile,) elif options.testdir: cmd, args = tester.testonedir, (options.testdir, options.exitfirst) else: cmd, args = tester.testall, (options.exitfirst,) try: try: if options.profile: import hotshot prof = hotshot.Profile(options.profile) prof.runcall(cmd, *args) prof.close() print 'profile data saved in', options.profile else: cmd(*args) except SystemExit: raise except: import traceback traceback.print_exc() finally: if covermode: cvg.stop() cvg.save() tester.show_report() if covermode: print 'coverage information stored, use it with pycoverage -ra' sys.exit(tester.errcode) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001105111242100540033620 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Logilab common library (aka Logilab's extension to the standard library). :type STD_BLACKLIST: tuple :var STD_BLACKLIST: directories ignored by default by the functions in this package which have to recurse into directories :type IGNORED_EXTENSIONS: tuple :var IGNORED_EXTENSIONS: file extensions that may usually be ignored """ __docformat__ = "restructuredtext en" from logilab.common.__pkginfo__ import version as __version__ STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build') IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc', '~', '.swp', '.orig') # set this to False if you've mx DateTime installed but you don't want your db # adapter to use it (should be set before you got a connection) USE_MX_DATETIME = True class attrdict(dict): """A dictionary for which keys are also accessible as attributes.""" def __getattr__(self, attr): try: return self[attr] except KeyError: raise AttributeError(attr) class dictattr(dict): def __init__(self, proxy): self.__proxy = proxy def __getitem__(self, attr): try: return getattr(self.__proxy, attr) except AttributeError: raise KeyError(attr) class nullobject(object): def __repr__(self): return '' def __nonzero__(self): return False # flatten ----- # XXX move in a specific module and use yield instead # do not mix flatten and translate # # def iterable(obj): # try: iter(obj) # except: return False # return True # # def is_string_like(obj): # try: obj +'' # except (TypeError, ValueError): return False # return True # #def is_scalar(obj): # return is_string_like(obj) or not iterable(obj) # #def flatten(seq): # for item in seq: # if is_scalar(item): # yield item # else: # for subitem in flatten(item): # yield subitem def flatten(iterable, tr_func=None, results=None): """Flatten a list of list with any level. If tr_func is not None, it should be a one argument function that'll be called on each final element. :rtype: list >>> flatten([1, [2, 3]]) [1, 2, 3] """ if results is None: results = [] for val in iterable: if isinstance(val, (list, tuple)): flatten(val, tr_func, results) elif tr_func is None: results.append(val) else: results.append(tr_func(val)) return results # XXX is function below still used ? def make_domains(lists): """ Given a list of lists, return a list of domain for each list to produce all combinations of possibles values. :rtype: list Example: >>> make_domains(['a', 'b'], ['c','d', 'e']) [['a', 'b', 'a', 'b', 'a', 'b'], ['c', 'c', 'd', 'd', 'e', 'e']] """ domains = [] for iterable in lists: new_domain = iterable[:] for i in range(len(domains)): domains[i] = domains[i]*len(iterable) if domains: missing = (len(domains[0]) - len(iterable)) / len(iterable) i = 0 for j in range(len(iterable)): value = iterable[j] for dummy in range(missing): new_domain.insert(i, value) i += 1 i += 1 domains.append(new_domain) return domains # private stuff ################################################################ def _handle_blacklist(blacklist, dirnames, filenames): """remove files/directories in the black list dirnames/filenames are usually from os.walk """ for norecurs in blacklist: if norecurs in dirnames: dirnames.remove(norecurs) elif norecurs in filenames: filenames.remove(norecurs) ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/pdf_ext.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000563611242100540033634 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Manipulate pdf and fdf files (pdftk recommended). Notes regarding pdftk, pdf forms and fdf files (form definition file) fields names can be extracted with: pdftk orig.pdf generate_fdf output truc.fdf to merge fdf and pdf: pdftk orig.pdf fill_form test.fdf output result.pdf [flatten] without flatten, one could further edit the resulting form. with flatten, everything is turned into text. """ __docformat__ = "restructuredtext en" # XXX seems very unix specific # TODO: check availability of pdftk at import import os HEAD="""%FDF-1.2 %\xE2\xE3\xCF\xD3 1 0 obj << /FDF << /Fields [ """ TAIL="""] >> >> endobj trailer << /Root 1 0 R >> %%EOF """ def output_field( f ): return "\xfe\xff" + "".join( [ "\x00"+c for c in f ] ) def extract_keys(lines): keys = [] for line in lines: if line.startswith('/V'): pass #print 'value',line elif line.startswith('/T'): key = line[7:-2] key = ''.join(key.split('\x00')) keys.append( key ) return keys def write_field(out, key, value): out.write("<<\n") if value: out.write("/V (%s)\n" %value) else: out.write("/V /\n") out.write("/T (%s)\n" % output_field(key) ) out.write(">> \n") def write_fields(out, fields): out.write(HEAD) for (key,value,comment) in fields: write_field(out, key, value) write_field(out, key+"a", value) # pour copie-carbone sur autres pages out.write(TAIL) def extract_keys_from_pdf(filename): # what about using 'pdftk filename dump_data_fields' and parsing the output ? os.system('pdftk %s generate_fdf output /tmp/toto.fdf' % filename) lines = file('/tmp/toto.fdf').readlines() return extract_keys(lines) def fill_pdf(infile, outfile, fields): write_fields(file('/tmp/toto.fdf', 'w'), fields) os.system('pdftk %s fill_form /tmp/toto.fdf output %s flatten' % (infile, outfile)) def testfill_pdf(infile, outfile): keys = extract_keys_from_pdf(infile) fields = [] for key in keys: fields.append( (key, key, '') ) fill_pdf(infile, outfile, fields) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/modutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000005240311242100540033626 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Python modules manipulation utility functions. :type PY_SOURCE_EXTS: tuple(str) :var PY_SOURCE_EXTS: list of possible python source file extension :type STD_LIB_DIR: str :var STD_LIB_DIR: directory where standard modules are located :type BUILTIN_MODULES: dict :var BUILTIN_MODULES: dictionary with builtin module names has key """ __docformat__ = "restructuredtext en" import sys import os from os.path import splitext, join, abspath, isdir, dirname, exists, basename from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY from distutils.sysconfig import get_config_var, get_python_lib, get_python_version try: import zipimport except ImportError: zipimport = None ZIPFILE = object() from logilab.common import STD_BLACKLIST, _handle_blacklist # Notes about STD_LIB_DIR # Consider arch-specific installation for STD_LIB_DIR definition # :mod:`distutils.sysconfig` contains to much hardcoded values to rely on # # :see: `Problems with /usr/lib64 builds `_ # :see: `FHS `_ if sys.platform.startswith('win'): PY_SOURCE_EXTS = ('py', 'pyw') PY_COMPILED_EXTS = ('dll', 'pyd') STD_LIB_DIR = get_python_lib(standard_lib=1) else: PY_SOURCE_EXTS = ('py',) PY_COMPILED_EXTS = ('so',) # extend lib dir with some arch-dependant paths STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version()) BUILTIN_MODULES = dict(zip(sys.builtin_module_names, [1]*len(sys.builtin_module_names))) class NoSourceFile(Exception): """exception raised when we are not able to get a python source file for a precompiled file """ class LazyObject(object): def __init__(self, module, obj): self.module = module self.obj = obj self._imported = None def __getobj(self): if self._imported is None: self._imported = getattr(load_module_from_name(self.module), self.obj) return self._imported def __getattribute__(self, attr): try: return super(LazyObject, self).__getattribute__(attr) except AttributeError, ex: return getattr(self.__getobj(), attr) def __call__(self, *args, **kwargs): return self.__getobj()(*args, **kwargs) def load_module_from_name(dotted_name, path=None, use_sys=1): """Load a Python module from it's name. :type dotted_name: str :param dotted_name: python name of a module or package :type path: list or None :param path: optional list of path where the module or package should be searched (use sys.path if nothing or None is given) :type use_sys: bool :param use_sys: boolean indicating whether the sys.modules dictionary should be used or not :raise ImportError: if the module or package is not found :rtype: module :return: the loaded module """ return load_module_from_modpath(dotted_name.split('.'), path, use_sys) def load_module_from_modpath(parts, path=None, use_sys=1): """Load a python module from it's splitted name. :type parts: list(str) or tuple(str) :param parts: python name of a module or package splitted on '.' :type path: list or None :param path: optional list of path where the module or package should be searched (use sys.path if nothing or None is given) :type use_sys: bool :param use_sys: boolean indicating whether the sys.modules dictionary should be used or not :raise ImportError: if the module or package is not found :rtype: module :return: the loaded module """ if use_sys: try: return sys.modules['.'.join(parts)] except KeyError: pass modpath = [] prevmodule = None for part in parts: modpath.append(part) curname = '.'.join(modpath) module = None if len(modpath) != len(parts): # even with use_sys=False, should try to get outer packages from sys.modules module = sys.modules.get(curname) if module is None: mp_file, mp_filename, mp_desc = find_module(part, path) module = load_module(curname, mp_file, mp_filename, mp_desc) if prevmodule: setattr(prevmodule, part, module) _file = getattr(module, '__file__', '') if not _file and len(modpath) != len(parts): raise ImportError('no module in %s' % '.'.join(parts[len(modpath):]) ) path = [dirname( _file )] prevmodule = module return module def load_module_from_file(filepath, path=None, use_sys=1, extrapath=None): """Load a Python module from it's path. :type filepath: str :param filepath: path to the python module or package :type path: list or None :param path: optional list of path where the module or package should be searched (use sys.path if nothing or None is given) :type use_sys: bool :param use_sys: boolean indicating whether the sys.modules dictionary should be used or not :raise ImportError: if the module or package is not found :rtype: module :return: the loaded module """ modpath = modpath_from_file(filepath, extrapath) return load_module_from_modpath(modpath, path, use_sys) def _check_init(path, mod_path): """check there are some __init__.py all along the way""" for part in mod_path: path = join(path, part) if not _has_init(path): return False return True def modpath_from_file(filename, extrapath=None): """given a file path return the corresponding splitted module's name (i.e name of a module or package splitted on '.') :type filename: str :param filename: file's path for which we want the module's name :type extrapath: dict :param extrapath: optional extra search path, with path as key and package name for the path as value. This is usually useful to handle package splitted in multiple directories using __path__ trick. :raise ImportError: if the corresponding module's name has not been found :rtype: list(str) :return: the corresponding splitted module's name """ base = splitext(abspath(filename))[0] if extrapath is not None: for path_ in extrapath: path = abspath(path_) if path and base[:len(path)] == path: submodpath = [pkg for pkg in base[len(path):].split(os.sep) if pkg] if _check_init(path, submodpath[:-1]): return extrapath[path_].split('.') + submodpath for path in sys.path: path = abspath(path) if path and base[:len(path)] == path: if filename.find('site-packages') != -1 and \ path.find('site-packages') == -1: continue modpath = [pkg for pkg in base[len(path):].split(os.sep) if pkg] if _check_init(path, modpath[:-1]): return modpath raise ImportError('Unable to find module for %s in %s' % ( filename, ', \n'.join(sys.path))) def file_from_modpath(modpath, path=None, context_file=None): """given a mod path (i.e. splitted module / package name), return the corresponding file, giving priority to source file over precompiled file if it exists :type modpath: list or tuple :param modpath: splitted module's name (i.e name of a module or package splitted on '.') (this means explicit relative imports that start with dots have empty strings in this list!) :type path: list or None :param path: optional list of path where the module or package should be searched (use sys.path if nothing or None is given) :type context_file: str or None :param context_file: context file to consider, necessary if the identifier has been introduced using a relative import unresolvable in the actual context (i.e. modutils) :raise ImportError: if there is no such module in the directory :rtype: str or None :return: the path to the module's file or None if it's an integrated builtin module such as 'sys' """ if context_file is not None: context = dirname(context_file) else: context = context_file if modpath[0] == 'xml': # handle _xmlplus try: return _file_from_modpath(['_xmlplus'] + modpath[1:], path, context) except ImportError: return _file_from_modpath(modpath, path, context) elif modpath == ['os', 'path']: # FIXME: currently ignoring search_path... return os.path.__file__ return _file_from_modpath(modpath, path, context) def get_module_part(dotted_name, context_file=None): """given a dotted name return the module part of the name : >>> get_module_part('logilab.common.modutils.get_module_part') 'logilab.common.modutils' :type dotted_name: str :param dotted_name: full name of the identifier we are interested in :type context_file: str or None :param context_file: context file to consider, necessary if the identifier has been introduced using a relative import unresolvable in the actual context (i.e. modutils) :raise ImportError: if there is no such module in the directory :rtype: str or None :return: the module part of the name or None if we have not been able at all to import the given name XXX: deprecated, since it doesn't handle package precedence over module (see #10066) """ # os.path trick if dotted_name.startswith('os.path'): return 'os.path' parts = dotted_name.split('.') if context_file is not None: # first check for builtin module which won't be considered latter # in that case (path != None) if parts[0] in BUILTIN_MODULES: if len(parts) > 2: raise ImportError(dotted_name) return parts[0] # don't use += or insert, we want a new list to be created ! path = None starti = 0 if parts[0] == '': assert context_file is not None, \ 'explicit relative import, but no context_file?' path = [] # prevent resolving the import non-relatively starti = 1 while parts[starti] == '': # for all further dots: change context starti += 1 context_file = dirname(context_file) for i in range(starti, len(parts)): try: file_from_modpath(parts[starti:i+1], path=path, context_file=context_file) except ImportError: if not i >= max(1, len(parts) - 2): raise return '.'.join(parts[:i]) return dotted_name def get_modules(package, src_directory, blacklist=STD_BLACKLIST): """given a package directory return a list of all available python modules in the package and its subpackages :type package: str :param package: the python name for the package :type src_directory: str :param src_directory: path of the directory corresponding to the package :type blacklist: list or tuple :param blacklist: optional list of files or directory to ignore, default to the value of `logilab.common.STD_BLACKLIST` :rtype: list :return: the list of all available python modules in the package and its subpackages """ modules = [] for directory, dirnames, filenames in os.walk(src_directory): _handle_blacklist(blacklist, dirnames, filenames) # check for __init__.py if not '__init__.py' in filenames: dirnames[:] = () continue if directory != src_directory: dir_package = directory[len(src_directory):].replace(os.sep, '.') modules.append(package + dir_package) for filename in filenames: if _is_python_file(filename) and filename != '__init__.py': src = join(directory, filename) module = package + src[len(src_directory):-3] modules.append(module.replace(os.sep, '.')) return modules def get_module_files(src_directory, blacklist=STD_BLACKLIST): """given a package directory return a list of all available python module's files in the package and its subpackages :type src_directory: str :param src_directory: path of the directory corresponding to the package :type blacklist: list or tuple :param blacklist: optional list of files or directory to ignore, default to the value of `logilab.common.STD_BLACKLIST` :rtype: list :return: the list of all available python module's files in the package and its subpackages """ files = [] for directory, dirnames, filenames in os.walk(src_directory): _handle_blacklist(blacklist, dirnames, filenames) # check for __init__.py if not '__init__.py' in filenames: dirnames[:] = () continue for filename in filenames: if _is_python_file(filename): src = join(directory, filename) files.append(src) return files def get_source_file(filename, include_no_ext=False): """given a python module's file name return the matching source file name (the filename will be returned identically if it's a already an absolute path to a python source file...) :type filename: str :param filename: python module's file name :raise NoSourceFile: if no source file exists on the file system :rtype: str :return: the absolute path of the source file if it exists """ base, orig_ext = splitext(abspath(filename)) for ext in PY_SOURCE_EXTS: source_path = '%s.%s' % (base, ext) if exists(source_path): return source_path if include_no_ext and not orig_ext and exists(base): return base raise NoSourceFile(filename) def cleanup_sys_modules(directories): """remove submodules of `directories` from `sys.modules`""" for modname, module in sys.modules.items(): modfile = getattr(module, '__file__', None) if modfile: for directory in directories: if modfile.startswith(directory): del sys.modules[modname] break def is_python_source(filename): """ rtype: bool return: True if the filename is a python source file """ return splitext(filename)[1][1:] in PY_SOURCE_EXTS def is_standard_module(modname, std_path=(STD_LIB_DIR,)): """try to guess if a module is a standard python module (by default, see `std_path` parameter's description) :type modname: str :param modname: name of the module we are interested in :type std_path: list(str) or tuple(str) :param std_path: list of path considered has standard :rtype: bool :return: true if the module: - is located on the path listed in one of the directory in `std_path` - is a built-in module """ modname = modname.split('.')[0] try: filename = file_from_modpath([modname]) except ImportError, ex: # import failed, i'm probably not so wrong by supposing it's # not standard... return 0 # modules which are not living in a file are considered standard # (sys and __builtin__ for instance) if filename is None: return 1 filename = abspath(filename) for path in std_path: path = abspath(path) if filename.startswith(path): pfx_len = len(path) if filename[pfx_len+1:pfx_len+14] != 'site-packages': return 1 return 0 return False def is_relative(modname, from_file): """return true if the given module name is relative to the given file name :type modname: str :param modname: name of the module we are interested in :type from_file: str :param from_file: path of the module from which modname has been imported :rtype: bool :return: true if the module has been imported relatively to `from_file` """ if not isdir(from_file): from_file = dirname(from_file) if from_file in sys.path: return False try: find_module(modname.split('.')[0], [from_file]) return True except ImportError: return False # internal only functions ##################################################### def _file_from_modpath(modpath, path=None, context=None): """given a mod path (i.e. splitted module / package name), return the corresponding file this function is used internally, see `file_from_modpath`'s documentation for more information """ assert len(modpath) > 0 if context is not None: try: mtype, mp_filename = _module_file(modpath, [context]) except ImportError: mtype, mp_filename = _module_file(modpath, path) else: mtype, mp_filename = _module_file(modpath, path) if mtype == PY_COMPILED: try: return get_source_file(mp_filename) except NoSourceFile: return mp_filename elif mtype == C_BUILTIN: # integrated builtin module return None elif mtype == PKG_DIRECTORY: mp_filename = _has_init(mp_filename) return mp_filename def _search_zip(modpath, pic): for filepath, importer in pic.items(): if importer is not None: if importer.find_module(modpath[0]): if not importer.find_module('/'.join(modpath)): raise ImportError('No module named %s in %s/%s' % ( '.'.join(modpath[1:]), file, modpath)) return ZIPFILE, abspath(filepath) + '/' + '/'.join(modpath), filepath raise ImportError('No module named %s' % '.'.join(modpath)) def _module_file(modpath, path=None): """get a module type / file path :type modpath: list or tuple :param modpath: splitted module's name (i.e name of a module or package splitted on '.'), with leading empty strings for explicit relative import :type path: list or None :param path: optional list of path where the module or package should be searched (use sys.path if nothing or None is given) :rtype: tuple(int, str) :return: the module type flag and the file path for a module """ # egg support compat try: pic = sys.path_importer_cache _path = (path is None and sys.path or path) for __path in _path: if not __path in pic: try: pic[__path] = zipimport.zipimporter(__path) except zipimport.ZipImportError: pic[__path] = None checkeggs = True except AttributeError: checkeggs = False imported = [] while modpath: try: _, mp_filename, mp_desc = find_module(modpath[0], path) except ImportError: if checkeggs: return _search_zip(modpath, pic)[:2] raise else: if checkeggs: fullabspath = [abspath(x) for x in _path] try: pathindex = fullabspath.index(dirname(abspath(mp_filename))) emtype, emp_filename, zippath = _search_zip(modpath, pic) if pathindex > _path.index(zippath): # an egg takes priority return emtype, emp_filename except ValueError: # XXX not in _path pass except ImportError: pass checkeggs = False imported.append(modpath.pop(0)) mtype = mp_desc[2] if modpath: if mtype != PKG_DIRECTORY: raise ImportError('No module %s in %s' % ('.'.join(modpath), '.'.join(imported))) path = [mp_filename] return mtype, mp_filename def _is_python_file(filename): """return true if the given filename should be considered as a python file .pyc and .pyo are ignored """ for ext in ('.py', '.so', '.pyd', '.pyw'): if filename.endswith(ext): return True return False def _has_init(directory): """if the given directory has a valid __init__ file, return its path, else return None """ mod_or_pack = join(directory, '__init__') for ext in PY_SOURCE_EXTS + ('pyc', 'pyo'): if exists(mod_or_pack + '.' + ext): return mod_or_pack + '.' + ext return None ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/__pkginfo__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000312111242100540033617 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """logilab.common packaging information""" __docformat__ = "restructuredtext en" distname = 'logilab-common' modname = 'common' subpackage_of = 'logilab' subpackage_master = True numversion = (0, 52, 1) version = '.'.join([str(num) for num in numversion]) license = 'LGPL' # 2.1 or later description = "collection of low-level Python packages and modules used by Logilab projects" web = "http://www.logilab.org/project/%s" % distname ftp = "ftp://ftp.logilab.org/pub/%s" % modname mailinglist = "mailto://python-projects@lists.logilab.org" author = "Logilab" author_email = "contact@logilab.fr" from os.path import join scripts = [join('bin', 'pytest')] include_dirs = [join('test', 'data')] pyversions = ['2.4', '2.5', '2.6'] install_requires = ['unittest2 >= 0.5.1'] ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/fileutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000003106511242100540033627 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """File and file-path manipulation utilities. :group path manipulation: first_level_directory, relative_path, is_binary,\ get_by_ext, remove_dead_links :group file manipulation: norm_read, norm_open, lines, stream_lines, lines,\ write_open_mode, ensure_fs_mode, export :sort: path manipulation, file manipulation """ __docformat__ = "restructuredtext en" import sys import shutil import mimetypes from os.path import isabs, isdir, islink, split, exists, normpath, join from os.path import abspath from os import sep, mkdir, remove, listdir, stat, chmod, walk from stat import ST_MODE, S_IWRITE from cStringIO import StringIO from logilab.common import STD_BLACKLIST as BASE_BLACKLIST, IGNORED_EXTENSIONS from logilab.common.shellutils import find from logilab.common.compat import FileIO, any def first_level_directory(path): """Return the first level directory of a path. >>> first_level_directory('home/syt/work') 'home' >>> first_level_directory('/home/syt/work') '/' >>> first_level_directory('work') 'work' >>> :type path: str :param path: the path for which we want the first level directory :rtype: str :return: the first level directory appearing in `path` """ head, tail = split(path) while head and tail: head, tail = split(head) if tail: return tail # path was absolute, head is the fs root return head def abspath_listdir(path): """Lists path's content using absolute paths. >>> os.listdir('/home') ['adim', 'alf', 'arthur', 'auc'] >>> abspath_listdir('/home') ['/home/adim', '/home/alf', '/home/arthur', '/home/auc'] """ path = abspath(path) return [join(path, filename) for filename in listdir(path)] def is_binary(filename): """Return true if filename may be a binary file, according to it's extension. :type filename: str :param filename: the name of the file :rtype: bool :return: true if the file is a binary file (actually if it's mime type isn't beginning by text/) """ try: return not mimetypes.guess_type(filename)[0].startswith('text') except AttributeError: return 1 def write_open_mode(filename): """Return the write mode that should used to open file. :type filename: str :param filename: the name of the file :rtype: str :return: the mode that should be use to open the file ('w' or 'wb') """ if is_binary(filename): return 'wb' return 'w' def ensure_fs_mode(filepath, desired_mode=S_IWRITE): """Check that the given file has the given mode(s) set, else try to set it. :type filepath: str :param filepath: path of the file :type desired_mode: int :param desired_mode: ORed flags describing the desired mode. Use constants from the `stat` module for file permission's modes """ mode = stat(filepath)[ST_MODE] if not mode & desired_mode: chmod(filepath, mode | desired_mode) # XXX (syt) unused? kill? class ProtectedFile(FileIO): """A special file-object class that automatically does a 'chmod +w' when needed. XXX: for now, the way it is done allows 'normal file-objects' to be created during the ProtectedFile object lifetime. One way to circumvent this would be to chmod / unchmod on each write operation. One other way would be to : - catch the IOError in the __init__ - if IOError, then create a StringIO object - each write operation writes in this StringIO object - on close()/del(), write/append the StringIO content to the file and do the chmod only once """ def __init__(self, filepath, mode): self.original_mode = stat(filepath)[ST_MODE] self.mode_changed = False if mode in ('w', 'a', 'wb', 'ab'): if not self.original_mode & S_IWRITE: chmod(filepath, self.original_mode | S_IWRITE) self.mode_changed = True FileIO.__init__(self, filepath, mode) def _restore_mode(self): """restores the original mode if needed""" if self.mode_changed: chmod(self.name, self.original_mode) # Don't re-chmod in case of several restore self.mode_changed = False def close(self): """restore mode before closing""" self._restore_mode() FileIO.close(self) def __del__(self): if not self.closed: self.close() class UnresolvableError(Exception): """Exception raised by relative path when it's unable to compute relative path between two paths. """ def relative_path(from_file, to_file): """Try to get a relative path from `from_file` to `to_file` (path will be absolute if to_file is an absolute file). This function is useful to create link in `from_file` to `to_file`. This typical use case is used in this function description. If both files are relative, they're expected to be relative to the same directory. >>> relative_path( from_file='toto/index.html', to_file='index.html') '../index.html' >>> relative_path( from_file='index.html', to_file='toto/index.html') 'toto/index.html' >>> relative_path( from_file='tutu/index.html', to_file='toto/index.html') '../toto/index.html' >>> relative_path( from_file='toto/index.html', to_file='/index.html') '/index.html' >>> relative_path( from_file='/toto/index.html', to_file='/index.html') '../index.html' >>> relative_path( from_file='/toto/index.html', to_file='/toto/summary.html') 'summary.html' >>> relative_path( from_file='index.html', to_file='index.html') '' >>> relative_path( from_file='/index.html', to_file='toto/index.html') Traceback (most recent call last): File "", line 1, in ? File "", line 37, in relative_path UnresolvableError >>> relative_path( from_file='/index.html', to_file='/index.html') '' >>> :type from_file: str :param from_file: source file (where links will be inserted) :type to_file: str :param to_file: target file (on which links point) :raise UnresolvableError: if it has been unable to guess a correct path :rtype: str :return: the relative path of `to_file` from `from_file` """ from_file = normpath(from_file) to_file = normpath(to_file) if from_file == to_file: return '' if isabs(to_file): if not isabs(from_file): return to_file elif isabs(from_file): raise UnresolvableError() from_parts = from_file.split(sep) to_parts = to_file.split(sep) idem = 1 result = [] while len(from_parts) > 1: dirname = from_parts.pop(0) if idem and len(to_parts) > 1 and dirname == to_parts[0]: to_parts.pop(0) else: idem = 0 result.append('..') result += to_parts return sep.join(result) from logilab.common.textutils import _LINE_RGX from sys import version_info _HAS_UNIV_OPEN = version_info[:2] >= (2, 3) del version_info def norm_read(path): """Return the content of the file with normalized line feeds. :type path: str :param path: path to the file to read :rtype: str :return: the content of the file with normalized line feeds """ if _HAS_UNIV_OPEN: return open(path, 'U').read() return _LINE_RGX.sub('\n', open(path).read()) def norm_open(path): """Return a stream for a file with content with normalized line feeds. :type path: str :param path: path to the file to open :rtype: file or StringIO :return: the opened file with normalized line feeds """ if _HAS_UNIV_OPEN: return open(path, 'U') return StringIO(_LINE_RGX.sub('\n', open(path).read())) def lines(path, comments=None): """Return a list of non empty lines in the file located at `path`. :type path: str :param path: path to the file :type comments: str or None :param comments: optional string which can be used to comment a line in the file (i.e. lines starting with this string won't be returned) :rtype: list :return: a list of stripped line in the file, without empty and commented lines :warning: at some point this function will probably return an iterator """ stream = norm_open(path) result = stream_lines(stream, comments) stream.close() return result def stream_lines(stream, comments=None): """Return a list of non empty lines in the given `stream`. :type stream: object implementing 'xreadlines' or 'readlines' :param stream: file like object :type comments: str or None :param comments: optional string which can be used to comment a line in the file (i.e. lines starting with this string won't be returned) :rtype: list :return: a list of stripped line in the file, without empty and commented lines :warning: at some point this function will probably return an iterator """ try: readlines = stream.xreadlines except AttributeError: readlines = stream.readlines result = [] for line in readlines(): line = line.strip() if line and (comments is None or not line.startswith(comments)): result.append(line) return result def export(from_dir, to_dir, blacklist=BASE_BLACKLIST, ignore_ext=IGNORED_EXTENSIONS, verbose=0): """Make a mirror of `from_dir` in `to_dir`, omitting directories and files listed in the black list or ending with one of the given extensions. :type from_dir: str :param from_dir: directory to export :type to_dir: str :param to_dir: destination directory :type blacklist: list or tuple :param blacklist: list of files or directories to ignore, default to the content of `BASE_BLACKLIST` :type ignore_ext: list or tuple :param ignore_ext: list of extensions to ignore, default to the content of `IGNORED_EXTENSIONS` :type verbose: bool :param verbose: flag indicating whether information about exported files should be printed to stderr, default to False """ try: mkdir(to_dir) except OSError: pass # FIXME we should use "exists" if the point is about existing dir # else (permission problems?) shouldn't return / raise ? for directory, dirnames, filenames in walk(from_dir): for norecurs in blacklist: try: dirnames.remove(norecurs) except ValueError: continue for dirname in dirnames: src = join(directory, dirname) dest = to_dir + src[len(from_dir):] if isdir(src): if not exists(dest): mkdir(dest) for filename in filenames: # don't include binary files # endswith does not accept tuple in 2.4 if any(filename.endswith(ext) for ext in ignore_ext): continue src = join(directory, filename) dest = to_dir + src[len(from_dir):] if verbose: print >> sys.stderr, src, '->', dest if exists(dest): remove(dest) shutil.copy2(src, dest) def remove_dead_links(directory, verbose=0): """Recursively traverse directory and remove all dead links. :type directory: str :param directory: directory to cleanup :type verbose: bool :param verbose: flag indicating whether information about deleted links should be printed to stderr, default to False """ for dirpath, dirname, filenames in walk(directory): for filename in dirnames + filenames: src = join(dirpath, filename) if islink(src) and not exists(src): if verbose: print 'remove dead link', src remove(src) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/contexts.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000032411242100540033621 0ustar andreasandreasfrom warnings import warn warn('logilab.common.contexts module is deprecated, use logilab.common.shellutils instead', DeprecationWarning, stacklevel=1) from logilab.common.shellutils import tempfile, pushd ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/pyro_ext.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001144611242100540033630 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Python Remote Object utilities Main functions available: * `register_object` to expose arbitrary object through pyro using delegation approach and register it in the nameserver. * `ns_unregister` unregister an object identifier from the nameserver. * `ns_get_proxy` get a pyro proxy from a nameserver object identifier. """ __docformat__ = "restructuredtext en" import logging import tempfile from Pyro import core, naming, errors, util, config _LOGGER = logging.getLogger('pyro') _MARKER = object() config.PYRO_STORAGE = tempfile.gettempdir() def ns_group_and_id(idstr, defaultnsgroup=_MARKER): try: nsgroup, nsid = idstr.rsplit('.', 1) except ValueError: if defaultnsgroup is _MARKER: nsgroup = config.PYRO_NS_DEFAULTGROUP else: nsgroup = defaultnsgroup nsid = idstr if nsgroup is not None and not nsgroup.startswith(':'): nsgroup = ':' + nsgroup return nsgroup, nsid def host_and_port(hoststr): if not hoststr: return None, None try: hoststr, port = hoststr.split(':') except ValueError: port = None else: port = int(port) return hoststr, port _DAEMONS = {} def _get_daemon(daemonhost, start=True): if not daemonhost in _DAEMONS: if not start: raise Exception('no daemon for %s' % daemonhost) if not _DAEMONS: core.initServer(banner=0) host, port = host_and_port(daemonhost) daemon = core.Daemon(host=host, port=port) _DAEMONS[daemonhost] = daemon return _DAEMONS[daemonhost] def locate_ns(nshost): """locate and return the pyro name server to the daemon""" core.initClient(banner=False) return naming.NameServerLocator().getNS(*host_and_port(nshost)) def register_object(object, nsid, defaultnsgroup=_MARKER, daemonhost=None, nshost=None): """expose the object as a pyro object and register it in the name-server return the pyro daemon object """ nsgroup, nsid = ns_group_and_id(nsid, defaultnsgroup) daemon = _get_daemon(daemonhost) nsd = locate_ns(nshost) # make sure our namespace group exists try: nsd.createGroup(nsgroup) except errors.NamingError: pass daemon.useNameServer(nsd) # use Delegation approach impl = core.ObjBase() impl.delegateTo(object) daemon.connect(impl, '%s.%s' % (nsgroup, nsid)) _LOGGER.info('registered %s a pyro object using group %s and id %s', object, nsgroup, nsid) return daemon def ns_unregister(nsid, defaultnsgroup=_MARKER, nshost=None): """unregister the object with the given nsid from the pyro name server""" nsgroup, nsid = ns_group_and_id(nsid, defaultnsgroup) try: nsd = locate_ns(nshost) except errors.PyroError, ex: # name server not responding _LOGGER.error('can\'t locate pyro name server: %s', ex) else: try: nsd.unregister('%s.%s' % (nsgroup, nsid)) _LOGGER.info('%s unregistered from pyro name server', nsid) except errors.NamingError: _LOGGER.warning('%s not registered in pyro name server', nsid) def ns_get_proxy(nsid, defaultnsgroup=_MARKER, nshost=None): nsgroup, nsid = ns_group_and_id(nsid, defaultnsgroup) # resolve the Pyro object try: nsd = locate_ns(nshost) pyrouri = nsd.resolve('%s.%s' % (nsgroup, nsid)) except errors.ProtocolError, ex: raise errors.PyroError( 'Could not connect to the Pyro name server (host: %s)' % nshost) except errors.NamingError: raise errors.PyroError( 'Could not get proxy for %s (not registered in Pyro), ' 'you may have to restart your server-side application' % nsid) return core.getProxyForURI(pyrouri) def set_pyro_log_threshold(level): pyrologger = logging.getLogger('Pyro.%s' % str(id(util.Log))) # remove handlers so only the root handler is used pyrologger.handlers = [] pyrologger.setLevel(level) ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/interface.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000504111242100540033622 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Bases class for interfaces to provide 'light' interface handling. TODO: _ implements a check method which check that an object implements the interface _ Attribute objects This module requires at least python 2.2 """ __docformat__ = "restructuredtext en" class Interface(object): """Base class for interfaces.""" def is_implemented_by(cls, instance): return implements(instance, cls) is_implemented_by = classmethod(is_implemented_by) def implements(obj, interface): """Return true if the give object (maybe an instance or class) implements the interface. """ kimplements = getattr(obj, '__implements__', ()) if not isinstance(kimplements, (list, tuple)): kimplements = (kimplements,) for implementedinterface in kimplements: if issubclass(implementedinterface, interface): return True return False def extend(klass, interface, _recurs=False): """Add interface to klass'__implements__ if not already implemented in. If klass is subclassed, ensure subclasses __implements__ it as well. NOTE: klass should be e new class. """ if not implements(klass, interface): try: kimplements = klass.__implements__ kimplementsklass = type(kimplements) kimplements = list(kimplements) except AttributeError: kimplementsklass = tuple kimplements = [] kimplements.append(interface) klass.__implements__ = kimplementsklass(kimplements) for subklass in klass.__subclasses__(): extend(subklass, interface, _recurs=True) elif _recurs: for subklass in klass.__subclasses__(): extend(subklass, interface, _recurs=True) ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/clcommands.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002476311242100540033636 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Helper functions to support command line tools providing more than one command. e.g called as "tool command [options] args..." where and are command'specific """ __docformat__ = "restructuredtext en" import sys import logging from os.path import basename from logilab.common.configuration import Configuration from logilab.common.deprecation import deprecated class BadCommandUsage(Exception): """Raised when an unknown command is used or when a command is not correctly used (bad options, too much / missing arguments...). Trigger display of command usage. """ class CommandError(Exception): """Raised when a command can't be processed and we want to display it and exit, without traceback nor usage displayed. """ # command line access point #################################################### class CommandLine(dict): """Usage: >>> LDI = cli.CommandLine('ldi', doc='Logilab debian installer', version=version, rcfile=RCFILE) >>> LDI.register(MyCommandClass) >>> LDI.register(MyOtherCommandClass) >>> LDI.run(sys.argv[1:]) Arguments: * `pgm`, the program name, default to `basename(sys.argv[0])` * `doc`, a short description of the command line tool * `copyright`, additional doc string that will be appended to the generated doc * `version`, version number of string of the tool. If specified, global --version option will be available. * `rcfile`, path to a configuration file. If specified, global --C/--rc-file option will be available? self.rcfile = rcfile * `logger`, logger to propagate to commands, default to `logging.getLogger(self.pgm))` """ def __init__(self, pgm=None, doc=None, copyright=None, version=None, rcfile=None, logthreshold=logging.ERROR): if pgm is None: pgm = basename(sys.argv[0]) self.pgm = pgm self.doc = doc self.copyright = copyright self.version = version self.rcfile = rcfile self.logger = None self.logthreshold = logthreshold def register(self, cls): """register the given :class:`Command` subclass""" self[cls.name] = cls def run(self, args): """main command line access point: * init logging * handle global options (-h/--help, --version, -C/--rc-file) * check command * run command Terminate by :exc:`SystemExit` """ from logilab.common import logging_ext logging_ext.init_log(debug=True, # so that we use StreamHandler logthreshold=self.logthreshold, logformat='%(levelname)s: %(message)s') try: arg = args.pop(0) except IndexError: self.usage_and_exit(1) if arg in ('-h', '--help'): self.usage_and_exit(0) if self.version is not None and arg in ('--version'): print self.version sys.exit(0) rcfile = self.rcfile if rcfile is not None and arg in ('-C', '--rc-file'): try: rcfile = args.pop(0) except IndexError: self.usage_and_exit(1) try: command = self.get_command(arg) except KeyError: print 'ERROR: no %s command' % arg print self.usage_and_exit(1) try: sys.exit(command.main_run(args, rcfile)) except KeyboardInterrupt: print 'interrupted' sys.exit(4) except BadCommandUsage, err: print 'ERROR:', err print print command.help() sys.exit(1) def create_logger(self, handler, logthreshold=None): logger = logging.Logger(self.pgm) logger.handlers = [handler] if logthreshold is None: logthreshold = self.logthreshold logger.setLevel(logthreshold) return logger def get_command(self, cmd, logger=None): if logger is None: logger = self.logger if logger is None: logger = self.logger = logging.getLogger(self.pgm) logger.setLevel(self.logthreshold) return self[cmd](logger) def usage(self): """display usage for the main program (i.e. when no command supplied) and exit """ print 'usage:', self.pgm, if self.rcfile: print '[--rc-file=]', print ' [options] ...' if self.doc: print '\n%s' % self.doc print ''' Type "%(pgm)s --help" for more information about a specific command. Available commands are :\n''' % self.__dict__ max_len = max([len(cmd) for cmd in self]) padding = ' ' * max_len for cmdname, cmd in sorted(self.items()): if not cmd.hidden: print ' ', (cmdname + padding)[:max_len], cmd.short_description() if self.rcfile: print ''' Use --rc-file= / -C before the command to specify a configuration file. Default to %s. ''' % self.rcfile print '''%(pgm)s -h/--help display this usage information and exit''' % self.__dict__ if self.version: print '''%(pgm)s -v/--version display version configuration and exit''' % self.__dict__ if self.copyright: print '\n', self.copyright def usage_and_exit(self, status): self.usage() sys.exit(status) # base command classes ######################################################### class Command(Configuration): """Base class for command line commands. Class attributes: * `name`, the name of the command * `min_args`, minimum number of arguments, None if unspecified * `max_args`, maximum number of arguments, None if unspecified * `arguments`, string describing arguments, used in command usage * `hidden`, boolean flag telling if the command should be hidden, e.g. does not appear in help's commands list * `options`, options list, as allowed by :mod:configuration """ arguments = '' name = '' # hidden from help ? hidden = False # max/min args, None meaning unspecified min_args = None max_args = None @classmethod def description(cls): return cls.__doc__.replace(' ', '') @classmethod def short_description(cls): return cls.description().split('.')[0] def __init__(self, logger): usage = '%%prog %s %s\n\n%s' % (self.name, self.arguments, self.description()) Configuration.__init__(self, usage=usage) self.logger = logger def check_args(self, args): """check command's arguments are provided""" if self.min_args is not None and len(args) < self.min_args: raise BadCommandUsage('missing argument') if self.max_args is not None and len(args) > self.max_args: raise BadCommandUsage('too many arguments') def main_run(self, args, rcfile=None): """Run the command and return status 0 if everything went fine. If :exc:`CommandError` is raised by the underlying command, simply log the error and return status 2. Any other exceptions, including :exc:`BadCommandUsage` will be propagated. """ if rcfile: self.load_file_configuration(rcfile) args = self.load_command_line_configuration(args) try: self.check_args(args) self.run(args) except CommandError, err: self.logger.error(err) return 2 return 0 def run(self, args): """run the command with its specific arguments""" raise NotImplementedError() class ListCommandsCommand(Command): """list available commands, useful for bash completion.""" name = 'listcommands' arguments = '[command]' hidden = True def run(self, args): """run the command with its specific arguments""" if args: command = args.pop() cmd = _COMMANDS[command] for optname, optdict in cmd.options: print '--help' print '--' + optname else: commands = _COMMANDS.keys() commands.sort() for command in commands: cmd = _COMMANDS[command] if not cmd.hidden: print command # deprecated stuff ############################################################# _COMMANDS = CommandLine() DEFAULT_COPYRIGHT = '''\ Copyright (c) 2004-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. http://www.logilab.fr/ -- mailto:contact@logilab.fr''' @deprecated('use cls.register(cli)') def register_commands(commands): """register existing commands""" for command_klass in commands: _COMMANDS.register(command_klass) @deprecated('use args.pop(0)') def main_run(args, doc=None, copyright=None, version=None): """command line tool: run command specified by argument list (without the program name). Raise SystemExit with status 0 if everything went fine. >>> main_run(sys.argv[1:]) """ _COMMANDS.doc = doc _COMMANDS.copyright = copyright _COMMANDS.version = version _COMMANDS.run(args) @deprecated('use args.pop(0)') def pop_arg(args_list, expected_size_after=None, msg="Missing argument"): """helper function to get and check command line arguments""" try: value = args_list.pop(0) except IndexError: raise BadCommandUsage(msg) if expected_size_after is not None and len(args_list) > expected_size_after: raise BadCommandUsage('too many arguments') return value ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/debugger.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001542711242100540033633 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Customized version of pdb's default debugger. - sets up a history file - uses ipython if available to colorize lines of code - overrides list command to search for current block instead of using 5 lines of context """ __docformat__ = "restructuredtext en" try: import readline except ImportError: readline = None import os import os.path as osp import sys from pdb import Pdb from cStringIO import StringIO import inspect try: from IPython import PyColorize except ImportError: def colorize(source, *args): """fallback colorize function""" return source def colorize_source(source, *args): return source else: def colorize(source, start_lineno, curlineno): """colorize and annotate source with linenos (as in pdb's list command) """ parser = PyColorize.Parser() output = StringIO() parser.format(source, output) annotated = [] for index, line in enumerate(output.getvalue().splitlines()): lineno = index + start_lineno if lineno == curlineno: annotated.append('%4s\t->\t%s' % (lineno, line)) else: annotated.append('%4s\t\t%s' % (lineno, line)) return '\n'.join(annotated) def colorize_source(source): """colorize given source""" parser = PyColorize.Parser() output = StringIO() parser.format(source, output) return output.getvalue() def getsource(obj): """Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An IOError is raised if the source code cannot be retrieved.""" lines, lnum = inspect.getsourcelines(obj) return ''.join(lines), lnum ################################################################ class Debugger(Pdb): """custom debugger - sets up a history file - uses ipython if available to colorize lines of code - overrides list command to search for current block instead of using 5 lines of context """ def __init__(self, tcbk=None): Pdb.__init__(self) self.reset() if tcbk: while tcbk.tb_next is not None: tcbk = tcbk.tb_next self._tcbk = tcbk self._histfile = osp.join(os.environ["HOME"], ".pdbhist") def setup_history_file(self): """if readline is available, read pdb history file """ if readline is not None: try: readline.read_history_file(self._histfile) except IOError: pass def start(self): """starts the interactive mode""" self.interaction(self._tcbk.tb_frame, self._tcbk) def setup(self, frame, tcbk): """setup hook: set up history file""" self.setup_history_file() Pdb.setup(self, frame, tcbk) def set_quit(self): """quit hook: save commands in the history file""" if readline is not None: readline.write_history_file(self._histfile) Pdb.set_quit(self) def complete_p(self, text, line, begin_idx, end_idx): """provide variable names completion for the ``p`` command""" namespace = dict(self.curframe.f_globals) namespace.update(self.curframe.f_locals) if '.' in text: return self.attr_matches(text, namespace) return [varname for varname in namespace if varname.startswith(text)] def attr_matches(self, text, namespace): """implementation coming from rlcompleter.Completer.attr_matches Compute matches when text contains a dot. Assuming the text is of the form NAME.NAME....[NAME], and is evaluatable in self.namespace, it will be evaluated and its attributes (as revealed by dir()) are used as possible completions. (For class instances, class members are also considered.) WARNING: this can still invoke arbitrary C code, if an object with a __getattr__ hook is evaluated. """ import re m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) if not m: return expr, attr = m.group(1, 3) object = eval(expr, namespace) words = dir(object) if hasattr(object,'__class__'): words.append('__class__') words = words + self.get_class_members(object.__class__) matches = [] n = len(attr) for word in words: if word[:n] == attr and word != "__builtins__": matches.append("%s.%s" % (expr, word)) return matches def get_class_members(self, klass): """implementation coming from rlcompleter.get_class_members""" ret = dir(klass) if hasattr(klass,'__bases__'): for base in klass.__bases__: ret = ret + self.get_class_members(base) return ret ## specific / overridden commands def do_list(self, arg): """overrides default list command to display the surrounding block instead of 5 lines of context """ self.lastcmd = 'list' if not arg: try: source, start_lineno = getsource(self.curframe) print colorize(''.join(source), start_lineno, self.curframe.f_lineno) except KeyboardInterrupt: pass except IOError: Pdb.do_list(self, arg) else: Pdb.do_list(self, arg) do_l = do_list def do_open(self, arg): """opens source file corresponding to the current stack level""" filename = self.curframe.f_code.co_filename lineno = self.curframe.f_lineno cmd = 'emacsclient --no-wait +%s %s' % (lineno, filename) os.system(cmd) do_o = do_open def pm(): """use our custom debugger""" dbg = Debugger(sys.last_traceback) dbg.start() def set_trace(): Debugger().set_trace(sys._getframe().f_back) ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/changelog.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001734611242100540033635 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Manipulation of upstream change log files. The upstream change log files format handled is simpler than the one often used such as those generated by the default Emacs changelog mode. Sample ChangeLog format:: Change log for project Yoo ========================== -- * add a new functionality 2002-02-01 -- 0.1.1 * fix bug #435454 * fix bug #434356 2002-01-01 -- 0.1 * initial release There is 3 entries in this change log, one for each released version and one for the next version (i.e. the current entry). Each entry contains a set of messages corresponding to changes done in this release. All the non empty lines before the first entry are considered as the change log title. """ __docformat__ = "restructuredtext en" import sys from stat import S_IWRITE BULLET = '*' SUBBULLET = '-' INDENT = ' ' * 4 class NoEntry(Exception): """raised when we are unable to find an entry""" class EntryNotFound(Exception): """raised when we are unable to find a given entry""" class Version(tuple): """simple class to handle soft version number has a tuple while correctly printing it as X.Y.Z """ def __new__(klass, versionstr): if isinstance(versionstr, basestring): versionstr = versionstr.strip(' :') try: parsed = [int(i) for i in versionstr.split('.')] except ValueError, ex: raise ValueError("invalid literal for version '%s' (%s)"%(versionstr,ex)) else: parsed = versionstr return tuple.__new__(klass, parsed) def __str__(self): return '.'.join([str(i) for i in self]) # upstream change log ######################################################### class ChangeLogEntry(object): """a change log entry, i.e. a set of messages associated to a version and its release date """ version_class = Version def __init__(self, date=None, version=None, **kwargs): self.__dict__.update(kwargs) if version: self.version = self.version_class(version) else: self.version = None self.date = date self.messages = [] def add_message(self, msg): """add a new message""" self.messages.append(([msg],[])) def complete_latest_message(self, msg_suite): """complete the latest added message """ if not self.messages: raise ValueError('unable to complete last message as there is no previous message)') if self.messages[-1][1]: # sub messages self.messages[-1][1][-1].append(msg_suite) else: # message self.messages[-1][0].append(msg_suite) def add_sub_message(self, sub_msg, key=None): if not self.messages: raise ValueError('unable to complete last message as there is no previous message)') if key is None: self.messages[-1][1].append([sub_msg]) else: raise NotImplementedError("sub message to specific key are not implemented yet") def write(self, stream=sys.stdout): """write the entry to file """ stream.write('%s -- %s\n' % (self.date or '', self.version or '')) for msg, sub_msgs in self.messages: stream.write('%s%s %s\n' % (INDENT, BULLET, msg[0])) stream.write(''.join(msg[1:])) if sub_msgs: stream.write('\n') for sub_msg in sub_msgs: stream.write('%s%s %s\n' % (INDENT * 2, SUBBULLET, sub_msg[0])) stream.write(''.join(sub_msg[1:])) stream.write('\n') stream.write('\n\n') class ChangeLog(object): """object representation of a whole ChangeLog file""" entry_class = ChangeLogEntry def __init__(self, changelog_file, title=''): self.file = changelog_file self.title = title self.additional_content = '' self.entries = [] self.load() def __repr__(self): return '' % (self.file, id(self), len(self.entries)) def add_entry(self, entry): """add a new entry to the change log""" self.entries.append(entry) def get_entry(self, version='', create=None): """ return a given changelog entry if version is omitted, return the current entry """ if not self.entries: if version or not create: raise NoEntry() self.entries.append(self.entry_class()) if not version: if self.entries[0].version and create is not None: self.entries.insert(0, self.entry_class()) return self.entries[0] version = self.version_class(version) for entry in self.entries: if entry.version == version: return entry raise EntryNotFound() def add(self, msg, create=None): """add a new message to the latest opened entry""" entry = self.get_entry(create=create) entry.add_message(msg) def load(self): """ read a logilab's ChangeLog from file """ try: stream = open(self.file) except IOError: return last = None expect_sub = False for line in stream.readlines(): sline = line.strip() words = sline.split() # if new entry if len(words) == 1 and words[0] == '--': expect_sub = False last = self.entry_class() self.add_entry(last) # if old entry elif len(words) == 3 and words[1] == '--': expect_sub = False last = self.entry_class(words[0], words[2]) self.add_entry(last) # if title elif sline and last is None: self.title = '%s%s' % (self.title, line) # if new entry elif sline and sline[0] == BULLET: expect_sub = False last.add_message(sline[1:].strip()) # if new sub_entry elif expect_sub and sline and sline[0] == SUBBULLET: last.add_sub_message(sline[1:].strip()) # if new line for current entry elif sline and last.messages: last.complete_latest_message(line) else: expect_sub = True self.additional_content += line stream.close() def format_title(self): return '%s\n\n' % self.title.strip() def save(self): """write back change log""" # filetutils isn't importable in appengine, so import locally from logilab.common.fileutils import ensure_fs_mode ensure_fs_mode(self.file, S_IWRITE) self.write(open(self.file, 'w')) def write(self, stream=sys.stdout): """write changelog to stream""" stream.write(self.format_title()) for entry in self.entries: entry.write(stream) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/umessage.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001247011242100540033626 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Unicode email support (extends email from stdlib). """ __docformat__ = "restructuredtext en" import email from encodings import search_function import sys if sys.version_info >= (2, 5): from email.utils import parseaddr, parsedate from email.header import decode_header else: from email.Utils import parseaddr, parsedate from email.Header import decode_header from datetime import datetime try: from mx.DateTime import DateTime except ImportError: DateTime = datetime import logilab.common as lgc def decode_QP(string): parts = [] for decoded, charset in decode_header(string): if not charset : charset = 'iso-8859-15' parts.append(unicode(decoded, charset, 'replace')) return u' '.join(parts) def message_from_file(fd): try: return UMessage(email.message_from_file(fd)) except email.Errors.MessageParseError: return '' def message_from_string(string): try: return UMessage(email.message_from_string(string)) except email.Errors.MessageParseError: return '' class UMessage: """Encapsulates an email.Message instance and returns only unicode objects. """ def __init__(self, message): self.message = message # email.Message interface ################################################# def get(self, header, default=None): value = self.message.get(header, default) if value: return decode_QP(value) return value def get_all(self, header, default=()): return [decode_QP(val) for val in self.message.get_all(header, default) if val is not None] def get_payload(self, index=None, decode=False): message = self.message if index is None: payload = message.get_payload(index, decode) if isinstance(payload, list): return [UMessage(msg) for msg in payload] if message.get_content_maintype() != 'text': return payload charset = message.get_content_charset() or 'iso-8859-1' if search_function(charset) is None: charset = 'iso-8859-1' return unicode(payload or '', charset, "replace") else: payload = UMessage(message.get_payload(index, decode)) return payload def is_multipart(self): return self.message.is_multipart() def get_boundary(self): return self.message.get_boundary() def walk(self): for part in self.message.walk(): yield UMessage(part) def get_content_maintype(self): return unicode(self.message.get_content_maintype()) def get_content_type(self): return unicode(self.message.get_content_type()) def get_filename(self, failobj=None): value = self.message.get_filename(failobj) if value is failobj: return value try: return unicode(value) except UnicodeDecodeError: return u'error decoding filename' # other convenience methods ############################################### def headers(self): """return an unicode string containing all the message's headers""" values = [] for header in self.message.keys(): values.append(u'%s: %s' % (header, self.get(header))) return '\n'.join(values) def multi_addrs(self, header): """return a list of 2-uple (name, address) for the given address (which is expected to be an header containing address such as from, to, cc...) """ persons = [] for person in self.get_all(header, ()): name, mail = parseaddr(person) persons.append((name, mail)) return persons def date(self, alternative_source=False, return_str=False): """return a datetime object for the email's date or None if no date is set or if it can't be parsed """ value = self.get('date') if value is None and alternative_source: unix_from = self.message.get_unixfrom() if unix_from is not None: try: value = unix_from.split(" ", 2)[2] except IndexError: pass if value is not None: datetuple = parsedate(value) if datetuple: if lgc.USE_MX_DATETIME: return DateTime(*datetuple[:6]) return datetime(*datetuple[:6]) elif not return_str: return None return value ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/optparser.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000635011242100540033626 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Extend OptionParser with commands. Example: >>> parser = OptionParser() >>> parser.usage = '%prog COMMAND [options] ...' >>> parser.add_command('build', 'mymod.build') >>> parser.add_command('clean', run_clean, add_opt_clean) >>> run, options, args = parser.parse_command(sys.argv[1:]) >>> return run(options, args[1:]) With mymod.build that defines two functions run and add_options """ __docformat__ = "restructuredtext en" from warnings import warn warn('lgc.optparser module is deprecated, use lgc.clcommands instead', DeprecationWarning, stacklevel=2) import sys import optparse class OptionParser(optparse.OptionParser): def __init__(self, *args, **kwargs): optparse.OptionParser.__init__(self, *args, **kwargs) self._commands = {} self.min_args, self.max_args = 0, 1 def add_command(self, name, mod_or_funcs, help=''): """name of the command name of module or tuple of functions (run, add_options) """ assert isinstance(mod_or_funcs, str) or isinstance(mod_or_funcs, tuple), \ "mod_or_funcs has to be a module name or a tuple of functions" self._commands[name] = (mod_or_funcs, help) def print_main_help(self): optparse.OptionParser.print_help(self) print '\ncommands:' for cmdname, (_, help) in self._commands.items(): print '% 10s - %s' % (cmdname, help) def parse_command(self, args): if len(args) == 0: self.print_main_help() sys.exit(1) cmd = args[0] args = args[1:] if cmd not in self._commands: if cmd in ('-h', '--help'): self.print_main_help() sys.exit(0) elif self.version is not None and cmd == "--version": self.print_version() sys.exit(0) self.error('unknown command') self.prog = '%s %s' % (self.prog, cmd) mod_or_f, help = self._commands[cmd] # optparse inserts self.description between usage and options help self.description = help if isinstance(mod_or_f, str): exec 'from %s import run, add_options' % mod_or_f else: run, add_options = mod_or_f add_options(self) (options, args) = self.parse_args(args) if not (self.min_args <= len(args) <= self.max_args): self.error('incorrect number of arguments') return run, options, args ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/adbh.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000303011242100540033616 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Helpers for DBMS specific (advanced or non standard) functionalities. """ __docformat__ = "restructuredtext en" from warnings import warn warn('this module is deprecated, use logilab.database instead', DeprecationWarning, stacklevel=1) from logilab.database import (FunctionDescr, get_db_helper as get_adv_func_helper, _GenericAdvFuncHelper, _ADV_FUNC_HELPER_DIRECTORY as ADV_FUNC_HELPER_DIRECTORY) from logilab.common.decorators import monkeypatch @monkeypatch(_GenericAdvFuncHelper, 'func_sqlname') @classmethod def func_sqlname(cls, funcname): funcdef = cls.function_description(funcname) return funcdef.name_mapping.get(cls.backend_name, funcname) ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/tree.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002455611242100540033636 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Base class to represent a tree structure. """ __docformat__ = "restructuredtext en" import sys from logilab.common import flatten from logilab.common.visitor import VisitedMixIn, FilteredIterator, no_filter ## Exceptions ################################################################# class NodeNotFound(Exception): """raised when a node has not been found""" EX_SIBLING_NOT_FOUND = "No such sibling as '%s'" EX_CHILD_NOT_FOUND = "No such child as '%s'" EX_NODE_NOT_FOUND = "No such node as '%s'" # Base node ################################################################### class Node(object): """a basic tree node, characterized by an id""" def __init__(self, nid=None) : self.id = nid # navigation self.parent = None self.children = [] def __iter__(self): return iter(self.children) def __str__(self, indent=0): s = ['%s%s %s' % (' '*indent, self.__class__.__name__, self.id)] indent += 2 for child in self.children: try: s.append(child.__str__(indent)) except TypeError: s.append(child.__str__()) return '\n'.join(s) def is_leaf(self): return not self.children def append(self, child): """add a node to children""" self.children.append(child) child.parent = self def remove(self, child): """remove a child node""" self.children.remove(child) child.parent = None def insert(self, index, child): """insert a child node""" self.children.insert(index, child) child.parent = self def replace(self, old_child, new_child): """replace a child node with another""" i = self.children.index(old_child) self.children.pop(i) self.children.insert(i, new_child) new_child.parent = self def get_sibling(self, nid): """return the sibling node that has given id""" try: return self.parent.get_child_by_id(nid) except NodeNotFound : raise NodeNotFound(EX_SIBLING_NOT_FOUND % nid) def next_sibling(self): """ return the next sibling for this node if any """ parent = self.parent if parent is None: # root node has no sibling return None index = parent.children.index(self) try: return parent.children[index+1] except IndexError: return None def previous_sibling(self): """ return the previous sibling for this node if any """ parent = self.parent if parent is None: # root node has no sibling return None index = parent.children.index(self) if index > 0: return parent.children[index-1] return None def get_node_by_id(self, nid): """ return node in whole hierarchy that has given id """ root = self.root() try: return root.get_child_by_id(nid, 1) except NodeNotFound : raise NodeNotFound(EX_NODE_NOT_FOUND % nid) def get_child_by_id(self, nid, recurse=None): """ return child of given id """ if self.id == nid: return self for c in self.children : if recurse: try: return c.get_child_by_id(nid, 1) except NodeNotFound : continue if c.id == nid : return c raise NodeNotFound(EX_CHILD_NOT_FOUND % nid) def get_child_by_path(self, path): """ return child of given path (path is a list of ids) """ if len(path) > 0 and path[0] == self.id: if len(path) == 1 : return self else : for c in self.children : try: return c.get_child_by_path(path[1:]) except NodeNotFound : pass raise NodeNotFound(EX_CHILD_NOT_FOUND % path) def depth(self): """ return depth of this node in the tree """ if self.parent is not None: return 1 + self.parent.depth() else : return 0 def depth_down(self): """ return depth of the tree from this node """ if self.children: return 1 + max([c.depth_down() for c in self.children]) return 1 def width(self): """ return the width of the tree from this node """ return len(self.leaves()) def root(self): """ return the root node of the tree """ if self.parent is not None: return self.parent.root() return self def leaves(self): """ return a list with all the leaves nodes descendant from this node """ leaves = [] if self.children: for child in self.children: leaves += child.leaves() return leaves else: return [self] def flatten(self, _list=None): """ return a list with all the nodes descendant from this node """ if _list is None: _list = [] _list.append(self) for c in self.children: c.flatten(_list) return _list def lineage(self): """ return list of parents up to root node """ lst = [self] if self.parent is not None: lst.extend(self.parent.lineage()) return lst class VNode(Node, VisitedMixIn): """a visitable node """ pass class BinaryNode(VNode): """a binary node (i.e. only two children """ def __init__(self, lhs=None, rhs=None) : VNode.__init__(self) if lhs is not None or rhs is not None: assert lhs and rhs self.append(lhs) self.append(rhs) def remove(self, child): """remove the child and replace this node with the other child """ self.children.remove(child) self.parent.replace(self, self.children[0]) def get_parts(self): """ return the left hand side and the right hand side of this node """ return self.children[0], self.children[1] if sys.version_info[0:2] >= (2, 2): list_class = list else: from UserList import UserList list_class = UserList class ListNode(VNode, list_class): """Used to manipulate Nodes as Lists """ def __init__(self): list_class.__init__(self) VNode.__init__(self) self.children = self def __str__(self, indent=0): return '%s%s %s' % (indent*' ', self.__class__.__name__, ', '.join([str(v) for v in self])) def append(self, child): """add a node to children""" list_class.append(self, child) child.parent = self def insert(self, index, child): """add a node to children""" list_class.insert(self, index, child) child.parent = self def remove(self, child): """add a node to children""" list_class.remove(self, child) child.parent = None def pop(self, index): """add a node to children""" child = list_class.pop(self, index) child.parent = None def __iter__(self): return list_class.__iter__(self) # construct list from tree #################################################### def post_order_list(node, filter_func=no_filter): """ create a list with tree nodes for which the function returned true in a post order fashion """ l, stack = [], [] poped, index = 0, 0 while node: if filter_func(node): if node.children and not poped: stack.append((node, index)) index = 0 node = node.children[0] else: l.append(node) index += 1 try: node = stack[-1][0].children[index] except IndexError: node = None else: node = None poped = 0 if node is None and stack: node, index = stack.pop() poped = 1 return l def pre_order_list(node, filter_func=no_filter): """ create a list with tree nodes for which the function returned true in a pre order fashion """ l, stack = [], [] poped, index = 0, 0 while node: if filter_func(node): if not poped: l.append(node) if node.children and not poped: stack.append((node, index)) index = 0 node = node.children[0] else: index += 1 try: node = stack[-1][0].children[index] except IndexError: node = None else: node = None poped = 0 if node is None and len(stack) > 1: node, index = stack.pop() poped = 1 return l class PostfixedDepthFirstIterator(FilteredIterator): """a postfixed depth first iterator, designed to be used with visitors """ def __init__(self, node, filter_func=None): FilteredIterator.__init__(self, node, post_order_list, filter_func) class PrefixedDepthFirstIterator(FilteredIterator): """a prefixed depth first iterator, designed to be used with visitors """ def __init__(self, node, filter_func=None): FilteredIterator.__init__(self, node, pre_order_list, filter_func) ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/optik_ext.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000003225511242100540033631 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Add an abstraction level to transparently import optik classes from optparse (python >= 2.3) or the optik package. It also defines three new types for optik/optparse command line parser : * regexp argument of this type will be converted using re.compile * csv argument of this type will be converted using split(',') * yn argument of this type will be true if 'y' or 'yes', false if 'n' or 'no' * named argument of this type are in the form = or : * password argument of this type wont be converted but this is used by other tools such as interactive prompt for configuration to double check value and use an invisible field * multiple_choice same as default "choice" type but multiple choices allowed * file argument of this type wont be converted but checked that the given file exists * color argument of this type wont be converted but checked its either a named color or a color specified using hexadecimal notation (preceded by a #) * time argument of this type will be converted to a float value in seconds according to time units (ms, s, min, h, d) * bytes argument of this type will be converted to a float value in bytes according to byte units (b, kb, mb, gb, tb) """ __docformat__ = "restructuredtext en" import re import sys import time from copy import copy from os.path import exists # python >= 2.3 from optparse import OptionParser as BaseParser, Option as BaseOption, \ OptionGroup, OptionContainer, OptionValueError, OptionError, \ Values, HelpFormatter, NO_DEFAULT, SUPPRESS_HELP try: from mx import DateTime HAS_MX_DATETIME = True except ImportError: HAS_MX_DATETIME = False OPTPARSE_FORMAT_DEFAULT = sys.version_info >= (2, 4) from logilab.common.textutils import splitstrip def check_regexp(option, opt, value): """check a regexp value by trying to compile it return the compiled regexp """ if hasattr(value, 'pattern'): return value try: return re.compile(value) except ValueError: raise OptionValueError( "option %s: invalid regexp value: %r" % (opt, value)) def check_csv(option, opt, value): """check a csv value by trying to split it return the list of separated values """ if isinstance(value, (list, tuple)): return value try: return splitstrip(value) except ValueError: raise OptionValueError( "option %s: invalid csv value: %r" % (opt, value)) def check_yn(option, opt, value): """check a yn value return true for yes and false for no """ if isinstance(value, int): return bool(value) if value in ('y', 'yes'): return True if value in ('n', 'no'): return False msg = "option %s: invalid yn value %r, should be in (y, yes, n, no)" raise OptionValueError(msg % (opt, value)) def check_named(option, opt, value): """check a named value return a dictionary containing (name, value) associations """ if isinstance(value, dict): return value values = [] for value in check_csv(option, opt, value): if value.find('=') != -1: values.append(value.split('=', 1)) elif value.find(':') != -1: values.append(value.split(':', 1)) if values: return dict(values) msg = "option %s: invalid named value %r, should be = or \ :" raise OptionValueError(msg % (opt, value)) def check_password(option, opt, value): """check a password value (can't be empty) """ # no actual checking, monkey patch if you want more return value def check_file(option, opt, value): """check a file value return the filepath """ if exists(value): return value msg = "option %s: file %r does not exist" raise OptionValueError(msg % (opt, value)) # XXX use python datetime def check_date(option, opt, value): """check a file value return the filepath """ try: return DateTime.strptime(value, "%Y/%m/%d") except DateTime.Error : raise OptionValueError( "expected format of %s is yyyy/mm/dd" % opt) def check_color(option, opt, value): """check a color value and returns it /!\ does *not* check color labels (like 'red', 'green'), only checks hexadecimal forms """ # Case (1) : color label, we trust the end-user if re.match('[a-z0-9 ]+$', value, re.I): return value # Case (2) : only accepts hexadecimal forms if re.match('#[a-f0-9]{6}', value, re.I): return value # Else : not a color label neither a valid hexadecimal form => error msg = "option %s: invalid color : %r, should be either hexadecimal \ value or predefined color" raise OptionValueError(msg % (opt, value)) def check_time(option, opt, value): from logilab.common.textutils import TIME_UNITS, apply_units if isinstance(value, (int, long, float)): return value return apply_units(value, TIME_UNITS) def check_bytes(option, opt, value): from logilab.common.textutils import BYTE_UNITS, apply_units if hasattr(value, '__int__'): return value return apply_units(value, BYTE_UNITS) import types class Option(BaseOption): """override optik.Option to add some new option types """ TYPES = BaseOption.TYPES + ('regexp', 'csv', 'yn', 'named', 'password', 'multiple_choice', 'file', 'color', 'time', 'bytes') ATTRS = BaseOption.ATTRS + ['hide', 'level'] TYPE_CHECKER = copy(BaseOption.TYPE_CHECKER) TYPE_CHECKER['regexp'] = check_regexp TYPE_CHECKER['csv'] = check_csv TYPE_CHECKER['yn'] = check_yn TYPE_CHECKER['named'] = check_named TYPE_CHECKER['multiple_choice'] = check_csv TYPE_CHECKER['file'] = check_file TYPE_CHECKER['color'] = check_color TYPE_CHECKER['password'] = check_password TYPE_CHECKER['time'] = check_time TYPE_CHECKER['bytes'] = check_bytes if HAS_MX_DATETIME: TYPES += ('date',) TYPE_CHECKER['date'] = check_date def __init__(self, *opts, **attrs): BaseOption.__init__(self, *opts, **attrs) if hasattr(self, "hide") and self.hide: self.help = SUPPRESS_HELP def _check_choice(self): """FIXME: need to override this due to optik misdesign""" if self.type in ("choice", "multiple_choice"): if self.choices is None: raise OptionError( "must supply a list of choices for type 'choice'", self) elif type(self.choices) not in (types.TupleType, types.ListType): raise OptionError( "choices must be a list of strings ('%s' supplied)" % str(type(self.choices)).split("'")[1], self) elif self.choices is not None: raise OptionError( "must not supply choices for type %r" % self.type, self) BaseOption.CHECK_METHODS[2] = _check_choice def process(self, opt, value, values, parser): # First, convert the value(s) to the right type. Howl if any # value(s) are bogus. try: value = self.convert_value(opt, value) except AttributeError: # py < 2.4 value = self.check_value(opt, value) if self.type == 'named': existant = getattr(values, self.dest) if existant: existant.update(value) value = existant # And then take whatever action is expected of us. # This is a separate method to make life easier for # subclasses to add new actions. return self.take_action( self.action, self.dest, opt, value, values, parser) class OptionParser(BaseParser): """override optik.OptionParser to use our Option class """ def __init__(self, option_class=Option, *args, **kwargs): BaseParser.__init__(self, option_class=Option, *args, **kwargs) def format_option_help(self, formatter=None): if formatter is None: formatter = self.formatter outputlevel = getattr(formatter, 'output_level', 0) formatter.store_option_strings(self) result = [] result.append(formatter.format_heading("Options")) formatter.indent() if self.option_list: result.append(OptionContainer.format_option_help(self, formatter)) result.append("\n") for group in self.option_groups: if group.level <= outputlevel and ( group.description or level_options(group, outputlevel)): result.append(group.format_help(formatter)) result.append("\n") formatter.dedent() # Drop the last "\n", or the header if no options or option groups: return "".join(result[:-1]) OptionGroup.level = 0 def level_options(group, outputlevel): return [option for option in group.option_list if (getattr(option, 'level', 0) or 0) <= outputlevel and not option.help is SUPPRESS_HELP] def format_option_help(self, formatter): result = [] outputlevel = getattr(formatter, 'output_level', 0) or 0 for option in level_options(self, outputlevel): result.append(formatter.format_option(option)) return "".join(result) OptionContainer.format_option_help = format_option_help class ManHelpFormatter(HelpFormatter): """Format help using man pages ROFF format""" def __init__ (self, indent_increment=0, max_help_position=24, width=79, short_first=0): HelpFormatter.__init__ ( self, indent_increment, max_help_position, width, short_first) def format_heading(self, heading): return '.SH %s\n' % heading.upper() def format_description(self, description): return description def format_option(self, option): try: optstring = option.option_strings except AttributeError: optstring = self.format_option_strings(option) if option.help: help_text = self.expand_default(option) help = ' '.join([l.strip() for l in help_text.splitlines()]) else: help = '' return '''.IP "%s" %s ''' % (optstring, help) def format_head(self, optparser, pkginfo, section=1): try: pgm = optparser._get_prog_name() except AttributeError: # py >= 2.4.X (dunno which X exactly, at least 2) pgm = optparser.get_prog_name() short_desc = self.format_short_description(pgm, pkginfo.description) return '%s\n%s\n%s' % (self.format_title(pgm, section), short_desc, self.format_synopsis(pgm)) def format_title(self, pgm, section): date = '-'.join([str(num) for num in time.localtime()[:3]]) return '.TH %s %s "%s" %s' % (pgm, section, date, pgm) def format_short_description(self, pgm, short_desc): return '''.SH NAME .B %s \- %s ''' % (pgm, short_desc.strip()) def format_synopsis(self, pgm): return '''.SH SYNOPSIS .B %s [ .I OPTIONS ] [ .I ] ''' % pgm def format_long_description(self, pgm, long_desc): long_desc = '\n'.join([line.lstrip() for line in long_desc.splitlines()]) long_desc = long_desc.replace('\n.\n', '\n\n') if long_desc.lower().startswith(pgm): long_desc = long_desc[len(pgm):] return '''.SH DESCRIPTION .B %s %s ''' % (pgm, long_desc.strip()) def format_tail(self, pkginfo): tail = '''.SH SEE ALSO /usr/share/doc/pythonX.Y-%s/ .SH BUGS Please report bugs on the project\'s mailing list: %s .SH AUTHOR %s <%s> ''' % (getattr(pkginfo, 'debian_name', pkginfo.modname), pkginfo.mailinglist, pkginfo.author, pkginfo.author_email) if hasattr(pkginfo, "copyright"): tail += ''' .SH COPYRIGHT %s ''' % pkginfo.copyright return tail def generate_manpage(optparser, pkginfo, section=1, stream=sys.stdout, level=0): """generate a man page from an optik parser""" formatter = ManHelpFormatter() formatter.output_level = level formatter.parser = optparser print >> stream, formatter.format_head(optparser, pkginfo, section) print >> stream, optparser.format_option_help(formatter) print >> stream, formatter.format_tail(pkginfo) __all__ = ('OptionParser', 'Option', 'OptionGroup', 'OptionValueError', 'Values') ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/setup.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001600711242100540033626 0ustar andreasandreas#!/usr/bin/env python # pylint: disable=W0404,W0622,W0704,W0613 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Generic Setup script, takes package info from __pkginfo__.py file. """ __docformat__ = "restructuredtext en" import os import sys import shutil from os.path import isdir, exists, join, walk try: if os.environ.get('NO_SETUPTOOLS'): raise ImportError() from setuptools import setup from setuptools.command import install_lib USE_SETUPTOOLS = 1 except ImportError: from distutils.core import setup from distutils.command import install_lib USE_SETUPTOOLS = 0 sys.modules.pop('__pkginfo__', None) # import required features from __pkginfo__ import modname, version, license, description, \ web, author, author_email # import optional features import __pkginfo__ distname = getattr(__pkginfo__, 'distname', modname) scripts = getattr(__pkginfo__, 'scripts', []) data_files = getattr(__pkginfo__, 'data_files', None) subpackage_of = getattr(__pkginfo__, 'subpackage_of', None) include_dirs = getattr(__pkginfo__, 'include_dirs', []) ext_modules = getattr(__pkginfo__, 'ext_modules', None) install_requires = getattr(__pkginfo__, 'install_requires', None) dependency_links = getattr(__pkginfo__, 'dependency_links', []) STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build') IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc', '~') if exists('README'): long_description = file('README').read() else: long_description = '' def ensure_scripts(linux_scripts): """Creates the proper script names required for each platform (taken from 4Suite) """ from distutils import util if util.get_platform()[:3] == 'win': scripts_ = [script + '.bat' for script in linux_scripts] else: scripts_ = linux_scripts return scripts_ def get_packages(directory, prefix): """return a list of subpackages for the given directory""" result = [] for package in os.listdir(directory): absfile = join(directory, package) if isdir(absfile): if exists(join(absfile, '__init__.py')) or \ package in ('test', 'tests'): if prefix: result.append('%s.%s' % (prefix, package)) else: result.append(package) result += get_packages(absfile, result[-1]) return result def export(from_dir, to_dir, blacklist=STD_BLACKLIST, ignore_ext=IGNORED_EXTENSIONS, verbose=True): """make a mirror of from_dir in to_dir, omitting directories and files listed in the black list """ def make_mirror(arg, directory, fnames): """walk handler""" for norecurs in blacklist: try: fnames.remove(norecurs) except ValueError: pass for filename in fnames: # don't include binary files if filename[-4:] in ignore_ext: continue if filename[-1] == '~': continue src = join(directory, filename) dest = to_dir + src[len(from_dir):] if verbose: print >> sys.stderr, src, '->', dest if os.path.isdir(src): if not exists(dest): os.mkdir(dest) else: if exists(dest): os.remove(dest) shutil.copy2(src, dest) try: os.mkdir(to_dir) except OSError, ex: # file exists ? import errno if ex.errno != errno.EEXIST: raise walk(from_dir, make_mirror, None) EMPTY_FILE = '''"""generated file, don\'t modify or your data will be lost""" try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: pass ''' class MyInstallLib(install_lib.install_lib): """extend install_lib command to handle package __init__.py and include_dirs variable if necessary """ def run(self): """overridden from install_lib class""" install_lib.install_lib.run(self) # create Products.__init__.py if needed if subpackage_of: product_init = join(self.install_dir, subpackage_of, '__init__.py') if not exists(product_init): self.announce('creating %s' % product_init) stream = open(product_init, 'w') stream.write(EMPTY_FILE) stream.close() # manually install included directories if any if include_dirs: if subpackage_of: base = join(subpackage_of, modname) else: base = modname for directory in include_dirs: dest = join(self.install_dir, base, directory) export(directory, dest, verbose=False) def install(**kwargs): """setup entry point""" if USE_SETUPTOOLS: if '--force-manifest' in sys.argv: sys.argv.remove('--force-manifest') # install-layout option was introduced in 2.5.3-1~exp1 elif sys.version_info < (2, 5, 4) and '--install-layout=deb' in sys.argv: sys.argv.remove('--install-layout=deb') if subpackage_of: package = subpackage_of + '.' + modname kwargs['package_dir'] = {package : '.'} packages = [package] + get_packages(os.getcwd(), package) if USE_SETUPTOOLS: kwargs['namespace_packages'] = [subpackage_of] else: kwargs['package_dir'] = {modname : '.'} packages = [modname] + get_packages(os.getcwd(), modname) if USE_SETUPTOOLS and install_requires: kwargs['install_requires'] = install_requires kwargs['dependency_links'] = dependency_links kwargs['packages'] = packages return setup(name = distname, version = version, license = license, description = description, long_description = long_description, author = author, author_email = author_email, url = web, scripts = ensure_scripts(scripts), data_files = data_files, ext_modules = ext_modules, cmdclass = {'install_lib': MyInstallLib}, **kwargs ) if __name__ == '__main__' : install() ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/cli.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001555711242100540033637 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Command line interface helper classes. It provides some default commands, a help system, a default readline configuration with completion and persistent history. Example:: class BookShell(CLIHelper): def __init__(self): # quit and help are builtins # CMD_MAP keys are commands, values are topics self.CMD_MAP['pionce'] = _("Sommeil") self.CMD_MAP['ronfle'] = _("Sommeil") CLIHelper.__init__(self) help_do_pionce = ("pionce", "pionce duree", _("met ton corps en veille")) def do_pionce(self): print 'nap is good' help_do_ronfle = ("ronfle", "ronfle volume", _("met les autres en veille")) def do_ronfle(self): print 'fuuuuuuuuuuuu rhhhhhrhrhrrh' cl = BookShell() """ __docformat__ = "restructuredtext en" from logilab.common.compat import raw_input, builtins if not hasattr(builtins, '_'): builtins._ = str def init_readline(complete_method, histfile=None): """Init the readline library if available.""" try: import readline readline.parse_and_bind("tab: complete") readline.set_completer(complete_method) string = readline.get_completer_delims().replace(':', '') readline.set_completer_delims(string) if histfile is not None: try: readline.read_history_file(histfile) except IOError: pass import atexit atexit.register(readline.write_history_file, histfile) except: print 'readline is not available :-(' class Completer : """Readline completer.""" def __init__(self, commands): self.list = commands def complete(self, text, state): """Hook called by readline when is pressed.""" n = len(text) matches = [] for cmd in self.list : if cmd[:n] == text : matches.append(cmd) try: return matches[state] except IndexError: return None class CLIHelper: """An abstract command line interface client which recognize commands and provide an help system. """ CMD_MAP = {'help' : _("Others"), 'quit' : _("Others"), } CMD_PREFIX = '' def __init__(self, histfile=None) : self._topics = {} self.commands = None self._completer = Completer(self._register_commands()) init_readline(self._completer.complete, histfile) def run(self): """loop on user input, exit on EOF""" while 1: try: line = raw_input('>>> ') except EOFError: print break s_line = line.strip() if not s_line: continue args = s_line.split() if args[0] in self.commands: try: cmd = 'do_%s' % self.commands[args[0]] getattr(self, cmd)(*args[1:]) except EOFError: break except: import traceback traceback.print_exc() else: try: self.handle_line(s_line) except: import traceback traceback.print_exc() def handle_line(self, stripped_line): """Method to overload in the concrete class (should handle lines which are not commands). """ raise NotImplementedError() # private methods ######################################################### def _register_commands(self): """ register available commands method and return the list of commands name """ self.commands = {} self._command_help = {} commands = [attr[3:] for attr in dir(self) if attr[:3] == 'do_'] for command in commands: topic = self.CMD_MAP[command] help_method = getattr(self, 'help_do_%s' % command) self._topics.setdefault(topic, []).append(help_method) self.commands[self.CMD_PREFIX + command] = command self._command_help[command] = help_method return self.commands.keys() def _print_help(self, cmd, syntax, explanation): print _('Command %s') % cmd print _('Syntax: %s') % syntax print '\t', explanation print # predefined commands ##################################################### def do_help(self, command=None) : """base input of the help system""" if command in self._command_help: self._print_help(*self._command_help[command]) elif command is None or command not in self._topics: print _("Use help or help .") print _("Available topics are:") topics = self._topics.keys() topics.sort() for topic in topics: print '\t', topic print print _("Available commands are:") commands = self.commands.keys() commands.sort() for command in commands: print '\t', command[len(self.CMD_PREFIX):] else: print _('Available commands about %s:') % command print for command_help_method in self._topics[command]: try: if callable(command_help_method): self._print_help(*command_help_method()) else: self._print_help(*command_help_method) except: import traceback traceback.print_exc() print 'ERROR in help method %s'% ( command_help_method.func_name) help_do_help = ("help", "help [topic|command]", _("print help message for the given topic/command or \ available topics when no argument")) def do_quit(self): """quit the CLI""" raise EOFError() def help_do_quit(self): return ("quit", "quit", _("quit the application")) ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/configuration.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000011667611242100540033643 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Classes to handle advanced configuration in simple to complex applications. Allows to load the configuration from a file or from command line options, to generate a sample configuration file or to display program's usage. Fills the gap between optik/optparse and ConfigParser by adding data types (which are also available as a standalone optik extension in the `optik_ext` module). Quick start: simplest usage --------------------------- .. python :: >>> import sys >>> from logilab.common.configuration import Configuration >>> options = [('dothis', {'type':'yn', 'default': True, 'metavar': ''}), ... ('value', {'type': 'string', 'metavar': ''}), ... ('multiple', {'type': 'csv', 'default': ('yop',), ... 'metavar': '', ... 'help': 'you can also document the option'}), ... ('number', {'type': 'int', 'default':2, 'metavar':''}), ... ] >>> config = Configuration(options=options, name='My config') >>> print config['dothis'] True >>> print config['value'] None >>> print config['multiple'] ('yop',) >>> print config['number'] 2 >>> print config.help() Usage: [options] Options: -h, --help show this help message and exit --dothis= --value= --multiple= you can also document the option [current: none] --number= >>> f = open('myconfig.ini', 'w') >>> f.write('''[MY CONFIG] ... number = 3 ... dothis = no ... multiple = 1,2,3 ... ''') >>> f.close() >>> config.load_file_configuration('myconfig.ini') >>> print config['dothis'] False >>> print config['value'] None >>> print config['multiple'] ['1', '2', '3'] >>> print config['number'] 3 >>> sys.argv = ['mon prog', '--value', 'bacon', '--multiple', '4,5,6', ... 'nonoptionargument'] >>> print config.load_command_line_configuration() ['nonoptionargument'] >>> print config['value'] bacon >>> config.generate_config() # class for simple configurations which don't need the # manager / providers model and prefer delegation to inheritance # # configuration values are accessible through a dict like interface # [MY CONFIG] dothis=no value=bacon # you can also document the option multiple=4,5,6 number=3 >>> """ __docformat__ = "restructuredtext en" __all__ = ('OptionsManagerMixIn', 'OptionsProviderMixIn', 'ConfigurationMixIn', 'Configuration', 'OptionsManager2ConfigurationAdapter') import os import sys import re from os.path import exists, expanduser from copy import copy from ConfigParser import ConfigParser, NoOptionError, NoSectionError, \ DuplicateSectionError from warnings import warn from logilab.common.compat import set, reversed, callable, raw_input from logilab.common.compat import str_encode as _encode from logilab.common.textutils import normalize_text, unquote from logilab.common import optik_ext as optparse OptionError = optparse.OptionError REQUIRED = [] class UnsupportedAction(Exception): """raised by set_option when it doesn't know what to do for an action""" def _get_encoding(encoding, stream): encoding = encoding or getattr(stream, 'encoding', None) if not encoding: import locale encoding = locale.getpreferredencoding() return encoding # validation functions ######################################################## def choice_validator(optdict, name, value): """validate and return a converted value for option of type 'choice' """ if not value in optdict['choices']: msg = "option %s: invalid value: %r, should be in %s" raise optparse.OptionValueError(msg % (name, value, optdict['choices'])) return value def multiple_choice_validator(optdict, name, value): """validate and return a converted value for option of type 'choice' """ choices = optdict['choices'] values = optparse.check_csv(None, name, value) for value in values: if not value in choices: msg = "option %s: invalid value: %r, should be in %s" raise optparse.OptionValueError(msg % (name, value, choices)) return values def csv_validator(optdict, name, value): """validate and return a converted value for option of type 'csv' """ return optparse.check_csv(None, name, value) def yn_validator(optdict, name, value): """validate and return a converted value for option of type 'yn' """ return optparse.check_yn(None, name, value) def named_validator(optdict, name, value): """validate and return a converted value for option of type 'named' """ return optparse.check_named(None, name, value) def file_validator(optdict, name, value): """validate and return a filepath for option of type 'file'""" return optparse.check_file(None, name, value) def color_validator(optdict, name, value): """validate and return a valid color for option of type 'color'""" return optparse.check_color(None, name, value) def password_validator(optdict, name, value): """validate and return a string for option of type 'password'""" return optparse.check_password(None, name, value) def date_validator(optdict, name, value): """validate and return a mx DateTime object for option of type 'date'""" return optparse.check_date(None, name, value) def time_validator(optdict, name, value): """validate and return a time object for option of type 'time'""" return optparse.check_time(None, name, value) def bytes_validator(optdict, name, value): """validate and return an integer for option of type 'bytes'""" return optparse.check_bytes(None, name, value) VALIDATORS = {'string' : unquote, 'int' : int, 'float': float, 'file': file_validator, 'font': unquote, 'color': color_validator, 'regexp': re.compile, 'csv': csv_validator, 'yn': yn_validator, 'bool': yn_validator, 'named': named_validator, 'password': password_validator, 'date': date_validator, 'time': time_validator, 'bytes': bytes_validator, 'choice': choice_validator, 'multiple_choice': multiple_choice_validator, } def _call_validator(opttype, optdict, option, value): if opttype not in VALIDATORS: raise Exception('Unsupported type "%s"' % opttype) try: return VALIDATORS[opttype](optdict, option, value) except TypeError: try: return VALIDATORS[opttype](value) except optparse.OptionValueError: raise except: raise optparse.OptionValueError('%s value (%r) should be of type %s' % (option, value, opttype)) # user input functions ######################################################## def input_password(optdict, question='password:'): from getpass import getpass while True: value = getpass(question) value2 = getpass('confirm: ') if value == value2: return value print 'password mismatch, try again' def input_string(optdict, question): value = raw_input(question).strip() return value or None def _make_input_function(opttype): def input_validator(optdict, question): while True: value = raw_input(question) if not value.strip(): return None try: return _call_validator(opttype, optdict, None, value) except optparse.OptionValueError, ex: msg = str(ex).split(':', 1)[-1].strip() print 'bad value: %s' % msg return input_validator INPUT_FUNCTIONS = { 'string': input_string, 'password': input_password, } for opttype in VALIDATORS.keys(): INPUT_FUNCTIONS.setdefault(opttype, _make_input_function(opttype)) def expand_default(self, option): """monkey patch OptionParser.expand_default since we have a particular way to handle defaults to avoid overriding values in the configuration file """ if self.parser is None or not self.default_tag: return option.help optname = option._long_opts[0][2:] try: provider = self.parser.options_manager._all_options[optname] except KeyError: value = None else: optdict = provider.get_option_def(optname) optname = provider.option_name(optname, optdict) value = getattr(provider.config, optname, optdict) value = format_option_value(optdict, value) if value is optparse.NO_DEFAULT or not value: value = self.NO_DEFAULT_VALUE return option.help.replace(self.default_tag, str(value)) def convert(value, optdict, name=''): """return a validated value for an option according to its type optional argument name is only used for error message formatting """ try: _type = optdict['type'] except KeyError: # FIXME return value return _call_validator(_type, optdict, name, value) def comment(string): """return string as a comment""" lines = [line.strip() for line in string.splitlines()] return '# ' + ('%s# ' % os.linesep).join(lines) def format_time(value): if not value: return '0' if value != int(value): return '%.2fs' % value value = int(value) nbmin, nbsec = divmod(value, 60) if nbsec: return '%ss' % value nbhour, nbmin_ = divmod(nbmin, 60) if nbmin_: return '%smin' % nbmin nbday, nbhour_ = divmod(nbhour, 24) if nbhour_: return '%sh' % nbhour return '%sd' % nbday def format_bytes(value): if not value: return '0' if value != int(value): return '%.2fB' % value value = int(value) prevunit = 'B' for unit in ('KB', 'MB', 'GB', 'TB'): next, remain = divmod(value, 1024) if remain: return '%s%s' % (value, prevunit) prevunit = unit value = next return '%s%s' % (value, unit) def format_option_value(optdict, value): """return the user input's value from a 'compiled' value""" if isinstance(value, (list, tuple)): value = ','.join(value) elif isinstance(value, dict): value = ','.join(['%s:%s' % (k,v) for k,v in value.items()]) elif hasattr(value, 'match'): # optdict.get('type') == 'regexp' # compiled regexp value = value.pattern elif optdict.get('type') == 'yn': value = value and 'yes' or 'no' elif isinstance(value, (str, unicode)) and value.isspace(): value = "'%s'" % value elif optdict.get('type') == 'time' and isinstance(value, (float, int, long)): value = format_time(value) elif optdict.get('type') == 'bytes' and hasattr(value, '__int__'): value = format_bytes(value) return value def ini_format_section(stream, section, options, encoding=None, doc=None): """format an options section using the INI format""" encoding = _get_encoding(encoding, stream) if doc: print >> stream, _encode(comment(doc), encoding) print >> stream, '[%s]' % section ini_format(stream, options, encoding) def ini_format(stream, options, encoding): """format options using the INI format""" for optname, optdict, value in options: value = format_option_value(optdict, value) help = optdict.get('help') if help: help = normalize_text(help, line_len=79, indent='# ') print >> stream print >> stream, _encode(help, encoding) else: print >> stream if value is None: print >> stream, '#%s=' % optname else: value = _encode(value, encoding).strip() print >> stream, '%s=%s' % (optname, value) format_section = ini_format_section def rest_format_section(stream, section, options, encoding=None, doc=None): """format an options section using the INI format""" encoding = _get_encoding(encoding, stream) if section: print >> stream, '%s\n%s' % (section, "'"*len(section)) if doc: print >> stream, _encode(normalize_text(doc, line_len=79, indent=''), encoding) print >> stream for optname, optdict, value in options: help = optdict.get('help') print >> stream, ':%s:' % optname if help: help = normalize_text(help, line_len=79, indent=' ') print >> stream, _encode(help, encoding) if value: value = _encode(format_option_value(optdict, value), encoding) print >> stream, '' print >> stream, ' Default: ``%s``' % value.replace("`` ","```` ``") class OptionsManagerMixIn(object): """MixIn to handle a configuration from both a configuration file and command line options """ def __init__(self, usage, config_file=None, version=None, quiet=0): self.config_file = config_file self.reset_parsers(usage, version=version) # list of registered options providers self.options_providers = [] # dictionary associating option name to checker self._all_options = {} self._short_options = {} self._nocallback_options = {} self._mygroups = dict() # verbosity self.quiet = quiet self._maxlevel = 0 def reset_parsers(self, usage='', version=None): # configuration file parser self.cfgfile_parser = ConfigParser() # command line parser self.cmdline_parser = optparse.OptionParser(usage=usage, version=version) self.cmdline_parser.options_manager = self self._optik_option_attrs = set(self.cmdline_parser.option_class.ATTRS) def register_options_provider(self, provider, own_group=True): """register an options provider""" assert provider.priority <= 0, "provider's priority can't be >= 0" for i in range(len(self.options_providers)): if provider.priority > self.options_providers[i].priority: self.options_providers.insert(i, provider) break else: self.options_providers.append(provider) non_group_spec_options = [option for option in provider.options if 'group' not in option[1]] groups = getattr(provider, 'option_groups', ()) if own_group and non_group_spec_options: self.add_option_group(provider.name.upper(), provider.__doc__, non_group_spec_options, provider) else: for opt, optdict in non_group_spec_options: self.add_optik_option(provider, self.cmdline_parser, opt, optdict) for gname, gdoc in groups: gname = gname.upper() goptions = [option for option in provider.options if option[1].get('group', '').upper() == gname] self.add_option_group(gname, gdoc, goptions, provider) def add_option_group(self, group_name, doc, options, provider): """add an option group including the listed options """ assert options # add option group to the command line parser if group_name in self._mygroups: group = self._mygroups[group_name] else: group = optparse.OptionGroup(self.cmdline_parser, title=group_name.capitalize()) self.cmdline_parser.add_option_group(group) group.level = provider.level self._mygroups[group_name] = group # add section to the config file if group_name != "DEFAULT": self.cfgfile_parser.add_section(group_name) # add provider's specific options for opt, optdict in options: self.add_optik_option(provider, group, opt, optdict) def add_optik_option(self, provider, optikcontainer, opt, optdict): if 'inputlevel' in optdict: warn('[0.50] "inputlevel" in option dictionary for %s is deprecated,' ' use "level"' % opt, DeprecationWarning) optdict['level'] = optdict.pop('inputlevel') args, optdict = self.optik_option(provider, opt, optdict) option = optikcontainer.add_option(*args, **optdict) self._all_options[opt] = provider self._maxlevel = max(self._maxlevel, option.level or 0) def optik_option(self, provider, opt, optdict): """get our personal option definition and return a suitable form for use with optik/optparse """ optdict = copy(optdict) others = {} if 'action' in optdict: self._nocallback_options[provider] = opt else: optdict['action'] = 'callback' optdict['callback'] = self.cb_set_provider_option # default is handled here and *must not* be given to optik if you # want the whole machinery to work if 'default' in optdict: if (optparse.OPTPARSE_FORMAT_DEFAULT and 'help' in optdict and optdict.get('default') is not None and not optdict['action'] in ('store_true', 'store_false')): optdict['help'] += ' [current: %default]' del optdict['default'] args = ['--' + str(opt)] if 'short' in optdict: self._short_options[optdict['short']] = opt args.append('-' + optdict['short']) del optdict['short'] # cleanup option definition dict before giving it to optik for key in optdict.keys(): if not key in self._optik_option_attrs: optdict.pop(key) return args, optdict def cb_set_provider_option(self, option, opt, value, parser): """optik callback for option setting""" if opt.startswith('--'): # remove -- on long option opt = opt[2:] else: # short option, get its long equivalent opt = self._short_options[opt[1:]] # trick since we can't set action='store_true' on options if value is None: value = 1 self.global_set_option(opt, value) def global_set_option(self, opt, value): """set option on the correct option provider""" self._all_options[opt].set_option(opt, value) def generate_config(self, stream=None, skipsections=(), encoding=None): """write a configuration file according to the current configuration into the given stream or stdout """ options_by_section = {} sections = [] for provider in self.options_providers: for section, options in provider.options_by_section(): if section is None: section = provider.name if section in skipsections: continue options = [(n, d, v) for (n, d, v) in options if d.get('type') is not None] if not options: continue if not section in sections: sections.append(section) alloptions = options_by_section.setdefault(section, []) alloptions += options stream = stream or sys.stdout encoding = _get_encoding(encoding, stream) printed = False for section in sections: if printed: print >> stream, '\n' format_section(stream, section.upper(), options_by_section[section], encoding) printed = True def generate_manpage(self, pkginfo, section=1, stream=None): """write a man page for the current configuration into the given stream or stdout """ self._monkeypatch_expand_default() try: optparse.generate_manpage(self.cmdline_parser, pkginfo, section, stream=stream or sys.stdout, level=self._maxlevel) finally: self._unmonkeypatch_expand_default() # initialization methods ################################################## def load_provider_defaults(self): """initialize configuration using default values""" for provider in self.options_providers: provider.load_defaults() def load_file_configuration(self, config_file=None): """load the configuration from file""" self.read_config_file(config_file) self.load_config_file() def read_config_file(self, config_file=None): """read the configuration file but do not load it (i.e. dispatching values to each options provider) """ helplevel = 1 while helplevel <= self._maxlevel: opt = '-'.join(['long'] * helplevel) + '-help' if opt in self._all_options: break # already processed def helpfunc(option, opt, val, p, level=helplevel): print self.help(level) sys.exit(0) helpmsg = '%s verbose help.' % ' '.join(['more'] * helplevel) optdict = {'action' : 'callback', 'callback' : helpfunc, 'help' : helpmsg} provider = self.options_providers[0] self.add_optik_option(provider, self.cmdline_parser, opt, optdict) provider.options += ( (opt, optdict), ) helplevel += 1 if config_file is None: config_file = self.config_file if config_file is not None: config_file = expanduser(config_file) if config_file and exists(config_file): parser = self.cfgfile_parser parser.read([config_file]) # normalize sections'title for sect, values in parser._sections.items(): if not sect.isupper() and values: parser._sections[sect.upper()] = values elif not self.quiet: msg = 'No config file found, using default configuration' print >> sys.stderr, msg return def input_config(self, onlysection=None, inputlevel=0, stream=None): """interactively get configuration values by asking to the user and generate a configuration file """ if onlysection is not None: onlysection = onlysection.upper() for provider in self.options_providers: for section, option, optdict in provider.all_options(): if onlysection is not None and section != onlysection: continue if not 'type' in optdict: # ignore action without type (callback, store_true...) continue provider.input_option(option, optdict, inputlevel) # now we can generate the configuration file if stream is not None: self.generate_config(stream) def load_config_file(self): """dispatch values previously read from a configuration file to each options provider) """ parser = self.cfgfile_parser for provider in self.options_providers: for section, option, optdict in provider.all_options(): try: value = parser.get(section, option) provider.set_option(option, value, optdict=optdict) except (NoSectionError, NoOptionError), ex: continue def load_configuration(self, **kwargs): """override configuration according to given parameters """ for opt, opt_value in kwargs.items(): opt = opt.replace('_', '-') provider = self._all_options[opt] provider.set_option(opt, opt_value) def load_command_line_configuration(self, args=None): """override configuration according to command line parameters return additional arguments """ self._monkeypatch_expand_default() try: if args is None: args = sys.argv[1:] else: args = list(args) (options, args) = self.cmdline_parser.parse_args(args=args) for provider in self._nocallback_options.keys(): config = provider.config for attr in config.__dict__.keys(): value = getattr(options, attr, None) if value is None: continue setattr(config, attr, value) return args finally: self._unmonkeypatch_expand_default() # help methods ############################################################ def add_help_section(self, title, description, level=0): """add a dummy option section for help purpose """ group = optparse.OptionGroup(self.cmdline_parser, title=title.capitalize(), description=description) group.level = level self._maxlevel = max(self._maxlevel, level) self.cmdline_parser.add_option_group(group) def _monkeypatch_expand_default(self): # monkey patch optparse to deal with our default values try: self.__expand_default_backup = optparse.HelpFormatter.expand_default optparse.HelpFormatter.expand_default = expand_default except AttributeError: # python < 2.4: nothing to be done pass def _unmonkeypatch_expand_default(self): # remove monkey patch if hasattr(optparse.HelpFormatter, 'expand_default'): # unpatch optparse to avoid side effects optparse.HelpFormatter.expand_default = self.__expand_default_backup def help(self, level=0): """return the usage string for available options """ self.cmdline_parser.formatter.output_level = level self._monkeypatch_expand_default() try: return self.cmdline_parser.format_help() finally: self._unmonkeypatch_expand_default() class Method(object): """used to ease late binding of default method (so you can define options on the class using default methods on the configuration instance) """ def __init__(self, methname): self.method = methname self._inst = None def bind(self, instance): """bind the method to its instance""" if self._inst is None: self._inst = instance def __call__(self, *args, **kwargs): assert self._inst, 'unbound method' return getattr(self._inst, self.method)(*args, **kwargs) class OptionsProviderMixIn(object): """Mixin to provide options to an OptionsManager""" # those attributes should be overridden priority = -1 name = 'default' options = () level = 0 def __init__(self): self.config = optparse.Values() for option in self.options: try: option, optdict = option except ValueError: raise Exception('Bad option: %r' % option) if isinstance(optdict.get('default'), Method): optdict['default'].bind(self) elif isinstance(optdict.get('callback'), Method): optdict['callback'].bind(self) self.load_defaults() def load_defaults(self): """initialize the provider using default values""" for opt, optdict in self.options: action = optdict.get('action') if action != 'callback': # callback action have no default default = self.option_default(opt, optdict) if default is REQUIRED: continue self.set_option(opt, default, action, optdict) def option_default(self, opt, optdict=None): """return the default value for an option""" if optdict is None: optdict = self.get_option_def(opt) default = optdict.get('default') if callable(default): default = default() return default def option_name(self, opt, optdict=None): """get the config attribute corresponding to opt """ if optdict is None: optdict = self.get_option_def(opt) return optdict.get('dest', opt.replace('-', '_')) def option_value(self, opt): """get the current value for the given option""" return getattr(self.config, self.option_name(opt), None) def set_option(self, opt, value, action=None, optdict=None): """method called to set an option (registered in the options list) """ # print "************ setting option", opt," to value", value if optdict is None: optdict = self.get_option_def(opt) if value is not None: value = convert(value, optdict, opt) if action is None: action = optdict.get('action', 'store') if optdict.get('type') == 'named': # XXX need specific handling optname = self.option_name(opt, optdict) currentvalue = getattr(self.config, optname, None) if currentvalue: currentvalue.update(value) value = currentvalue if action == 'store': setattr(self.config, self.option_name(opt, optdict), value) elif action in ('store_true', 'count'): setattr(self.config, self.option_name(opt, optdict), 0) elif action == 'store_false': setattr(self.config, self.option_name(opt, optdict), 1) elif action == 'append': opt = self.option_name(opt, optdict) _list = getattr(self.config, opt, None) if _list is None: if type(value) in (type(()), type([])): _list = value elif value is not None: _list = [] _list.append(value) setattr(self.config, opt, _list) elif type(_list) is type(()): setattr(self.config, opt, _list + (value,)) else: _list.append(value) elif action == 'callback': optdict['callback'](None, opt, value, None) else: raise UnsupportedAction(action) def input_option(self, option, optdict, inputlevel=99): default = self.option_default(option, optdict) if default is REQUIRED: defaultstr = '(required): ' elif optdict.get('level', 0) > inputlevel: self.set_option(option, default, optdict=optdict) return elif optdict['type'] == 'password' or default is None: defaultstr = ': ' else: defaultstr = '(default: %s): ' % format_option_value(optdict, default) print ':%s:' % option print optdict.get('help') or option inputfunc = INPUT_FUNCTIONS[optdict['type']] value = inputfunc(optdict, defaultstr) while default is REQUIRED and not value: print 'please specify a value' value = inputfunc(optdict, '%s: ' % option) if value is None and default is not None: value = default self.set_option(option, value, optdict=optdict) def get_option_def(self, opt): """return the dictionary defining an option given it's name""" assert self.options for option in self.options: if option[0] == opt: return option[1] raise OptionError('no such option %s in section %r' % (self.name, opt), opt) def all_options(self): """return an iterator on available options for this provider option are actually described by a 3-uple: (section, option name, option dictionary) """ for section, options in self.options_by_section(): if section is None: if self.name is None: continue section = self.name.upper() for option, optiondict, value in options: yield section, option, optiondict def options_by_section(self): """return an iterator on options grouped by section (section, [list of (optname, optdict, optvalue)]) """ sections = {} for optname, optdict in self.options: sections.setdefault(optdict.get('group'), []).append( (optname, optdict, self.option_value(optname))) if None in sections: yield None, sections.pop(None) for section, options in sections.items(): yield section.upper(), options def options_and_values(self, options=None): if options is None: options = self.options for optname, optdict in options: yield (optname, optdict, self.option_value(optname)) class ConfigurationMixIn(OptionsManagerMixIn, OptionsProviderMixIn): """basic mixin for simple configurations which don't need the manager / providers model """ def __init__(self, *args, **kwargs): if not args: kwargs.setdefault('usage', '') kwargs.setdefault('quiet', 1) OptionsManagerMixIn.__init__(self, *args, **kwargs) OptionsProviderMixIn.__init__(self) if not getattr(self, 'option_groups', None): self.option_groups = [] for option, optdict in self.options: try: gdef = (optdict['group'].upper(), '') except KeyError: continue if not gdef in self.option_groups: self.option_groups.append(gdef) self.register_options_provider(self, own_group=0) def register_options(self, options): """add some options to the configuration""" options_by_group = {} for optname, optdict in options: options_by_group.setdefault(optdict.get('group', self.name.upper()), []).append((optname, optdict)) for group, options in options_by_group.items(): self.add_option_group(group, None, options, self) self.options += tuple(options) def load_defaults(self): OptionsProviderMixIn.load_defaults(self) def __iter__(self): return iter(self.config.__dict__.iteritems()) def __getitem__(self, key): try: return getattr(self.config, self.option_name(key)) except (optparse.OptionValueError, AttributeError): raise KeyError(key) def __setitem__(self, key, value): self.set_option(key, value) def get(self, key, default=None): try: return getattr(self.config, self.option_name(key)) except (OptionError, AttributeError): return default class Configuration(ConfigurationMixIn): """class for simple configurations which don't need the manager / providers model and prefer delegation to inheritance configuration values are accessible through a dict like interface """ def __init__(self, config_file=None, options=None, name=None, usage=None, doc=None, version=None): if options is not None: self.options = options if name is not None: self.name = name if doc is not None: self.__doc__ = doc super(Configuration, self).__init__(config_file=config_file, usage=usage, version=version) class OptionsManager2ConfigurationAdapter(object): """Adapt an option manager to behave like a `logilab.common.configuration.Configuration` instance """ def __init__(self, provider): self.config = provider def __getattr__(self, key): return getattr(self.config, key) def __getitem__(self, key): provider = self.config._all_options[key] try: return getattr(provider.config, provider.option_name(key)) except AttributeError: raise KeyError(key) def __setitem__(self, key, value): self.config.global_set_option(self.config.option_name(key), value) def get(self, key, default=None): provider = self.config._all_options[key] try: return getattr(provider.config, provider.option_name(key)) except AttributeError: return default def read_old_config(newconfig, changes, configfile): """initialize newconfig from a deprecated configuration file possible changes: * ('renamed', oldname, newname) * ('moved', option, oldgroup, newgroup) * ('typechanged', option, oldtype, newvalue) """ # build an index of changes changesindex = {} for action in changes: if action[0] == 'moved': option, oldgroup, newgroup = action[1:] changesindex.setdefault(option, []).append((action[0], oldgroup, newgroup)) continue if action[0] == 'renamed': oldname, newname = action[1:] changesindex.setdefault(newname, []).append((action[0], oldname)) continue if action[0] == 'typechanged': option, oldtype, newvalue = action[1:] changesindex.setdefault(option, []).append((action[0], oldtype, newvalue)) continue if action[1] in ('added', 'removed'): continue # nothing to do here raise Exception('unknown change %s' % action[0]) # build a config object able to read the old config options = [] for optname, optdef in newconfig.options: for action in changesindex.pop(optname, ()): if action[0] == 'moved': oldgroup, newgroup = action[1:] optdef = optdef.copy() optdef['group'] = oldgroup elif action[0] == 'renamed': optname = action[1] elif action[0] == 'typechanged': oldtype = action[1] optdef = optdef.copy() optdef['type'] = oldtype options.append((optname, optdef)) if changesindex: raise Exception('unapplied changes: %s' % changesindex) oldconfig = Configuration(options=options, name=newconfig.name) # read the old config oldconfig.load_file_configuration(configfile) # apply values reverting changes changes.reverse() done = set() for action in changes: if action[0] == 'renamed': oldname, newname = action[1:] newconfig[newname] = oldconfig[oldname] done.add(newname) elif action[0] == 'typechanged': optname, oldtype, newvalue = action[1:] newconfig[optname] = newvalue done.add(optname) for optname, optdef in newconfig.options: if optdef.get('type') and not optname in done: newconfig.set_option(optname, oldconfig[optname], optdict=optdef) def merge_options(options): """preprocess options to remove duplicate""" alloptions = {} options = list(options) for i in range(len(options)-1, -1, -1): optname, optdict = options[i] if optname in alloptions: options.pop(i) alloptions[optname].update(optdict) else: alloptions[optname] = optdict return tuple(options) ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/hg.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000661111242100540033626 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """mercurial utilities (mercurial should be installed)""" __docformat__ = "restructuredtext en" import os import sys import os.path as osp try: from mercurial.error import RepoError from mercurial.__version__ import version as hg_version except ImportError: from mercurial.repo import RepoError from mercurial.version import get_version hg_version = get_version() from mercurial.hg import repository as Repository from mercurial.ui import ui as Ui from mercurial.node import short try: # mercurial >= 1.2 (?) from mercurial.cmdutil import walkchangerevs except ImportError, ex: from mercurial.commands import walkchangerevs try: # mercurial >= 1.1 (.1?) from mercurial.util import cachefunc except ImportError, ex: def cachefunc(func): return func try: # mercurial >= 1.3.1 from mercurial import encoding _encoding = encoding.encoding except ImportError: try: from mercurial.util import _encoding except ImportError: import locale # stay compatible with mercurial 0.9.1 (etch debian release) # (borrowed from mercurial.util 1.1.2) try: _encoding = os.environ.get("HGENCODING") if sys.platform == 'darwin' and not _encoding: # On darwin, getpreferredencoding ignores the locale environment and # always returns mac-roman. We override this if the environment is # not C (has been customized by the user). locale.setlocale(locale.LC_CTYPE, '') _encoding = locale.getlocale()[1] if not _encoding: _encoding = locale.getpreferredencoding() or 'ascii' except locale.Error: _encoding = 'ascii' try: # demandimport causes problems when activated, ensure it isn't # XXX put this in apycot where the pb has been noticed? from mercurial import demandimport demandimport.disable() except: pass Ui.warn = lambda *args, **kwargs: 0 # make it quiet def find_repository(path): """returns 's mercurial repository None if is not under hg control """ path = osp.realpath(osp.abspath(path)) while not osp.isdir(osp.join(path, ".hg")): oldpath = path path = osp.dirname(path) if path == oldpath: return None return path def get_repository(path): """Simple function that open a hg repository""" repopath = find_repository(path) if repopath is None: raise RuntimeError('no repository found in %s' % osp.abspath(path)) return Repository(Ui(), path=repopath) ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/decorators.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001342711242100540033631 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """A few useful function/method decorators. """ __docformat__ = "restructuredtext en" from types import MethodType from time import clock, time import sys, re # XXX rewrite so we can use the decorator syntax when keyarg has to be specified def cached(callableobj, keyarg=None): """Simple decorator to cache result of method call.""" if callableobj.func_code.co_argcount == 1 or keyarg == 0: def cache_wrapper1(self, *args): cache = '_%s_cache_' % callableobj.__name__ #print 'cache1?', cache try: return self.__dict__[cache] except KeyError: #print 'miss' value = callableobj(self, *args) setattr(self, cache, value) return value cache_wrapper1.__doc__ = callableobj.__doc__ return cache_wrapper1 elif keyarg: def cache_wrapper2(self, *args, **kwargs): cache = '_%s_cache_' % callableobj.__name__ key = args[keyarg-1] #print 'cache2?', cache, self, key try: _cache = self.__dict__[cache] except KeyError: #print 'init' _cache = {} setattr(self, cache, _cache) try: return _cache[key] except KeyError: #print 'miss', self, cache, key _cache[key] = callableobj(self, *args, **kwargs) return _cache[key] cache_wrapper2.__doc__ = callableobj.__doc__ return cache_wrapper2 def cache_wrapper3(self, *args): cache = '_%s_cache_' % callableobj.__name__ #print 'cache3?', cache, self, args try: _cache = self.__dict__[cache] except KeyError: #print 'init' _cache = {} setattr(self, cache, _cache) try: return _cache[args] except KeyError: #print 'miss' _cache[args] = callableobj(self, *args) return _cache[args] cache_wrapper3.__doc__ = callableobj.__doc__ return cache_wrapper3 def clear_cache(obj, funcname): """Function to clear a cache handled by the cached decorator.""" try: del obj.__dict__['_%s_cache_' % funcname] except KeyError: pass def copy_cache(obj, funcname, cacheobj): """Copy cache for from cacheobj to obj.""" cache = '_%s_cache_' % funcname try: setattr(obj, cache, cacheobj.__dict__[cache]) except KeyError: pass class wproperty(object): """Simple descriptor expecting to take a modifier function as first argument and looking for a _ to retrieve the attribute. """ def __init__(self, setfunc): self.setfunc = setfunc self.attrname = '_%s' % setfunc.__name__ def __set__(self, obj, value): self.setfunc(obj, value) def __get__(self, obj, cls): assert obj is not None return getattr(obj, self.attrname) class classproperty(object): """this is a simple property-like class but for class attributes. """ def __init__(self, get): self.get = get def __get__(self, inst, cls): return self.get(cls) class iclassmethod(object): '''Descriptor for method which should be available as class method if called on the class or instance method if called on an instance. ''' def __init__(self, func): self.func = func def __get__(self, instance, objtype): if instance is None: return MethodType(self.func, objtype, objtype.__class__) return MethodType(self.func, instance, objtype) def __set__(self, instance, value): raise AttributeError("can't set attribute") def timed(f): def wrap(*args, **kwargs): t = time() c = clock() res = f(*args, **kwargs) print '%s clock: %.9f / time: %.9f' % (f.__name__, clock() - c, time() - t) return res return wrap def locked(acquire, release): """Decorator taking two methods to acquire/release a lock as argument, returning a decorator function which will call the inner method after having called acquire(self) et will call release(self) afterwards. """ def decorator(f): def wrapper(self, *args, **kwargs): acquire(self) try: return f(self, *args, **kwargs) finally: release(self) return wrapper return decorator def monkeypatch(klass, methodname=None): """Decorator extending class with the decorated function >>> class A: ... pass >>> @monkeypatch(A) ... def meth(self): ... return 12 ... >>> a = A() >>> a.meth() 12 >>> @monkeypatch(A, 'foo') ... def meth(self): ... return 12 ... >>> a.foo() 12 """ def decorator(func): setattr(klass, methodname or func.__name__, func) return func return decorator ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/date.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002314311242100540033625 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Date manipulation helper functions.""" __docformat__ = "restructuredtext en" import math import re from locale import getpreferredencoding from datetime import date, time, datetime, timedelta from time import strptime as time_strptime from calendar import monthrange, timegm try: from mx.DateTime import RelativeDateTime, Date, DateTimeType except ImportError: endOfMonth = None DateTimeType = datetime else: endOfMonth = RelativeDateTime(months=1, day=-1) # NOTE: should we implement a compatibility layer between date representations # as we have in lgc.db ? FRENCH_FIXED_HOLIDAYS = { 'jour_an' : '%s-01-01', 'fete_travail' : '%s-05-01', 'armistice1945' : '%s-05-08', 'fete_nat' : '%s-07-14', 'assomption' : '%s-08-15', 'toussaint' : '%s-11-01', 'armistice1918' : '%s-11-11', 'noel' : '%s-12-25', } FRENCH_MOBILE_HOLIDAYS = { 'paques2004' : '2004-04-12', 'ascension2004' : '2004-05-20', 'pentecote2004' : '2004-05-31', 'paques2005' : '2005-03-28', 'ascension2005' : '2005-05-05', 'pentecote2005' : '2005-05-16', 'paques2006' : '2006-04-17', 'ascension2006' : '2006-05-25', 'pentecote2006' : '2006-06-05', 'paques2007' : '2007-04-09', 'ascension2007' : '2007-05-17', 'pentecote2007' : '2007-05-28', 'paques2008' : '2008-03-24', 'ascension2008' : '2008-05-01', 'pentecote2008' : '2008-05-12', 'paques2009' : '2009-04-13', 'ascension2009' : '2009-05-21', 'pentecote2009' : '2009-06-01', 'paques2010' : '2010-04-05', 'ascension2010' : '2010-05-13', 'pentecote2010' : '2010-05-24', 'paques2011' : '2011-04-25', 'ascension2011' : '2011-06-02', 'pentecote2011' : '2011-06-13', 'paques2012' : '2012-04-09', 'ascension2012' : '2012-05-17', 'pentecote2012' : '2012-05-28', } # XXX this implementation cries for multimethod dispatching def get_step(dateobj, nbdays=1): # assume date is either a python datetime or a mx.DateTime object if isinstance(dateobj, date): return ONEDAY * nbdays return nbdays # mx.DateTime is ok with integers def datefactory(year, month, day, sampledate): # assume date is either a python datetime or a mx.DateTime object if isinstance(sampledate, datetime): return datetime(year, month, day) if isinstance(sampledate, date): return date(year, month, day) return Date(year, month, day) def weekday(dateobj): # assume date is either a python datetime or a mx.DateTime object if isinstance(dateobj, date): return dateobj.weekday() return dateobj.day_of_week def str2date(datestr, sampledate): # NOTE: datetime.strptime is not an option until we drop py2.4 compat year, month, day = [int(chunk) for chunk in datestr.split('-')] return datefactory(year, month, day, sampledate) def days_between(start, end): if isinstance(start, date): delta = end - start # datetime.timedelta.days is always an integer (floored) if delta.seconds: return delta.days + 1 return delta.days else: return int(math.ceil((end - start).days)) def get_national_holidays(begin, end): """return french national days off between begin and end""" begin = datefactory(begin.year, begin.month, begin.day, begin) end = datefactory(end.year, end.month, end.day, end) holidays = [str2date(datestr, begin) for datestr in FRENCH_MOBILE_HOLIDAYS.values()] for year in xrange(begin.year, end.year+1): for datestr in FRENCH_FIXED_HOLIDAYS.values(): date = str2date(datestr % year, begin) if date not in holidays: holidays.append(date) return [day for day in holidays if begin <= day < end] def add_days_worked(start, days): """adds date but try to only take days worked into account""" step = get_step(start) weeks, plus = divmod(days, 5) end = start + ((weeks * 7) + plus) * step if weekday(end) >= 5: # saturday or sunday end += (2 * step) end += len([x for x in get_national_holidays(start, end + step) if weekday(x) < 5]) * step if weekday(end) >= 5: # saturday or sunday end += (2 * step) return end def nb_open_days(start, end): assert start <= end step = get_step(start) days = days_between(start, end) weeks, plus = divmod(days, 7) if weekday(start) > weekday(end): plus -= 2 elif weekday(end) == 6: plus -= 1 open_days = weeks * 5 + plus nb_week_holidays = len([x for x in get_national_holidays(start, end+step) if weekday(x) < 5 and x < end]) open_days -= nb_week_holidays if open_days < 0: return 0 return open_days def date_range(begin, end, incday=None, incmonth=None): """yields each date between begin and end :param begin: the start date :param end: the end date :param incr: the step to use to iterate over dates. Default is one day. :param include: None (means no exclusion) or a function taking a date as parameter, and returning True if the date should be included. When using mx datetime, you should *NOT* use incmonth argument, use instead oneDay, oneHour, oneMinute, oneSecond, oneWeek or endOfMonth (to enumerate months) as `incday` argument """ assert not (incday and incmonth) begin = todate(begin) end = todate(end) if incmonth: while begin < end: begin = next_month(begin, incmonth) yield begin else: incr = get_step(begin, incday or 1) while begin < end: yield begin begin += incr # makes py datetime usable ##################################################### ONEDAY = timedelta(days=1) ONEWEEK = timedelta(days=7) try: strptime = datetime.strptime except AttributeError: # py < 2.5 from time import strptime as time_strptime def strptime(value, format): return datetime(*time_strptime(value, format)[:6]) def strptime_time(value, format='%H:%M'): return time(*time_strptime(value, format)[3:6]) def todate(somedate): """return a date from a date (leaving unchanged) or a datetime""" if isinstance(somedate, datetime): return date(somedate.year, somedate.month, somedate.day) assert isinstance(somedate, (date, DateTimeType)), repr(somedate) return somedate def totime(somedate): """return a time from a time (leaving unchanged), date or datetime""" # XXX mx compat if not isinstance(somedate, time): return time(somedate.hour, somedate.minute, somedate.second) assert isinstance(somedate, (time)), repr(somedate) return somedate def todatetime(somedate): """return a date from a date (leaving unchanged) or a datetime""" # take care, datetime is a subclass of date if isinstance(somedate, datetime): return somedate assert isinstance(somedate, (date, DateTimeType)), repr(somedate) return datetime(somedate.year, somedate.month, somedate.day) def datetime2ticks(somedate): return timegm(somedate.timetuple()) * 1000 def days_in_month(somedate): return monthrange(somedate.year, somedate.month)[1] def days_in_year(somedate): feb = date(somedate.year, 2, 1) if days_in_month(feb) == 29: return 366 else: return 365 def previous_month(somedate, nbmonth=1): while nbmonth: somedate = first_day(somedate) - ONEDAY nbmonth -= 1 return somedate def next_month(somedate, nbmonth=1): while nbmonth: somedate = last_day(somedate) + ONEDAY nbmonth -= 1 return somedate def first_day(somedate): return date(somedate.year, somedate.month, 1) def last_day(somedate): return date(somedate.year, somedate.month, days_in_month(somedate)) def ustrftime(somedate, fmt='%Y-%m-%d'): """like strftime, but returns a unicode string instead of an encoded string which' may be problematic with localized date. encoding is guessed by locale.getpreferredencoding() """ encoding = getpreferredencoding(do_setlocale=False) or 'UTF-8' try: return unicode(somedate.strftime(str(fmt)), encoding) except ValueError, exc: if '1900' not in exc.args[0]: raise # datetime is not happy with dates before 1900 # we try to work around this, assuming a simple # format string fields = {'Y': somedate.year, 'm': somedate.month, 'd': somedate.day, } if isinstance(somedate, datetime): fields.update({'H': somedate.hour, 'M': somedate.minute, 'S': somedate.second}) fmt = re.sub('%([YmdHMS])', r'%(\1)02d', fmt) return unicode(fmt) % fields ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/cache.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000704511242100540033630 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Cache module, with a least recently used algorithm for the management of the deletion of entries. """ __docformat__ = "restructuredtext en" from threading import Lock from logilab.common.decorators import locked _marker = object() class Cache(dict): """A dictionary like cache. inv: len(self._usage) <= self.size len(self.data) <= self.size """ def __init__(self, size=100): """ Warning : Cache.__init__() != dict.__init__(). Constructor does not take any arguments beside size. """ assert size >= 0, 'cache size must be >= 0 (0 meaning no caching)' self.size = size self._usage = [] self._lock = Lock() super(Cache, self).__init__() def _acquire(self): self._lock.acquire() def _release(self): self._lock.release() def _update_usage(self, key): if not self._usage: self._usage.append(key) elif self._usage[-1] != key: try: self._usage.remove(key) except ValueError: # we are inserting a new key # check the size of the dictionary # and remove the oldest item in the cache if self.size and len(self._usage) >= self.size: super(Cache, self).__delitem__(self._usage[0]) del self._usage[0] self._usage.append(key) else: pass # key is already the most recently used key def __getitem__(self, key): value = super(Cache, self).__getitem__(key) self._update_usage(key) return value __getitem__ = locked(_acquire, _release)(__getitem__) def __setitem__(self, key, item): # Just make sure that size > 0 before inserting a new item in the cache if self.size > 0: super(Cache, self).__setitem__(key, item) self._update_usage(key) __setitem__ = locked(_acquire, _release)(__setitem__) def __delitem__(self, key): super(Cache, self).__delitem__(key) self._usage.remove(key) __delitem__ = locked(_acquire, _release)(__delitem__) def clear(self): super(Cache, self).clear() self._usage = [] clear = locked(_acquire, _release)(clear) def pop(self, key, default=_marker): if key in self: self._usage.remove(key) #if default is _marker: # return super(Cache, self).pop(key) return super(Cache, self).pop(key, default) pop = locked(_acquire, _release)(pop) def popitem(self): raise NotImplementedError() def setdefault(self, key, default=None): raise NotImplementedError() def update(self, other): raise NotImplementedError() ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/vcgutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001700311242100540033623 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Functions to generate files readable with Georg Sander's vcg (Visualization of Compiler Graphs). You can download vcg at http://rw4.cs.uni-sb.de/~sander/html/gshome.html Note that vcg exists as a debian package. See vcg's documentation for explanation about the different values that maybe used for the functions parameters. """ __docformat__ = "restructuredtext en" import string ATTRS_VAL = { 'algos': ('dfs', 'tree', 'minbackward', 'left_to_right','right_to_left', 'top_to_bottom','bottom_to_top', 'maxdepth', 'maxdepthslow', 'mindepth', 'mindepthslow', 'mindegree', 'minindegree', 'minoutdegree', 'maxdegree','maxindegree', 'maxoutdegree'), 'booleans': ('yes', 'no'), 'colors': ('black', 'white', 'blue', 'red', 'green', 'yellow', 'magenta', 'lightgrey', 'cyan', 'darkgrey', 'darkblue', 'darkred', 'darkgreen', 'darkyellow', 'darkmagenta', 'darkcyan', 'gold', 'lightblue', 'lightred', 'lightgreen', 'lightyellow', 'lightmagenta', 'lightcyan', 'lilac', 'turquoise', 'aquamarine', 'khaki', 'purple', 'yellowgreen', 'pink', 'orange', 'orchid'), 'shapes': ('box', 'ellipse', 'rhomb', 'triangle'), 'textmodes': ('center', 'left_justify', 'right_justify'), 'arrowstyles': ('solid', 'line', 'none'), 'linestyles': ('continuous', 'dashed', 'dotted', 'invisible'), } # meaning of possible values: # O -> string # 1 -> int # list -> value in list GRAPH_ATTRS = { 'title' : 0, 'label' : 0, 'color': ATTRS_VAL['colors'], 'textcolor': ATTRS_VAL['colors'], 'bordercolor': ATTRS_VAL['colors'], 'width': 1, 'height': 1, 'borderwidth': 1, 'textmode': ATTRS_VAL['textmodes'], 'shape': ATTRS_VAL['shapes'], 'shrink': 1, 'stretch': 1, 'orientation': ATTRS_VAL['algos'], 'vertical_order': 1, 'horizontal_order': 1, 'xspace': 1, 'yspace': 1, 'layoutalgorithm' : ATTRS_VAL['algos'], 'late_edge_labels' : ATTRS_VAL['booleans'], 'display_edge_labels': ATTRS_VAL['booleans'], 'dirty_edge_labels' : ATTRS_VAL['booleans'], 'finetuning': ATTRS_VAL['booleans'], 'manhattan_edges': ATTRS_VAL['booleans'], 'smanhattan_edges': ATTRS_VAL['booleans'], 'port_sharing': ATTRS_VAL['booleans'], 'edges': ATTRS_VAL['booleans'], 'nodes': ATTRS_VAL['booleans'], 'splines': ATTRS_VAL['booleans'], } NODE_ATTRS = { 'title' : 0, 'label' : 0, 'color': ATTRS_VAL['colors'], 'textcolor': ATTRS_VAL['colors'], 'bordercolor': ATTRS_VAL['colors'], 'width': 1, 'height': 1, 'borderwidth': 1, 'textmode': ATTRS_VAL['textmodes'], 'shape': ATTRS_VAL['shapes'], 'shrink': 1, 'stretch': 1, 'vertical_order': 1, 'horizontal_order': 1, } EDGE_ATTRS = { 'sourcename' : 0, 'targetname' : 0, 'label' : 0, 'linestyle' : ATTRS_VAL['linestyles'], 'class' : 1, 'thickness' : 0, 'color': ATTRS_VAL['colors'], 'textcolor': ATTRS_VAL['colors'], 'arrowcolor': ATTRS_VAL['colors'], 'backarrowcolor': ATTRS_VAL['colors'], 'arrowsize': 1, 'backarrowsize': 1, 'arrowstyle': ATTRS_VAL['arrowstyles'], 'backarrowstyle': ATTRS_VAL['arrowstyles'], 'textmode': ATTRS_VAL['textmodes'], 'priority': 1, 'anchor': 1, 'horizontal_order': 1, } # Misc utilities ############################################################### def latin_to_vcg(st): """Convert latin characters using vcg escape sequence. """ for char in st: if char not in string.ascii_letters: try: num = ord(char) if num >= 192: st = st.replace(char, r'\fi%d'%ord(char)) except: pass return st class VCGPrinter: """A vcg graph writer. """ def __init__(self, output_stream): self._stream = output_stream self._indent = '' def open_graph(self, **args): """open a vcg graph """ self._stream.write('%sgraph:{\n'%self._indent) self._inc_indent() self._write_attributes(GRAPH_ATTRS, **args) def close_graph(self): """close a vcg graph """ self._dec_indent() self._stream.write('%s}\n'%self._indent) def node(self, title, **args): """draw a node """ self._stream.write('%snode: {title:"%s"' % (self._indent, title)) self._write_attributes(NODE_ATTRS, **args) self._stream.write('}\n') def edge(self, from_node, to_node, edge_type='', **args): """draw an edge from a node to another. """ self._stream.write( '%s%sedge: {sourcename:"%s" targetname:"%s"' % ( self._indent, edge_type, from_node, to_node)) self._write_attributes(EDGE_ATTRS, **args) self._stream.write('}\n') # private ################################################################## def _write_attributes(self, attributes_dict, **args): """write graph, node or edge attributes """ for key, value in args.items(): try: _type = attributes_dict[key] except KeyError: raise Exception('''no such attribute %s possible attributes are %s''' % (key, attributes_dict.keys())) if not _type: self._stream.write('%s%s:"%s"\n' % (self._indent, key, value)) elif _type == 1: self._stream.write('%s%s:%s\n' % (self._indent, key, int(value))) elif value in _type: self._stream.write('%s%s:%s\n' % (self._indent, key, value)) else: raise Exception('''value %s isn\'t correct for attribute %s correct values are %s''' % (value, key, _type)) def _inc_indent(self): """increment indentation """ self._indent = ' %s' % self._indent def _dec_indent(self): """decrement indentation """ self._indent = self._indent[:-2] ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/xmlutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000434111242100540033624 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """XML utilities. This module contains useful functions for parsing and using XML data. For the moment, there is only one function that can parse the data inside a processing instruction and return a Python dictionary. """ __docformat__ = "restructuredtext en" import re RE_DOUBLE_QUOTE = re.compile('([\w\-\.]+)="([^"]+)"') RE_SIMPLE_QUOTE = re.compile("([\w\-\.]+)='([^']+)'") def parse_pi_data(pi_data): """ Utility function that parses the data contained in an XML processing instruction and returns a dictionary of keywords and their associated values (most of the time, the processing instructions contain data like ``keyword="value"``, if a keyword is not associated to a value, for example ``keyword``, it will be associated to ``None``). :param pi_data: data contained in an XML processing instruction. :type pi_data: unicode :returns: Dictionary of the keywords (Unicode strings) associated to their values (Unicode strings) as they were defined in the data. :rtype: dict """ results = {} for elt in pi_data.split(): if RE_DOUBLE_QUOTE.match(elt): kwd, val = RE_DOUBLE_QUOTE.match(elt).groups() elif RE_SIMPLE_QUOTE.match(elt): kwd, val = RE_SIMPLE_QUOTE.match(elt).groups() else: kwd, val = elt, None results[kwd] = val return results ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/COPYINGscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000004310311242100540033623 0ustar andreasandreas GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead of this License. ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/tasksqueue.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000547011242100540033630 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Prioritized tasks queue""" __docformat__ = "restructuredtext en" from bisect import insort_left from Queue import Queue LOW = 0 MEDIUM = 10 HIGH = 100 PRIORITY = { 'LOW': LOW, 'MEDIUM': MEDIUM, 'HIGH': HIGH, } REVERSE_PRIORITY = dict((values, key) for key, values in PRIORITY.iteritems()) class PrioritizedTasksQueue(Queue): def _init(self, maxsize): """Initialize the queue representation""" self.maxsize = maxsize # ordered list of task, from the lowest to the highest priority self.queue = [] def _put(self, item): """Put a new item in the queue""" for i, task in enumerate(self.queue): # equivalent task if task == item: # if new task has a higher priority, remove the one already # queued so the new priority will be considered if task < item: item.merge(task) del self.queue[i] break # else keep it so current order is kept task.merge(item) return insort_left(self.queue, item) def _get(self): """Get an item from the queue""" return self.queue.pop() def __iter__(self): return iter(self.queue) def remove(self, tid): """remove a specific task from the queue""" # XXX acquire lock for i, task in enumerate(self): if task.id == tid: self.queue.pop(i) return raise ValueError('not task of id %s in queue' % tid) class Task(object): def __init__(self, tid, priority=LOW): # task id self.id = tid # task priority self.priority = priority def __repr__(self): return '' % (self.id, id(self)) def __cmp__(self, other): return cmp(self.priority, other.priority) def __eq__(self, other): return self.id == other.id def merge(self, other): pass ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/html.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001251711242100540033630 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """render a tree in HTML.""" __docformat__ = "restructuredtext en" from warnings import warn warn('lgc.html module is deprecated', DeprecationWarning, stacklevel=2) def render_HTML_tree(tree, selected_node=None, render_node=None, caption=None): """ Generate a pure HTML representation of a tree given as an instance of a logilab.common.tree.Node selected_node is the currently selected node (if any) which will have its surrounding
have id="selected" (which default to a bold border libe with the default CSS). render_node is a function that should take a Node content (Node.id) as parameter and should return a string (what will be displayed in the cell). Warning: proper rendering of the generated html code depends on html_tree.css """ tree_depth = tree.depth_down() if render_node is None: render_node = str # helper function that build a matrix from the tree, like: # +------+-----------+-----------+ # | root | child_1_1 | child_2_1 | # | root | child_1_1 | child_2_2 | # | root | child_1_2 | | # | root | child_1_3 | child_2_3 | # | root | child_1_3 | child_2_4 | # +------+-----------+-----------+ # from: # root -+- child_1_1 -+- child_2_1 # | | # | +- child_2_2 # +- child_1_2 # | # +- child1_3 -+- child_2_3 # | # +- child_2_2 def build_matrix(path, matrix): if path[-1].is_leaf(): matrix.append(path[:]) else: for child in path[-1].children: build_matrix(path[:] + [child], matrix) matrix = [] build_matrix([tree], matrix) # make all lines in the matrix have the same number of columns for line in matrix: line.extend([None]*(tree_depth-len(line))) for i in range(len(matrix)-1, 0, -1): prev_line, line = matrix[i-1:i+1] for j in range(len(line)): if line[j] == prev_line[j]: line[j] = None # We build the matrix of link types (between 2 cells on a line of the matrix) # link types are : link_types = {(True, True, True ): 1, # T (False, False, True ): 2, # | (False, True, True ): 3, # + (actually, vert. bar with horiz. bar on the right) (False, True, False): 4, # L (True, True, False): 5, # - } links = [] for i, line in enumerate(matrix): links.append([]) for j in range(tree_depth-1): cell_11 = line[j] is not None cell_12 = line[j+1] is not None cell_21 = line[j+1] is not None and line[j+1].next_sibling() is not None link_type = link_types.get((cell_11, cell_12, cell_21), 0) if link_type == 0 and i > 0 and links[i-1][j] in (1, 2, 3): link_type = 2 links[-1].append(link_type) # We can now generate the HTML code for the s = u'
\n' if caption: s += '\n' % caption for i, link_line in enumerate(links): line = matrix[i] s += '' for j, link_cell in enumerate(link_line): cell = line[j] if cell: if cell.id == selected_node: s += '' % (render_node(cell.id)) else: s += '' % (render_node(cell.id)) else: s += '' s += '' % link_cell s += '' % link_cell cell = line[-1] if cell: if cell.id == selected_node: s += '' % (render_node(cell.id)) else: s += '' % (render_node(cell.id)) else: s += '' s += '\n' if link_line: s += '' for j, link_cell in enumerate(link_line): s += '' % link_cell s += '' % link_cell s += '\n' s += '
%s
%s
%s
   
%s
%s
 
  
' return s ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/shellutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000003057411242100540033633 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """shell/term utilities, useful to write some python scripts instead of shell scripts. """ __docformat__ = "restructuredtext en" import os import glob import shutil import stat import sys import tempfile import time import fnmatch import errno from os.path import exists, isdir, islink, basename, join from logilab.common import STD_BLACKLIST, _handle_blacklist from logilab.common.compat import raw_input from logilab.common.compat import str_to_bytes try: from logilab.common.proc import ProcInfo, NoSuchProcess except ImportError: # windows platform class NoSuchProcess(Exception): pass def ProcInfo(pid): raise NoSuchProcess() class tempdir(object): def __enter__(self): self.path = tempfile.mkdtemp() return self.path def __exit__(self, exctype, value, traceback): # rmtree in all cases shutil.rmtree(self.path) return traceback is None class pushd(object): def __init__(self, directory): self.directory = directory def __enter__(self): self.cwd = os.getcwd() os.chdir(self.directory) return self.directory def __exit__(self, exctype, value, traceback): os.chdir(self.cwd) def chown(path, login=None, group=None): """Same as `os.chown` function but accepting user login or group name as argument. If login or group is omitted, it's left unchanged. Note: you must own the file to chown it (or be root). Otherwise OSError is raised. """ if login is None: uid = -1 else: try: uid = int(login) except ValueError: import pwd # Platforms: Unix uid = pwd.getpwnam(login).pw_uid if group is None: gid = -1 else: try: gid = int(group) except ValueError: import grp gid = grp.getgrnam(group).gr_gid os.chown(path, uid, gid) def mv(source, destination, _action=shutil.move): """A shell-like mv, supporting wildcards. """ sources = glob.glob(source) if len(sources) > 1: assert isdir(destination) for filename in sources: _action(filename, join(destination, basename(filename))) else: try: source = sources[0] except IndexError: raise OSError('No file matching %s' % source) if isdir(destination) and exists(destination): destination = join(destination, basename(source)) try: _action(source, destination) except OSError, ex: raise OSError('Unable to move %r to %r (%s)' % ( source, destination, ex)) def rm(*files): """A shell-like rm, supporting wildcards. """ for wfile in files: for filename in glob.glob(wfile): if islink(filename): os.remove(filename) elif isdir(filename): shutil.rmtree(filename) else: os.remove(filename) def cp(source, destination): """A shell-like cp, supporting wildcards. """ mv(source, destination, _action=shutil.copy) def find(directory, exts, exclude=False, blacklist=STD_BLACKLIST): """Recursively find files ending with the given extensions from the directory. :type directory: str :param directory: directory where the search should start :type exts: basestring or list or tuple :param exts: extensions or lists or extensions to search :type exclude: boolean :param exts: if this argument is True, returning files NOT ending with the given extensions :type blacklist: list or tuple :param blacklist: optional list of files or directory to ignore, default to the value of `logilab.common.STD_BLACKLIST` :rtype: list :return: the list of all matching files """ if isinstance(exts, basestring): exts = (exts,) if exclude: def match(filename, exts): for ext in exts: if filename.endswith(ext): return False return True else: def match(filename, exts): for ext in exts: if filename.endswith(ext): return True return False files = [] for dirpath, dirnames, filenames in os.walk(directory): _handle_blacklist(blacklist, dirnames, filenames) # don't append files if the directory is blacklisted dirname = basename(dirpath) if dirname in blacklist: continue files.extend([join(dirpath, f) for f in filenames if match(f, exts)]) return files def globfind(directory, pattern, blacklist=STD_BLACKLIST): """Recursively finds files matching glob `pattern` under `directory`. This is an alternative to `logilab.common.shellutils.find`. :type directory: str :param directory: directory where the search should start :type pattern: basestring :param pattern: the glob pattern (e.g *.py, foo*.py, etc.) :type blacklist: list or tuple :param blacklist: optional list of files or directory to ignore, default to the value of `logilab.common.STD_BLACKLIST` :rtype: iterator :return: iterator over the list of all matching files """ for curdir, dirnames, filenames in os.walk(directory): _handle_blacklist(blacklist, dirnames, filenames) for fname in fnmatch.filter(filenames, pattern): yield join(curdir, fname) def unzip(archive, destdir): import zipfile if not exists(destdir): os.mkdir(destdir) zfobj = zipfile.ZipFile(archive) for name in zfobj.namelist(): if name.endswith('/'): os.mkdir(join(destdir, name)) else: outfile = open(join(destdir, name), 'wb') outfile.write(zfobj.read(name)) outfile.close() class Execute: """This is a deadlock safe version of popen2 (no stdin), that returns an object with errorlevel, out and err. """ def __init__(self, command): outfile = tempfile.mktemp() errfile = tempfile.mktemp() self.status = os.system("( %s ) >%s 2>%s" % (command, outfile, errfile)) >> 8 self.out = open(outfile,"r").read() self.err = open(errfile,"r").read() os.remove(outfile) os.remove(errfile) def acquire_lock(lock_file, max_try=10, delay=10, max_delay=3600): """Acquire a lock represented by a file on the file system If the process written in lock file doesn't exist anymore, we remove the lock file immediately If age of the lock_file is greater than max_delay, then we raise a UserWarning """ count = abs(max_try) while count: try: fd = os.open(lock_file, os.O_EXCL | os.O_RDWR | os.O_CREAT) os.write(fd, str_to_bytes(str(os.getpid())) ) os.close(fd) return True except OSError, e: if e.errno == errno.EEXIST: try: fd = open(lock_file, "r") pid = int(fd.readline()) pi = ProcInfo(pid) age = (time.time() - os.stat(lock_file)[stat.ST_MTIME]) if age / max_delay > 1 : raise UserWarning("Command '%s' (pid %s) has locked the " "file '%s' for %s minutes" % (pi.name(), pid, lock_file, age/60)) except UserWarning: raise except NoSuchProcess: os.remove(lock_file) except Exception: # The try block is not essential. can be skipped. # Note: ProcInfo object is only available for linux # process information are not accessible... # or lock_file is no more present... pass else: raise count -= 1 time.sleep(delay) else: raise Exception('Unable to acquire %s' % lock_file) def release_lock(lock_file): """Release a lock represented by a file on the file system.""" os.remove(lock_file) class ProgressBar(object): """A simple text progression bar.""" def __init__(self, nbops, size=20, stream=sys.stdout, title=''): if title: self._fstr = '\r%s [%%-%ss]' % (title, int(size)) else: self._fstr = '\r[%%-%ss]' % int(size) self._stream = stream self._total = nbops self._size = size self._current = 0 self._progress = 0 self._current_text = None self._last_text_write_size = 0 def _get_text(self): return self._current_text def _set_text(self, text=None): self._current_text = text self.refresh() def _del_text(self): self.text = None text = property(_get_text, _set_text, _del_text) def update(self): """Update the progression bar.""" self._current += 1 progress = int((float(self._current)/float(self._total))*self._size) if progress > self._progress: self._progress = progress self.refresh() def refresh(self): """Refresh the progression bar display.""" self._stream.write(self._fstr % ('.' * min(self._progress, self._size)) ) if self._last_text_write_size or self._current_text: template = ' %%-%is' % (self._last_text_write_size) text = self._current_text if text is None: text = '' self._stream.write(template % text) self._last_text_write_size = len(text.rstrip()) self._stream.flush() class RawInput(object): def __init__(self, input=None, printer=None): self._input = input or raw_input self._print = printer def ask(self, question, options, default): assert default in options choices = [] for option in options: if option == default: label = option[0].upper() else: label = option[0].lower() if len(option) > 1: label += '(%s)' % option[1:].lower() choices.append((option, label)) prompt = "%s [%s]: " % (question, '/'.join([opt[1] for opt in choices])) tries = 3 while tries > 0: answer = self._input(prompt).strip().lower() if not answer: return default possible = [option for option, label in choices if option.lower().startswith(answer)] if len(possible) == 1: return possible[0] elif len(possible) == 0: msg = '%s is not an option.' % answer else: msg = ('%s is an ambiguous answer, do you mean %s ?' % ( answer, ' or '.join(possible))) if self._print: self._print(msg) else: print msg tries -= 1 raise Exception('unable to get a sensible answer') def confirm(self, question, default_is_yes=True): default = default_is_yes and 'y' or 'n' answer = self.ask(question, ('y','n'), default) return answer == 'y' ASK = RawInput() def getlogin(): """avoid using os.getlogin() because of strange tty / stdin problems (man 3 getlogin) Another solution would be to use $LOGNAME, $USER or $USERNAME """ if sys.platform != 'win32': import pwd # Platforms: Unix return pwd.getpwuid(os.getuid())[0] else: return os.environ['USERNAME'] ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/proc.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002221011242100540033617 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """module providing: * process information (linux specific: rely on /proc) * a class for resource control (memory / time / cpu time) This module doesn't work on windows platforms (only tested on linux) :organization: Logilab """ __docformat__ = "restructuredtext en" import os import stat from resource import getrlimit, setrlimit, RLIMIT_CPU, RLIMIT_AS from signal import signal, SIGXCPU, SIGKILL, SIGUSR2, SIGUSR1 from threading import Timer, currentThread, Thread, Event from time import time from logilab.common.tree import Node class NoSuchProcess(Exception): pass def proc_exists(pid): """check the a pid is registered in /proc raise NoSuchProcess exception if not """ if not os.path.exists('/proc/%s' % pid): raise NoSuchProcess() PPID = 3 UTIME = 13 STIME = 14 CUTIME = 15 CSTIME = 16 VSIZE = 22 class ProcInfo(Node): """provide access to process information found in /proc""" def __init__(self, pid): self.pid = int(pid) Node.__init__(self, self.pid) proc_exists(self.pid) self.file = '/proc/%s/stat' % self.pid self.ppid = int(self.status()[PPID]) def memory_usage(self): """return the memory usage of the process in Ko""" try : return int(self.status()[VSIZE]) except IOError: return 0 def lineage_memory_usage(self): return self.memory_usage() + sum([child.lineage_memory_usage() for child in self.children]) def time(self, children=0): """return the number of jiffies that this process has been scheduled in user and kernel mode""" status = self.status() time = int(status[UTIME]) + int(status[STIME]) if children: time += int(status[CUTIME]) + int(status[CSTIME]) return time def status(self): """return the list of fields found in /proc//stat""" return open(self.file).read().split() def name(self): """return the process name found in /proc//stat """ return self.status()[1].strip('()') def age(self): """return the age of the process """ return os.stat(self.file)[stat.ST_MTIME] class ProcInfoLoader: """manage process information""" def __init__(self): self._loaded = {} def list_pids(self): """return a list of existent process ids""" for subdir in os.listdir('/proc'): if subdir.isdigit(): yield int(subdir) def load(self, pid): """get a ProcInfo object for a given pid""" pid = int(pid) try: return self._loaded[pid] except KeyError: procinfo = ProcInfo(pid) procinfo.manager = self self._loaded[pid] = procinfo return procinfo def load_all(self): """load all processes information""" for pid in self.list_pids(): try: procinfo = self.load(pid) if procinfo.parent is None and procinfo.ppid: pprocinfo = self.load(procinfo.ppid) pprocinfo.append(procinfo) except NoSuchProcess: pass try: class ResourceError(BaseException): """Error raise when resource limit is reached""" limit = "Unknown Resource Limit" except NameError: class ResourceError(Exception): """Error raise when resource limit is reached""" limit = "Unknown Resource Limit" class XCPUError(ResourceError): """Error raised when CPU Time limit is reached""" limit = "CPU Time" class LineageMemoryError(ResourceError): """Error raised when the total amount of memory used by a process and it's child is reached""" limit = "Lineage total Memory" class TimeoutError(ResourceError): """Error raised when the process is running for to much time""" limit = "Real Time" # Can't use subclass because the StandardError MemoryError raised RESOURCE_LIMIT_EXCEPTION = (ResourceError, MemoryError) class MemorySentinel(Thread): """A class checking a process don't use too much memory in a separated daemonic thread """ def __init__(self, interval, memory_limit, gpid=os.getpid()): Thread.__init__(self, target=self._run, name="Test.Sentinel") self.memory_limit = memory_limit self._stop = Event() self.interval = interval self.setDaemon(True) self.gpid = gpid def stop(self): """stop ap""" self._stop.set() def _run(self): pil = ProcInfoLoader() while not self._stop.isSet(): if self.memory_limit <= pil.load(self.gpid).lineage_memory_usage(): os.killpg(self.gpid, SIGUSR1) self._stop.wait(self.interval) class ResourceController: def __init__(self, max_cpu_time=None, max_time=None, max_memory=None, max_reprieve=60): if SIGXCPU == -1: raise RuntimeError("Unsupported platform") self.max_time = max_time self.max_memory = max_memory self.max_cpu_time = max_cpu_time self._reprieve = max_reprieve self._timer = None self._msentinel = None self._old_max_memory = None self._old_usr1_hdlr = None self._old_max_cpu_time = None self._old_usr2_hdlr = None self._old_sigxcpu_hdlr = None self._limit_set = 0 self._abort_try = 0 self._start_time = None self._elapse_time = 0 def _hangle_sig_timeout(self, sig, frame): raise TimeoutError() def _hangle_sig_memory(self, sig, frame): if self._abort_try < self._reprieve: self._abort_try += 1 raise LineageMemoryError("Memory limit reached") else: os.killpg(os.getpid(), SIGKILL) def _handle_sigxcpu(self, sig, frame): if self._abort_try < self._reprieve: self._abort_try += 1 raise XCPUError("Soft CPU time limit reached") else: os.killpg(os.getpid(), SIGKILL) def _time_out(self): if self._abort_try < self._reprieve: self._abort_try += 1 os.killpg(os.getpid(), SIGUSR2) if self._limit_set > 0: self._timer = Timer(1, self._time_out) self._timer.start() else: os.killpg(os.getpid(), SIGKILL) def setup_limit(self): """set up the process limit""" assert currentThread().getName() == 'MainThread' os.setpgrp() if self._limit_set <= 0: if self.max_time is not None: self._old_usr2_hdlr = signal(SIGUSR2, self._hangle_sig_timeout) self._timer = Timer(max(1, int(self.max_time) - self._elapse_time), self._time_out) self._start_time = int(time()) self._timer.start() if self.max_cpu_time is not None: self._old_max_cpu_time = getrlimit(RLIMIT_CPU) cpu_limit = (int(self.max_cpu_time), self._old_max_cpu_time[1]) self._old_sigxcpu_hdlr = signal(SIGXCPU, self._handle_sigxcpu) setrlimit(RLIMIT_CPU, cpu_limit) if self.max_memory is not None: self._msentinel = MemorySentinel(1, int(self.max_memory) ) self._old_max_memory = getrlimit(RLIMIT_AS) self._old_usr1_hdlr = signal(SIGUSR1, self._hangle_sig_memory) as_limit = (int(self.max_memory), self._old_max_memory[1]) setrlimit(RLIMIT_AS, as_limit) self._msentinel.start() self._limit_set += 1 def clean_limit(self): """reinstall the old process limit""" if self._limit_set > 0: if self.max_time is not None: self._timer.cancel() self._elapse_time += int(time())-self._start_time self._timer = None signal(SIGUSR2, self._old_usr2_hdlr) if self.max_cpu_time is not None: setrlimit(RLIMIT_CPU, self._old_max_cpu_time) signal(SIGXCPU, self._old_sigxcpu_hdlr) if self.max_memory is not None: self._msentinel.stop() self._msentinel = None setrlimit(RLIMIT_AS, self._old_max_memory) signal(SIGUSR1, self._old_usr1_hdlr) self._limit_set -= 1 ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/visitor.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000653511242100540033633 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """A generic visitor abstract implementation. """ __docformat__ = "restructuredtext en" def no_filter(_): return 1 # Iterators ################################################################### class FilteredIterator(object): def __init__(self, node, list_func, filter_func=None): self._next = [(node, 0)] if filter_func is None: filter_func = no_filter self._list = list_func(node, filter_func) def next(self): try: return self._list.pop(0) except : return None # Base Visitor ################################################################ class Visitor(object): def __init__(self, iterator_class, filter_func=None): self._iter_class = iterator_class self.filter = filter_func def visit(self, node, *args, **kargs): """ launch the visit on a given node call 'open_visit' before the beginning of the visit, with extra args given when all nodes have been visited, call the 'close_visit' method """ self.open_visit(node, *args, **kargs) return self.close_visit(self._visit(node)) def _visit(self, node): iterator = self._get_iterator(node) n = iterator.next() while n: result = n.accept(self) n = iterator.next() return result def _get_iterator(self, node): return self._iter_class(node, self.filter) def open_visit(self, *args, **kargs): """ method called at the beginning of the visit """ pass def close_visit(self, result): """ method called at the end of the visit """ return result # standard visited mixin ###################################################### class VisitedMixIn(object): """ Visited interface allow node visitors to use the node """ def get_visit_name(self): """ return the visit name for the mixed class. When calling 'accept', the method <'visit_' + name returned by this method> will be called on the visitor """ try: return self.TYPE.replace('-', '_') except: return self.__class__.__name__.lower() def accept(self, visitor, *args, **kwargs): func = getattr(visitor, 'visit_%s' % self.get_visit_name()) return func(self, *args, **kwargs) def leave(self, visitor, *args, **kwargs): func = getattr(visitor, 'leave_%s' % self.get_visit_name()) return func(self, *args, **kwargs) ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/daemon.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001361511242100540033630 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """A daemonize function (for Unices) and daemon mix-in class""" __docformat__ = "restructuredtext en" import os import errno import signal import sys import time import warnings def daemonize(pidfile=None, uid=None): # See http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC16 # XXX unix specific # # fork so the parent can exit if os.fork(): # launch child and... return 1 # deconnect from tty and create a new session os.setsid() # fork again so the parent, (the session group leader), can exit. # as a non-session group leader, we can never regain a controlling # terminal. if os.fork(): # launch child again. return 1 # move to the root to avoit mount pb os.chdir('/') # set paranoid umask os.umask(077) # redirect standard descriptors null = os.open('/dev/null', os.O_RDWR) for i in range(3): try: os.dup2(null, i) except OSError, e: if e.errno != errno.EBADF: raise os.close(null) # filter warnings warnings.filterwarnings('ignore') # write pid in a file if pidfile: # ensure the directory where the pid-file should be set exists (for # instance /var/run/cubicweb may be deleted on computer restart) piddir = os.path.dirname(pidfile) if not os.path.exists(piddir): os.makedirs(piddir) f = file(pidfile, 'w') f.write(str(os.getpid())) f.close() # change process uid if uid: try: uid = int(uid) except ValueError: from pwd import getpwnam uid = getpwnam(uid).pw_uid os.setuid(uid) return None class DaemonMixIn: """Mixin to make a daemon from watchers/queriers. """ def __init__(self, configmod) : self.delay = configmod.DELAY self.name = str(self.__class__).split('.')[-1] self._pid_file = os.path.join('/tmp', '%s.pid'%self.name) if os.path.exists(self._pid_file): raise Exception('''Another instance of %s must be running. If it i not the case, remove the file %s''' % (self.name, self._pid_file)) self._alive = 1 self._sleeping = 0 self.config = configmod def _daemonize(self): if not self.config.NODETACH: if daemonize(self._pid_file) is None: # put signal handler signal.signal(signal.SIGTERM, self.signal_handler) signal.signal(signal.SIGHUP, self.signal_handler) else: return -1 def run(self): """ optionally go in daemon mode and do what concrete class has to do and pauses for delay between runs If self.delay is negative, do a pause before starting """ if self._daemonize() == -1: return if self.delay < 0: self.delay = -self.delay time.sleep(self.delay) while 1: try: self._run() except Exception, ex: # display for info, sleep, and hope the problem will be solved # later. self.config.exception('Internal error: %s', ex) if not self._alive: break try: self._sleeping = 1 time.sleep(self.delay) self._sleeping = 0 except SystemExit: break self.config.info('%s instance exited', self.name) # remove pid file os.remove(self._pid_file) def signal_handler(self, sig_num, stack_frame): if sig_num == signal.SIGTERM: if self._sleeping: # we are sleeping so we can exit without fear self.config.debug('exit on SIGTERM') sys.exit(0) else: self.config.debug('exit on SIGTERM (on next turn)') self._alive = 0 elif sig_num == signal.SIGHUP: self.config.info('reloading configuration on SIGHUP') reload(self.config) def _run(self): """should be overridden in the mixed class""" raise NotImplementedError() import logging from logilab.common.logging_ext import set_log_methods set_log_methods(DaemonMixIn, logging.getLogger('lgc.daemon')) ## command line utilities ###################################################### L_OPTIONS = ["help", "log=", "delay=", 'no-detach'] S_OPTIONS = 'hl:d:n' def print_help(modconfig): print """ --help or -h displays this message --log log treshold (7 record everything, 0 record only emergency.) Defaults to %s --delay the number of seconds between two runs. Defaults to %s""" % (modconfig.LOG_TRESHOLD, modconfig.DELAY) def handle_option(modconfig, opt_name, opt_value, help_meth): if opt_name in ('-h','--help'): help_meth() sys.exit(0) elif opt_name in ('-l','--log'): modconfig.LOG_TRESHOLD = int(opt_value) elif opt_name in ('-d', '--delay'): modconfig.DELAY = int(opt_value) elif opt_name in ('-n', '--no-detach'): modconfig.NODETACH = 1 ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/table.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000007531111242100540033631 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Table management module.""" __docformat__ = "restructuredtext en" from logilab.common.compat import set class Table(object): """Table defines a data table with column and row names. inv: len(self.data) <= len(self.row_names) forall(self.data, lambda x: len(x) <= len(self.col_names)) """ def __init__(self, default_value=0, col_names=None, row_names=None): self.col_names = [] self.row_names = [] self.data = [] self.default_value = default_value if col_names: self.create_columns(col_names) if row_names: self.create_rows(row_names) def _next_row_name(self): return 'row%s' % (len(self.row_names)+1) def __iter__(self): return iter(self.data) def __eq__(self, other): if other is None: return False else: return list(self) == list(other) def __ne__(self, other): return not self == other def __len__(self): return len(self.row_names) ## Rows / Columns creation ################################################# def create_rows(self, row_names): """Appends row_names to the list of existing rows """ self.row_names.extend(row_names) for row_name in row_names: self.data.append([self.default_value]*len(self.col_names)) def create_columns(self, col_names): """Appends col_names to the list of existing columns """ for col_name in col_names: self.create_column(col_name) def create_row(self, row_name=None): """Creates a rowname to the row_names list """ row_name = row_name or self._next_row_name() self.row_names.append(row_name) self.data.append([self.default_value]*len(self.col_names)) def create_column(self, col_name): """Creates a colname to the col_names list """ self.col_names.append(col_name) for row in self.data: row.append(self.default_value) ## Sort by column ########################################################## def sort_by_column_id(self, col_id, method = 'asc'): """Sorts the table (in-place) according to data stored in col_id """ try: col_index = self.col_names.index(col_id) self.sort_by_column_index(col_index, method) except ValueError: raise KeyError("Col (%s) not found in table" % (col_id)) def sort_by_column_index(self, col_index, method = 'asc'): """Sorts the table 'in-place' according to data stored in col_index method should be in ('asc', 'desc') """ sort_list = [(row[col_index], row, row_name) for row, row_name in zip(self.data, self.row_names)] # Sorting sort_list will sort according to col_index sort_list.sort() # If we want reverse sort, then reverse list if method.lower() == 'desc': sort_list.reverse() # Rebuild data / row names self.data = [] self.row_names = [] for val, row, row_name in sort_list: self.data.append(row) self.row_names.append(row_name) def groupby(self, colname, *others): """builds indexes of data :returns: nested dictionaries pointing to actual rows """ groups = {} colnames = (colname,) + others col_indexes = [self.col_names.index(col_id) for col_id in colnames] for row in self.data: ptr = groups for col_index in col_indexes[:-1]: ptr = ptr.setdefault(row[col_index], {}) ptr = ptr.setdefault(row[col_indexes[-1]], Table(default_value=self.default_value, col_names=self.col_names)) ptr.append_row(tuple(row)) return groups def select(self, colname, value): grouped = self.groupby(colname) try: return grouped[value] except KeyError: return [] def remove(self, colname, value): col_index = self.col_names.index(colname) for row in self.data[:]: if row[col_index] == value: self.data.remove(row) ## The 'setter' part ####################################################### def set_cell(self, row_index, col_index, data): """sets value of cell 'row_indew', 'col_index' to data """ self.data[row_index][col_index] = data def set_cell_by_ids(self, row_id, col_id, data): """sets value of cell mapped by row_id and col_id to data Raises a KeyError if row_id or col_id are not found in the table """ try: row_index = self.row_names.index(row_id) except ValueError: raise KeyError("Row (%s) not found in table" % (row_id)) else: try: col_index = self.col_names.index(col_id) self.data[row_index][col_index] = data except ValueError: raise KeyError("Column (%s) not found in table" % (col_id)) def set_row(self, row_index, row_data): """sets the 'row_index' row pre: type(row_data) == types.ListType len(row_data) == len(self.col_names) """ self.data[row_index] = row_data def set_row_by_id(self, row_id, row_data): """sets the 'row_id' column pre: type(row_data) == types.ListType len(row_data) == len(self.row_names) Raises a KeyError if row_id is not found """ try: row_index = self.row_names.index(row_id) self.set_row(row_index, row_data) except ValueError: raise KeyError('Row (%s) not found in table' % (row_id)) def append_row(self, row_data, row_name=None): """Appends a row to the table pre: type(row_data) == types.ListType len(row_data) == len(self.col_names) """ row_name = row_name or self._next_row_name() self.row_names.append(row_name) self.data.append(row_data) return len(self.data) - 1 def insert_row(self, index, row_data, row_name=None): """Appends row_data before 'index' in the table. To make 'insert' behave like 'list.insert', inserting in an out of range index will insert row_data to the end of the list pre: type(row_data) == types.ListType len(row_data) == len(self.col_names) """ row_name = row_name or self._next_row_name() self.row_names.insert(index, row_name) self.data.insert(index, row_data) def delete_row(self, index): """Deletes the 'index' row in the table, and returns it. Raises an IndexError if index is out of range """ self.row_names.pop(index) return self.data.pop(index) def delete_row_by_id(self, row_id): """Deletes the 'row_id' row in the table. Raises a KeyError if row_id was not found. """ try: row_index = self.row_names.index(row_id) self.delete_row(row_index) except ValueError: raise KeyError('Row (%s) not found in table' % (row_id)) def set_column(self, col_index, col_data): """sets the 'col_index' column pre: type(col_data) == types.ListType len(col_data) == len(self.row_names) """ for row_index, cell_data in enumerate(col_data): self.data[row_index][col_index] = cell_data def set_column_by_id(self, col_id, col_data): """sets the 'col_id' column pre: type(col_data) == types.ListType len(col_data) == len(self.col_names) Raises a KeyError if col_id is not found """ try: col_index = self.col_names.index(col_id) self.set_column(col_index, col_data) except ValueError: raise KeyError('Column (%s) not found in table' % (col_id)) def append_column(self, col_data, col_name): """Appends the 'col_index' column pre: type(col_data) == types.ListType len(col_data) == len(self.row_names) """ self.col_names.append(col_name) for row_index, cell_data in enumerate(col_data): self.data[row_index].append(cell_data) def insert_column(self, index, col_data, col_name): """Appends col_data before 'index' in the table. To make 'insert' behave like 'list.insert', inserting in an out of range index will insert col_data to the end of the list pre: type(col_data) == types.ListType len(col_data) == len(self.row_names) """ self.col_names.insert(index, col_name) for row_index, cell_data in enumerate(col_data): self.data[row_index].insert(index, cell_data) def delete_column(self, index): """Deletes the 'index' column in the table, and returns it. Raises an IndexError if index is out of range """ self.col_names.pop(index) return [row.pop(index) for row in self.data] def delete_column_by_id(self, col_id): """Deletes the 'col_id' col in the table. Raises a KeyError if col_id was not found. """ try: col_index = self.col_names.index(col_id) self.delete_column(col_index) except ValueError: raise KeyError('Column (%s) not found in table' % (col_id)) ## The 'getter' part ####################################################### def get_shape(self): """Returns a tuple which represents the table's shape """ return len(self.row_names), len(self.col_names) shape = property(get_shape) def __getitem__(self, indices): """provided for convenience""" rows, multirows = None, False cols, multicols = None, False if isinstance(indices, tuple): rows = indices[0] if len(indices) > 1: cols = indices[1] else: rows = indices # define row slice if isinstance(rows,str): try: rows = self.row_names.index(rows) except ValueError: raise KeyError("Row (%s) not found in table" % (rows)) if isinstance(rows,int): rows = slice(rows,rows+1) multirows = False else: rows = slice(None) multirows = True # define col slice if isinstance(cols,str): try: cols = self.col_names.index(cols) except ValueError: raise KeyError("Column (%s) not found in table" % (cols)) if isinstance(cols,int): cols = slice(cols,cols+1) multicols = False else: cols = slice(None) multicols = True # get sub-table tab = Table() tab.default_value = self.default_value tab.create_rows(self.row_names[rows]) tab.create_columns(self.col_names[cols]) for idx,row in enumerate(self.data[rows]): tab.set_row(idx, row[cols]) if multirows : if multicols: return tab else: return [item[0] for item in tab.data] else: if multicols: return tab.data[0] else: return tab.data[0][0] def get_cell_by_ids(self, row_id, col_id): """Returns the element at [row_id][col_id] """ try: row_index = self.row_names.index(row_id) except ValueError: raise KeyError("Row (%s) not found in table" % (row_id)) else: try: col_index = self.col_names.index(col_id) except ValueError: raise KeyError("Column (%s) not found in table" % (col_id)) return self.data[row_index][col_index] def get_row_by_id(self, row_id): """Returns the 'row_id' row """ try: row_index = self.row_names.index(row_id) except ValueError: raise KeyError("Row (%s) not found in table" % (row_id)) return self.data[row_index] def get_column_by_id(self, col_id, distinct=False): """Returns the 'col_id' col """ try: col_index = self.col_names.index(col_id) except ValueError: raise KeyError("Column (%s) not found in table" % (col_id)) return self.get_column(col_index, distinct) def get_columns(self): """Returns all the columns in the table """ return [self[:,index] for index in range(len(self.col_names))] def get_column(self, col_index, distinct=False): """get a column by index""" col = [row[col_index] for row in self.data] if distinct: col = list(set(col)) return col def apply_stylesheet(self, stylesheet): """Applies the stylesheet to this table """ for instruction in stylesheet.instructions: eval(instruction) def transpose(self): """Keeps the self object intact, and returns the transposed (rotated) table. """ transposed = Table() transposed.create_rows(self.col_names) transposed.create_columns(self.row_names) for col_index, column in enumerate(self.get_columns()): transposed.set_row(col_index, column) return transposed def pprint(self): """returns a string representing the table in a pretty printed 'text' format. """ # The maximum row name (to know the start_index of the first col) max_row_name = 0 for row_name in self.row_names: if len(row_name) > max_row_name: max_row_name = len(row_name) col_start = max_row_name + 5 lines = [] # Build the 'first' line <=> the col_names one # The first cell <=> an empty one col_names_line = [' '*col_start] for col_name in self.col_names: col_names_line.append(col_name.encode('iso-8859-1') + ' '*5) lines.append('|' + '|'.join(col_names_line) + '|') max_line_length = len(lines[0]) # Build the table for row_index, row in enumerate(self.data): line = [] # First, build the row_name's cell row_name = self.row_names[row_index].encode('iso-8859-1') line.append(row_name + ' '*(col_start-len(row_name))) # Then, build all the table's cell for this line. for col_index, cell in enumerate(row): col_name_length = len(self.col_names[col_index]) + 5 data = str(cell) line.append(data + ' '*(col_name_length - len(data))) lines.append('|' + '|'.join(line) + '|') if len(lines[-1]) > max_line_length: max_line_length = len(lines[-1]) # Wrap the table with '-' to make a frame lines.insert(0, '-'*max_line_length) lines.append('-'*max_line_length) return '\n'.join(lines) def __repr__(self): return repr(self.data) def as_text(self): data = [] # We must convert cells into strings before joining them for row in self.data: data.append([str(cell) for cell in row]) lines = ['\t'.join(row) for row in data] return '\n'.join(lines) class TableStyle: """Defines a table's style """ def __init__(self, table): self._table = table self.size = dict([(col_name,'1*') for col_name in table.col_names]) # __row_column__ is a special key to define the first column which # actually has no name (<=> left most column <=> row names column) self.size['__row_column__'] = '1*' self.alignment = dict([(col_name,'right') for col_name in table.col_names]) self.alignment['__row_column__'] = 'right' # We shouldn't have to create an entry for # the 1st col (the row_column one) self.units = dict([(col_name,'') for col_name in table.col_names]) self.units['__row_column__'] = '' # XXX FIXME : params order should be reversed for all set() methods def set_size(self, value, col_id): """sets the size of the specified col_id to value """ self.size[col_id] = value def set_size_by_index(self, value, col_index): """Allows to set the size according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] self.size[col_id] = value def set_alignment(self, value, col_id): """sets the alignment of the specified col_id to value """ self.alignment[col_id] = value def set_alignment_by_index(self, value, col_index): """Allows to set the alignment according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] self.alignment[col_id] = value def set_unit(self, value, col_id): """sets the unit of the specified col_id to value """ self.units[col_id] = value def set_unit_by_index(self, value, col_index): """Allows to set the unit according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! (Note that in the 'unit' case, you shouldn't have to set a unit for the 1st column (the __row__column__ one)) """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] self.units[col_id] = value def get_size(self, col_id): """Returns the size of the specified col_id """ return self.size[col_id] def get_size_by_index(self, col_index): """Allows to get the size according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] return self.size[col_id] def get_alignment(self, col_id): """Returns the alignment of the specified col_id """ return self.alignment[col_id] def get_alignment_by_index(self, col_index): """Allors to get the alignment according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] return self.alignment[col_id] def get_unit(self, col_id): """Returns the unit of the specified col_id """ return self.units[col_id] def get_unit_by_index(self, col_index): """Allors to get the unit according to the column index rather than using the column's id. BE CAREFUL : the '0' column is the '__row_column__' one ! """ if col_index == 0: col_id = '__row_column__' else: col_id = self._table.col_names[col_index-1] return self.units[col_id] import re CELL_PROG = re.compile("([0-9]+)_([0-9]+)") class TableStyleSheet: """A simple Table stylesheet Rules are expressions where cells are defined by the row_index and col_index separated by an underscore ('_'). For example, suppose you want to say that the (2,5) cell must be the sum of its two preceding cells in the row, you would create the following rule : 2_5 = 2_3 + 2_4 You can also use all the math.* operations you want. For example: 2_5 = sqrt(2_3**2 + 2_4**2) """ def __init__(self, rules = None): rules = rules or [] self.rules = [] self.instructions = [] for rule in rules: self.add_rule(rule) def add_rule(self, rule): """Adds a rule to the stylesheet rules """ try: source_code = ['from math import *'] source_code.append(CELL_PROG.sub(r'self.data[\1][\2]', rule)) self.instructions.append(compile('\n'.join(source_code), 'table.py', 'exec')) self.rules.append(rule) except SyntaxError: print "Bad Stylesheet Rule : %s [skipped]"%rule def add_rowsum_rule(self, dest_cell, row_index, start_col, end_col): """Creates and adds a rule to sum over the row at row_index from start_col to end_col. dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. pre: start_col >= 0 end_col > start_col """ cell_list = ['%d_%d'%(row_index, index) for index in range(start_col, end_col + 1)] rule = '%d_%d=' % dest_cell + '+'.join(cell_list) self.add_rule(rule) def add_rowavg_rule(self, dest_cell, row_index, start_col, end_col): """Creates and adds a rule to make the row average (from start_col to end_col) dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. pre: start_col >= 0 end_col > start_col """ cell_list = ['%d_%d'%(row_index, index) for index in range(start_col, end_col + 1)] num = (end_col - start_col + 1) rule = '%d_%d=' % dest_cell + '('+'+'.join(cell_list)+')/%f'%num self.add_rule(rule) def add_colsum_rule(self, dest_cell, col_index, start_row, end_row): """Creates and adds a rule to sum over the col at col_index from start_row to end_row. dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. pre: start_row >= 0 end_row > start_row """ cell_list = ['%d_%d'%(index, col_index) for index in range(start_row, end_row + 1)] rule = '%d_%d=' % dest_cell + '+'.join(cell_list) self.add_rule(rule) def add_colavg_rule(self, dest_cell, col_index, start_row, end_row): """Creates and adds a rule to make the col average (from start_row to end_row) dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. pre: start_row >= 0 end_row > start_row """ cell_list = ['%d_%d'%(index, col_index) for index in range(start_row, end_row + 1)] num = (end_row - start_row + 1) rule = '%d_%d=' % dest_cell + '('+'+'.join(cell_list)+')/%f'%num self.add_rule(rule) class TableCellRenderer: """Defines a simple text renderer """ def __init__(self, **properties): """keywords should be properties with an associated boolean as value. For example : renderer = TableCellRenderer(units = True, alignment = False) An unspecified property will have a 'False' value by default. Possible properties are : alignment, unit """ self.properties = properties def render_cell(self, cell_coord, table, table_style): """Renders the cell at 'cell_coord' in the table, using table_style """ row_index, col_index = cell_coord cell_value = table.data[row_index][col_index] final_content = self._make_cell_content(cell_value, table_style, col_index +1) return self._render_cell_content(final_content, table_style, col_index + 1) def render_row_cell(self, row_name, table, table_style): """Renders the cell for 'row_id' row """ cell_value = row_name.encode('iso-8859-1') return self._render_cell_content(cell_value, table_style, 0) def render_col_cell(self, col_name, table, table_style): """Renders the cell for 'col_id' row """ cell_value = col_name.encode('iso-8859-1') col_index = table.col_names.index(col_name) return self._render_cell_content(cell_value, table_style, col_index +1) def _render_cell_content(self, content, table_style, col_index): """Makes the appropriate rendering for this cell content. Rendering properties will be searched using the *table_style.get_xxx_by_index(col_index)' methods **This method should be overridden in the derived renderer classes.** """ return content def _make_cell_content(self, cell_content, table_style, col_index): """Makes the cell content (adds decoration data, like units for example) """ final_content = cell_content if 'skip_zero' in self.properties: replacement_char = self.properties['skip_zero'] else: replacement_char = 0 if replacement_char and final_content == 0: return replacement_char try: units_on = self.properties['units'] if units_on: final_content = self._add_unit( cell_content, table_style, col_index) except KeyError: pass return final_content def _add_unit(self, cell_content, table_style, col_index): """Adds unit to the cell_content if needed """ unit = table_style.get_unit_by_index(col_index) return str(cell_content) + " " + unit class DocbookRenderer(TableCellRenderer): """Defines how to render a cell for a docboook table """ def define_col_header(self, col_index, table_style): """Computes the colspec element according to the style """ size = table_style.get_size_by_index(col_index) return '\n' % \ (col_index, size) def _render_cell_content(self, cell_content, table_style, col_index): """Makes the appropriate rendering for this cell content. Rendering properties will be searched using the table_style.get_xxx_by_index(col_index)' methods. """ try: align_on = self.properties['alignment'] alignment = table_style.get_alignment_by_index(col_index) if align_on: return "%s\n" % \ (alignment, cell_content) except KeyError: # KeyError <=> Default alignment return "%s\n" % cell_content class TableWriter: """A class to write tables """ def __init__(self, stream, table, style, **properties): self._stream = stream self.style = style or TableStyle(table) self._table = table self.properties = properties self.renderer = None def set_style(self, style): """sets the table's associated style """ self.style = style def set_renderer(self, renderer): """sets the way to render cell """ self.renderer = renderer def update_properties(self, **properties): """Updates writer's properties (for cell rendering) """ self.properties.update(properties) def write_table(self, title = ""): """Writes the table """ raise NotImplementedError("write_table must be implemented !") class DocbookTableWriter(TableWriter): """Defines an implementation of TableWriter to write a table in Docbook """ def _write_headers(self): """Writes col headers """ # Define col_headers (colstpec elements) for col_index in range(len(self._table.col_names)+1): self._stream.write(self.renderer.define_col_header(col_index, self.style)) self._stream.write("\n\n") # XXX FIXME : write an empty entry <=> the first (__row_column) column self._stream.write('\n') for col_name in self._table.col_names: self._stream.write(self.renderer.render_col_cell( col_name, self._table, self.style)) self._stream.write("\n\n") def _write_body(self): """Writes the table body """ self._stream.write('\n') for row_index, row in enumerate(self._table.data): self._stream.write('\n') row_name = self._table.row_names[row_index] # Write the first entry (row_name) self._stream.write(self.renderer.render_row_cell(row_name, self._table, self.style)) for col_index, cell in enumerate(row): self._stream.write(self.renderer.render_cell( (row_index, col_index), self._table, self.style)) self._stream.write('\n') self._stream.write('\n') def write_table(self, title = ""): """Writes the table """ self._stream.write('\n%s>\n'%(title)) self._stream.write( '\n'% (len(self._table.col_names)+1)) self._write_headers() self._write_body() self._stream.write('\n
\n') ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/textutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000004036611242100540033633 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Some text manipulation utility functions. :group text formatting: normalize_text, normalize_paragraph, pretty_match,\ unquote, colorize_ansi :group text manipulation: searchall, splitstrip :sort: text formatting, text manipulation :type ANSI_STYLES: dict(str) :var ANSI_STYLES: dictionary mapping style identifier to ANSI terminal code :type ANSI_COLORS: dict(str) :var ANSI_COLORS: dictionary mapping color identifier to ANSI terminal code :type ANSI_PREFIX: str :var ANSI_PREFIX: ANSI terminal code notifying the start of an ANSI escape sequence :type ANSI_END: str :var ANSI_END: ANSI terminal code notifying the end of an ANSI escape sequence :type ANSI_RESET: str :var ANSI_RESET: ANSI terminal code resetting format defined by a previous ANSI escape sequence """ __docformat__ = "restructuredtext en" import sys import re import os.path as osp from unicodedata import normalize as _uninormalize try: from os import linesep except ImportError: linesep = '\n' # gae from logilab.common.deprecation import deprecated MANUAL_UNICODE_MAP = { u'\xa1': u'!', # INVERTED EXCLAMATION MARK u'\u0142': u'l', # LATIN SMALL LETTER L WITH STROKE u'\u2044': u'/', # FRACTION SLASH u'\xc6': u'AE', # LATIN CAPITAL LETTER AE u'\xa9': u'(c)', # COPYRIGHT SIGN u'\xab': u'"', # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK u'\xe6': u'ae', # LATIN SMALL LETTER AE u'\xae': u'(r)', # REGISTERED SIGN u'\u0153': u'oe', # LATIN SMALL LIGATURE OE u'\u0152': u'OE', # LATIN CAPITAL LIGATURE OE u'\xd8': u'O', # LATIN CAPITAL LETTER O WITH STROKE u'\xf8': u'o', # LATIN SMALL LETTER O WITH STROKE u'\xbb': u'"', # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK u'\xdf': u'ss', # LATIN SMALL LETTER SHARP S } def unormalize(ustring, ignorenonascii=False): """replace diacritical characters with their corresponding ascii characters Convert the unicode string to its long normalized form (unicode character will be transform into several characters) and keep the first one only. The normal form KD (NFKD) will apply the compatibility decomposition, i.e. replace all compatibility characters with their equivalents. :see: Another project about ASCII transliterations of Unicode text http://pypi.python.org/pypi/Unidecode """ res = [] for letter in ustring[:]: try: replacement = MANUAL_UNICODE_MAP[letter] except KeyError: if ord(letter) >= 2**8: if ignorenonascii: continue raise ValueError("can't deal with non-ascii based characters") replacement = _uninormalize('NFKD', letter)[0] res.append(replacement) return u''.join(res) def unquote(string): """remove optional quotes (simple or double) from the string :type string: str or unicode :param string: an optionally quoted string :rtype: str or unicode :return: the unquoted string (or the input string if it wasn't quoted) """ if not string: return string if string[0] in '"\'': string = string[1:] if string[-1] in '"\'': string = string[:-1] return string _BLANKLINES_RGX = re.compile('\r?\n\r?\n') _NORM_SPACES_RGX = re.compile('\s+') def normalize_text(text, line_len=80, indent='', rest=False): """normalize a text to display it with a maximum line size and optionally arbitrary indentation. Line jumps are normalized but blank lines are kept. The indentation string may be used to insert a comment (#) or a quoting (>) mark for instance. :type text: str or unicode :param text: the input text to normalize :type line_len: int :param line_len: expected maximum line's length, default to 80 :type indent: str or unicode :param indent: optional string to use as indentation :rtype: str or unicode :return: the input text normalized to fit on lines with a maximized size inferior to `line_len`, and optionally prefixed by an indentation string """ if rest: normp = normalize_rest_paragraph else: normp = normalize_paragraph result = [] for text in _BLANKLINES_RGX.split(text): result.append(normp(text, line_len, indent)) return ('%s%s%s' % (linesep, indent, linesep)).join(result) def normalize_paragraph(text, line_len=80, indent=''): """normalize a text to display it with a maximum line size and optionally arbitrary indentation. Line jumps are normalized. The indentation string may be used top insert a comment mark for instance. :type text: str or unicode :param text: the input text to normalize :type line_len: int :param line_len: expected maximum line's length, default to 80 :type indent: str or unicode :param indent: optional string to use as indentation :rtype: str or unicode :return: the input text normalized to fit on lines with a maximized size inferior to `line_len`, and optionally prefixed by an indentation string """ text = _NORM_SPACES_RGX.sub(' ', text) line_len = line_len - len(indent) lines = [] while text: aline, text = splittext(text.strip(), line_len) lines.append(indent + aline) return linesep.join(lines) def normalize_rest_paragraph(text, line_len=80, indent=''): """normalize a ReST text to display it with a maximum line size and optionally arbitrary indentation. Line jumps are normalized. The indentation string may be used top insert a comment mark for instance. :type text: str or unicode :param text: the input text to normalize :type line_len: int :param line_len: expected maximum line's length, default to 80 :type indent: str or unicode :param indent: optional string to use as indentation :rtype: str or unicode :return: the input text normalized to fit on lines with a maximized size inferior to `line_len`, and optionally prefixed by an indentation string """ toreport = '' lines = [] line_len = line_len - len(indent) for line in text.splitlines(): line = toreport + _NORM_SPACES_RGX.sub(' ', line.strip()) toreport = '' while len(line) > line_len: # too long line, need split line, toreport = splittext(line, line_len) lines.append(indent + line) if toreport: line = toreport + ' ' toreport = '' else: line = '' if line: lines.append(indent + line.strip()) return linesep.join(lines) def splittext(text, line_len): """split the given text on space according to the given max line size return a 2-uple: * a line <= line_len if possible * the rest of the text which has to be reported on another line """ if len(text) <= line_len: return text, '' pos = min(len(text)-1, line_len) while pos > 0 and text[pos] != ' ': pos -= 1 if pos == 0: pos = min(len(text), line_len) while len(text) > pos and text[pos] != ' ': pos += 1 return text[:pos], text[pos+1:].strip() def splitstrip(string, sep=','): """return a list of stripped string by splitting the string given as argument on `sep` (',' by default). Empty string are discarded. >>> splitstrip('a, b, c , 4,,') ['a', 'b', 'c', '4'] >>> splitstrip('a') ['a'] >>> :type string: str or unicode :param string: a csv line :type sep: str or unicode :param sep: field separator, default to the comma (',') :rtype: str or unicode :return: the unquoted string (or the input string if it wasn't quoted) """ return [word.strip() for word in string.split(sep) if word.strip()] get_csv = deprecated('get_csv is deprecated, use splitstrip')(splitstrip) def split_url_or_path(url_or_path): """return the latest component of a string containing either an url of the form :// or a local file system path """ if '://' in url_or_path: return url_or_path.rstrip('/').rsplit('/', 1) return osp.split(url_or_path.rstrip(osp.sep)) def text_to_dict(text): """parse multilines text containing simple 'key=value' lines and return a dict of {'key': 'value'}. When the same key is encountered multiple time, value is turned into a list containing all values. >>> text_to_dict('''multiple=1 ... multiple= 2 ... single =3 ... ''') {'single': '3', 'multiple': ['1', '2']} """ res = {} if not text: return res for line in text.splitlines(): line = line.strip() if line and not line.startswith('#'): key, value = [w.strip() for w in line.split('=', 1)] if key in res: try: res[key].append(value) except AttributeError: res[key] = [res[key], value] else: res[key] = value return res _BLANK_URE = r'(\s|,)+' _BLANK_RE = re.compile(_BLANK_URE) __VALUE_URE = r'-?(([0-9]+\.[0-9]*)|((0x?)?[0-9]+))' __UNITS_URE = r'[a-zA-Z]+' _VALUE_RE = re.compile(r'(?P%s)(?P%s)?'%(__VALUE_URE,__UNITS_URE)) BYTE_UNITS = { "b": 1, "kb": 1024, "mb": 1024 ** 2, "gb": 1024 ** 3, "tb": 1024 ** 4, } TIME_UNITS = { "ms": 0.0001, "s": 1, "min": 60, "h": 60 * 60, "d": 60 * 60 *24, } def apply_units( string, units, inter=None, final=float, blank_reg=_BLANK_RE, value_reg=_VALUE_RE): """Parse the string applying the units defined in units (e.g.: "1.5m",{'m',60} -> 80). :type string: str or unicode :param string: the string to parse :type units: dict (or any object with __getitem__ using basestring key) :param units: a dict mapping a unit string repr to its value :type inter: type :param inter: used to parse every intermediate value (need __sum__) :type blank_reg: regexp :param blank_reg: should match every blank char to ignore. :type value_reg: regexp with "value" and optional "unit" group :param value_reg: match a value and it's unit into the """ if inter is None: inter = final string = _BLANK_RE.sub('',string) values = [] for match in value_reg.finditer(string): dic = match.groupdict() #import sys #print >> sys.stderr, dic lit, unit = dic["value"], dic.get("unit") value = inter(lit) if unit is not None: try: value *= units[unit.lower()] except KeyError: raise KeyError('invalid unit %s. valid units are %s' % (unit, units.keys())) values.append(value) return final(sum(values)) _LINE_RGX = re.compile('\r\n|\r+|\n') def pretty_match(match, string, underline_char='^'): """return a string with the match location underlined: >>> import re >>> print pretty_match(re.search('mange', 'il mange du bacon'), 'il mange du bacon') il mange du bacon ^^^^^ >>> :type match: _sre.SRE_match :param match: object returned by re.match, re.search or re.finditer :type string: str or unicode :param string: the string on which the regular expression has been applied to obtain the `match` object :type underline_char: str or unicode :param underline_char: character to use to underline the matched section, default to the carret '^' :rtype: str or unicode :return: the original string with an inserted line to underline the match location """ start = match.start() end = match.end() string = _LINE_RGX.sub(linesep, string) start_line_pos = string.rfind(linesep, 0, start) if start_line_pos == -1: start_line_pos = 0 result = [] else: result = [string[:start_line_pos]] start_line_pos += len(linesep) offset = start - start_line_pos underline = ' ' * offset + underline_char * (end - start) end_line_pos = string.find(linesep, end) if end_line_pos == -1: string = string[start_line_pos:] result.append(string) result.append(underline) else: end = string[end_line_pos + len(linesep):] string = string[start_line_pos:end_line_pos] result.append(string) result.append(underline) result.append(end) return linesep.join(result).rstrip() # Ansi colorization ########################################################### ANSI_PREFIX = '\033[' ANSI_END = 'm' ANSI_RESET = '\033[0m' ANSI_STYLES = { 'reset' : "0", 'bold' : "1", 'italic' : "3", 'underline' : "4", 'blink' : "5", 'inverse' : "7", 'strike' : "9", } ANSI_COLORS = { 'reset' : "0", 'black' : "30", 'red' : "31", 'green' : "32", 'yellow' : "33", 'blue' : "34", 'magenta' : "35", 'cyan' : "36", 'white' : "37", } def _get_ansi_code(color=None, style=None): """return ansi escape code corresponding to color and style :type color: str or None :param color: the color name (see `ANSI_COLORS` for available values) or the color number when 256 colors are available :type style: str or None :param style: style string (see `ANSI_COLORS` for available values). To get several style effects at the same time, use a coma as separator. :raise KeyError: if an unexistent color or style identifier is given :rtype: str :return: the built escape code """ ansi_code = [] if style: style_attrs = splitstrip(style) for effect in style_attrs: ansi_code.append(ANSI_STYLES[effect]) if color: if color.isdigit(): ansi_code.extend(['38','5']) ansi_code.append(color) else: ansi_code.append(ANSI_COLORS[color]) if ansi_code: return ANSI_PREFIX + ';'.join(ansi_code) + ANSI_END return '' def colorize_ansi(msg, color=None, style=None): """colorize message by wrapping it with ansi escape codes :type msg: str or unicode :param msg: the message string to colorize :type color: str or None :param color: the color identifier (see `ANSI_COLORS` for available values) :type style: str or None :param style: style string (see `ANSI_COLORS` for available values). To get several style effects at the same time, use a coma as separator. :raise KeyError: if an unexistent color or style identifier is given :rtype: str or unicode :return: the ansi escaped string """ # If both color and style are not defined, then leave the text as is if color is None and style is None: return msg escape_code = _get_ansi_code(color, style) # If invalid (or unknown) color, don't wrap msg with ansi codes if escape_code: return '%s%s%s' % (escape_code, msg, ANSI_RESET) return msg DIFF_STYLE = {'separator': 'cyan', 'remove': 'red', 'add': 'green'} def diff_colorize_ansi(lines, out=sys.stdout, style=DIFF_STYLE): for line in lines: if line[:4] in ('--- ', '+++ '): out.write(colorize_ansi(line, style['separator'])) elif line[0] == '-': out.write(colorize_ansi(line, style['remove'])) elif line[0] == '+': out.write(colorize_ansi(line, style['add'])) elif line[:4] == '--- ': out.write(colorize_ansi(line, style['separator'])) elif line[:4] == '+++ ': out.write(colorize_ansi(line, style['separator'])) else: out.write(line) ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/COPYING.LESSERscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000006363711242100540033641 0ustar andreasandreas GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/dbf.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001711511242100540033627 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """This is a DBF reader which reads Visual Fox Pro DBF format with Memo field Usage: >>> rec = readDbf('test.dbf') >>> for line in rec: >>> print line['name'] :date: 13/07/2007 http://www.physics.ox.ac.uk/users/santoso/Software.Repository.html page says code is "available as is without any warranty or support". """ import struct import os, os.path import sys import csv import tempfile import ConfigParser class Dbase: def __init__(self): self.fdb = None self.fmemo = None self.db_data = None self.memo_data = None self.fields = None self.num_records = 0 self.header = None self.memo_file = '' self.memo_header = None self.memo_block_size = 0 self.memo_header_len = 0 def _drop_after_NULL(self, txt): for i in range(0, len(txt)): if ord(struct.unpack('c', txt[i])[0])==0: return txt[:i] return txt def _reverse_endian(self, num): if not len(num): return 0 val = struct.unpack('L', val[0]) val = struct.unpack('>L', val) return val[0] def _assign_ids(self, lst, ids): result = {} idx = 0 for item in lst: id = ids[idx] result[id] = item idx += 1 return result def open(self, db_name): filesize = os.path.getsize(db_name) if filesize <= 68: raise IOError, 'The file is not large enough to be a dbf file' self.fdb = open(db_name, 'rb') self.memo_file = '' if os.path.isfile(db_name[0:-1] + 't'): self.memo_file = db_name[0:-1] + 't' elif os.path.isfile(db_name[0:-3] + 'fpt'): self.memo_file = db_name[0:-3] + 'fpt' if self.memo_file: #Read memo file self.fmemo = open(self.memo_file, 'rb') self.memo_data = self.fmemo.read() self.memo_header = self._assign_ids(struct.unpack('>6x1H', self.memo_data[:8]), ['Block size']) block_size = self.memo_header['Block size'] if not block_size: block_size = 512 self.memo_block_size = block_size self.memo_header_len = block_size memo_size = os.path.getsize(self.memo_file) #Start reading data file data = self.fdb.read(32) self.header = self._assign_ids(struct.unpack(' self.num_records: raise Exception, 'Unable to extract data outside the range' offset = self.header['Record Size'] * rec_no data = self.db_data[offset:offset+self.row_len] record = self._assign_ids(struct.unpack(self.row_format, data), self.row_ids) if self.memo_file: for key in self.fields: field = self.fields[key] f_type = field['Field Type'] f_name = field['Field Name'] c_data = record[f_name] if f_type=='M' or f_type=='G' or f_type=='B' or f_type=='P': c_data = self._reverse_endian(c_data) if c_data: record[f_name] = self.read_memo(c_data-1).strip() else: record[f_name] = c_data.strip() return record def read_memo_record(self, num, in_length): """ Read the record of given number. The second parameter is the length of the record to read. It can be undefined, meaning read the whole record, and it can be negative, meaning at most the length """ if in_length < 0: in_length = -self.memo_block_size offset = self.memo_header_len + num * self.memo_block_size self.fmemo.seek(offset) if in_length<0: in_length = -in_length if in_length==0: return '' return self.fmemo.read(in_length) def read_memo(self, num): result = '' buffer = self.read_memo_record(num, -1) if len(buffer)<=0: return '' length = struct.unpack('>L', buffer[4:4+4])[0] + 8 block_size = self.memo_block_size if length < block_size: return buffer[8:length] rest_length = length - block_size rest_data = self.read_memo_record(num+1, rest_length) if len(rest_data)<=0: return '' return buffer[8:] + rest_data def readDbf(filename): """ Read the DBF file specified by the filename and return the records as a list of dictionary. :param: filename File name of the DBF :return: List of rows """ db = Dbase() db.open(filename) num = db.get_numrecords() rec = [] for i in range(0, num): record = db.get_record_with_names(i) rec.append(record) db.close() return rec if __name__=='__main__': rec = readDbf('dbf/sptable.dbf') for line in rec: print '%s %s' % (line['GENUS'].strip(), line['SPECIES'].strip()) ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/sphinxutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001053411242100540033625 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Sphinx utils ModuleGenerator: Generate a file that lists all the modules of a list of packages in order to pull all the docstring. This should not be used in a makefile to systematically generate sphinx documentation! Typical usage: >>> from logilab.common.sphinxutils import ModuleGenerator >>> mgen = ModuleGenerator('logilab common', '/home/adim/src/logilab/common') >>> mgen.generate('api_logilab_common.rst', exclude_dirs=('test',)) """ import os, sys import os.path as osp import inspect from logilab.common import STD_BLACKLIST from logilab.common.shellutils import globfind from logilab.common.modutils import load_module_from_file, modpath_from_file def module_members(module): members = [] for name, value in inspect.getmembers(module): if getattr(value, '__module__', None) == module.__name__: members.append( (name, value) ) return sorted(members) def class_members(klass): return sorted([name for name in vars(klass) if name not in ('__doc__', '__module__', '__dict__', '__weakref__')]) class ModuleGenerator: file_header = """.. -*- coding: utf-8 -*-\n\n%s\n""" module_def = """ :mod:`%s` =======%s .. automodule:: %s :members: %s """ class_def = """ .. autoclass:: %s :members: %s """ def __init__(self, project_title, code_dir): self.title = project_title self.code_dir = osp.abspath(code_dir) def generate(self, dest_file, exclude_dirs=STD_BLACKLIST): """make the module file""" self.fn = open(dest_file, 'w') num = len(self.title) + 6 title = "=" * num + "\n %s API\n" % self.title + "=" * num self.fn.write(self.file_header % title) self.gen_modules(exclude_dirs=exclude_dirs) self.fn.close() def gen_modules(self, exclude_dirs): """generate all modules""" for module in self.find_modules(exclude_dirs): modname = module.__name__ classes = [] modmembers = [] for objname, obj in module_members(module): if inspect.isclass(obj): classmembers = class_members(obj) classes.append( (objname, classmembers) ) else: modmembers.append(objname) self.fn.write(self.module_def % (modname, '=' * len(modname), modname, ', '.join(modmembers))) for klass, members in classes: self.fn.write(self.class_def % (klass, ', '.join(members))) def find_modules(self, exclude_dirs): basepath = osp.dirname(self.code_dir) basedir = osp.basename(basepath) + osp.sep if basedir not in sys.path: sys.path.insert(1, basedir) for filepath in globfind(self.code_dir, '*.py', exclude_dirs): if osp.basename(filepath) in ('setup.py', '__pkginfo__.py'): continue try: module = load_module_from_file(filepath) except: # module might be broken or magic dotted_path = modpath_from_file(filepath) module = type('.'.join(dotted_path), (), {}) # mock it yield module if __name__ == '__main__': # example : title, code_dir, outfile = sys.argv[1:] generator = ModuleGenerator(title, code_dir) # XXX modnames = ['logilab'] generator.generate(outfile, ('test', 'tests', 'examples', 'data', 'doc', '.hg', 'migration')) ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/compat.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002060511242100540033625 0ustar andreasandreas# pylint: disable=E0601,W0622,W0611 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Wrappers around some builtins introduced in python 2.3, 2.4 and 2.5, making them available in for earlier versions of python. See another compatibility snippets from other projects: :mod:`lib2to3.fixes` :mod:`coverage.backward` :mod:`unittest2.compatibility` """ from __future__ import generators __docformat__ = "restructuredtext en" import os import sys from warnings import warn import __builtin__ as builtins # 2to3 will tranform '__builtin__' to 'builtins' if sys.version_info < (3, 0): str_to_bytes = str def str_encode(string, encoding): if isinstance(string, unicode): return string.encode(encoding) return str(string) else: def str_to_bytes(string): return str.encode(string) # we have to ignore the encoding in py3k to be able to write a string into a # TextIOWrapper or like object (which expect an unicode string) def str_encode(string, encoding): return str(string) # XXX shouldn't we remove this and just let 2to3 do his job ? try: callable = callable except NameError:# callable removed from py3k import collections def callable(something): return isinstance(something, collections.Callable) del collections if sys.version_info < (3, 0): raw_input = raw_input else: raw_input = input # Pythons 2 and 3 differ on where to get StringIO if sys.version_info < (3, 0): from cStringIO import StringIO FileIO = file BytesIO = StringIO else: from io import FileIO, BytesIO, StringIO # Where do pickles come from? try: import cPickle as pickle except ImportError: import pickle try: set = set frozenset = frozenset except NameError:# Python 2.3 doesn't have `set` from sets import Set as set, ImmutableSet as frozenset from logilab.common.deprecation import deprecated from itertools import izip, chain, imap izip = deprecated('izip exists in itertools since py2.3')(izip) imap = deprecated('imap exists in itertools since py2.3')(imap) chain = deprecated('chain exists in itertools since py2.3')(chain) sum = deprecated('sum exists in builtins since py2.3')(sum) enumerate = deprecated('enumerate exists in builtins since py2.3')(enumerate) try: sorted = sorted reversed = reversed except NameError: # py2.3 def sorted(iterable, cmp=None, key=None, reverse=False): original = list(iterable) if key: l2 = [(key(elt), index) for index, elt in builtins.enumerate(original)] else: l2 = original l2.sort(cmp) if reverse: l2.reverse() if key: return [original[index] for elt, index in l2] return l2 def reversed(l): l2 = list(l) l2.reverse() return l2 try: max = max max(("ab","cde"),key=len) # does not work in py2.3 except TypeError: def max( *args, **kargs): if len(args) == 0: raise TypeError("max expected at least 1 arguments, got 0") key= kargs.pop("key", None) #default implementation if key is None: return builtins.max(*args,**kargs) for karg in kargs: raise TypeError("unexpected keyword argument %s for function max") % karg if len(args) == 1: items = iter(args[0]) else: items = iter(args) try: best_item = items.next() best_value = key(best_item) except StopIteration: raise ValueError("max() arg is an empty sequence") for item in items: value = key(item) if value > best_value: best_item = item best_value = value return best_item # Python2.5 builtins try: any = any all = all except NameError: def any(iterable): """any(iterable) -> bool Return True if bool(x) is True for any x in the iterable. """ for elt in iterable: if elt: return True return False def all(iterable): """all(iterable) -> bool Return True if bool(x) is True for all values x in the iterable. """ for elt in iterable: if not elt: return False return True # Python2.5 subprocess added functions and exceptions try: from subprocess import Popen except ImportError: # gae or python < 2.3 class CalledProcessError(Exception): """This exception is raised when a process run by check_call() returns a non-zero exit status. The exit status will be stored in the returncode attribute.""" def __init__(self, returncode, cmd): self.returncode = returncode self.cmd = cmd def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) def call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example: retcode = call(["ls", "-l"]) """ # workaround: subprocess.Popen(cmd, stdout=sys.stdout) fails # see http://bugs.python.org/issue1531862 if "stdout" in kwargs: fileno = kwargs.get("stdout").fileno() del kwargs['stdout'] return Popen(stdout=os.dup(fileno), *popenargs, **kwargs).wait() return Popen(*popenargs, **kwargs).wait() def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the Popen constructor. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] if retcode: raise CalledProcessError(retcode, cmd) return retcode try: from os.path import relpath except ImportError: # python < 2.6 from os.path import curdir, abspath, sep, commonprefix, pardir, join def relpath(path, start=curdir): """Return a relative version of a path""" if not path: raise ValueError("no path specified") start_list = abspath(start).split(sep) path_list = abspath(path).split(sep) # Work out how much of the filepath is shared by start and path. i = len(commonprefix([start_list, path_list])) rel_list = [pardir] * (len(start_list)-i) + path_list[i:] if not rel_list: return curdir return join(*rel_list) if (2, 5) <= sys.version_info[:2]: InheritableSet = set else: class InheritableSet(set): """hacked resolving inheritancy issue from old style class in 2.4""" def __new__(cls, *args, **kwargs): if args: new_args = (args[0], ) else: new_args = () obj = set.__new__(cls, *new_args) obj.__init__(*args, **kwargs) return obj # XXX shouldn't we remove this and just let 2to3 do his job ? # range or xrange? try: range = xrange except NameError: range = range # ConfigParser was renamed to the more-standard configparser try: import configparser except ImportError: import ConfigParser as configparser try: import json except ImportError: try: import simplejson as json except ImportError: json = None ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/db.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000376511242100540033635 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Wrappers to get actually replaceable DBAPI2 compliant modules and database connection whatever the database and client lib used. Currently support: - postgresql (pgdb, psycopg, psycopg2, pyPgSQL) - mysql (MySQLdb) - sqlite (pysqlite2, sqlite, sqlite3) just use the `get_connection` function from this module to get a wrapped connection. If multiple drivers for a database are available, you can control which one you want to use using the `set_prefered_driver` function. Additional helpers are also provided for advanced functionalities such as listing existing users or databases, creating database... Get the helper for your database using the `get_adv_func_helper` function. """ __docformat__ = "restructuredtext en" from warnings import warn warn('this module is deprecated, use logilab.database instead', DeprecationWarning, stacklevel=1) from logilab.database import (get_connection, set_prefered_driver, get_dbapi_compliant_module as _gdcm, get_db_helper as _gdh) def get_dbapi_compliant_module(driver, *args, **kwargs): module = _gdcm(driver, *args, **kwargs) module.adv_func_helper = _gdh(driver) return module ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/sqlgen.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000213611242100540033624 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Help to generate SQL strings usable by the Python DB-API. """ __docformat__ = "restructuredtext en" from warnings import warn warn('this module is deprecated, use logilab.database instead', DeprecationWarning, stacklevel=1) from logilab.database.sqlgen import * ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/logging_ext.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001451111242100540033624 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Extends the logging module from the standard library.""" __docformat__ = "restructuredtext en" import os import sys import logging from logilab.common.textutils import colorize_ansi def set_log_methods(cls, logger): """bind standard logger's methods as methods on the class""" cls.__logger = logger for attr in ('debug', 'info', 'warning', 'error', 'critical', 'exception'): setattr(cls, attr, getattr(logger, attr)) def xxx_cyan(record): if 'XXX' in record.message: return 'cyan' class ColorFormatter(logging.Formatter): """ A color Formatter for the logging standard module. By default, colorize CRITICAL and ERROR in red, WARNING in orange, INFO in green and DEBUG in yellow. self.colors is customizable via the 'color' constructor argument (dictionary). self.colorfilters is a list of functions that get the LogRecord and return a color name or None. """ def __init__(self, fmt=None, datefmt=None, colors=None): logging.Formatter.__init__(self, fmt, datefmt) self.colorfilters = [] self.colors = {'CRITICAL': 'red', 'ERROR': 'red', 'WARNING': 'magenta', 'INFO': 'green', 'DEBUG': 'yellow', } if colors is not None: assert isinstance(colors, dict) self.colors.update(colors) def format(self, record): msg = logging.Formatter.format(self, record) if record.levelname in self.colors: color = self.colors[record.levelname] return colorize_ansi(msg, color) else: for cf in self.colorfilters: color = cf(record) if color: return colorize_ansi(msg, color) return msg def set_color_formatter(logger=None, **kw): """ Install a color formatter on the 'logger'. If not given, it will defaults to the default logger. Any additional keyword will be passed as-is to the ColorFormatter constructor. """ if logger is None: logger = logging.getLogger() if not logger.handlers: logging.basicConfig() format_msg = logger.handlers[0].formatter._fmt fmt = ColorFormatter(format_msg, **kw) fmt.colorfilters.append(xxx_cyan) logger.handlers[0].setFormatter(fmt) LOG_FORMAT = '%(asctime)s - (%(name)s) %(levelname)s: %(message)s' LOG_DATE_FORMAT = '%Y-%m-%d %H:%M:%S' def get_handler(debug=False, syslog=False, logfile=None, rotation_parameters=None): """get an apropriate handler according to given parameters""" if os.environ.get('APYCOT_ROOT'): handler = logging.StreamHandler(sys.stdout) if debug: handler = logging.StreamHandler() elif logfile is None: if syslog: from logging import handlers handler = handlers.SysLogHandler() else: handler = logging.StreamHandler() else: try: if rotation_parameters is None: handler = logging.FileHandler(logfile) else: from logging.handlers import TimedRotatingFileHandler handler = TimedRotatingFileHandler( logfile, **rotation_parameters) except IOError: handler = logging.StreamHandler() return handler def get_threshold(debug=False, logthreshold=None): if logthreshold is None: if debug: logthreshold = logging.DEBUG else: logthreshold = logging.ERROR elif isinstance(logthreshold, basestring): logthreshold = getattr(logging, THRESHOLD_MAP.get(logthreshold, logthreshold)) return logthreshold def get_formatter(logformat=LOG_FORMAT, logdateformat=LOG_DATE_FORMAT): isatty = hasattr(sys.__stdout__, 'isatty') and sys.__stdout__.isatty() if isatty and sys.platform != 'win32': fmt = ColorFormatter(logformat, logdateformat) def col_fact(record): if 'XXX' in record.message: return 'cyan' if 'kick' in record.message: return 'red' fmt.colorfilters.append(col_fact) else: fmt = logging.Formatter(logformat, logdateformat) return fmt def init_log(debug=False, syslog=False, logthreshold=None, logfile=None, logformat=LOG_FORMAT, logdateformat=LOG_DATE_FORMAT, fmt=None, rotation_parameters=None, handler=None): """init the log service""" logger = logging.getLogger() if handler is None: handler = get_handler(debug, syslog, logfile, rotation_parameters) # only addHandler and removeHandler method while I would like a setHandler # method, so do it this way :$ logger.handlers = [handler] logthreshold = get_threshold(debug, logthreshold) logger.setLevel(logthreshold) if fmt is None: if debug: fmt = get_formatter(logformat=logformat, logdateformat=logdateformat) else: fmt = logging.Formatter(logformat, logdateformat) handler.setFormatter(fmt) return handler # map logilab.common.logger thresholds to logging thresholds THRESHOLD_MAP = {'LOG_DEBUG': 'DEBUG', 'LOG_INFO': 'INFO', 'LOG_NOTICE': 'INFO', 'LOG_WARN': 'WARNING', 'LOG_WARNING': 'WARNING', 'LOG_ERR': 'ERROR', 'LOG_ERROR': 'ERROR', 'LOG_CRIT': 'CRITICAL', } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/sphinx_ext.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000640111242100540033623 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . from logilab.common.decorators import monkeypatch from sphinx.ext import autodoc class DocstringOnlyModuleDocumenter(autodoc.ModuleDocumenter): objtype = 'docstring' def format_signature(self): pass def add_directive_header(self, sig): pass def document_members(self, all_members=False): pass def resolve_name(self, modname, parents, path, base): if modname is not None: return modname, parents + [base] return (path or '') + base, [] #autodoc.add_documenter(DocstringOnlyModuleDocumenter) def setup(app): app.add_autodocumenter(DocstringOnlyModuleDocumenter) from sphinx.ext.autodoc import (ViewList, Options, AutodocReporter, nodes, assemble_option_dict, nested_parse_with_titles) @monkeypatch(autodoc.AutoDirective) def run(self): self.filename_set = set() # a set of dependent filenames self.reporter = self.state.document.reporter self.env = self.state.document.settings.env self.warnings = [] self.result = ViewList() # find out what documenter to call objtype = self.name[4:] doc_class = self._registry[objtype] # process the options with the selected documenter's option_spec self.genopt = Options(assemble_option_dict( self.options.items(), doc_class.option_spec)) # generate the output documenter = doc_class(self, self.arguments[0]) documenter.generate(more_content=self.content) if not self.result: return self.warnings # record all filenames as dependencies -- this will at least # partially make automatic invalidation possible for fn in self.filename_set: self.env.note_dependency(fn) # use a custom reporter that correctly assigns lines to source # filename/description and lineno old_reporter = self.state.memo.reporter self.state.memo.reporter = AutodocReporter(self.result, self.state.memo.reporter) if self.name in ('automodule', 'autodocstring'): node = nodes.section() # necessary so that the child nodes get the right source/line set node.document = self.state.document nested_parse_with_titles(self.state, self.result, node) else: node = nodes.paragraph() node.document = self.state.document self.state.nested_parse(self.result, 0, node) self.state.memo.reporter = old_reporter return self.warnings + node.children ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/xmlrpcutils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001173611242100540033632 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """XML-RPC utilities.""" __docformat__ = "restructuredtext en" import xmlrpclib from base64 import encodestring #from cStringIO import StringIO ProtocolError = xmlrpclib.ProtocolError ## class BasicAuthTransport(xmlrpclib.Transport): ## def __init__(self, username=None, password=None): ## self.username = username ## self.password = password ## self.verbose = None ## self.has_ssl = httplib.__dict__.has_key("HTTPConnection") ## def request(self, host, handler, request_body, verbose=None): ## # issue XML-RPC request ## if self.has_ssl: ## if host.startswith("https:"): h = httplib.HTTPSConnection(host) ## else: h = httplib.HTTPConnection(host) ## else: h = httplib.HTTP(host) ## h.putrequest("POST", handler) ## # required by HTTP/1.1 ## if not self.has_ssl: # HTTPConnection already does 1.1 ## h.putheader("Host", host) ## h.putheader("Connection", "close") ## if request_body: h.send(request_body) ## if self.has_ssl: ## response = h.getresponse() ## if response.status != 200: ## raise xmlrpclib.ProtocolError(host + handler, ## response.status, ## response.reason, ## response.msg) ## file = response.fp ## else: ## errcode, errmsg, headers = h.getreply() ## if errcode != 200: ## raise xmlrpclib.ProtocolError(host + handler, errcode, ## errmsg, headers) ## file = h.getfile() ## return self.parse_response(file) class AuthMixin: """basic http authentication mixin for xmlrpc transports""" def __init__(self, username, password, encoding): self.verbose = 0 self.username = username self.password = password self.encoding = encoding def request(self, host, handler, request_body, verbose=0): """issue XML-RPC request""" h = self.make_connection(host) h.putrequest("POST", handler) # required by XML-RPC h.putheader("User-Agent", self.user_agent) h.putheader("Content-Type", "text/xml") h.putheader("Content-Length", str(len(request_body))) h.putheader("Host", host) h.putheader("Connection", "close") # basic auth if self.username is not None and self.password is not None: h.putheader("AUTHORIZATION", "Basic %s" % encodestring( "%s:%s" % (self.username, self.password)).replace("\012", "")) h.endheaders() # send body if request_body: h.send(request_body) # get and check reply errcode, errmsg, headers = h.getreply() if errcode != 200: raise ProtocolError(host + handler, errcode, errmsg, headers) file = h.getfile() ## # FIXME: encoding ??? iirc, this fix a bug in xmlrpclib but... ## data = h.getfile().read() ## if self.encoding != 'UTF-8': ## data = data.replace("version='1.0'", ## "version='1.0' encoding='%s'" % self.encoding) ## result = StringIO() ## result.write(data) ## result.seek(0) ## return self.parse_response(result) return self.parse_response(file) class BasicAuthTransport(AuthMixin, xmlrpclib.Transport): """basic http authentication transport""" class BasicAuthSafeTransport(AuthMixin, xmlrpclib.SafeTransport): """basic https authentication transport""" def connect(url, user=None, passwd=None, encoding='ISO-8859-1'): """return an xml rpc server on , using user / password if specified """ if user or passwd: assert user and passwd is not None if url.startswith('https://'): transport = BasicAuthSafeTransport(user, passwd, encoding) else: transport = BasicAuthTransport(user, passwd, encoding) else: transport = None server = xmlrpclib.ServerProxy(url, transport, encoding=encoding) return server ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000755000175000017500000000000011242100540033620 5ustar andreasandreas././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001403511242100540033625 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Universal report objects and some formatting drivers. A way to create simple reports using python objects, primarily designed to be formatted as text and html. """ from __future__ import generators __docformat__ = "restructuredtext en" import sys from cStringIO import StringIO from StringIO import StringIO as UStringIO from logilab.common.textutils import linesep def get_nodes(node, klass): """return an iterator on all children node of the given klass""" for child in node.children: if isinstance(child, klass): yield child # recurse (FIXME: recursion controled by an option) for grandchild in get_nodes(child, klass): yield grandchild def layout_title(layout): """try to return the layout's title as string, return None if not found """ for child in layout.children: if isinstance(child, Title): return ' '.join([node.data for node in get_nodes(child, Text)]) def build_summary(layout, level=1): """make a summary for the report, including X level""" assert level > 0 level -= 1 summary = List(klass='summary') for child in layout.children: if not isinstance(child, Section): continue label = layout_title(child) if not label and not child.id: continue if not child.id: child.id = label.replace(' ', '-') node = Link('#'+child.id, label=label or child.id) # FIXME: Three following lines produce not very compliant # docbook: there are some useless . They might be # replaced by the three commented lines but this then produces # a bug in html display... if level and [n for n in child.children if isinstance(n, Section)]: node = Paragraph([node, build_summary(child, level)]) summary.append(node) # summary.append(node) # if level and [n for n in child.children if isinstance(n, Section)]: # summary.append(build_summary(child, level)) return summary class BaseWriter(object): """base class for ureport writers""" def format(self, layout, stream=None, encoding=None): """format and write the given layout into the stream object unicode policy: unicode strings may be found in the layout; try to call stream.write with it, but give it back encoded using the given encoding if it fails """ if stream is None: stream = sys.stdout if not encoding: encoding = getattr(stream, 'encoding', 'UTF-8') self.encoding = encoding or 'UTF-8' self.__compute_funcs = [] self.out = stream self.begin_format(layout) layout.accept(self) self.end_format(layout) def format_children(self, layout): """recurse on the layout children and call their accept method (see the Visitor pattern) """ for child in getattr(layout, 'children', ()): child.accept(self) def writeln(self, string=''): """write a line in the output buffer""" self.write(string + linesep) def write(self, string): """write a string in the output buffer""" try: self.out.write(string) except UnicodeEncodeError: self.out.write(string.encode(self.encoding)) def begin_format(self, layout): """begin to format a layout""" self.section = 0 def end_format(self, layout): """finished to format a layout""" def get_table_content(self, table): """trick to get table content without actually writing it return an aligned list of lists containing table cells values as string """ result = [[]] cols = table.cols for cell in self.compute_content(table): if cols == 0: result.append([]) cols = table.cols cols -= 1 result[-1].append(cell) # fill missing cells while len(result[-1]) < cols: result[-1].append('') return result def compute_content(self, layout): """trick to compute the formatting of children layout before actually writing it return an iterator on strings (one for each child element) """ # use cells ! def write(data): try: stream.write(data) except UnicodeEncodeError: stream.write(data.encode(self.encoding)) def writeln(data=''): try: stream.write(data+linesep) except UnicodeEncodeError: stream.write(data.encode(self.encoding)+linesep) self.write = write self.writeln = writeln self.__compute_funcs.append((write, writeln)) for child in layout.children: stream = UStringIO() child.accept(self) yield stream.getvalue() self.__compute_funcs.pop() try: self.write, self.writeln = self.__compute_funcs[-1] except IndexError: del self.write del self.writeln from logilab.common.ureports.nodes import * from logilab.common.ureports.text_writer import TextWriter from logilab.common.ureports.html_writer import HTMLWriter ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/html_writer.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001142711242100540033627 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """HTML formatting drivers for ureports""" __docformat__ = "restructuredtext en" from cgi import escape from logilab.common.ureports import BaseWriter class HTMLWriter(BaseWriter): """format layouts as HTML""" def __init__(self, snippet=None): super(HTMLWriter, self).__init__() self.snippet = snippet def handle_attrs(self, layout): """get an attribute string from layout member attributes""" attrs = '' klass = getattr(layout, 'klass', None) if klass: attrs += ' class="%s"' % klass nid = getattr(layout, 'id', None) if nid: attrs += ' id="%s"' % nid return attrs def begin_format(self, layout): """begin to format a layout""" super(HTMLWriter, self).begin_format(layout) if self.snippet is None: self.writeln('') self.writeln('') def end_format(self, layout): """finished to format a layout""" if self.snippet is None: self.writeln('') self.writeln('') def visit_section(self, layout): """display a section as html, using div + h[section level]""" self.section += 1 self.writeln('' % self.handle_attrs(layout)) self.format_children(layout) self.writeln('
') self.section -= 1 def visit_title(self, layout): """display a title using """ self.write('' % (self.section, self.handle_attrs(layout))) self.format_children(layout) self.writeln('' % self.section) def visit_table(self, layout): """display a table as html""" self.writeln('' % self.handle_attrs(layout)) table_content = self.get_table_content(layout) for i in range(len(table_content)): row = table_content[i] if i == 0 and layout.rheaders: self.writeln('') elif i+1 == len(table_content) and layout.rrheaders: self.writeln('') else: self.writeln('' % (i%2 and 'even' or 'odd')) for j in range(len(row)): cell = row[j] or ' ' if (layout.rheaders and i == 0) or \ (layout.cheaders and j == 0) or \ (layout.rrheaders and i+1 == len(table_content)) or \ (layout.rcheaders and j+1 == len(row)): self.writeln('%s' % cell) else: self.writeln('%s' % cell) self.writeln('') self.writeln('') def visit_list(self, layout): """display a list as html""" self.writeln('' % self.handle_attrs(layout)) for row in list(self.compute_content(layout)): self.writeln('
  • %s
  • ' % row) self.writeln('') def visit_paragraph(self, layout): """display links (using

    )""" self.write('

    ') self.format_children(layout) self.write('

    ') def visit_span(self, layout): """display links (using

    )""" self.write('' % self.handle_attrs(layout)) self.format_children(layout) self.write('') def visit_link(self, layout): """display links (using )""" self.write(' %s' % (layout.url, self.handle_attrs(layout), layout.label)) def visit_verbatimtext(self, layout): """display verbatim text (using

    )"""
            self.write('
    ')
            self.write(layout.data.replace('&', '&').replace('<', '<'))
            self.write('
    ') def visit_text(self, layout): """add some text""" data = layout.data if layout.escaped: data = data.replace('&', '&').replace('<', '<') self.write(data) ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/nodes.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001326211242100540033626 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Micro reports objects. A micro report is a tree of layout and content objects. """ __docformat__ = "restructuredtext en" from logilab.common.tree import VNode class BaseComponent(VNode): """base report component attributes * id : the component's optional id * klass : the component's optional klass """ def __init__(self, id=None, klass=None): VNode.__init__(self, id) self.klass = klass class BaseLayout(BaseComponent): """base container node attributes * BaseComponent attributes * children : components in this table (i.e. the table's cells) """ def __init__(self, children=(), **kwargs): super(BaseLayout, self).__init__(**kwargs) for child in children: if isinstance(child, BaseComponent): self.append(child) else: self.add_text(child) def append(self, child): """overridden to detect problems easily""" assert child not in self.parents() VNode.append(self, child) def parents(self): """return the ancestor nodes""" assert self.parent is not self if self.parent is None: return [] return [self.parent] + self.parent.parents() def add_text(self, text): """shortcut to add text data""" self.children.append(Text(text)) # non container nodes ######################################################### class Text(BaseComponent): """a text portion attributes : * BaseComponent attributes * data : the text value as an encoded or unicode string """ def __init__(self, data, escaped=True, **kwargs): super(Text, self).__init__(**kwargs) #if isinstance(data, unicode): # data = data.encode('ascii') assert isinstance(data, (str, unicode)), data.__class__ self.escaped = escaped self.data = data class VerbatimText(Text): """a verbatim text, display the raw data attributes : * BaseComponent attributes * data : the text value as an encoded or unicode string """ class Link(BaseComponent): """a labelled link attributes : * BaseComponent attributes * url : the link's target (REQUIRED) * label : the link's label as a string (use the url by default) """ def __init__(self, url, label=None, **kwargs): super(Link, self).__init__(**kwargs) assert url self.url = url self.label = label or url class Image(BaseComponent): """an embedded or a single image attributes : * BaseComponent attributes * filename : the image's filename (REQUIRED) * stream : the stream object containing the image data (REQUIRED) * title : the image's optional title """ def __init__(self, filename, stream, title=None, **kwargs): super(Image, self).__init__(**kwargs) assert filename assert stream self.filename = filename self.stream = stream self.title = title # container nodes ############################################################# class Section(BaseLayout): """a section attributes : * BaseLayout attributes a title may also be given to the constructor, it'll be added as a first element a description may also be given to the constructor, it'll be added as a first paragraph """ def __init__(self, title=None, description=None, **kwargs): super(Section, self).__init__(**kwargs) if description: self.insert(0, Paragraph([Text(description)])) if title: self.insert(0, Title(children=(title,))) class Title(BaseLayout): """a title attributes : * BaseLayout attributes A title must not contains a section nor a paragraph! """ class Span(BaseLayout): """a title attributes : * BaseLayout attributes A span should only contains Text and Link nodes (in-line elements) """ class Paragraph(BaseLayout): """a simple text paragraph attributes : * BaseLayout attributes A paragraph must not contains a section ! """ class Table(BaseLayout): """some tabular data attributes : * BaseLayout attributes * cols : the number of columns of the table (REQUIRED) * rheaders : the first row's elements are table's header * cheaders : the first col's elements are table's header * title : the table's optional title """ def __init__(self, cols, title=None, rheaders=0, cheaders=0, rrheaders=0, rcheaders=0, **kwargs): super(Table, self).__init__(**kwargs) assert isinstance(cols, int) self.cols = cols self.title = title self.rheaders = rheaders self.cheaders = cheaders self.rrheaders = rrheaders self.rcheaders = rcheaders class List(BaseLayout): """some list data attributes : * BaseLayout attributes """ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/docbook_writer.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001311711242100540033625 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """HTML formatting drivers for ureports""" from __future__ import generators __docformat__ = "restructuredtext en" from logilab.common.ureports import HTMLWriter class DocbookWriter(HTMLWriter): """format layouts as HTML""" def begin_format(self, layout): """begin to format a layout""" super(HTMLWriter, self).begin_format(layout) if self.snippet is None: self.writeln('') self.writeln(""" """) def end_format(self, layout): """finished to format a layout""" if self.snippet is None: self.writeln('') def visit_section(self, layout): """display a section (using (level 0) or
    )""" if self.section == 0: tag = "chapter" else: tag = "section" self.section += 1 self.writeln(self._indent('<%s%s>' % (tag, self.handle_attrs(layout)))) self.format_children(layout) self.writeln(self._indent(''% tag)) self.section -= 1 def visit_title(self, layout): """display a title using """ self.write(self._indent(' <title%s>' % self.handle_attrs(layout))) self.format_children(layout) self.writeln('') def visit_table(self, layout): """display a table as html""" self.writeln(self._indent(' %s' \ % (self.handle_attrs(layout), layout.title))) self.writeln(self._indent(' '% layout.cols)) for i in range(layout.cols): self.writeln(self._indent(' ' % i)) table_content = self.get_table_content(layout) # write headers if layout.cheaders: self.writeln(self._indent(' ')) self._write_row(table_content[0]) self.writeln(self._indent(' ')) table_content = table_content[1:] elif layout.rcheaders: self.writeln(self._indent(' ')) self._write_row(table_content[-1]) self.writeln(self._indent(' ')) table_content = table_content[:-1] # write body self.writeln(self._indent(' ')) for i in range(len(table_content)): row = table_content[i] self.writeln(self._indent(' ')) for j in range(len(row)): cell = row[j] or ' ' self.writeln(self._indent(' %s' % cell)) self.writeln(self._indent(' ')) self.writeln(self._indent(' ')) self.writeln(self._indent(' ')) self.writeln(self._indent(' ')) def _write_row(self, row): """write content of row (using )""" self.writeln(' ') for j in range(len(row)): cell = row[j] or ' ' self.writeln(' %s' % cell) self.writeln(self._indent(' ')) def visit_list(self, layout): """display a list (using )""" self.writeln(self._indent(' ' % self.handle_attrs(layout))) for row in list(self.compute_content(layout)): self.writeln(' %s' % row) self.writeln(self._indent(' ')) def visit_paragraph(self, layout): """display links (using )""" self.write(self._indent(' ')) self.format_children(layout) self.writeln('') def visit_span(self, layout): """display links (using

    )""" #TODO: translate in docbook self.write('' % self.handle_attrs(layout)) self.format_children(layout) self.write('') def visit_link(self, layout): """display links (using )""" self.write('%s' % (layout.url, self.handle_attrs(layout), layout.label)) def visit_verbatimtext(self, layout): """display verbatim text (using )""" self.writeln(self._indent(' ')) self.write(layout.data.replace('&', '&').replace('<', '<')) self.writeln(self._indent(' ')) def visit_text(self, layout): """add some text""" self.write(layout.data.replace('&', '&').replace('<', '<')) def _indent(self, string): """correctly indent string according to section""" return ' ' * 2*(self.section) + string ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/ureports/text_writer.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001176211242100540033631 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Text formatting drivers for ureports""" __docformat__ = "restructuredtext en" from logilab.common.textutils import linesep from logilab.common.ureports import BaseWriter TITLE_UNDERLINES = ['', '=', '-', '`', '.', '~', '^'] BULLETS = ['*', '-'] class TextWriter(BaseWriter): """format layouts as text (ReStructured inspiration but not totally handled yet) """ def begin_format(self, layout): super(TextWriter, self).begin_format(layout) self.list_level = 0 self.pending_urls = [] def visit_section(self, layout): """display a section as text """ self.section += 1 self.writeln() self.format_children(layout) if self.pending_urls: self.writeln() for label, url in self.pending_urls: self.writeln('.. _`%s`: %s' % (label, url)) self.pending_urls = [] self.section -= 1 self.writeln() def visit_title(self, layout): title = ''.join(list(self.compute_content(layout))) self.writeln(title) try: self.writeln(TITLE_UNDERLINES[self.section] * len(title)) except IndexError: print "FIXME TITLE TOO DEEP. TURNING TITLE INTO TEXT" def visit_paragraph(self, layout): """enter a paragraph""" self.format_children(layout) self.writeln() def visit_span(self, layout): """enter a span""" self.format_children(layout) def visit_table(self, layout): """display a table as text""" table_content = self.get_table_content(layout) # get columns width cols_width = [0]*len(table_content[0]) for row in table_content: for index in range(len(row)): col = row[index] cols_width[index] = max(cols_width[index], len(col)) if layout.klass == 'field': self.field_table(layout, table_content, cols_width) else: self.default_table(layout, table_content, cols_width) self.writeln() def default_table(self, layout, table_content, cols_width): """format a table""" cols_width = [size+1 for size in cols_width] format_strings = ' '.join(['%%-%ss'] * len(cols_width)) format_strings = format_strings % tuple(cols_width) format_strings = format_strings.split(' ') table_linesep = '\n+' + '+'.join(['-'*w for w in cols_width]) + '+\n' headsep = '\n+' + '+'.join(['='*w for w in cols_width]) + '+\n' # FIXME: layout.cheaders self.write(table_linesep) for i in range(len(table_content)): self.write('|') line = table_content[i] for j in range(len(line)): self.write(format_strings[j] % line[j]) self.write('|') if i == 0 and layout.rheaders: self.write(headsep) else: self.write(table_linesep) def field_table(self, layout, table_content, cols_width): """special case for field table""" assert layout.cols == 2 format_string = '%s%%-%ss: %%s' % (linesep, cols_width[0]) for field, value in table_content: self.write(format_string % (field, value)) def visit_list(self, layout): """display a list layout as text""" bullet = BULLETS[self.list_level % len(BULLETS)] indent = ' ' * self.list_level self.list_level += 1 for child in layout.children: self.write('%s%s%s ' % (linesep, indent, bullet)) child.accept(self) self.list_level -= 1 def visit_link(self, layout): """add a hyperlink""" if layout.label != layout.url: self.write('`%s`_' % layout.label) self.pending_urls.append( (layout.label, layout.url) ) else: self.write(layout.url) def visit_verbatimtext(self, layout): """display a verbatim layout as text (so difficult ;) """ self.writeln('::\n') for line in layout.data.splitlines(): self.writeln(' ' + line) self.writeln() def visit_text(self, layout): """add some text""" self.write(layout.data) ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/testlib.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000022371011242100540033627 0ustar andreasandreas# -*- coding: utf-8 -*- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Run tests. This will find all modules whose name match a given prefix in the test directory, and run them. Various command line options provide additional facilities. Command line options: -v verbose -- run tests in verbose mode with output to stdout -q quiet -- don't print anything except if a test fails -t testdir -- directory where the tests will be found -x exclude -- add a test to exclude -p profile -- profiled execution -c capture -- capture standard out/err during tests -d dbc -- enable design-by-contract -m match -- only run test matching the tag pattern which follow If no non-option arguments are present, prefixes used are 'test', 'regrtest', 'smoketest' and 'unittest'. """ __docformat__ = "restructuredtext en" # modified copy of some functions from test/regrtest.py from PyXml # disable camel case warning # pylint: disable=C0103 import sys import os, os.path as osp import re import time import traceback import inspect import difflib import types import tempfile import math from shutil import rmtree from operator import itemgetter import warnings from ConfigParser import ConfigParser from logilab.common.deprecation import deprecated from itertools import dropwhile if sys.version_info < (3, 2): import unittest2 as unittest from unittest2 import SkipTest else: import unittest from unittest import SkipTest try: from functools import wraps except ImportError: def wraps(wrapped): def proxy(callable): callable.__name__ = wrapped.__name__ return callable return proxy try: from test import test_support except ImportError: # not always available class TestSupport: def unload(self, test): pass test_support = TestSupport() # pylint: disable=W0622 from logilab.common.compat import set, any, sorted, InheritableSet, callable # pylint: enable=W0622 from logilab.common.modutils import load_module_from_name from logilab.common.debugger import Debugger, colorize_source from logilab.common.decorators import cached, classproperty from logilab.common import textutils __all__ = ['main', 'unittest_main', 'find_tests', 'run_test', 'spawn'] DEFAULT_PREFIXES = ('test', 'regrtest', 'smoketest', 'unittest', 'func', 'validation') ENABLE_DBC = False FILE_RESTART = ".pytest.restart" if sys.version_info >= (2, 6): # FIXME : this does not work as expected / breaks tests on testlib # however testlib does not work on py3k for many reasons ... from inspect import CO_GENERATOR else: from compiler.consts import CO_GENERATOR if sys.version_info >= (3, 0): def is_generator(function): flags = function.__code__.co_flags return flags & CO_GENERATOR else: def is_generator(function): flags = function.func_code.co_flags return flags & CO_GENERATOR # used by unittest to count the number of relevant levels in the traceback __unittest = 1 def with_tempdir(callable): """A decorator ensuring no temporary file left when the function return Work only for temporary file create with the tempfile module""" @wraps(callable) def proxy(*args, **kargs): old_tmpdir = tempfile.gettempdir() new_tmpdir = tempfile.mkdtemp(prefix="temp-lgc-") tempfile.tempdir = new_tmpdir try: return callable(*args, **kargs) finally: try: rmtree(new_tmpdir, ignore_errors=True) finally: tempfile.tempdir = old_tmpdir return proxy def in_tempdir(callable): """A decorator moving the enclosed function inside the tempfile.tempfdir """ @wraps(callable) def proxy(*args, **kargs): old_cwd = os.getcwd() os.chdir(tempfile.tempdir) try: return callable(*args, **kargs) finally: os.chdir(old_cwd) return proxy def within_tempdir(callable): """A decorator run the enclosed function inside a tmpdir removed after execution """ proxy = with_tempdir(in_tempdir(callable)) proxy.__name__ = callable.__name__ return proxy def run_tests(tests, quiet, verbose, runner=None, capture=0): """Execute a list of tests. :rtype: tuple :return: tuple (list of passed tests, list of failed tests, list of skipped tests) """ good = [] bad = [] skipped = [] all_result = None for test in tests: if not quiet: print print '-'*80 print "Executing", test result = run_test(test, verbose, runner, capture) if type(result) is type(''): # an unexpected error occurred skipped.append( (test, result)) else: if all_result is None: all_result = result else: all_result.testsRun += result.testsRun all_result.failures += result.failures all_result.errors += result.errors all_result.skipped += result.skipped if result.errors or result.failures: bad.append(test) if verbose: print "test", test, \ "failed -- %s errors, %s failures" % ( len(result.errors), len(result.failures)) else: good.append(test) return good, bad, skipped, all_result def find_tests(testdir, prefixes=DEFAULT_PREFIXES, suffix=".py", excludes=(), remove_suffix=True): """ Return a list of all applicable test modules. """ tests = [] for name in os.listdir(testdir): if not suffix or name.endswith(suffix): for prefix in prefixes: if name.startswith(prefix): if remove_suffix and name.endswith(suffix): name = name[:-len(suffix)] if name not in excludes: tests.append(name) tests.sort() return tests def run_test(test, verbose, runner=None, capture=0): """ Run a single test. test -- the name of the test verbose -- if true, print more messages """ test_support.unload(test) try: m = load_module_from_name(test, path=sys.path) # m = __import__(test, globals(), locals(), sys.path) try: suite = m.suite if callable(suite): suite = suite() except AttributeError: loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) if runner is None: runner = SkipAwareTextTestRunner(capture=capture) # verbosity=0) return runner.run(suite) except KeyboardInterrupt: raise except: # raise type, value = sys.exc_info()[:2] msg = "test %s crashed -- %s : %s" % (test, type, value) if verbose: traceback.print_exc() return msg def _count(n, word): """format word according to n""" if n == 1: return "%d %s" % (n, word) else: return "%d %ss" % (n, word) ## PostMortem Debug facilities ##### def start_interactive_mode(result): """starts an interactive shell so that the user can inspect errors """ debuggers = result.debuggers descrs = result.error_descrs + result.fail_descrs if len(debuggers) == 1: # don't ask for test name if there's only one failure debuggers[0].start() else: while True: testindex = 0 print "Choose a test to debug:" # order debuggers in the same way than errors were printed print "\n".join(['\t%s : %s' % (i, descr) for i, (_, descr) in enumerate(descrs)]) print "Type 'exit' (or ^D) to quit" print try: todebug = raw_input('Enter a test name: ') if todebug.strip().lower() == 'exit': print break else: try: testindex = int(todebug) debugger = debuggers[descrs[testindex][0]] except (ValueError, IndexError): print "ERROR: invalid test number %r" % (todebug, ) else: debugger.start() except (EOFError, KeyboardInterrupt): print break # test utils ################################################################## from cStringIO import StringIO class SkipAwareTestResult(unittest._TextTestResult): def __init__(self, stream, descriptions, verbosity, exitfirst=False, capture=0, printonly=None, pdbmode=False, cvg=None, colorize=False): super(SkipAwareTestResult, self).__init__(stream, descriptions, verbosity) self.skipped = [] self.debuggers = [] self.fail_descrs = [] self.error_descrs = [] self.exitfirst = exitfirst self.capture = capture self.printonly = printonly self.pdbmode = pdbmode self.cvg = cvg self.colorize = colorize self.pdbclass = Debugger self.verbose = verbosity > 1 def descrs_for(self, flavour): return getattr(self, '%s_descrs' % flavour.lower()) def _create_pdb(self, test_descr, flavour): self.descrs_for(flavour).append( (len(self.debuggers), test_descr) ) if self.pdbmode: self.debuggers.append(self.pdbclass(sys.exc_info()[2])) def _iter_valid_frames(self, frames): """only consider non-testlib frames when formatting traceback""" lgc_testlib = osp.abspath(__file__) std_testlib = osp.abspath(unittest.__file__) invalid = lambda fi: osp.abspath(fi[1]) in (lgc_testlib, std_testlib) for frameinfo in dropwhile(invalid, frames): yield frameinfo def _exc_info_to_string(self, err, test): """Converts a sys.exc_info()-style tuple of values into a string. This method is overridden here because we want to colorize lines if --color is passed, and display local variables if --verbose is passed """ exctype, exc, tb = err output = ['Traceback (most recent call last)'] frames = inspect.getinnerframes(tb) colorize = self.colorize frames = enumerate(self._iter_valid_frames(frames)) for index, (frame, filename, lineno, funcname, ctx, ctxindex) in frames: filename = osp.abspath(filename) if ctx is None: # pyc files or C extensions for instance source = '' else: source = ''.join(ctx) if colorize: filename = textutils.colorize_ansi(filename, 'magenta') source = colorize_source(source) output.append(' File "%s", line %s, in %s' % (filename, lineno, funcname)) output.append(' %s' % source.strip()) if self.verbose: output.append('%r == %r' % (dir(frame), test.__module__)) output.append('') output.append(' ' + ' local variables '.center(66, '-')) for varname, value in sorted(frame.f_locals.items()): output.append(' %s: %r' % (varname, value)) if varname == 'self': # special handy processing for self for varname, value in sorted(vars(value).items()): output.append(' self.%s: %r' % (varname, value)) output.append(' ' + '-' * 66) output.append('') output.append(''.join(traceback.format_exception_only(exctype, exc))) return '\n'.join(output) def addError(self, test, err): """err == (exc_type, exc, tcbk)""" exc_type, exc, _ = err # if exc_type == SkipTest: self.addSkipped(test, exc) else: if self.exitfirst: self.shouldStop = True descr = self.getDescription(test) super(SkipAwareTestResult, self).addError(test, err) self._create_pdb(descr, 'error') def addFailure(self, test, err): if self.exitfirst: self.shouldStop = True descr = self.getDescription(test) super(SkipAwareTestResult, self).addFailure(test, err) self._create_pdb(descr, 'fail') def addSkipped(self, test, reason): self.skipped.append((test, self.getDescription(test), reason)) if self.showAll: self.stream.writeln("SKIPPED") elif self.dots: self.stream.write('S') def printErrors(self): super(SkipAwareTestResult, self).printErrors() # FIXME format of skipped results not compatible with unittest2 self.printSkippedList() def printSkippedList(self): for _, descr, err in self.skipped: # test, descr, err self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % ('SKIPPED', descr)) self.stream.writeln("\t%s" % err) def printErrorList(self, flavour, errors): for (_, descr), (test, err) in zip(self.descrs_for(flavour), errors): self.stream.writeln(self.separator1) if self.colorize: self.stream.writeln("%s: %s" % ( textutils.colorize_ansi(flavour, color='red'), descr)) else: self.stream.writeln("%s: %s" % (flavour, descr)) self.stream.writeln(self.separator2) self.stream.writeln(err) try: output, errput = test.captured_output() except AttributeError: pass # original unittest else: if output: self.stream.writeln(self.separator2) self.stream.writeln("captured stdout".center( len(self.separator2))) self.stream.writeln(self.separator2) self.stream.writeln(output) else: self.stream.writeln('no stdout'.center( len(self.separator2))) if errput: self.stream.writeln(self.separator2) self.stream.writeln("captured stderr".center( len(self.separator2))) self.stream.writeln(self.separator2) self.stream.writeln(errput) else: self.stream.writeln('no stderr'.center( len(self.separator2))) def run(self, result, runcondition=None, options=None): for test in self._tests: if result.shouldStop: break try: test(result, runcondition, options) except TypeError: # this might happen if a raw unittest.TestCase is defined # and used with python (and not pytest) warnings.warn("%s should extend lgc.testlib.TestCase instead of unittest.TestCase" % test) test(result) return result unittest.TestSuite.run = run # backward compatibility: TestSuite might be imported from lgc.testlib TestSuite = unittest.TestSuite class SkipAwareTextTestRunner(unittest.TextTestRunner): def __init__(self, stream=sys.stderr, verbosity=1, exitfirst=False, capture=False, printonly=None, pdbmode=False, cvg=None, test_pattern=None, skipped_patterns=(), colorize=False, batchmode=False, options=None): super(SkipAwareTextTestRunner, self).__init__(stream=stream, verbosity=verbosity) self.exitfirst = exitfirst self.capture = capture self.printonly = printonly self.pdbmode = pdbmode self.cvg = cvg self.test_pattern = test_pattern self.skipped_patterns = skipped_patterns self.colorize = colorize self.batchmode = batchmode self.options = options def _this_is_skipped(self, testedname): return any([(pat in testedname) for pat in self.skipped_patterns]) def _runcondition(self, test, skipgenerator=True): if isinstance(test, InnerTest): testname = test.name else: if isinstance(test, TestCase): meth = test._get_test_method() func = meth.im_func testname = '%s.%s' % (meth.im_class.__name__, func.__name__) elif isinstance(test, types.FunctionType): func = test testname = func.__name__ elif isinstance(test, types.MethodType): func = test.im_func testname = '%s.%s' % (test.im_class.__name__, func.__name__) else: return True # Not sure when this happens if is_generator(func) and skipgenerator: return self.does_match_tags(func) # Let inner tests decide at run time # print 'testname', testname, self.test_pattern if self._this_is_skipped(testname): return False # this was explicitly skipped if self.test_pattern is not None: try: classpattern, testpattern = self.test_pattern.split('.') klass, name = testname.split('.') if classpattern not in klass or testpattern not in name: return False except ValueError: if self.test_pattern not in testname: return False return self.does_match_tags(test) def does_match_tags(self, test): if self.options is not None: tags_pattern = getattr(self.options, 'tags_pattern', None) if tags_pattern is not None: tags = getattr(test, 'tags', Tags()) if tags.inherit and isinstance(test, types.MethodType): tags = tags | getattr(test.im_class, 'tags', Tags()) return tags.match(tags_pattern) return True # no pattern def _makeResult(self): return SkipAwareTestResult(self.stream, self.descriptions, self.verbosity, self.exitfirst, self.capture, self.printonly, self.pdbmode, self.cvg, self.colorize) def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result, self._runcondition, self.options) stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() if not self.batchmode: self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): if self.colorize: self.stream.write(textutils.colorize_ansi("FAILED", color='red')) else: self.stream.write("FAILED") else: if self.colorize: self.stream.write(textutils.colorize_ansi("OK", color='green')) else: self.stream.write("OK") failed, errored, skipped = map(len, (result.failures, result.errors, result.skipped)) det_results = [] for name, value in (("failures", result.failures), ("errors",result.errors), ("skipped", result.skipped)): if value: det_results.append("%s=%i" % (name, len(value))) if det_results: self.stream.write(" (") self.stream.write(', '.join(det_results)) self.stream.write(")") self.stream.writeln("") return result class keywords(dict): """Keyword args (**kwargs) support for generative tests.""" class starargs(tuple): """Variable arguments (*args) for generative tests.""" def __new__(cls, *args): return tuple.__new__(cls, args) class NonStrictTestLoader(unittest.TestLoader): """ Overrides default testloader to be able to omit classname when specifying tests to run on command line. For example, if the file test_foo.py contains :: class FooTC(TestCase): def test_foo1(self): # ... def test_foo2(self): # ... def test_bar1(self): # ... class BarTC(TestCase): def test_bar2(self): # ... 'python test_foo.py' will run the 3 tests in FooTC 'python test_foo.py FooTC' will run the 3 tests in FooTC 'python test_foo.py test_foo' will run test_foo1 and test_foo2 'python test_foo.py test_foo1' will run test_foo1 'python test_foo.py test_bar' will run FooTC.test_bar1 and BarTC.test_bar2 """ def __init__(self): self.skipped_patterns = [] def loadTestsFromNames(self, names, module=None): suites = [] for name in names: suites.extend(self.loadTestsFromName(name, module)) return self.suiteClass(suites) def _collect_tests(self, module): tests = {} for obj in vars(module).values(): if (issubclass(type(obj), (types.ClassType, type)) and issubclass(obj, unittest.TestCase)): classname = obj.__name__ if classname[0] == '_' or self._this_is_skipped(classname): continue methodnames = [] # obj is a TestCase class for attrname in dir(obj): if attrname.startswith(self.testMethodPrefix): attr = getattr(obj, attrname) if callable(attr): methodnames.append(attrname) # keep track of class (obj) for convenience tests[classname] = (obj, methodnames) return tests def loadTestsFromSuite(self, module, suitename): try: suite = getattr(module, suitename)() except AttributeError: return [] assert hasattr(suite, '_tests'), \ "%s.%s is not a valid TestSuite" % (module.__name__, suitename) # python2.3 does not implement __iter__ on suites, we need to return # _tests explicitly return suite._tests def loadTestsFromName(self, name, module=None): parts = name.split('.') if module is None or len(parts) > 2: # let the base class do its job here return [super(NonStrictTestLoader, self).loadTestsFromName(name)] tests = self._collect_tests(module) # import pprint # pprint.pprint(tests) collected = [] if len(parts) == 1: pattern = parts[0] if callable(getattr(module, pattern, None) ) and pattern not in tests: # consider it as a suite return self.loadTestsFromSuite(module, pattern) if pattern in tests: # case python unittest_foo.py MyTestTC klass, methodnames = tests[pattern] for methodname in methodnames: collected = [klass(methodname) for methodname in methodnames] else: # case python unittest_foo.py something for klass, methodnames in tests.values(): collected += [klass(methodname) for methodname in methodnames] elif len(parts) == 2: # case "MyClass.test_1" classname, pattern = parts klass, methodnames = tests.get(classname, (None, [])) for methodname in methodnames: collected = [klass(methodname) for methodname in methodnames] return collected def _this_is_skipped(self, testedname): return any([(pat in testedname) for pat in self.skipped_patterns]) def getTestCaseNames(self, testCaseClass): """Return a sorted sequence of method names found within testCaseClass """ is_skipped = self._this_is_skipped classname = testCaseClass.__name__ if classname[0] == '_' or is_skipped(classname): return [] testnames = super(NonStrictTestLoader, self).getTestCaseNames( testCaseClass) return [testname for testname in testnames if not is_skipped(testname)] class SkipAwareTestProgram(unittest.TestProgram): # XXX: don't try to stay close to unittest.py, use optparse USAGE = """\ Usage: %(progName)s [options] [test] [...] Options: -h, --help Show this message -v, --verbose Verbose output -i, --pdb Enable test failure inspection -x, --exitfirst Exit on first failure -c, --capture Captures and prints standard out/err only on errors -p, --printonly Only prints lines matching specified pattern (implies capture) -s, --skip skip test matching this pattern (no regexp for now) -q, --quiet Minimal output --color colorize tracebacks -m, --match Run only test whose tag match this pattern -P, --profile FILE: Run the tests using cProfile and saving results in FILE Examples: %(progName)s - run default set of tests %(progName)s MyTestSuite - run suite 'MyTestSuite' %(progName)s MyTestCase.testSomething - run MyTestCase.testSomething %(progName)s MyTestCase - run all 'test*' test methods in MyTestCase """ def __init__(self, module='__main__', defaultTest=None, batchmode=False, cvg=None, options=None, outstream=sys.stderr): self.batchmode = batchmode self.cvg = cvg self.options = options self.outstream = outstream super(SkipAwareTestProgram, self).__init__( module=module, defaultTest=defaultTest, testLoader=NonStrictTestLoader()) def parseArgs(self, argv): self.pdbmode = False self.exitfirst = False self.capture = 0 self.printonly = None self.skipped_patterns = [] self.test_pattern = None self.tags_pattern = None self.colorize = False self.profile_name = None import getopt try: options, args = getopt.getopt(argv[1:], 'hHvixrqcp:s:m:P:', ['help', 'verbose', 'quiet', 'pdb', 'exitfirst', 'restart', 'capture', 'printonly=', 'skip=', 'color', 'match=', 'profile=']) for opt, value in options: if opt in ('-h', '-H', '--help'): self.usageExit() if opt in ('-i', '--pdb'): self.pdbmode = True if opt in ('-x', '--exitfirst'): self.exitfirst = True if opt in ('-r', '--restart'): self.restart = True self.exitfirst = True if opt in ('-q', '--quiet'): self.verbosity = 0 if opt in ('-v', '--verbose'): self.verbosity = 2 if opt in ('-c', '--capture'): self.capture += 1 if opt in ('-p', '--printonly'): self.printonly = re.compile(value) if opt in ('-s', '--skip'): self.skipped_patterns = [pat.strip() for pat in value.split(', ')] if opt == '--color': self.colorize = True if opt in ('-m', '--match'): #self.tags_pattern = value self.options["tag_pattern"] = value if opt in ('-P', '--profile'): self.profile_name = value self.testLoader.skipped_patterns = self.skipped_patterns if self.printonly is not None: self.capture += 1 if len(args) == 0 and self.defaultTest is None: suitefunc = getattr(self.module, 'suite', None) if isinstance(suitefunc, (types.FunctionType, types.MethodType)): self.test = self.module.suite() else: self.test = self.testLoader.loadTestsFromModule(self.module) return if len(args) > 0: self.test_pattern = args[0] self.testNames = args else: self.testNames = (self.defaultTest, ) self.createTests() except getopt.error, msg: self.usageExit(msg) def runTests(self): if self.profile_name: import cProfile cProfile.runctx('self._runTests()', globals(), locals(), self.profile_name ) else: return self._runTests() def _runTests(self): if hasattr(self.module, 'setup_module'): try: self.module.setup_module(self.options) except Exception, exc: print 'setup_module error:', exc sys.exit(1) self.testRunner = SkipAwareTextTestRunner(verbosity=self.verbosity, stream=self.outstream, exitfirst=self.exitfirst, capture=self.capture, printonly=self.printonly, pdbmode=self.pdbmode, cvg=self.cvg, test_pattern=self.test_pattern, skipped_patterns=self.skipped_patterns, colorize=self.colorize, batchmode=self.batchmode, options=self.options) def removeSucceededTests(obj, succTests): """ Recursive function that removes succTests from a TestSuite or TestCase """ if isinstance(obj, TestSuite): removeSucceededTests(obj._tests, succTests) if isinstance(obj, list): for el in obj[:]: if isinstance(el, TestSuite): removeSucceededTests(el, succTests) elif isinstance(el, TestCase): descr = '.'.join((el.__class__.__module__, el.__class__.__name__, el._testMethodName)) if descr in succTests: obj.remove(el) # take care, self.options may be None if getattr(self.options, 'restart', False): # retrieve succeeded tests from FILE_RESTART try: restartfile = open(FILE_RESTART, 'r') try: succeededtests = list(elem.rstrip('\n\r') for elem in restartfile.readlines()) removeSucceededTests(self.test, succeededtests) finally: restartfile.close() except Exception, ex: raise Exception("Error while reading succeeded tests into %s: %s" % (osp.join(os.getcwd(), FILE_RESTART), ex)) result = self.testRunner.run(self.test) # help garbage collection: we want TestSuite, which hold refs to every # executed TestCase, to be gc'ed del self.test if hasattr(self.module, 'teardown_module'): try: self.module.teardown_module(self.options, result) except Exception, exc: print 'teardown_module error:', exc sys.exit(1) if getattr(result, "debuggers", None) and \ getattr(self, "pdbmode", None): start_interactive_mode(result) if not getattr(self, "batchmode", None): sys.exit(not result.wasSuccessful()) self.result = result class FDCapture: """adapted from py lib (http://codespeak.net/py) Capture IO to/from a given os-level filedescriptor. """ def __init__(self, fd, attr='stdout', printonly=None): self.targetfd = fd self.tmpfile = os.tmpfile() # self.maketempfile() self.printonly = printonly # save original file descriptor self._savefd = os.dup(fd) # override original file descriptor os.dup2(self.tmpfile.fileno(), fd) # also modify sys module directly self.oldval = getattr(sys, attr) setattr(sys, attr, self) # self.tmpfile) self.attr = attr def write(self, msg): # msg might be composed of several lines for line in msg.splitlines(): line += '\n' # keepdend=True is not enough if self.printonly is None or self.printonly.search(line) is None: self.tmpfile.write(line) else: os.write(self._savefd, line) ## def maketempfile(self): ## tmpf = os.tmpfile() ## fd = os.dup(tmpf.fileno()) ## newf = os.fdopen(fd, tmpf.mode, 0) # No buffering ## tmpf.close() ## return newf def restore(self): """restore original fd and returns captured output""" #XXX: hack hack hack self.tmpfile.flush() try: ref_file = getattr(sys, '__%s__' % self.attr) ref_file.flush() except AttributeError: pass if hasattr(self.oldval, 'flush'): self.oldval.flush() # restore original file descriptor os.dup2(self._savefd, self.targetfd) # restore sys module setattr(sys, self.attr, self.oldval) # close backup descriptor os.close(self._savefd) # go to beginning of file and read it self.tmpfile.seek(0) return self.tmpfile.read() def _capture(which='stdout', printonly=None): """private method, should not be called directly (cf. capture_stdout() and capture_stderr()) """ assert which in ('stdout', 'stderr' ), "Can only capture stdout or stderr, not %s" % which if which == 'stdout': fd = 1 else: fd = 2 return FDCapture(fd, which, printonly) def capture_stdout(printonly=None): """captures the standard output returns a handle object which has a `restore()` method. The restore() method returns the captured stdout and restores it """ return _capture('stdout', printonly) def capture_stderr(printonly=None): """captures the standard error output returns a handle object which has a `restore()` method. The restore() method returns the captured stderr and restores it """ return _capture('stderr', printonly) def unittest_main(module='__main__', defaultTest=None, batchmode=False, cvg=None, options=None, outstream=sys.stderr): """use this function if you want to have the same functionality as unittest.main""" return SkipAwareTestProgram(module, defaultTest, batchmode, cvg, options, outstream) class InnerTestSkipped(SkipTest): """raised when a test is skipped""" pass def parse_generative_args(params): args = [] varargs = () kwargs = {} flags = 0 # 2 <=> starargs, 4 <=> kwargs for param in params: if isinstance(param, starargs): varargs = param if flags: raise TypeError('found starargs after keywords !') flags |= 2 args += list(varargs) elif isinstance(param, keywords): kwargs = param if flags & 4: raise TypeError('got multiple keywords parameters') flags |= 4 elif flags & 2 or flags & 4: raise TypeError('found parameters after kwargs or args') else: args.append(param) return args, kwargs class InnerTest(tuple): def __new__(cls, name, *data): instance = tuple.__new__(cls, data) instance.name = name return instance class Tags(InheritableSet): # 2.4 compat """A set of tag able validate an expression""" def __init__(self, *tags, **kwargs): self.inherit = kwargs.pop('inherit', True) if kwargs: raise TypeError("%s are an invalid keyword argument for this function" % kwargs.keys()) if len(tags) == 1 and not isinstance(tags[0], basestring): tags = tags[0] super(Tags, self).__init__(tags, **kwargs) def __getitem__(self, key): return key in self def match(self, exp): return eval(exp, {}, self) # duplicate definition from unittest2 of the _deprecate decorator def _deprecate(original_func): def deprecated_func(*args, **kwargs): warnings.warn( ('Please use %s instead.' % original_func.__name__), DeprecationWarning, 2) return original_func(*args, **kwargs) return deprecated_func class TestCase(unittest.TestCase): """A unittest.TestCase extension with some additional methods.""" maxDiff = None capture = False pdbclass = Debugger tags = Tags() def __init__(self, methodName='runTest'): super(TestCase, self).__init__(methodName) # internal API changed in python2.5 if sys.version_info >= (2, 5): self.__exc_info = sys.exc_info self.__testMethodName = self._testMethodName else: # let's give easier access to _testMethodName to every subclasses if hasattr(self, "__testMethodName"): self._testMethodName = self.__testMethodName self._captured_stdout = "" self._captured_stderr = "" self._out = [] self._err = [] self._current_test_descr = None self._options_ = None @classproperty @cached def datadir(cls): # pylint: disable=E0213 """helper attribute holding the standard test's data directory NOTE: this is a logilab's standard """ mod = __import__(cls.__module__) return osp.join(osp.dirname(osp.abspath(mod.__file__)), 'data') # cache it (use a class method to cache on class since TestCase is # instantiated for each test run) @classmethod def datapath(cls, *fname): """joins the object's datadir and `fname`""" return osp.join(cls.datadir, *fname) def set_description(self, descr): """sets the current test's description. This can be useful for generative tests because it allows to specify a description per yield """ self._current_test_descr = descr # override default's unittest.py feature def shortDescription(self): """override default unittest shortDescription to handle correctly generative tests """ if self._current_test_descr is not None: return self._current_test_descr return super(TestCase, self).shortDescription() def captured_output(self): """return a two tuple with standard output and error stripped""" return self._captured_stdout.strip(), self._captured_stderr.strip() def _start_capture(self): """start_capture if enable""" if self.capture: warnings.simplefilter('ignore', DeprecationWarning) self.start_capture() def _stop_capture(self): """stop_capture and restore previous output""" self._force_output_restore() def start_capture(self, printonly=None): """start_capture""" self._out.append(capture_stdout(printonly or self._printonly)) self._err.append(capture_stderr(printonly or self._printonly)) def printonly(self, pattern, flags=0): """set the pattern of line to print""" rgx = re.compile(pattern, flags) if self._out: self._out[-1].printonly = rgx self._err[-1].printonly = rgx else: self.start_capture(printonly=rgx) def stop_capture(self): """stop output and error capture""" if self._out: _out = self._out.pop() _err = self._err.pop() return _out.restore(), _err.restore() return '', '' def _force_output_restore(self): """remove all capture set""" while self._out: self._captured_stdout += self._out.pop().restore() self._captured_stderr += self._err.pop().restore() def quiet_run(self, result, func, *args, **kwargs): self._start_capture() try: func(*args, **kwargs) except (KeyboardInterrupt, SystemExit): self._stop_capture() raise except: self._stop_capture() result.addError(self, self.__exc_info()) return False self._stop_capture() return True def _get_test_method(self): """return the test method""" return getattr(self, self._testMethodName) def optval(self, option, default=None): """return the option value or default if the option is not define""" return getattr(self._options_, option, default) def __call__(self, result=None, runcondition=None, options=None): """rewrite TestCase.__call__ to support generative tests This is mostly a copy/paste from unittest.py (i.e same variable names, same logic, except for the generative tests part) """ if result is None: result = self.defaultTestResult() result.pdbclass = self.pdbclass # if self.capture is True here, it means it was explicitly specified # in the user's TestCase class. If not, do what was asked on cmd line self.capture = self.capture or getattr(result, 'capture', False) self._options_ = options self._printonly = getattr(result, 'printonly', None) # if result.cvg: # result.cvg.start() testMethod = self._get_test_method() if runcondition and not runcondition(testMethod): return # test is skipped result.startTest(self) try: if not self.quiet_run(result, self.setUp): return generative = is_generator(testMethod.im_func) # generative tests if generative: self._proceed_generative(result, testMethod, runcondition) else: status = self._proceed(result, testMethod) success = (status == 0) if not self.quiet_run(result, self.tearDown): return if not generative and success: if hasattr(options, "exitfirst") and options.exitfirst: # add this test to restart file try: restartfile = open(FILE_RESTART, 'a') try: descr = '.'.join((self.__class__.__module__, self.__class__.__name__, self._testMethodName)) restartfile.write(descr+os.linesep) finally: restartfile.close() except Exception, ex: print >> sys.__stderr__, "Error while saving \ succeeded test into", osp.join(os.getcwd(),FILE_RESTART) raise ex result.addSuccess(self) finally: # if result.cvg: # result.cvg.stop() result.stopTest(self) def _proceed_generative(self, result, testfunc, runcondition=None): # cancel startTest()'s increment result.testsRun -= 1 self._start_capture() success = True try: for params in testfunc(): if runcondition and not runcondition(testfunc, skipgenerator=False): if not (isinstance(params, InnerTest) and runcondition(params)): continue if not isinstance(params, (tuple, list)): params = (params, ) func = params[0] args, kwargs = parse_generative_args(params[1:]) # increment test counter manually result.testsRun += 1 status = self._proceed(result, func, args, kwargs) if status == 0: result.addSuccess(self) success = True else: success = False if status == 2: result.shouldStop = True if result.shouldStop: # either on error or on exitfirst + error break except: # if an error occurs between two yield result.addError(self, self.__exc_info()) success = False self._stop_capture() return success def _proceed(self, result, testfunc, args=(), kwargs=None): """proceed the actual test returns 0 on success, 1 on failure, 2 on error Note: addSuccess can't be called here because we have to wait for tearDown to be successfully executed to declare the test as successful """ self._start_capture() kwargs = kwargs or {} try: testfunc(*args, **kwargs) self._stop_capture() except self.failureException: self._stop_capture() result.addFailure(self, self.__exc_info()) return 1 except KeyboardInterrupt: self._stop_capture() raise except InnerTestSkipped, e: result.addSkipped(self, e) return 1 except: self._stop_capture() result.addError(self, self.__exc_info()) return 2 return 0 def defaultTestResult(self): """return a new instance of the defaultTestResult""" return SkipAwareTestResult() skip = _deprecate(unittest.TestCase.skipTest) assertEquals = _deprecate(unittest.TestCase.assertEqual) assertNotEquals = _deprecate(unittest.TestCase.assertNotEqual) assertAlmostEquals = _deprecate(unittest.TestCase.assertAlmostEqual) assertNotAlmostEquals = _deprecate(unittest.TestCase.assertNotAlmostEqual) def innerSkip(self, msg=None): """mark a generative test as skipped for the reason""" msg = msg or 'test was skipped' raise InnerTestSkipped(msg) @deprecated('Please use assertDictEqual instead.') def assertDictEquals(self, dict1, dict2, msg=None): """compares two dicts If the two dict differ, the first difference is shown in the error message :param dict1: a Python Dictionary :param dict2: a Python Dictionary :param msg: custom message (String) in case of failure """ dict1 = dict(dict1) msgs = [] for key, value in dict2.items(): try: if dict1[key] != value: msgs.append('%r != %r for key %r' % (dict1[key], value, key)) del dict1[key] except KeyError: msgs.append('missing %r key' % key) if dict1: msgs.append('dict2 is lacking %r' % dict1) if msg: self.failureException(msg) elif msgs: self.fail('\n'.join(msgs)) @deprecated('Please use assertItemsEqual instead.') def assertUnorderedIterableEquals(self, got, expected, msg=None): """compares two iterable and shows difference between both :param got: the unordered Iterable that we found :param expected: the expected unordered Iterable :param msg: custom message (String) in case of failure """ got, expected = list(got), list(expected) self.assertSetEqual(set(got), set(expected), msg) if len(got) != len(expected): if msg is None: msg = ['Iterable have the same elements but not the same number', '\t\ti\t'] got_count = {} expected_count = {} for element in got: got_count[element] = got_count.get(element,0) + 1 for element in expected: expected_count[element] = expected_count.get(element,0) + 1 # we know that got_count.key() == expected_count.key() # because of assertSetEqual for element, count in got_count.iteritems(): other_count = expected_count[element] if other_count != count: msg.append('\t%s\t%s\t%s' % (element, other_count, count)) self.fail(msg) assertUnorderedIterableEqual = assertUnorderedIterableEquals assertUnordIterEquals = assertUnordIterEqual = assertUnorderedIterableEqual @deprecated('Please use assertSetEqual instead.') def assertSetEquals(self,got,expected, msg=None): """compares two sets and shows difference between both Don't use it for iterables other than sets. :param got: the Set that we found :param expected: the second Set to be compared to the first one :param msg: custom message (String) in case of failure """ if not(isinstance(got, set) and isinstance(expected, set)): warnings.warn("the assertSetEquals function if now intended for set only."\ "use assertUnorderedIterableEquals instead.", DeprecationWarning, 2) return self.assertUnorderedIterableEquals(got,expected, msg) items={} items['missing'] = expected - got items['unexpected'] = got - expected if any(items.itervalues()): if msg is None: msg = '\n'.join('%s:\n\t%s' % (key,"\n\t".join(str(value) for value in values)) for key, values in items.iteritems() if values) self.fail(msg) @deprecated('Please use assertListEqual instead.') def assertListEquals(self, list_1, list_2, msg=None): """compares two lists If the two list differ, the first difference is shown in the error message :param list_1: a Python List :param list_2: a second Python List :param msg: custom message (String) in case of failure """ _l1 = list_1[:] for i, value in enumerate(list_2): try: if _l1[0] != value: from pprint import pprint pprint(list_1) pprint(list_2) self.fail('%r != %r for index %d' % (_l1[0], value, i)) del _l1[0] except IndexError: if msg is None: msg = 'list_1 has only %d elements, not %s '\ '(at least %r missing)'% (i, len(list_2), value) self.fail(msg) if _l1: if msg is None: msg = 'list_2 is lacking %r' % _l1 self.fail(msg) @deprecated('Non-standard. Please use assertMultiLineEqual instead.') def assertLinesEquals(self, string1, string2, msg=None, striplines=False): """compare two strings and assert that the text lines of the strings are equal. :param string1: a String :param string2: a String :param msg: custom message (String) in case of failure :param striplines: Boolean to trigger line stripping before comparing """ lines1 = string1.splitlines() lines2 = string2.splitlines() if striplines: lines1 = [l.strip() for l in lines1] lines2 = [l.strip() for l in lines2] self.assertListEqual(lines1, lines2, msg) assertLineEqual = assertLinesEquals @deprecated('Non-standard') def assertXMLWellFormed(self, stream, msg=None, context=2): """asserts the XML stream is well-formed (no DTD conformance check) :param context: number of context lines in standard message (show all data if negative). Only available with element tree """ try: from xml.etree.ElementTree import parse self._assertETXMLWellFormed(stream, parse, msg) except ImportError: from xml.sax import make_parser, SAXParseException parser = make_parser() try: parser.parse(stream) except SAXParseException, ex: if msg is None: stream.seek(0) for _ in xrange(ex.getLineNumber()): line = stream.readline() pointer = ('' * (ex.getLineNumber() - 1)) + '^' msg = 'XML stream not well formed: %s\n%s%s' % (ex, line, pointer) self.fail(msg) @deprecated('Non-standard') def assertXMLStringWellFormed(self, xml_string, msg=None, context=2): """asserts the XML string is well-formed (no DTD conformance check) :param context: number of context lines in standard message (show all data if negative). Only available with element tree """ try: from xml.etree.ElementTree import fromstring except ImportError: from elementtree.ElementTree import fromstring self._assertETXMLWellFormed(xml_string, fromstring, msg) def _assertETXMLWellFormed(self, data, parse, msg=None, context=2): """internal function used by /assertXML(String)?WellFormed/ functions :param data: xml_data :param parse: appropriate parser function for this data :param msg: error message :param context: number of context lines in standard message (show all data if negative). Only available with element tree """ from xml.parsers.expat import ExpatError try: parse(data) except ExpatError, ex: if msg is None: if hasattr(data, 'readlines'): #file like object data.seek(0) lines = data.readlines() else: lines = data.splitlines(True) nb_lines = len(lines) context_lines = [] if context < 0: start = 1 end = nb_lines else: start = max(ex.lineno-context, 1) end = min(ex.lineno+context, nb_lines) line_number_length = len('%i' % end) line_pattern = " %%%ii: %%s" % line_number_length for line_no in xrange(start, ex.lineno): context_lines.append(line_pattern % (line_no, lines[line_no-1])) context_lines.append(line_pattern % (ex.lineno, lines[ex.lineno-1])) context_lines.append('%s^\n' % (' ' * (1 + line_number_length + 2 +ex.offset))) for line_no in xrange(ex.lineno+1, end+1): context_lines.append(line_pattern % (line_no, lines[line_no-1])) rich_context = ''.join(context_lines) msg = 'XML stream not well formed: %s\n%s' % (ex, rich_context) self.fail(msg) @deprecated('Non-standard') def assertXMLEqualsTuple(self, element, tup): """compare an ElementTree Element to a tuple formatted as follow: (tagname, [attrib[, children[, text[, tail]]]])""" # check tag self.assertTextEquals(element.tag, tup[0]) # check attrib if len(element.attrib) or len(tup)>1: if len(tup)<=1: self.fail( "tuple %s has no attributes (%s expected)"%(tup, dict(element.attrib))) self.assertDictEqual(element.attrib, tup[1]) # check children if len(element) or len(tup)>2: if len(tup)<=2: self.fail( "tuple %s has no children (%i expected)"%(tup, len(element))) if len(element) != len(tup[2]): self.fail( "tuple %s has %i children%s (%i expected)"%(tup, len(tup[2]), ('', 's')[len(tup[2])>1], len(element))) for index in xrange(len(tup[2])): self.assertXMLEqualsTuple(element[index], tup[2][index]) #check text if element.text or len(tup)>3: if len(tup)<=3: self.fail( "tuple %s has no text value (%r expected)"%(tup, element.text)) self.assertTextEquals(element.text, tup[3]) #check tail if element.tail or len(tup)>4: if len(tup)<=4: self.fail( "tuple %s has no tail value (%r expected)"%(tup, element.tail)) self.assertTextEquals(element.tail, tup[4]) def _difftext(self, lines1, lines2, junk=None, msg_prefix='Texts differ'): junk = junk or (' ', '\t') # result is a generator result = difflib.ndiff(lines1, lines2, charjunk=lambda x: x in junk) read = [] for line in result: read.append(line) # lines that don't start with a ' ' are diff ones if not line.startswith(' '): self.fail('\n'.join(['%s\n'%msg_prefix]+read + list(result))) @deprecated('Non-standard. Please use assertMultiLineEqual instead.') def assertTextEquals(self, text1, text2, junk=None, msg_prefix='Text differ', striplines=False): """compare two multiline strings (using difflib and splitlines()) :param text1: a Python BaseString :param text2: a second Python Basestring :param junk: List of Caracters :param msg_prefix: String (message prefix) :param striplines: Boolean to trigger line stripping before comparing """ msg = [] if not isinstance(text1, basestring): msg.append('text1 is not a string (%s)'%(type(text1))) if not isinstance(text2, basestring): msg.append('text2 is not a string (%s)'%(type(text2))) if msg: self.fail('\n'.join(msg)) lines1 = text1.strip().splitlines(True) lines2 = text2.strip().splitlines(True) if striplines: lines1 = [line.strip() for line in lines1] lines2 = [line.strip() for line in lines2] self._difftext(lines1, lines2, junk, msg_prefix) assertTextEqual = assertTextEquals @deprecated('Non-standard') def assertStreamEquals(self, stream1, stream2, junk=None, msg_prefix='Stream differ'): """compare two streams (using difflib and readlines())""" # if stream2 is stream2, readlines() on stream1 will also read lines # in stream2, so they'll appear different, although they're not if stream1 is stream2: return # make sure we compare from the beginning of the stream stream1.seek(0) stream2.seek(0) # compare self._difftext(stream1.readlines(), stream2.readlines(), junk, msg_prefix) assertStreamEqual = assertStreamEquals @deprecated('Non-standard') def assertFileEquals(self, fname1, fname2, junk=(' ', '\t')): """compares two files using difflib""" self.assertStreamEqual(file(fname1), file(fname2), junk, msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) assertFileEqual = assertFileEquals @deprecated('Non-standard') def assertDirEquals(self, path_a, path_b): """compares two files using difflib""" assert osp.exists(path_a), "%s doesn't exists" % path_a assert osp.exists(path_b), "%s doesn't exists" % path_b all_a = [ (ipath[len(path_a):].lstrip('/'), idirs, ifiles) for ipath, idirs, ifiles in os.walk(path_a)] all_a.sort(key=itemgetter(0)) all_b = [ (ipath[len(path_b):].lstrip('/'), idirs, ifiles) for ipath, idirs, ifiles in os.walk(path_b)] all_b.sort(key=itemgetter(0)) iter_a, iter_b = iter(all_a), iter(all_b) partial_iter = True ipath_a, idirs_a, ifiles_a = data_a = None, None, None while True: try: ipath_a, idirs_a, ifiles_a = datas_a = iter_a.next() partial_iter = False ipath_b, idirs_b, ifiles_b = datas_b = iter_b.next() partial_iter = True self.assert_(ipath_a == ipath_b, "unexpected %s in %s while looking %s from %s" % (ipath_a, path_a, ipath_b, path_b)) errors = {} sdirs_a = set(idirs_a) sdirs_b = set(idirs_b) errors["unexpected directories"] = sdirs_a - sdirs_b errors["missing directories"] = sdirs_b - sdirs_a sfiles_a = set(ifiles_a) sfiles_b = set(ifiles_b) errors["unexpected files"] = sfiles_a - sfiles_b errors["missing files"] = sfiles_b - sfiles_a msgs = [ "%s: %s"% (name, items) for name, items in errors.iteritems() if items] if msgs: msgs.insert(0,"%s and %s differ :" % ( osp.join(path_a, ipath_a), osp.join(path_b, ipath_b), )) self.fail("\n".join(msgs)) for files in (ifiles_a, ifiles_b): files.sort() for index, path in enumerate(ifiles_a): self.assertFileEquals(osp.join(path_a, ipath_a, path), osp.join(path_b, ipath_b, ifiles_b[index])) except StopIteration: break assertDirEqual = assertDirEquals def assertIsInstance(self, obj, klass, msg=None, strict=False): """check if an object is an instance of a class :param obj: the Python Object to be checked :param klass: the target class :param msg: a String for a custom message :param strict: if True, check that the class of is ; else check with 'isinstance' """ if strict: warnings.warn('[API] Non-standard. Strict parameter has vanished', DeprecationWarning, stacklevel=2) if msg is None: if strict: msg = '%r is not of class %s but of %s' else: msg = '%r is not an instance of %s but of %s' msg = msg % (obj, klass, type(obj)) if strict: self.assert_(obj.__class__ is klass, msg) else: self.assert_(isinstance(obj, klass), msg) @deprecated('Please use assertIsNone instead.') def assertNone(self, obj, msg=None): """assert obj is None :param obj: Python Object to be tested """ if msg is None: msg = "reference to %r when None expected"%(obj,) self.assert_( obj is None, msg ) @deprecated('Please use assertIsNotNone instead.') def assertNotNone(self, obj, msg=None): """assert obj is not None""" if msg is None: msg = "unexpected reference to None" self.assert_( obj is not None, msg ) @deprecated('Non-standard. Please use assertAlmostEqual instead.') def assertFloatAlmostEquals(self, obj, other, prec=1e-5, msg=None): """compares if two floats have a distance smaller than expected precision. :param obj: a Float :param other: another Float to be comparted to :param prec: a Float describing the precision :param msg: a String for a custom message """ if msg is None: msg = "%r != %r" % (obj, other) self.assert_(math.fabs(obj - other) < prec, msg) #@deprecated('[API] Non-standard. Please consider using a context here') def failUnlessRaises(self, excClass, callableObj, *args, **kwargs): """override default failUnlessRaises method to return the raised exception instance. Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. CAUTION! There are subtle differences between Logilab and unittest2 - exc is not returned in standard version - context capabilities in standard version - try/except/else construction (minor) :param excClass: the Exception to be raised :param callableObj: a callable Object which should raise :param args: a List of arguments for :param kwargs: a List of keyword arguments for """ try: callableObj(*args, **kwargs) except excClass, exc: return exc else: if hasattr(excClass, '__name__'): excName = excClass.__name__ else: excName = str(excClass) raise self.failureException("%s not raised" % excName) assertRaises = failUnlessRaises import doctest class SkippedSuite(unittest.TestSuite): def test(self): """just there to trigger test execution""" self.skipped_test('doctest module has no DocTestSuite class') # DocTestFinder was introduced in python2.4 if sys.version_info >= (2, 4): class DocTestFinder(doctest.DocTestFinder): def __init__(self, *args, **kwargs): self.skipped = kwargs.pop('skipped', ()) doctest.DocTestFinder.__init__(self, *args, **kwargs) def _get_test(self, obj, name, module, globs, source_lines): """override default _get_test method to be able to skip tests according to skipped attribute's value Note: Python (<=2.4) use a _name_filter which could be used for that purpose but it's no longer available in 2.5 Python 2.5 seems to have a [SKIP] flag """ if getattr(obj, '__name__', '') in self.skipped: return None return doctest.DocTestFinder._get_test(self, obj, name, module, globs, source_lines) else: # this is a hack to make skipped work with python <= 2.3 class DocTestFinder(object): def __init__(self, skipped): self.skipped = skipped self.original_find_tests = doctest._find_tests doctest._find_tests = self._find_tests def _find_tests(self, module, prefix=None): tests = [] for testinfo in self.original_find_tests(module, prefix): testname, _, _, _ = testinfo # testname looks like A.B.C.function_name testname = testname.split('.')[-1] if testname not in self.skipped: tests.append(testinfo) return tests class DocTest(TestCase): """trigger module doctest I don't know how to make unittest.main consider the DocTestSuite instance without this hack """ skipped = () def __call__(self, result=None, runcondition=None, options=None):\ # pylint: disable=W0613 try: finder = DocTestFinder(skipped=self.skipped) if sys.version_info >= (2, 4): suite = doctest.DocTestSuite(self.module, test_finder=finder) else: suite = doctest.DocTestSuite(self.module) except AttributeError: suite = SkippedSuite() return suite.run(result) run = __call__ def test(self): """just there to trigger test execution""" MAILBOX = None class MockSMTP: """fake smtplib.SMTP""" def __init__(self, host, port): self.host = host self.port = port global MAILBOX self.reveived = MAILBOX = [] def set_debuglevel(self, debuglevel): """ignore debug level""" def sendmail(self, fromaddr, toaddres, body): """push sent mail in the mailbox""" self.reveived.append((fromaddr, toaddres, body)) def quit(self): """ignore quit""" class MockConfigParser(ConfigParser): """fake ConfigParser.ConfigParser""" def __init__(self, options): ConfigParser.__init__(self) for section, pairs in options.iteritems(): self.add_section(section) for key, value in pairs.iteritems(): self.set(section,key,value) def write(self, _): raise NotImplementedError() class MockConnection: """fake DB-API 2.0 connexion AND cursor (i.e. cursor() return self)""" def __init__(self, results): self.received = [] self.states = [] self.results = results def cursor(self): """Mock cursor method""" return self def execute(self, query, args=None): """Mock execute method""" self.received.append( (query, args) ) def fetchone(self): """Mock fetchone method""" return self.results[0] def fetchall(self): """Mock fetchall method""" return self.results def commit(self): """Mock commiy method""" self.states.append( ('commit', len(self.received)) ) def rollback(self): """Mock rollback method""" self.states.append( ('rollback', len(self.received)) ) def close(self): """Mock close method""" pass def mock_object(**params): """creates an object using params to set attributes >>> option = mock_object(verbose=False, index=range(5)) >>> option.verbose False >>> option.index [0, 1, 2, 3, 4] """ return type('Mock', (), params)() def create_files(paths, chroot): """Creates directories and files found in . :param paths: list of relative paths to files or directories :param chroot: the root directory in which paths will be created >>> from os.path import isdir, isfile >>> isdir('/tmp/a') False >>> create_files(['a/b/foo.py', 'a/b/c/', 'a/b/c/d/e.py'], '/tmp') >>> isdir('/tmp/a') True >>> isdir('/tmp/a/b/c') True >>> isfile('/tmp/a/b/c/d/e.py') True >>> isfile('/tmp/a/b/foo.py') True """ dirs, files = set(), set() for path in paths: path = osp.join(chroot, path) filename = osp.basename(path) # path is a directory path if filename == '': dirs.add(path) # path is a filename path else: dirs.add(osp.dirname(path)) files.add(path) for dirpath in dirs: if not osp.isdir(dirpath): os.makedirs(dirpath) for filepath in files: file(filepath, 'w').close() def enable_dbc(*args): """ Without arguments, return True if contracts can be enabled and should be enabled (see option -d), return False otherwise. With arguments, return False if contracts can't or shouldn't be enabled, otherwise weave ContractAspect with items passed as arguments. """ if not ENABLE_DBC: return False try: from logilab.aspects.weaver import weaver from logilab.aspects.lib.contracts import ContractAspect except ImportError: sys.stderr.write( 'Warning: logilab.aspects is not available. Contracts disabled.') return False for arg in args: weaver.weave_module(arg, ContractAspect) return True class AttrObject: # XXX cf mock_object def __init__(self, **kwargs): self.__dict__.update(kwargs) def tag(*args, **kwargs): """descriptor adding tag to a function""" def desc(func): assert not hasattr(func, 'tags') func.tags = Tags(*args, **kwargs) return func return desc def require_version(version): """ Compare version of python interpreter to the given one. Skip the test if older. """ def check_require_version(f): version_elements = version.split('.') try: compare = tuple([int(v) for v in version_elements]) except ValueError: raise ValueError('%s is not a correct version : should be X.Y[.Z].' % version) current = sys.version_info[:3] #print 'comp', current, compare if current < compare: #print 'version too old' def new_f(self, *args, **kwargs): self.skipTest('Need at least %s version of python. Current version is %s.' % (version, '.'.join([str(element) for element in current]))) new_f.__name__ = f.__name__ return new_f else: #print 'version young enough' return f return check_require_version def require_module(module): """ Check if the given module is loaded. Skip the test if not. """ def check_require_module(f): try: __import__(module) #print module, 'imported' return f except ImportError: #print module, 'can not be imported' def new_f(self, *args, **kwargs): self.skipTest('%s can not be imported.' % module) new_f.__name__ = f.__name__ return new_f return check_require_module ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/corbautils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000000750711242100540033633 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """A set of utility function to ease the use of OmniORBpy. """ __docformat__ = "restructuredtext en" from omniORB import CORBA, PortableServer import CosNaming orb = None def get_orb(): """ returns a reference to the ORB. The first call to the method initialized the ORB This method is mainly used internally in the module. """ global orb if orb is None: import sys orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) return orb def get_root_context(): """ returns a reference to the NameService object. This method is mainly used internally in the module. """ orb = get_orb() nss = orb.resolve_initial_references("NameService") rootContext = nss._narrow(CosNaming.NamingContext) assert rootContext is not None,"Failed to narrow root naming context" return rootContext def register_object_name(object, namepath): """ Registers a object in the NamingService. The name path is a list of 2-uples (id,kind) giving the path. For instance if the path of an object is [('foo',''),('bar','')], it is possible to get a reference to the object using the URL 'corbaname::hostname#foo/bar'. [('logilab','rootmodule'),('chatbot','application'),('chatter','server')] is mapped to 'corbaname::hostname#logilab.rootmodule/chatbot.application/chatter.server' The get_object_reference() function can be used to resolve such a URL. """ context = get_root_context() for id, kind in namepath[:-1]: name = [CosNaming.NameComponent(id, kind)] try: context = context.bind_new_context(name) except CosNaming.NamingContext.AlreadyBound, ex: context = context.resolve(name)._narrow(CosNaming.NamingContext) assert context is not None, \ 'test context exists but is not a NamingContext' id,kind = namepath[-1] name = [CosNaming.NameComponent(id, kind)] try: context.bind(name, object._this()) except CosNaming.NamingContext.AlreadyBound, ex: context.rebind(name, object._this()) def activate_POA(): """ This methods activates the Portable Object Adapter. You need to call it to enable the reception of messages in your code, on both the client and the server. """ orb = get_orb() poa = orb.resolve_initial_references('RootPOA') poaManager = poa._get_the_POAManager() poaManager.activate() def run_orb(): """ Enters the ORB mainloop on the server. You should not call this method on the client. """ get_orb().run() def get_object_reference(url): """ Resolves a corbaname URL to an object proxy. See register_object_name() for examples URLs """ return get_orb().string_to_object(url) def get_object_string(host, namepath): """given an host name and a name path as described in register_object_name, return a corba string identifier """ strname = '/'.join(['.'.join(path_elt) for path_elt in namepath]) return 'corbaname::%s#%s' % (host, strname) ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/deprecation.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000001034211242100540033622 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Deprecation utilities.""" __docformat__ = "restructuredtext en" import sys from warnings import warn class class_deprecated(type): """metaclass to print a warning on instantiation of a deprecated class""" def __call__(cls, *args, **kwargs): msg = getattr(cls, "__deprecation_warning__", "%(cls)s is deprecated") % {'cls': cls.__name__} warn(msg, DeprecationWarning, stacklevel=2) return type.__call__(cls, *args, **kwargs) def class_renamed(old_name, new_class, message=None): """automatically creates a class which fires a DeprecationWarning when instantiated. >>> Set = class_renamed('Set', set, 'Set is now replaced by set') >>> s = Set() sample.py:57: DeprecationWarning: Set is now replaced by set s = Set() >>> """ clsdict = {} if message is None: message = '%s is deprecated, use %s' % (old_name, new_class.__name__) clsdict['__deprecation_warning__'] = message try: # new-style class return class_deprecated(old_name, (new_class,), clsdict) except (NameError, TypeError): # old-style class class DeprecatedClass(new_class): """FIXME: There might be a better way to handle old/new-style class """ def __init__(self, *args, **kwargs): warn(message, DeprecationWarning, stacklevel=2) new_class.__init__(self, *args, **kwargs) return DeprecatedClass def class_moved(new_class, old_name=None, message=None): """nice wrapper around class_renamed when a class has been moved into another module """ if old_name is None: old_name = new_class.__name__ if message is None: message = 'class %s is now available as %s.%s' % ( old_name, new_class.__module__, new_class.__name__) return class_renamed(old_name, new_class, message) def deprecated(reason=None, stacklevel=2): """Decorator that raises a DeprecationWarning to print a message when the decorated function is called. """ def deprecated_decorator(func): message = reason or 'The function "%s" is deprecated' if '%s' in message: message = message % func.func_name def wrapped(*args, **kwargs): warn(message, DeprecationWarning, stacklevel=stacklevel) return func(*args, **kwargs) try: wrapped.__name__ = func.__name__ except TypeError: # readonly attribute in 2.3 pass wrapped.__doc__ = func.__doc__ return wrapped return deprecated_decorator def moved(modpath, objname): """use to tell that a callable has been moved to a new module. It returns a callable wrapper, so that when its called a warning is printed telling where the object can be found, import is done (and not before) and the actual object is called. NOTE: the usage is somewhat limited on classes since it will fail if the wrapper is use in a class ancestors list, use the `class_moved` function instead (which has no lazy import feature though). """ def callnew(*args, **kwargs): from logilab.common.modutils import load_module_from_name message = "object %s has been moved to module %s" % (objname, modpath) warn(message, DeprecationWarning, stacklevel=2) m = load_module_from_name(modpath) return getattr(m, objname)(*args, **kwargs) return callnew ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/graph.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common0000644000175000017500000002251111242100540033623 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common 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 Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . """Graph manipulation utilities. (dot generation adapted from pypy/translator/tool/make_dot.py) """ __docformat__ = "restructuredtext en" __metaclass__ = type import os.path as osp import os import sys import tempfile from logilab.common.compat import sorted, reversed def escape(value): """Make usable in a dot file.""" lines = [line.replace('"', '\\"') for line in value.split('\n')] data = '\\l'.join(lines) return '\\n' + data def target_info_from_filename(filename): """Transforms /some/path/foo.png into ('/some/path', 'foo.png', 'png').""" basename = osp.basename(filename) storedir = osp.dirname(osp.abspath(filename)) target = filename.split('.')[-1] return storedir, basename, target class DotBackend: """Dot File backend.""" def __init__(self, graphname, rankdir=None, size=None, ratio=None, charset='utf-8', renderer='dot', additionnal_param={}): self.graphname = graphname self.renderer = renderer self.lines = [] self._source = None self.emit("digraph %s {" % normalize_node_id(graphname)) if rankdir: self.emit('rankdir=%s' % rankdir) if ratio: self.emit('ratio=%s' % ratio) if size: self.emit('size="%s"' % size) if charset: assert charset.lower() in ('utf-8', 'iso-8859-1', 'latin1'), \ 'unsupported charset %s' % charset self.emit('charset="%s"' % charset) for param in additionnal_param.iteritems(): self.emit('='.join(param)) def get_source(self): """returns self._source""" if self._source is None: self.emit("}\n") self._source = '\n'.join(self.lines) del self.lines return self._source source = property(get_source) def generate(self, outputfile=None, dotfile=None, mapfile=None): """Generates a graph file. :param outputfile: filename and path [defaults to graphname.png] :param dotfile: filename and path [defaults to graphname.dot] :rtype: str :return: a path to the generated file """ import subprocess # introduced in py 2.4 name = self.graphname if not dotfile: # if 'outputfile' is a dot file use it as 'dotfile' if outputfile and outputfile.endswith(".dot"): dotfile = outputfile else: dotfile = '%s.dot' % name if outputfile is not None: storedir, basename, target = target_info_from_filename(outputfile) if target != "dot": pdot, dot_sourcepath = tempfile.mkstemp(".dot", name) os.close(pdot) else: dot_sourcepath = osp.join(storedir, dotfile) else: target = 'png' pdot, dot_sourcepath = tempfile.mkstemp(".dot", name) ppng, outputfile = tempfile.mkstemp(".png", name) os.close(pdot) os.close(ppng) pdot = open(dot_sourcepath,'w') if isinstance(self.source, unicode): pdot.write(self.source.encode('UTF8')) else: pdot.write(self.source) pdot.close() if target != 'dot': if mapfile: print '%s -Tcmapx -o%s -T%s %s -o%s' % (self.renderer, mapfile, target, dot_sourcepath, outputfile) subprocess.call('%s -Tcmapx -o%s -T%s %s -o%s' % (self.renderer, mapfile, target, dot_sourcepath, outputfile), shell=True) else: subprocess.call('%s -T%s %s -o%s' % (self.renderer, target, dot_sourcepath, outputfile), shell=True) os.unlink(dot_sourcepath) return outputfile def emit(self, line): """Adds to final output.""" self.lines.append(line) def emit_edge(self, name1, name2, **props): """emit an edge from to . edge properties: see http://www.graphviz.org/doc/info/attrs.html """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] n_from, n_to = normalize_node_id(name1), normalize_node_id(name2) self.emit('%s -> %s [%s];' % (n_from, n_to, ", ".join(attrs)) ) def emit_node(self, name, **props): """emit a node with given properties. node properties: see http://www.graphviz.org/doc/info/attrs.html """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] self.emit('%s [%s];' % (normalize_node_id(name), ", ".join(attrs))) def normalize_node_id(nid): """Returns a suitable DOT node id for `nid`.""" return '"%s"' % nid class GraphGenerator: def __init__(self, backend): # the backend is responsible to output the graph in a particular format self.backend = backend # XXX doesn't like space in outpufile / mapfile def generate(self, visitor, propshdlr, outputfile=None, mapfile=None): # the visitor # the property handler is used to get node and edge properties # according to the graph and to the backend self.propshdlr = propshdlr for nodeid, node in visitor.nodes(): props = propshdlr.node_properties(node) self.backend.emit_node(nodeid, **props) for subjnode, objnode, edge in visitor.edges(): props = propshdlr.edge_properties(edge, subjnode, objnode) self.backend.emit_edge(subjnode, objnode, **props) return self.backend.generate(outputfile=outputfile, mapfile=mapfile) class UnorderableGraph(Exception): def __init__(self, cycles): self.cycles = cycles def __str__(self): return 'cycles in graph: %s' % self.cycles def ordered_nodes(graph): """takes a dependency graph dict as arguments and return an ordered tuple of nodes starting with nodes without dependencies and up to the outermost node. If there is some cycle in the graph, :exc:`UnorderableGraph` will be raised. Also the given graph dict will be emptied. """ cycles = get_cycles(graph) if cycles: cycles = '\n'.join([' -> '.join(cycle) for cycle in cycles]) raise UnorderableGraph(cycles) ordered = [] while graph: # sorted to get predictable results for node, deps in sorted(graph.items()): if not deps: ordered.append(node) del graph[node] for deps in graph.itervalues(): try: deps.remove(node) except KeyError: continue return tuple(reversed(ordered)) def get_cycles(graph_dict, vertices=None): '''given a dictionary representing an ordered graph (i.e. key are vertices and values is a list of destination vertices representing edges), return a list of detected cycles ''' if not graph_dict: return () result = [] if vertices is None: vertices = graph_dict.keys() for vertice in vertices: _get_cycles(graph_dict, vertice, [], result) return result def _get_cycles(graph_dict, vertice=None, path=None, result=None): """recursive function doing the real work for get_cycles""" if vertice in path: cycle = [vertice] for node in path[::-1]: if node == vertice: break cycle.insert(0, node) # make a canonical representation start_from = min(cycle) index = cycle.index(start_from) cycle = cycle[index:] + cycle[0:index] # append it to result if not already in if not cycle in result: result.append(cycle) return path.append(vertice) try: for node in graph_dict[vertice]: _get_cycles(graph_dict, node, path, result) except KeyError: pass path.pop() def has_path(graph_dict, fromnode, tonode, path=None): """generic function taking a simple graph definition as a dictionary, with node has key associated to a list of nodes directly reachable from it. Return None if no path exists to go from `fromnode` to `tonode`, else the first path found (as a list including the destination node at last) """ if path is None: path = [] elif fromnode in path: return None path.append(fromnode) for destnode in graph_dict[fromnode]: if destnode == tonode or has_path(graph_dict, destnode, tonode, path): return path[1:] + [tonode] path.pop() return None scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000755000175000017500000000000011242100540033523 5ustar andreasandreas././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/builder.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000001720311242100540033530 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """The ASTNGBuilder makes astng from living object and / or from compiler.ast With python >= 2.5, the internal _ast module is used instead The builder is not thread safe and can't be used to parse different sources at the same time. """ __docformat__ = "restructuredtext en" import sys from os.path import splitext, basename, dirname, exists, abspath from inspect import isfunction, ismethod, ismethoddescriptor, isclass, \ isbuiltin from inspect import isdatadescriptor from logilab.common.fileutils import norm_read from logilab.common.modutils import modpath_from_file from logilab.astng._exceptions import ASTNGBuildingException from logilab.astng.raw_building import * try: from _ast import PyCF_ONLY_AST def parse(string): return compile(string, "", 'exec', PyCF_ONLY_AST) from logilab.astng._nodes_ast import TreeRebuilder except ImportError, exc: from compiler import parse from logilab.astng import patchcomptransformer from logilab.astng._nodes_compiler import TreeRebuilder # ast NG builder ############################################################## class ASTNGBuilder: """provide astng building methods """ def __init__(self, manager=None): if manager is None: from logilab.astng import MANAGER as manager self._manager = manager self._module = None self._file = None self._done = None self.rebuilder = TreeRebuilder(manager) self._dyn_modname_map = {'gtk': 'gtk._gtk'} def module_build(self, module, modname=None): """build an astng from a living module instance """ node = None self._module = module path = getattr(module, '__file__', None) if path is not None: path_, ext = splitext(module.__file__) if ext in ('.py', '.pyc', '.pyo') and exists(path_ + '.py'): node = self.file_build(path_ + '.py', modname) if node is None: # this is a built-in module # get a partial representation by introspection node = self.inspect_build(module, modname=modname, path=path) return node def inspect_build(self, module, modname=None, path=None): """build astng from a living module (i.e. using inspect) this is used when there is no python source code available (either because it's a built-in module or because the .py is not available) """ self._module = module if modname is None: modname = module.__name__ node = build_module(modname, module.__doc__) node.file = node.path = path and abspath(path) or path if self._manager is not None: self._manager._cache[modname] = node node.package = hasattr(module, '__path__') self._done = {} self.object_build(node, module) return node def file_build(self, path, modname=None): """build astng from a source code file (i.e. from an ast) path is expected to be a python source file """ try: data = norm_read(path) except IOError, ex: msg = 'Unable to load file %r (%s)' % (path, ex) raise ASTNGBuildingException(msg) self._file = path # get module name if necessary, *before modifying sys.path* if modname is None: try: modname = '.'.join(modpath_from_file(path)) except ImportError: modname = splitext(basename(path))[0] # build astng representation try: sys.path.insert(0, dirname(path)) node = self.string_build(data, modname, path) node.file = abspath(path) finally: self._file = None sys.path.pop(0) return node def string_build(self, data, modname='', path=None): """build astng from a source code stream (i.e. from an ast)""" return self.ast_build(parse(data + '\n'), modname, path) def ast_build(self, node, modname='', path=None): """build the astng from AST, return the new tree""" if path is not None: node_file = abspath(path) else: node_file = '' if modname.endswith('.__init__'): modname = modname[:-9] package = True else: package = path and path.find('__init__.py') > -1 or False newnode = self.rebuilder.build(node, modname, node_file, package) return newnode # astng from living objects ############################################### # # this is actually a really minimal representation, including only Module, # Function and Class nodes and some others as guessed def object_build(self, node, obj): """recursive method which create a partial ast from real objects (only function, class, and method are handled) """ if self._done.has_key(obj): return self._done[obj] self._done[obj] = node for name in dir(obj): try: member = getattr(obj, name) except AttributeError: # damned ExtensionClass.Base, I know you're there ! attach_dummy_node(node, name) continue if ismethod(member): member = member.im_func if isfunction(member): # verify this is not an imported function if member.func_code.co_filename != getattr(self._module, '__file__', None): attach_dummy_node(node, name, member) continue object_build_function(node, member, name) elif isbuiltin(member): # verify this is not an imported member if self._member_module(member) != self._module.__name__: imported_member(node, member, name) continue object_build_methoddescriptor(node, member, name) elif isclass(member): # verify this is not an imported class if self._member_module(member) != self._module.__name__: imported_member(node, member, name) continue if member in self._done: class_node = self._done[member] if not class_node in node.locals.get(name, ()): node.add_local_node(class_node, name) else: class_node = object_build_class(node, member, name) # recursion self.object_build(class_node, member) if name == '__class__' and class_node.parent is None: class_node.parent = self._done[self._module] elif ismethoddescriptor(member): assert isinstance(member, object) object_build_methoddescriptor(node, member, name) elif isdatadescriptor(member): assert isinstance(member, object) object_build_datadescriptor(node, member, name) elif isinstance(member, (int, long, float, str, unicode)) or member is None: attach_const_node(node, name, member) else: # create an empty node so that the name is actually defined attach_dummy_node(node, name, member) def _member_module(self, member): modname = getattr(member, '__module__', None) return self._dyn_modname_map.get(modname, modname) def imported_member(node, member, name): """consider a class/builtin member where __module__ != current module name check if it's sound valid and then add an import node, else use a dummy node """ # /!\ some classes like ExtensionClass doesn't have a # __module__ attribute ! member_module = getattr(member, '__module__', '__builtin__') try: getattr(sys.modules[member_module], name) except (KeyError, AttributeError): attach_dummy_node(node, name, member) else: attach_import_node(node, member_module, name) ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/__init__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000000656011242100540033534 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """Python Abstract Syntax Tree New Generation The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse, pylint... Well, actually the development of this library is essentially governed by pylint's needs. It extends class defined in the compiler.ast [1] module with some additional methods and attributes. Instance attributes are added by a builder object, which can either generate extended ast (let's call them astng ;) by visiting an existent ast tree or by inspecting living object. Methods are added by monkey patching ast classes. Main modules are: * nodes and scoped_nodes for more information about methods and attributes added to different node classes * the manager contains a high level object to get astng trees from source files and living objects. It maintains a cache of previously constructed tree for quick access * builder contains the class responsible to build astng trees """ __doctype__ = "restructuredtext en" # WARNING: internal imports order matters ! # make all exception classes accessible from astng package from logilab.astng._exceptions import * # make a manager singleton as well as Project and Package classes accessible # from astng package from logilab.astng.manager import ASTNGManager, Project, Package MANAGER = ASTNGManager() del ASTNGManager # make all node classes accessible from astng package from logilab.astng.nodes import * # trigger extra monkey-patching from logilab.astng import inference # more stuff available from logilab.astng import raw_building from logilab.astng.bases import YES, Instance, BoundMethod, UnboundMethod from logilab.astng.node_classes import are_exclusive, unpack_infer from logilab.astng.scoped_nodes import builtin_lookup ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/patchcomptransformer.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000001405211242100540033527 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """Monkey patch compiler.transformer to fix line numbering bugs """ # TODO : move this module to _nodes_compiler from types import TupleType from token import DEDENT from compiler import transformer import compiler.ast as nodes def fromto_lineno(asttuple): """return the minimum and maximum line number of the given ast tuple""" return from_lineno(asttuple), to_lineno(asttuple) def from_lineno(asttuple): """return the minimum line number of the given ast tuple""" while type(asttuple[1]) is TupleType: asttuple = asttuple[1] return asttuple[2] def to_lineno(asttuple): """return the maximum line number of the given ast tuple""" while type(asttuple[1]) is TupleType: for i in xrange(len(asttuple) - 1, 0, -1): if asttuple[i][0] != DEDENT: asttuple = asttuple[i] break else: raise Exception() return asttuple[2] def fix_lineno(node, fromast, toast=None, blockast=None): if getattr(node, 'fromlineno', None) is not None: return node if isinstance(node, nodes.Stmt): return node if toast is None or toast is fromast: node.fromlineno, node.tolineno = fromto_lineno(fromast) else: node.fromlineno, node.tolineno = from_lineno(fromast), to_lineno(toast) if blockast: node.blockstart_tolineno = to_lineno(blockast) return node BaseTransformer = transformer.Transformer COORD_MAP = { # if: test ':' suite ('elif' test ':' suite)* ['else' ':' suite] 'if': 0, # 'while' test ':' suite ['else' ':' suite] 'while': 1, # 'for' exprlist 'in' exprlist ':' suite ['else' ':' suite] 'for': 3, # 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite] 'try': 0, # | 'try' ':' suite 'finally' ':' suite # XXX with } def fixlineno_wrap(function, stype): def fixlineno_wrapper(self, nodelist): node = function(self, nodelist) try: blockstart_idx = COORD_MAP[stype] except KeyError: return fix_lineno(node, nodelist[0], nodelist[-1]) else: return fix_lineno(node, nodelist[0], nodelist[-1], nodelist[blockstart_idx]) return fixlineno_wrapper class ASTNGTransformer(BaseTransformer): """overrides transformer for a better source line number handling""" def com_NEWLINE(self, *args): # A ';' at the end of a line can make a NEWLINE token appear # here, Render it harmless. (genc discards ('discard', # ('const', xxxx)) Nodes) lineno = args[0][1] # don't put fromlineno/tolineno on Const None to mark it as dynamically # added, without "physical" reference in the source n = nodes.Discard(nodes.Const(None)) n.fromlineno = n.tolineno = lineno return n def com_node(self, node): res = self._dispatch[node[0]](node[1:]) return fix_lineno(res, node) def com_assign(self, node, assigning): res = BaseTransformer.com_assign(self, node, assigning) return fix_lineno(res, node) def com_apply_trailer(self, primaryNode, nodelist): node = BaseTransformer.com_apply_trailer(self, primaryNode, nodelist) return fix_lineno(node, nodelist) def funcdef(self, nodelist): node = BaseTransformer.funcdef(self, nodelist) if node.decorators is not None: fix_lineno(node.decorators, nodelist[0]) return fix_lineno(node, nodelist[-5], nodelist[-1], nodelist[-3]) def lambdef(self, nodelist): node = BaseTransformer.lambdef(self, nodelist) return fix_lineno(node, nodelist[1], nodelist[-1]) def classdef(self, nodelist): node = BaseTransformer.classdef(self, nodelist) return fix_lineno(node, nodelist[0], nodelist[-1], nodelist[-2]) def file_input(self, nodelist): node = BaseTransformer.file_input(self, nodelist) if node.node.nodes: node.tolineno = node.node.nodes[-1].tolineno else: node.tolineno = 0 return node # wrap *_stmt methods for name in dir(BaseTransformer): if name.endswith('_stmt') and not (name in ('com_stmt', 'com_append_stmt') or name in ASTNGTransformer.__dict__): setattr(BaseTransformer, name, fixlineno_wrap(getattr(BaseTransformer, name), name[:-5])) transformer.Transformer = ASTNGTransformer ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/__pkginfo__.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000000434111242100540033527 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """logilab.astng packaging information""" distname = 'logilab-astng' modname = 'astng' subpackage_of = 'logilab' numversion = (0, 20, 3) version = '.'.join([str(num) for num in numversion]) install_requires = ['logilab-common >= 0.49.0'] pyversions = ["2.3", "2.4", "2.5", '2.6'] license = 'LGPL' author = 'Logilab' author_email = 'python-projects@lists.logilab.org' mailinglist = "mailto://%s" % author_email web = "http://www.logilab.org/project/%s" % distname ftp = "ftp://ftp.logilab.org/pub/%s" % modname short_desc = "rebuild a new abstract syntax tree from Python's ast" long_desc = """The aim of this module is to provide a common base \ representation of python source code for projects such as pychecker, pyreverse, pylint... Well, actually the development of this library is essentially governed by pylint's needs. It rebuilds the tree generated by the compiler.ast [1] module (python <= 2.4) or by the builtin _ast module (python >= 2.5) by recursively walking down the AST and building an extended ast (let's call it astng ;). The new node classes have additional methods and attributes for different usages. Furthermore, astng builds partial trees by inspecting living objects.""" from os.path import join include_dirs = [join('test', 'regrtest_data'), join('test', 'data'), join('test', 'data2')] ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/bases.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000004757011242100540033542 0ustar andreasandreas# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """This module contains base classes and functions for the nodes and some inference utils. """ from __future__ import generators __docformat__ = "restructuredtext en" try: from _ast import AST del AST class BaseClass(object): pass except ImportError: class BaseClass: pass from logilab.common.compat import set from logilab.astng._exceptions import InferenceError, ASTNGError, \ NotFoundError, UnresolvableName class Proxy(BaseClass): """a simple proxy object""" _proxied = None def __init__(self, proxied=None): if proxied is not None: self._proxied = proxied def __getattr__(self, name): if name == '_proxied': return getattr(self.__class__, '_proxied') if name in self.__dict__: return self.__dict__[name] return getattr(self._proxied, name) def infer(self, context=None): yield self # Inference ################################################################## class InferenceContext(object): __slots__ = ('path', 'lookupname', 'callcontext', 'boundnode') def __init__(self, path=None): if path is None: self.path = set() else: self.path = path self.lookupname = None self.callcontext = None self.boundnode = None def push(self, node): name = self.lookupname if (node, name) in self.path: raise StopIteration() self.path.add( (node, name) ) def clone(self): # XXX copy lookupname/callcontext ? clone = InferenceContext(self.path) clone.callcontext = self.callcontext clone.boundnode = self.boundnode return clone def copy_context(context): if context is not None: return context.clone() else: return InferenceContext() def _infer_stmts(stmts, context, frame=None): """return an iterator on statements inferred by each statement in """ stmt = None infered = False if context is not None: name = context.lookupname context = context.clone() else: name = None context = InferenceContext() for stmt in stmts: if stmt is YES: yield stmt infered = True continue context.lookupname = stmt._infer_name(frame, name) try: for infered in stmt.infer(context): yield infered infered = True except UnresolvableName: continue except InferenceError: yield YES infered = True if not infered: raise InferenceError(str(stmt)) # special inference objects (e.g. may be returned as nodes by .infer()) ####### class _Yes(object): """a yes object""" def __repr__(self): return 'YES' def __getattribute__(self, name): if name.startswith('__') and name.endswith('__'): # to avoid inspection pb return super(_Yes, self).__getattribute__(name) return self def __call__(self, *args, **kwargs): return self YES = _Yes() class Instance(Proxy): """a special node representing a class instance""" def getattr(self, name, context=None, lookupclass=True): try: values = self._proxied.instance_attr(name, context) except NotFoundError: if name == '__class__': return [self._proxied] if lookupclass: # class attributes not available through the instance # unless they are explicitly defined if name in ('__name__', '__bases__', '__mro__', '__subclasses__'): return self._proxied.local_attr(name) return self._proxied.getattr(name, context) raise NotFoundError(name) # since we've no context information, return matching class members as # well if lookupclass: try: return values + self._proxied.getattr(name, context) except NotFoundError: pass return values def igetattr(self, name, context=None): """inferred getattr""" try: # XXX frame should be self._proxied, or not ? get_attr = self.getattr(name, context, lookupclass=False) return _infer_stmts(self._wrap_attr(get_attr, context), context, frame=self) except NotFoundError: try: # fallback to class'igetattr since it has some logic to handle # descriptors return self._wrap_attr(self._proxied.igetattr(name, context), context) except NotFoundError: raise InferenceError(name) def _wrap_attr(self, attrs, context=None): """wrap bound methods of attrs in a InstanceMethod proxies""" for attr in attrs: if isinstance(attr, UnboundMethod): if '__builtin__.property' in attr.decoratornames(): for infered in attr.infer_call_result(self, context): yield infered else: yield BoundMethod(attr, self) else: yield attr def infer_call_result(self, caller, context=None): """infer what a class instance is returning when called""" infered = False for node in self._proxied.igetattr('__call__', context): for res in node.infer_call_result(caller, context): infered = True yield res if not infered: raise InferenceError() def __repr__(self): return '' % (self._proxied.root().name, self._proxied.name, id(self)) def __str__(self): return 'Instance of %s.%s' % (self._proxied.root().name, self._proxied.name) def callable(self): try: self._proxied.getattr('__call__') return True except NotFoundError: return False def pytype(self): return self._proxied.qname() def display_type(self): return 'Instance of' class UnboundMethod(Proxy): """a special node representing a method not bound to an instance""" def __repr__(self): frame = self._proxied.parent.frame() return '<%s %s of %s at 0x%s' % (self.__class__.__name__, self._proxied.name, frame.qname(), id(self)) def is_bound(self): return False def getattr(self, name, context=None): if name == 'im_func': return [self._proxied] return super(UnboundMethod, self).getattr(name, context) def igetattr(self, name, context=None): if name == 'im_func': return iter((self._proxied,)) return super(UnboundMethod, self).igetattr(name, context) class BoundMethod(UnboundMethod): """a special node representing a method bound to an instance""" def __init__(self, proxy, bound): UnboundMethod.__init__(self, proxy) self.bound = bound def is_bound(self): return True def infer_call_result(self, caller, context): context = context.clone() context.boundnode = self.bound return self._proxied.infer_call_result(caller, context) class Generator(Proxy): """a special node representing a generator""" def callable(self): return True def pytype(self): return '__builtin__.generator' def display_type(self): return 'Generator' # decorators ################################################################## def path_wrapper(func): """return the given infer function wrapped to handle the path""" def wrapped(node, context=None, _func=func, **kwargs): """wrapper function handling context""" if context is None: context = InferenceContext() context.push(node) yielded = set() for res in _func(node, context, **kwargs): # unproxy only true instance, not const, tuple, dict... if res.__class__ is Instance: ares = res._proxied else: ares = res if not ares in yielded: yield res yielded.add(ares) return wrapped def yes_if_nothing_infered(func): def wrapper(*args, **kwargs): infered = False for node in func(*args, **kwargs): infered = True yield node if not infered: yield YES return wrapper def raise_if_nothing_infered(func): def wrapper(*args, **kwargs): infered = False for node in func(*args, **kwargs): infered = True yield node if not infered: raise InferenceError() return wrapper # Node ###################################################################### class NodeNG(BaseClass): """Base Class for all ASTNG node classes. It represents a node of the new abstract syntax tree. """ is_statement = False # attributes below are set by the builder module or by raw factories lineno = None fromlineno = None tolineno = None # parent node in the tree parent = None # attributes containing child node(s) redefined in most concrete classes: _astng_fields = () def _repr_name(self): """return self.name or self.attrname or '' for nice representation""" return getattr(self, 'name', getattr(self, 'attrname', '')) def __str__(self): return '%s(%s)' % (self.__class__.__name__, self._repr_name()) def __repr__(self): return '<%s(%s) l.%s [%s] at Ox%x>' % (self.__class__.__name__, self._repr_name(), self.fromlineno, self.root().name, id(self)) def accept(self, visitor): klass = self.__class__.__name__ func = getattr(visitor, "visit_" + self.__class__.__name__.lower()) return func(self) def get_children(self): node_dict = self.__dict__ for field in self._astng_fields: attr = node_dict[field] if attr is None: continue if isinstance(attr, (list, tuple)): for elt in attr: yield elt else: yield attr def last_child(self): """an optimized version of list(get_children())[-1]""" n_dict = self.__dict__ for field in self._astng_fields[::-1]: attr = n_dict[field] if not attr: # None or empty listy / tuple continue if isinstance(attr, (list, tuple)): return attr[-1] else: return attr return None def parent_of(self, node): """return true if i'm a parent of the given node""" parent = node.parent while parent is not None: if self is parent: return True parent = parent.parent return False def statement(self): """return the first parent node marked as statement node""" if self.is_statement: return self return self.parent.statement() def frame(self): """return the first parent frame node (i.e. Module, Function or Class) """ return self.parent.frame() def scope(self): """return the first node defining a new scope (i.e. Module, Function, Class, Lambda but also GenExpr) """ return self.parent.scope() def root(self): """return the root node of the tree, (i.e. a Module)""" if self.parent: return self.parent.root() return self def child_sequence(self, child): """search for the right sequence where the child lies in""" for field in self._astng_fields: node_or_sequence = getattr(self, field) if node_or_sequence is child: return [node_or_sequence] # /!\ compiler.ast Nodes have an __iter__ walking over child nodes if isinstance(node_or_sequence, (tuple, list)) and child in node_or_sequence: return node_or_sequence else: msg = 'Could not found %s in %s\'s children' raise ASTNGError(msg % (repr(child), repr(self))) def locate_child(self, child): """return a 2-uple (child attribute name, sequence or node)""" for field in self._astng_fields: node_or_sequence = getattr(self, field) # /!\ compiler.ast Nodes have an __iter__ walking over child nodes if child is node_or_sequence: return field, child if isinstance(node_or_sequence, (tuple, list)) and child in node_or_sequence: return field, node_or_sequence msg = 'Could not found %s in %s\'s children' raise ASTNGError(msg % (repr(child), repr(self))) # FIXME : should we merge child_sequence and locate_child ? locate_child # is only used in are_exclusive, child_sequence one time in pylint. def next_sibling(self): """return the next sibling statement""" return self.parent.next_sibling() def previous_sibling(self): """return the previous sibling statement""" return self.parent.previous_sibling() def nearest(self, nodes): """return the node which is the nearest before this one in the given list of nodes """ myroot = self.root() mylineno = self.fromlineno nearest = None, 0 for node in nodes: assert node.root() is myroot, \ 'nodes %s and %s are not from the same module' % (self, node) lineno = node.fromlineno if node.fromlineno > mylineno: break if lineno > nearest[1]: nearest = node, lineno # FIXME: raise an exception if nearest is None ? return nearest[0] def set_line_info(self, lastchild): if self.lineno is None: self.fromlineno = self._fixed_source_line() else: self.fromlineno = self.lineno if lastchild is None: self.tolineno = self.fromlineno else: self.tolineno = lastchild.tolineno return # TODO / FIXME: assert self.fromlineno is not None, self assert self.tolineno is not None, self def _fixed_source_line(self): """return the line number where the given node appears we need this method since not all nodes have the lineno attribute correctly set... """ line = self.lineno _node = self try: while line is None: _node = _node.get_children().next() line = _node.lineno except StopIteration: _node = self.parent while _node and line is None: line = _node.lineno _node = _node.parent return line def block_range(self, lineno): """handle block line numbers range for non block opening statements """ return lineno, self.tolineno def set_local(self, name, stmt): """delegate to a scoped parent handling a locals dictionary""" self.parent.set_local(name, stmt) def nodes_of_class(self, klass, skip_klass=None): """return an iterator on nodes which are instance of the given class(es) klass may be a class object or a tuple of class objects """ if isinstance(self, klass): yield self for child_node in self.get_children(): if skip_klass is not None and isinstance(child_node, skip_klass): continue for matching in child_node.nodes_of_class(klass, skip_klass): yield matching def _infer_name(self, frame, name): # overridden for From, Import, Global, TryExcept and Arguments return None def infer(self, context=None): """we don't know how to resolve a statement by default""" # this method is overridden by most concrete classes raise InferenceError(self.__class__.__name__) def infered(self): '''return list of infered values for a more simple inference usage''' return list(self.infer()) def instanciate_class(self): """instanciate a node if it is a Class node, else return self""" return self def has_base(self, node): return False def callable(self): return False def eq(self, value): return False def as_string(self): from logilab.astng.nodes_as_string import as_string return as_string(self) def repr_tree(self, ids=False): """print a nice astng tree representation""" result = [] _repr_tree(self, result, ids=ids) print "\n".join(result) INDENT = " " def _repr_tree(node, result, indent='', _done=None, ids=False): """built a tree representation of a node as a list of lines""" if _done is None: _done = set() if not hasattr(node, '_astng_fields'): # not a astng node return if node in _done: result.append( indent + 'loop in tree: %s' % node ) return _done.add(node) node_str = str(node) if ids: node_str += ' . \t%x' % id(node) result.append( indent + node_str ) indent += INDENT for field in node._astng_fields: value = getattr(node, field) if isinstance(value, (list, tuple) ): result.append( indent + field + " = [" ) for child in value: if isinstance(child, (list, tuple) ): # special case for Dict # FIXME _repr_tree(child[0], result, indent, _done, ids) _repr_tree(child[1], result, indent, _done, ids) result.append(indent + ',') else: _repr_tree(child, result, indent, _done, ids) result.append( indent + "]" ) else: result.append( indent + field + " = " ) _repr_tree(value, result, indent, _done, ids) ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/raw_building.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000001762711242100540033542 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains a set of functions to create astng trees from scratch (build_* functions) or from living object (object_build_* functions) """ __docformat__ = "restructuredtext en" import sys from inspect import getargspec from logilab.astng import nodes def _attach_local_node(parent, node, name): node.name = name # needed by add_local_node parent.add_local_node(node) _marker = object() def attach_dummy_node(node, name, object=_marker): """create a dummy node and register it in the locals of the given node with the specified name """ enode = nodes.EmptyNode() enode.object = object _attach_local_node(node, enode, name) nodes.EmptyNode.has_underlying_object = lambda self: self.object is not _marker def attach_const_node(node, name, value): """create a Const node and register it in the locals of the given node with the specified name """ if not name in node.special_attributes: _attach_local_node(node, nodes.const_factory(value), name) def attach_import_node(node, modname, membername): """create a From node and register it in the locals of the given node with the specified name """ from_node = nodes.From(modname, [(membername, None)]) _attach_local_node(node, from_node, membername) def build_module(name, doc=None): """create and initialize a astng Module node""" node = nodes.Module(name, doc, pure_python=False) node.package = False node.parent = None return node def build_class(name, basenames=(), doc=None): """create and initialize a astng Class node""" node = nodes.Class(name, doc) for base in basenames: basenode = nodes.Name() basenode.name = base node.bases.append(basenode) basenode.parent = node return node def build_function(name, args=None, defaults=None, flag=0, doc=None): """create and initialize a astng Function node""" args, defaults = args or [], defaults or [] # first argument is now a list of decorators func = nodes.Function(name, doc) func.args = argsnode = nodes.Arguments() argsnode.args = [] for arg in args: argsnode.args.append(nodes.Name()) argsnode.args[-1].name = arg argsnode.args[-1].parent = argsnode argsnode.defaults = [] for default in defaults: argsnode.defaults.append(nodes.const_factory(default)) argsnode.defaults[-1].parent = argsnode argsnode.kwarg = None argsnode.vararg = None argsnode.parent = func if args: register_arguments(func) return func # def build_name_assign(name, value): # """create and initialize an astng Assign for a name assignment""" # return nodes.Assign([nodes.AssName(name, 'OP_ASSIGN')], nodes.Const(value)) # def build_attr_assign(name, value, attr='self'): # """create and initialize an astng Assign for an attribute assignment""" # return nodes.Assign([nodes.AssAttr(nodes.Name(attr), name, 'OP_ASSIGN')], # nodes.Const(value)) def build_from_import(fromname, names): """create and initialize an astng From import statement""" return nodes.From(fromname, [(name, None) for name in names]) def register_arguments(func, args=None): """add given arguments to local args is a list that may contains nested lists (i.e. def func(a, (b, c, d)): ...) """ if args is None: args = func.args.args if func.args.vararg: func.set_local(func.args.vararg, func.args) if func.args.kwarg: func.set_local(func.args.kwarg, func.args) for arg in args: if isinstance(arg, nodes.Name): func.set_local(arg.name, arg) else: register_arguments(func, arg.elts) def object_build_class(node, member, localname): """create astng for a living class object""" basenames = [base.__name__ for base in member.__bases__] return _base_class_object_build(node, member, basenames, localname=localname) def object_build_function(node, member, localname): """create astng for a living function object""" args, varargs, varkw, defaults = getargspec(member) if varargs is not None: args.append(varargs) if varkw is not None: args.append(varkw) func = build_function(getattr(member, '__name__', None) or localname, args, defaults, member.func_code.co_flags, member.__doc__) node.add_local_node(func, localname) def object_build_datadescriptor(node, member, name): """create astng for a living data descriptor object""" return _base_class_object_build(node, member, [], name) def object_build_methoddescriptor(node, member, localname): """create astng for a living method descriptor object""" # FIXME get arguments ? func = build_function(getattr(member, '__name__', None) or localname, doc=member.__doc__) # set node's arguments to None to notice that we have no information, not # and empty argument list func.args.args = None node.add_local_node(func, localname) def _base_class_object_build(node, member, basenames, name=None, localname=None): """create astng for a living class object, with a given set of base names (e.g. ancestors) """ klass = build_class(name or getattr(member, '__name__', None) or localname, basenames, member.__doc__) klass._newstyle = isinstance(member, type) node.add_local_node(klass, localname) try: # limit the instantiation trick since it's too dangerous # (such as infinite test execution...) # this at least resolves common case such as Exception.args, # OSError.errno if issubclass(member, Exception): instdict = member().__dict__ else: raise TypeError except: pass else: for name, obj in instdict.items(): valnode = nodes.EmptyNode() valnode.object = obj valnode.parent = klass valnode.lineno = 1 klass.instance_attrs[name] = [valnode] return klass __all__ = ('register_arguments', 'build_module', 'object_build_class', 'object_build_function', 'object_build_datadescriptor', 'object_build_methoddescriptor', 'attach_dummy_node', 'attach_const_node', 'attach_import_node') ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/rebuilder.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000003020111242100540033521 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains utilities for rebuilding a compiler.ast or _ast tree in order to get a single ASTNG representation """ from logilab.astng import ASTNGBuildingException, InferenceError from logilab.astng import nodes from logilab.astng.bases import YES, Instance REDIRECT = {'arguments': 'Arguments', 'Attribute': 'Getattr', 'comprehension': 'Comprehension', 'Call': 'CallFunc', 'ClassDef': 'Class', "ListCompFor": 'Comprehension', "GenExprFor": 'Comprehension', 'excepthandler': 'ExceptHandler', 'Expr': 'Discard', 'FunctionDef': 'Function', 'GeneratorExp': 'GenExpr', 'ImportFrom': 'From', 'keyword': 'Keyword', 'Repr': 'Backquote', 'Add': 'BinOp', 'Bitand': 'BinOp', 'Bitor': 'BinOp', 'Bitxor': 'BinOp', 'Div': 'BinOp', 'FloorDiv': 'BinOp', 'LeftShift': 'BinOp', 'Mod': 'BinOp', 'Mul': 'BinOp', 'Power': 'BinOp', 'RightShift': 'BinOp', 'Sub': 'BinOp', 'And': 'BoolOp', 'Or': 'BoolOp', 'UnaryAdd': 'UnaryOp', 'UnarySub': 'UnaryOp', 'Not': 'UnaryOp', 'Invert': 'UnaryOp' } class RebuildVisitor(object): """Visitor to transform an AST to an ASTNG """ def __init__(self, manager): self._manager = manager self.asscontext = None self._metaclass = None self._global_names = None self._delayed_assattr = [] def visit(self, node, parent): if node is None: # some attributes of some nodes are just None return None cls_name = node.__class__.__name__ visit_name = 'visit_' + REDIRECT.get(cls_name, cls_name).lower() visit_method = getattr(self, visit_name) return visit_method(node, parent) def build(self, node, modname, module_file, package): """rebuild the tree starting with an Module node; return an astng.Module node """ self._metaclass = [''] self._global_names = [] self._from_nodes = [] module = self.visit_module(node, modname, package) module.file = module.path = module_file # init module cache here else we may get some infinite recursion # errors while infering delayed assignments if self._manager is not None: self._manager._cache[module.name] = module # handle delayed assattr nodes for from_node in self._from_nodes: self._add_from_names_to_locals(from_node, delayed=True) delay_assattr = self.delayed_assattr for delayed in self._delayed_assattr: delay_assattr(delayed) return module def _save_argument_name(self, node): """save argument names in locals""" if node.vararg: node.parent.set_local(node.vararg, node) if node.kwarg: node.parent.set_local(node.kwarg, node) # visit_ and delayed_ methods ################################# def _set_assign_infos(self, newnode): """set some function or metaclass infos""" # XXX right ? klass = newnode.parent.frame() if (isinstance(klass, nodes.Class) and isinstance(newnode.value, nodes.CallFunc) and isinstance(newnode.value.func, nodes.Name)): func_name = newnode.value.func.name for ass_node in newnode.targets: try: meth = klass[ass_node.name] if isinstance(meth, nodes.Function): if func_name in ('classmethod', 'staticmethod'): meth.type = func_name try: # XXX use setdefault ? meth.extra_decorators.append(newnode.value) except AttributeError: meth.extra_decorators = [newnode.value] except (AttributeError, KeyError): continue elif getattr(newnode.targets[0], 'name', None) == '__metaclass__': # XXX check more... self._metaclass[-1] = 'type' # XXX get the actual metaclass def visit_class(self, node, parent): """visit a Class node to become astng""" self._metaclass.append(self._metaclass[-1]) newnode = self._visit_class(node, parent) metaclass = self._metaclass.pop() if not newnode.bases: # no base classes, detect new / style old style according to # current scope newnode._newstyle = metaclass == 'type' newnode.parent.frame().set_local(newnode.name, newnode) return newnode def visit_break(self, node, parent): """visit a Break node by returning a fresh instance of it""" newnode = nodes.Break() self._set_infos(node, newnode, parent) return newnode def visit_const(self, node, parent): """visit a Const node by returning a fresh instance of it""" newnode = nodes.Const(node.value) self._set_infos(node, newnode, parent) return newnode def visit_continue(self, node, parent): """visit a Continue node by returning a fresh instance of it""" newnode = nodes.Continue() self._set_infos(node, newnode, parent) return newnode def visit_ellipsis(self, node, parent): """visit an Ellipsis node by returning a fresh instance of it""" newnode = nodes.Ellipsis() self._set_infos(node, newnode, parent) return newnode def visit_emptynode(self, node, parent): """visit an EmptyNode node by returning a fresh instance of it""" newnode = nodes.EmptyNode() self._set_infos(node, newnode, parent) return newnode def _store_from_node(self, node): """handle From names by adding them to locals now or after""" # we can not handle wildcard imports if the source module is not # in the cache since 'import_module' calls the MANAGER and we will # end up with infinite recursions working with unfinished trees if node.modname in self._manager._cache: self._add_from_names_to_locals(node) else: self._from_nodes.append(node) def _add_from_names_to_locals(self, node, delayed=False): """store imported names to the locals; resort the locals if coming from a delayed node """ cmp_nodes = lambda x, y: cmp(x.fromlineno, y.fromlineno) for (name, asname) in node.names: if name == '*': try: imported = node.root().import_module(node.modname) except ASTNGBuildingException: continue for name in imported.wildcard_import_names(): node.parent.set_local(name, node) if delayed: node.parent.scope().locals[name].sort(cmp_nodes) else: node.parent.set_local(asname or name, node) if delayed: node.parent.scope().locals[asname or name].sort(cmp_nodes) def visit_function(self, node, parent): """visit an Function node to become astng""" self._global_names.append({}) newnode = self._visit_function(node, parent) self._global_names.pop() frame = newnode.parent.frame() if isinstance(frame, nodes.Class): if newnode.name == '__new__': newnode.type = 'classmethod' else: newnode.type = 'method' if newnode.decorators is not None: for decorator_expr in newnode.decorators.nodes: if isinstance(decorator_expr, nodes.Name) and \ decorator_expr.name in ('classmethod', 'staticmethod'): newnode.type = decorator_expr.name frame.set_local(newnode.name, newnode) return newnode def visit_global(self, node, parent): """visit an Global node to become astng""" newnode = nodes.Global(node.names) self._set_infos(node, newnode, parent) if self._global_names: # global at the module level, no effect for name in node.names: self._global_names[-1].setdefault(name, []).append(newnode) return newnode def _save_import_locals(self, newnode): """save import names in parent's locals""" for (name, asname) in newnode.names: name = asname or name newnode.parent.set_local(name.split('.')[0], newnode) def visit_pass(self, node, parent): """visit a Pass node by returning a fresh instance of it""" newnode = nodes.Pass() self._set_infos(node, newnode, parent) return newnode def _save_assignment(self, node, name=None): """save assignement situation since node.parent is not available yet""" if self._global_names and node.name in self._global_names[-1]: node.root().set_local(node.name, node) else: node.parent.set_local(node.name, node) def delayed_assattr(self, node): """visit a AssAttr node -> add name to locals, handle members definition """ try: frame = node.frame() for infered in node.expr.infer(): if infered is YES: continue try: if infered.__class__ is Instance: infered = infered._proxied iattrs = infered.instance_attrs elif isinstance(infered, Instance): # Const, Tuple, ... we may be wrong, may be not, but # anyway we don't want to pollute builtin's namespace continue else: iattrs = infered.locals except AttributeError: # XXX log error #import traceback #traceback.print_exc() continue values = iattrs.setdefault(node.attrname, []) if node in values: continue # get assign in __init__ first XXX useful ? if frame.name == '__init__' and values and not \ values[0].frame().name == '__init__': values.insert(0, node) else: values.append(node) except InferenceError: pass ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/protocols.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000002754111242100540033536 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains a set of functions to handle python protocols for nodes where it makes sense. """ from __future__ import generators __doctype__ = "restructuredtext en" from logilab.astng import InferenceError, NoDefault from logilab.astng.node_classes import unpack_infer from logilab.astng.bases import copy_context, \ raise_if_nothing_infered, yes_if_nothing_infered, Instance, Generator, YES from logilab.astng.nodes import const_factory from logilab.astng import nodes # unary operations ############################################################ def tl_infer_unary_op(self, operator): if operator == 'not': return const_factory(not bool(self.elts)) raise TypeError() # XXX log unsupported operation nodes.Tuple.infer_unary_op = tl_infer_unary_op nodes.List.infer_unary_op = tl_infer_unary_op def dict_infer_unary_op(self, operator): if operator == 'not': return const_factory(not bool(self.items)) raise TypeError() # XXX log unsupported operation nodes.Dict.infer_unary_op = dict_infer_unary_op def const_infer_unary_op(self, operator): if operator == 'not': return const_factory(not self.value) # XXX log potentially raised TypeError elif operator == '+': return const_factory(+self.value) else: # operator == '-': return const_factory(-self.value) nodes.Const.infer_unary_op = const_infer_unary_op # binary operations ########################################################### BIN_OP_IMPL = {'+': lambda a, b: a + b, '-': lambda a, b: a - b, '/': lambda a, b: a / b, '//': lambda a, b: a // b, '*': lambda a, b: a * b, '**': lambda a, b: a ** b, '%': lambda a, b: a % b, '&': lambda a, b: a & b, '|': lambda a, b: a | b, '^': lambda a, b: a ^ b, '<<': lambda a, b: a << b, '>>': lambda a, b: a >> b, } for key, impl in BIN_OP_IMPL.items(): BIN_OP_IMPL[key+'='] = impl def const_infer_binary_op(self, operator, other, context): for other in other.infer(context): if isinstance(other, nodes.Const): try: impl = BIN_OP_IMPL[operator] try: yield const_factory(impl(self.value, other.value)) except StandardError: # ArithmeticError is not enough: float >> float is a TypeError # TODO : let pylint know about the problem pass except TypeError: # XXX log TypeError continue elif other is YES: yield other else: try: for val in other.infer_binary_op(operator, self, context): yield val except AttributeError: yield YES nodes.Const.infer_binary_op = yes_if_nothing_infered(const_infer_binary_op) def tl_infer_binary_op(self, operator, other, context): for other in other.infer(context): if isinstance(other, self.__class__) and operator == '+': node = self.__class__() elts = [n for elt in self.elts for n in elt.infer(context) if not n is YES] elts += [n for elt in other.elts for n in elt.infer(context) if not n is YES] node.elts = elts yield node elif isinstance(other, nodes.Const) and operator == '*': if not isinstance(other.value, int): yield YES continue node = self.__class__() elts = [n for elt in self.elts for n in elt.infer(context) if not n is YES] * other.value node.elts = elts yield node elif isinstance(other, Instance) and not isinstance(other, nodes.Const): yield YES # XXX else log TypeError nodes.Tuple.infer_binary_op = yes_if_nothing_infered(tl_infer_binary_op) nodes.List.infer_binary_op = yes_if_nothing_infered(tl_infer_binary_op) def dict_infer_binary_op(self, operator, other, context): for other in other.infer(context): if isinstance(other, Instance) and isinstance(other._proxied, nodes.Class): yield YES # XXX else log TypeError nodes.Dict.infer_binary_op = yes_if_nothing_infered(dict_infer_binary_op) # assignment ################################################################## """the assigned_stmts method is responsible to return the assigned statement (e.g. not inferred) according to the assignment type. The `asspath` argument is used to record the lhs path of the original node. For instance if we want assigned statements for 'c' in 'a, (b,c)', asspath will be [1, 1] once arrived to the Assign node. The `context` argument is the current inference context which should be given to any intermediary inference necessary. """ def _resolve_looppart(parts, asspath, context): """recursive function to resolve multiple assignments on loops""" asspath = asspath[:] index = asspath.pop(0) for part in parts: if part is YES: continue # XXX handle __iter__ and log potentially detected errors if not hasattr(part, 'itered'): continue try: itered = part.itered() except TypeError: continue # XXX log error for stmt in itered: try: assigned = stmt.getitem(index, context) except (AttributeError, IndexError): continue except TypeError, exc: # stmt is unsubscriptable Const continue if not asspath: # we achieved to resolved the assignment path, # don't infer the last part yield assigned elif assigned is YES: break else: # we are not yet on the last part of the path # search on each possibly inferred value try: for infered in _resolve_looppart(assigned.infer(context), asspath, context): yield infered except InferenceError: break def for_assigned_stmts(self, node, context=None, asspath=None): if asspath is None: for lst in self.iter.infer(context): if isinstance(lst, (nodes.Tuple, nodes.List)): for item in lst.elts: yield item else: for infered in _resolve_looppart(self.iter.infer(context), asspath, context): yield infered nodes.For.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts) nodes.Comprehension.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts) def mulass_assigned_stmts(self, node, context=None, asspath=None): if asspath is None: asspath = [] asspath.insert(0, self.elts.index(node)) return self.parent.assigned_stmts(self, context, asspath) nodes.Tuple.assigned_stmts = mulass_assigned_stmts nodes.List.assigned_stmts = mulass_assigned_stmts def assend_assigned_stmts(self, context=None): return self.parent.assigned_stmts(self, context=context) nodes.AssName.assigned_stmts = assend_assigned_stmts nodes.AssAttr.assigned_stmts = assend_assigned_stmts def _arguments_infer_argname(self, name, context): # arguments information may be missing, in which case we can't do anything # more if not (self.args or self.vararg or self.kwarg): yield YES return # first argument of instance/class method if self.args and getattr(self.args[0], 'name', None) == name: functype = self.parent.type if functype == 'method': yield Instance(self.parent.parent.frame()) return if functype == 'classmethod': yield self.parent.parent.frame() return if name == self.vararg: yield const_factory(()) return if name == self.kwarg: yield const_factory({}) return # if there is a default value, yield it. And then yield YES to reflect # we can't guess given argument value try: context = copy_context(context) for infered in self.default_value(name).infer(context): yield infered yield YES except NoDefault: yield YES def arguments_assigned_stmts(self, node, context, asspath=None): if context.callcontext: # reset call context/name callcontext = context.callcontext context = copy_context(context) context.callcontext = None for infered in callcontext.infer_argument(self.parent, node.name, context): yield infered return for infered in _arguments_infer_argname(self, node.name, context): yield infered nodes.Arguments.assigned_stmts = arguments_assigned_stmts def assign_assigned_stmts(self, node, context=None, asspath=None): if not asspath: yield self.value return for infered in _resolve_asspart(self.value.infer(context), asspath, context): yield infered nodes.Assign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts) nodes.AugAssign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts) def _resolve_asspart(parts, asspath, context): """recursive function to resolve multiple assignments""" asspath = asspath[:] index = asspath.pop(0) for part in parts: if hasattr(part, 'getitem'): try: assigned = part.getitem(index, context) # XXX raise a specific exception to avoid potential hiding of # unexpected exception ? except (TypeError, IndexError): return if not asspath: # we achieved to resolved the assignment path, don't infer the # last part yield assigned elif assigned is YES: return else: # we are not yet on the last part of the path search on each # possibly inferred value try: for infered in _resolve_asspart(assigned.infer(context), asspath, context): yield infered except InferenceError: return def excepthandler_assigned_stmts(self, node, context=None, asspath=None): for assigned in unpack_infer(self.type): if isinstance(assigned, nodes.Class): assigned = Instance(assigned) yield assigned nodes.ExceptHandler.assigned_stmts = raise_if_nothing_infered(excepthandler_assigned_stmts) def with_assigned_stmts(self, node, context=None, asspath=None): if asspath is None: for lst in self.vars.infer(context): if isinstance(lst, (nodes.Tuple, nodes.List)): for item in lst.nodes: yield item nodes.With.assigned_stmts = raise_if_nothing_infered(with_assigned_stmts) ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/nodes_as_string.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000003633211242100540033534 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains exceptions used in the astng library """ """This module renders ASTNG nodes to string representation. It will probably not work on compiler.ast or _ast trees. """ from logilab.astng.utils import ASTVisitor INDENT = ' ' # 4 spaces ; keep indentation variable def _import_string(names): """return a list of (name, asname) formatted as a string""" _names = [] for name, asname in names: if asname is not None: _names.append('%s as %s' % (name, asname)) else: _names.append(name) return ', '.join(_names) class AsStringVisitor(ASTVisitor): """Visitor to render an ASTNG node as string """ def __call__(self, node): """Makes this visitor behave as a simple function""" return node.accept(self) def _stmt_list(self, stmts): """return a list of nodes to string""" stmts = '\n'.join([nstr for nstr in [n.accept(self) for n in stmts] if nstr]) return INDENT + stmts.replace('\n', '\n'+INDENT) ## visit_ methods ########################################### def visit_arguments(self, node): """return an astng.Function node as string""" return node.format_args() def visit_assattr(self, node): """return an astng.AssAttr node as string""" return self.visit_getattr(node) def visit_assert(self, node): """return an astng.Assert node as string""" if node.fail: return 'assert %s, %s' % (node.test.accept(self), node.fail.accept(self)) return 'assert %s' % node.test.accept(self) def visit_assname(self, node): """return an astng.AssName node as string""" return node.name def visit_assign(self, node): """return an astng.Assign node as string""" lhs = ' = '.join([n.accept(self) for n in node.targets]) return '%s = %s' % (lhs, node.value.accept(self)) def visit_augassign(self, node): """return an astng.AugAssign node as string""" return '%s %s %s' % (node.target.accept(self), node.op, node.value.accept(self)) def visit_backquote(self, node): """return an astng.Backquote node as string""" return '`%s`' % node.value.accept(self) def visit_binop(self, node): """return an astng.BinOp node as string""" return '(%s) %s (%s)' % (node.left.accept(self), node.op, node.right.accept(self)) def visit_boolop(self, node): """return an astng.BoolOp node as string""" return (' %s ' % node.op).join(['(%s)' % n.accept(self) for n in node.values]) def visit_break(self, node): """return an astng.Break node as string""" return 'break' def visit_callfunc(self, node): """return an astng.CallFunc node as string""" expr_str = node.func.accept(self) args = ', '.join([arg.accept(self) for arg in node.args]) if node.starargs: args += ', *%s' % node.starargs.accept(self) if node.kwargs: args += ', **%s' % node.kwargs.accept(self) return '%s(%s)' % (expr_str, args) def visit_class(self, node): """return an astng.Class node as string""" bases = ', '.join([n.accept(self) for n in node.bases]) bases = bases and '(%s)' % bases or '' docs = node.doc and '\n%s"""%s"""' % (INDENT, node.doc) or '' return 'class %s%s:%s\n%s\n' % (node.name, bases, docs, self._stmt_list( node.body)) def visit_compare(self, node): """return an astng.Compare node as string""" rhs_str = ' '.join(['%s %s' % (op, expr.accept(self)) for op, expr in node.ops]) return '%s %s' % (node.left.accept(self), rhs_str) def visit_comprehension(self, node): """return an astng.Comprehension node as string""" ifs = ''.join([ ' if %s' % n.accept(self) for n in node.ifs]) return 'for %s in %s%s' % (node.target.accept(self), node.iter.accept(self), ifs ) def visit_const(self, node): """return an astng.Const node as string""" return repr(node.value) def visit_continue(self, node): """return an astng.Continue node as string""" return 'continue' def visit_delete(self, node): # XXX check if correct """return an astng.Delete node as string""" return 'del %s' % ', '.join([child.accept(self) for child in node.targets]) def visit_delattr(self, node): """return an astng.DelAttr node as string""" return self.visit_getattr(node) def visit_delname(self, node): """return an astng.DelName node as string""" return node.name def visit_decorators(self, node): """return an astng.Decorators node as string""" return '@%s\n' % '\n@'.join([item.accept(self) for item in node.nodes]) def visit_dict(self, node): """return an astng.Dict node as string""" return '{%s}' % ', '.join(['%s: %s' % (key.accept(self), value.accept(self)) for key, value in node.items]) def visit_discard(self, node): """return an astng.Discard node as string""" return node.value.accept(self) def visit_excepthandler(self, node): if node.type: if node.name: excs = 'except %s, %s' % (node.type.accept(self), node.name.accept(self)) else: excs = 'except %s' % node.type.accept(self) else: excs = 'except' return '%s:\n%s' % (excs, self._stmt_list(node.body)) def visit_ellipsis(self, node): """return an astng.Ellipsis node as string""" return '...' def visit_empty(self, node): """return an Empty node as string""" return '' def visit_exec(self, node): """return an astng.Exec node as string""" if node.locals: return 'exec %s in %s, %s' % (node.expr.accept(self), node.locals.accept(self), node.globals.accept(self)) if node.globals: return 'exec %s in %s' % (node.expr.accept(self), node.globals.accept(self)) return 'exec %s' % node.expr.accept(self) def visit_extslice(self, node): """return an astng.ExtSlice node as string""" return ','.join( [dim.accept(self) for dim in node.dims] ) def visit_for(self, node): """return an astng.For node as string""" fors = 'for %s in %s:\n%s' % (node.target.accept(self), node.iter.accept(self), self._stmt_list( node.body)) if node.orelse: fors = '%s\nelse:\n%s' % (fors, self._stmt_list(node.orelse)) return fors def visit_from(self, node): """return an astng.From node as string""" # XXX level return 'from %s import %s' % (node.modname, _import_string(node.names)) def visit_function(self, node): """return an astng.Function node as string""" decorate = node.decorators and node.decorators.accept(self) or '' docs = node.doc and '\n%s"""%s"""' % (INDENT, node.doc) or '' return '%sdef %s(%s):%s\n%s' % (decorate, node.name, node.args.accept(self), docs, self._stmt_list(node.body)) def visit_genexpr(self, node): """return an astng.ListComp node as string""" return '(%s %s)' % (node.elt.accept(self), ' '.join([n.accept(self) for n in node.generators])) def visit_getattr(self, node): """return an astng.Getattr node as string""" return '%s.%s' % (node.expr.accept(self), node.attrname) def visit_global(self, node): """return an astng.Global node as string""" return 'global %s' % ', '.join(node.names) def visit_if(self, node): """return an astng.If node as string""" ifs = ['if %s:\n%s' % (node.test.accept(self), self._stmt_list(node.body))] if node.orelse:# XXX use elif ??? ifs.append('else:\n%s' % self._stmt_list(node.orelse)) return '\n'.join(ifs) def visit_ifexp(self, node): """return an astng.IfExp node as string""" return '%s if %s else %s' % (node.body.accept(self), node.test.accept(self), node.orelse.accept(self)) def visit_import(self, node): """return an astng.Import node as string""" return 'import %s' % _import_string(node.names) def visit_keyword(self, node): """return an astng.Keyword node as string""" return '%s=%s' % (node.arg, node.value.accept(self)) def visit_lambda(self, node): """return an astng.Lambda node as string""" return 'lambda %s: %s' % (node.args.accept(self), node.body.accept(self)) def visit_list(self, node): """return an astng.List node as string""" return '[%s]' % ', '.join([child.accept(self) for child in node.elts]) def visit_listcomp(self, node): """return an astng.ListComp node as string""" return '[%s %s]' % (node.elt.accept(self), ' '.join([n.accept(self) for n in node.generators])) def visit_module(self, node): """return an astng.Module node as string""" docs = node.doc and '"""%s"""\n' % node.doc or '' stmts = '\n'.join([n.accept(self) for n in node.body]) return docs + '\n'.join([n.accept(self) for n in node.body]) def visit_name(self, node): """return an astng.Name node as string""" return node.name def visit_pass(self, node): """return an astng.Pass node as string""" return 'pass' def visit_print(self, node): """return an astng.Print node as string""" nodes = ', '.join([n.accept(self) for n in node.values]) if not node.nl: nodes = '%s,' % nodes if node.dest: return 'print >> %s, %s' % (node.dest.accept(self), nodes) return 'print %s' % nodes def visit_raise(self, node): """return an astng.Raise node as string""" if node.type: if node.inst: if node.tback: return 'raise %s, %s, %s' % (node.type.accept(self), node.inst.accept(self), node.tback.accept(self)) return 'raise %s, %s' % (node.type.accept(self), node.inst.accept(self)) return 'raise %s' % node.type.accept(self) return 'raise' def visit_return(self, node): """return an astng.Return node as string""" if node.value: return 'return %s' % node.value.accept(self) else: return 'return' def visit_index(self, node): """return a astng.Index node as string""" return node.value.accept(self) def visit_slice(self, node): """return a astng.Slice node as string""" lower = node.lower and node.lower.accept(self) or '' upper = node.upper and node.upper.accept(self) or '' step = node.step and node.step.accept(self) or '' if step: return '%s:%s:%s' % (lower, upper, step) return '%s:%s' % (lower, upper) def visit_subscript(self, node): """return an astng.Subscript node as string""" return '%s[%s]' % (node.value.accept(self), node.slice.accept(self)) def visit_tryexcept(self, node): """return an astng.TryExcept node as string""" trys = ['try:\n%s' % self._stmt_list( node.body)] for handler in node.handlers: trys.append(handler.accept(self)) if node.orelse: trys.append('else:\n%s' % self._stmt_list(node.orelse)) return '\n'.join(trys) def visit_tryfinally(self, node): """return an astng.TryFinally node as string""" return 'try:\n%s\nfinally:\n%s' % (self._stmt_list( node.body), self._stmt_list(node.finalbody)) def visit_tuple(self, node): """return an astng.Tuple node as string""" return '(%s)' % ', '.join([child.accept(self) for child in node.elts]) def visit_unaryop(self, node): """return an astng.UnaryOp node as string""" if node.op == 'not': operator = 'not ' else: operator = node.op return '%s%s' % (operator, node.operand.accept(self)) def visit_while(self, node): """return an astng.While node as string""" whiles = 'while %s:\n%s' % (node.test.accept(self), self._stmt_list(node.body)) if node.orelse: whiles = '%s\nelse:\n%s' % (whiles, self._stmt_list(node.orelse)) return whiles def visit_with(self, node): # 'with' without 'as' is possible """return an astng.With node as string""" as_var = node.vars and " as (%s)" % (node.vars.accept(self)) or "" withs = 'with (%s)%s:\n%s' % (node.expr.accept(self), as_var, self._stmt_list( node.body)) return withs def visit_yield(self, node): """yield an ast.Yield node as string""" return 'yield %s' % node.value.accept(self) # this visitor is stateless, thus it can be reused as_string = AsStringVisitor() ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/mixins.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000001357611242100540033541 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """This module contains some mixins for the different nodes. """ from logilab.astng import ASTNGBuildingException, InferenceError, NotFoundError from logilab.astng.bases import BaseClass # /!\ We cannot build a StmtNode(NodeNG) class since modifying "__bases__" # in "nodes.py" has to work *both* for old-style and new-style classes, # but we need the StmtMixIn for scoped nodes class StmtMixIn(BaseClass): """StmtMixIn used only for a adding a few attributes""" is_statement = True def replace(self, child, newchild): sequence = self.child_sequence(child) newchild.parent = self child.parent = None sequence[sequence.index(child)] = newchild def next_sibling(self): """return the next sibling statement""" stmts = self.parent.child_sequence(self) index = stmts.index(self) try: return stmts[index +1] except IndexError: pass def previous_sibling(self): """return the previous sibling statement""" stmts = self.parent.child_sequence(self) index = stmts.index(self) if index >= 1: return stmts[index -1] class BlockRangeMixIn(BaseClass): """override block range """ def set_line_info(self, lastchild): self.fromlineno = self.lineno self.tolineno = lastchild.tolineno self.blockstart_tolineno = self._blockstart_toline() def _elsed_block_range(self, lineno, orelse, last=None): """handle block line numbers range for try/finally, for, if and while statements """ if lineno == self.fromlineno: return lineno, lineno if orelse: if lineno >= orelse[0].fromlineno: return lineno, orelse[-1].tolineno return lineno, orelse[0].fromlineno - 1 return lineno, last or self.tolineno class FilterStmtsMixin(object): """Mixin for statement filtering and assignment type""" def _get_filtered_stmts(self, _, node, _stmts, mystmt): """method used in _filter_stmts to get statemtents and trigger break""" if self.statement() is mystmt: # original node's statement is the assignment, only keep # current node (gen exp, list comp) return [node], True return _stmts, False def ass_type(self): return self class AssignTypeMixin(object): def ass_type(self): return self def _get_filtered_stmts(self, lookup_node, node, _stmts, mystmt): """method used in filter_stmts""" if self is mystmt: return _stmts, True if self.statement() is mystmt: # original node's statement is the assignment, only keep # current node (gen exp, list comp) return [node], True return _stmts, False class ParentAssignTypeMixin(AssignTypeMixin): def ass_type(self): return self.parent.ass_type() class FromImportMixIn(BaseClass, FilterStmtsMixin): """MixIn for From and Import Nodes""" def _infer_name(self, frame, name): return name def do_import_module(self, modname): """return the ast for a module whose name is imported by """ # handle special case where we are on a package node importing a module # using the same name as the package, which may end in an infinite loop # on relative imports # XXX: no more needed ? mymodule = self.root() level = getattr(self, 'level', None) # Import as no level if mymodule.absolute_modname(modname, level) == mymodule.name: # FIXME: I don't know what to do here... raise InferenceError('module importing itself: %s' % modname) try: return mymodule.import_module(modname, level=level) except (ASTNGBuildingException, SyntaxError): raise InferenceError(modname) def real_name(self, asname): """get name from 'as' name""" for index in range(len(self.names)): name, _asname = self.names[index] if name == '*': return asname if not _asname: name = name.split('.', 1)[0] _asname = name if asname == _asname: return name raise NotFoundError(asname) ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/_exceptions.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000000503211242100540033525 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains exceptions used in the astng library """ __doctype__ = "restructuredtext en" class ASTNGError(Exception): """base exception class for all astng related exceptions""" class ASTNGBuildingException(ASTNGError): """exception class when we are unable to build an astng representation""" class ResolveError(ASTNGError): """base class of astng resolution/inference error""" class NotFoundError(ResolveError): """raised when we are unable to resolve a name""" class InferenceError(ResolveError): """raised when we are unable to infer a node""" class UnresolvableName(InferenceError): """raised when we are unable to resolve a name""" class NoDefault(ASTNGError): """raised by function's `default_value` method when an argument has no default value """ class IgnoreChild(Exception): """exception that maybe raised by visit methods to avoid children traversal """ ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/setup.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000001572211242100540033534 0ustar andreasandreas#!/usr/bin/env python # pylint: disable-msg=W0404,W0622,W0704,W0613,W0152 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """Generic Setup script, takes package info from __pkginfo__.py file. """ __docformat__ = "restructuredtext en" import os import sys import shutil from os.path import isdir, exists, join, walk try: if os.environ.get('NO_SETUPTOOLS'): raise ImportError() from setuptools import setup from setuptools.command import install_lib USE_SETUPTOOLS = 1 except ImportError: from distutils.core import setup from distutils.command import install_lib USE_SETUPTOOLS = 0 sys.modules.pop('__pkginfo__', None) # import required features from __pkginfo__ import modname, version, license, short_desc, long_desc, \ web, author, author_email # import optional features try: from __pkginfo__ import distname except ImportError: distname = modname try: from __pkginfo__ import scripts except ImportError: scripts = [] try: from __pkginfo__ import data_files except ImportError: data_files = None try: from __pkginfo__ import subpackage_of except ImportError: subpackage_of = None try: from __pkginfo__ import include_dirs except ImportError: include_dirs = [] try: from __pkginfo__ import ext_modules except ImportError: ext_modules = None try: from __pkginfo__ import install_requires except ImportError: install_requires = None STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build') IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc', '~') def ensure_scripts(linux_scripts): """ Creates the proper script names required for each platform (taken from 4Suite) """ from distutils import util if util.get_platform()[:3] == 'win': scripts_ = [script + '.bat' for script in linux_scripts] else: scripts_ = linux_scripts return scripts_ def get_packages(directory, prefix): """return a list of subpackages for the given directory """ result = [] for package in os.listdir(directory): absfile = join(directory, package) if isdir(absfile): if exists(join(absfile, '__init__.py')) or \ package in ('test', 'tests'): if prefix: result.append('%s.%s' % (prefix, package)) else: result.append(package) result += get_packages(absfile, result[-1]) return result def export(from_dir, to_dir, blacklist=STD_BLACKLIST, ignore_ext=IGNORED_EXTENSIONS, verbose=True): """make a mirror of from_dir in to_dir, omitting directories and files listed in the black list """ def make_mirror(arg, directory, fnames): """walk handler""" for norecurs in blacklist: try: fnames.remove(norecurs) except ValueError: pass for filename in fnames: # don't include binary files if filename[-4:] in ignore_ext: continue if filename[-1] == '~': continue src = join(directory, filename) dest = to_dir + src[len(from_dir):] if verbose: print >> sys.stderr, src, '->', dest if os.path.isdir(src): if not exists(dest): os.mkdir(dest) else: if exists(dest): os.remove(dest) shutil.copy2(src, dest) try: os.mkdir(to_dir) except OSError, ex: # file exists ? import errno if ex.errno != errno.EEXIST: raise walk(from_dir, make_mirror, None) EMPTY_FILE = '''"""generated file, don\'t modify or your data will be lost""" try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: pass ''' class MyInstallLib(install_lib.install_lib): """extend install_lib command to handle package __init__.py and include_dirs variable if necessary """ def run(self): """overridden from install_lib class""" install_lib.install_lib.run(self) # create Products.__init__.py if needed if subpackage_of: product_init = join(self.install_dir, subpackage_of, '__init__.py') if not exists(product_init): self.announce('creating %s' % product_init) stream = open(product_init, 'w') stream.write(EMPTY_FILE) stream.close() # manually install included directories if any if include_dirs: if subpackage_of: base = join(subpackage_of, modname) else: base = modname for directory in include_dirs: dest = join(self.install_dir, base, directory) export(directory, dest, verbose=False) def install(**kwargs): """setup entry point""" try: if USE_SETUPTOOLS: sys.argv.remove('--force-manifest') except: pass if subpackage_of: package = subpackage_of + '.' + modname kwargs['package_dir'] = {package : '.'} packages = [package] + get_packages(os.getcwd(), package) if USE_SETUPTOOLS: kwargs['namespace_packages'] = [subpackage_of] else: kwargs['package_dir'] = {modname : '.'} packages = [modname] + get_packages(os.getcwd(), modname) if USE_SETUPTOOLS and install_requires: kwargs['install_requires'] = install_requires kwargs['packages'] = packages return setup(name = distname, version = version, license = license, description = short_desc, long_description = long_desc, author = author, author_email = author_email, url = web, scripts = ensure_scripts(scripts), data_files = data_files, ext_modules = ext_modules, cmdclass = {'install_lib': MyInstallLib}, **kwargs ) if __name__ == '__main__' : install() ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/inference.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000003475011242100540033536 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains a set of functions to handle inference on astng trees """ from __future__ import generators __doctype__ = "restructuredtext en" from logilab.common.compat import chain try: GeneratorExit # introduced in py2.5 except NameError: class GeneratorExit(Exception): pass from logilab.astng import MANAGER, nodes, raw_building from logilab.astng import ASTNGError, InferenceError, UnresolvableName, \ NoDefault, NotFoundError, ASTNGBuildingException from logilab.astng.bases import YES, Instance, InferenceContext, \ _infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered from logilab.astng.protocols import _arguments_infer_argname _CONST_PROXY = { type(None): raw_building.build_class('NoneType'), bool: MANAGER.astng_from_class(bool), int: MANAGER.astng_from_class(int), long: MANAGER.astng_from_class(long), float: MANAGER.astng_from_class(float), complex: MANAGER.astng_from_class(complex), str: MANAGER.astng_from_class(str), unicode: MANAGER.astng_from_class(unicode), } _CONST_PROXY[type(None)].parent = _CONST_PROXY[bool].parent # TODO : find a nicer way to handle this situation; we should at least # be able to avoid calling MANAGER.astng_from_class(const.value.__class__) # each time (if we can not avoid the property). However __proxied introduced an # infinite recursion (see https://bugs.launchpad.net/pylint/+bug/456870) def _set_proxied(const): return _CONST_PROXY[const.value.__class__] nodes.Const._proxied = property(_set_proxied) def Const_pytype(self): return self._proxied.qname() nodes.Const.pytype = Const_pytype nodes.List._proxied = MANAGER.astng_from_class(list) nodes.Tuple._proxied = MANAGER.astng_from_class(tuple) nodes.Dict._proxied = MANAGER.astng_from_class(dict) class CallContext: """when inferring a function call, this class is used to remember values given as argument """ def __init__(self, args, starargs, dstarargs): self.args = [] self.nargs = {} for arg in args: if isinstance(arg, nodes.Keyword): self.nargs[arg.arg] = arg.value else: self.args.append(arg) self.starargs = starargs self.dstarargs = dstarargs def infer_argument(self, funcnode, name, context): """infer a function argument value according to the call context""" # 1. search in named keywords try: return self.nargs[name].infer(context) except KeyError: # Function.args.args can be None in astng (means that we don't have # information on argnames) argindex = funcnode.args.find_argname(name)[0] if argindex is not None: # 2. first argument of instance/class method if argindex == 0 and funcnode.type in ('method', 'classmethod'): if context.boundnode is not None: boundnode = context.boundnode else: # XXX can do better ? boundnode = funcnode.parent.frame() if funcnode.type == 'method': if not isinstance(boundnode, Instance): boundnode = Instance(boundnode) return iter((boundnode,)) if funcnode.type == 'classmethod': return iter((boundnode,)) # 2. search arg index try: return self.args[argindex].infer(context) except IndexError: pass # 3. search in *args (.starargs) if self.starargs is not None: its = [] for infered in self.starargs.infer(context): if infered is YES: its.append((YES,)) continue try: its.append(infered.getitem(argindex, context).infer(context)) except (InferenceError, AttributeError): its.append((YES,)) except (IndexError, TypeError): continue if its: return chain(*its) # 4. XXX search in **kwargs (.dstarargs) if self.dstarargs is not None: its = [] for infered in self.dstarargs.infer(context): if infered is YES: its.append((YES,)) continue try: its.append(infered.getitem(name, context).infer(context)) except (InferenceError, AttributeError): its.append((YES,)) except (IndexError, TypeError): continue if its: return chain(*its) # 5. */** argument, (Tuple or Dict) if name == funcnode.args.vararg: return iter((nodes.const_factory(()))) if name == funcnode.args.kwarg: return iter((nodes.const_factory({}))) # 6. return default value if any try: return funcnode.args.default_value(name).infer(context) except NoDefault: raise InferenceError(name) # .infer method ############################################################### def infer_end(self, context=None): """inference's end for node such as Module, Class, Function, Const... """ yield self nodes.Module.infer = infer_end nodes.Class.infer = infer_end nodes.Function.infer = infer_end nodes.Lambda.infer = infer_end nodes.Const.infer = infer_end nodes.List.infer = infer_end nodes.Tuple.infer = infer_end nodes.Dict.infer = infer_end def infer_name(self, context=None): """infer a Name: use name lookup rules""" frame, stmts = self.lookup(self.name) if not stmts: raise UnresolvableName(self.name) context = context.clone() context.lookupname = self.name return _infer_stmts(stmts, context, frame) nodes.Name.infer = path_wrapper(infer_name) nodes.AssName.infer_lhs = infer_name # won't work with a path wrapper def infer_callfunc(self, context=None): """infer a CallFunc node by trying to guess what the function returns""" callcontext = context.clone() callcontext.callcontext = CallContext(self.args, self.starargs, self.kwargs) callcontext.boundnode = None for callee in self.func.infer(context): if callee is YES: yield callee continue try: if hasattr(callee, 'infer_call_result'): for infered in callee.infer_call_result(self, callcontext): yield infered except InferenceError: ## XXX log error ? continue nodes.CallFunc.infer = path_wrapper(raise_if_nothing_infered(infer_callfunc)) def infer_import(self, context=None, asname=True): """infer an Import node: return the imported module/object""" name = context.lookupname if name is None: raise InferenceError() if asname: yield self.do_import_module(self.real_name(name)) else: yield self.do_import_module(name) nodes.Import.infer = path_wrapper(infer_import) def infer_name_module(self, name): context = InferenceContext() context.lookupname = name return self.infer(context, asname=False) nodes.Import.infer_name_module = infer_name_module def infer_from(self, context=None, asname=True): """infer a From nodes: return the imported module/object""" name = context.lookupname if name is None: raise InferenceError() if asname: name = self.real_name(name) module = self.do_import_module(self.modname) try: context = copy_context(context) context.lookupname = name return _infer_stmts(module.getattr(name), context) except NotFoundError: raise InferenceError(name) nodes.From.infer = path_wrapper(infer_from) def infer_getattr(self, context=None): """infer a Getattr node by using getattr on the associated object""" #context = context.clone() for owner in self.expr.infer(context): if owner is YES: yield owner continue try: context.boundnode = owner for obj in owner.igetattr(self.attrname, context): yield obj context.boundnode = None except (NotFoundError, InferenceError): context.boundnode = None except AttributeError: # XXX method / function context.boundnode = None nodes.Getattr.infer = path_wrapper(raise_if_nothing_infered(infer_getattr)) nodes.AssAttr.infer_lhs = raise_if_nothing_infered(infer_getattr) # # won't work with a path wrapper def infer_global(self, context=None): if context.lookupname is None: raise InferenceError() try: return _infer_stmts(self.root().getattr(context.lookupname), context) except NotFoundError: raise InferenceError() nodes.Global.infer = path_wrapper(infer_global) def infer_subscript(self, context=None): """infer simple subscription such as [1,2,3][0] or (1,2,3)[-1]""" if isinstance(self.slice, nodes.Index): index = self.slice.value.infer(context).next() if index is YES: yield YES return try: # suppose it's a Tuple/List node (attribute error else) assigned = self.value.getitem(index.value, context) except AttributeError: raise InferenceError() except (IndexError, TypeError): yield YES return for infered in assigned.infer(context): yield infered else: raise InferenceError() nodes.Subscript.infer = path_wrapper(infer_subscript) nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript) UNARY_OP_METHOD = {'+': '__pos__', '-': '__neg__', '~': '__invert__', 'not': None, # XXX not '__nonzero__' } def infer_unaryop(self, context=None): for operand in self.operand.infer(context): try: yield operand.infer_unary_op(self.op) except TypeError: continue except AttributeError: meth = UNARY_OP_METHOD[self.op] if meth is None: yield YES else: try: # XXX just suppose if the type implement meth, returned type # will be the same operand.getattr(meth) yield operand except GeneratorExit: raise except: yield YES nodes.UnaryOp.infer = path_wrapper(infer_unaryop) BIN_OP_METHOD = {'+': '__add__', '-': '__sub__', '/': '__div__', '//': '__floordiv__', '*': '__mul__', '**': '__power__', '%': '__mod__', '&': '__and__', '|': '__or__', '^': '__xor__', '<<': '__lshift__', '>>': '__rshift__', } def _infer_binop(operator, operand1, operand2, context, failures=None): if operand1 is YES: yield operand1 return try: for valnode in operand1.infer_binary_op(operator, operand2, context): yield valnode except AttributeError: try: # XXX just suppose if the type implement meth, returned type # will be the same operand1.getattr(BIN_OP_METHOD[operator]) yield operand1 except: if failures is None: yield YES else: failures.append(operand1) def infer_binop(self, context=None): failures = [] for lhs in self.left.infer(context): for val in _infer_binop(self.op, lhs, self.right, context, failures): yield val for lhs in failures: for rhs in self.right.infer(context): for val in _infer_binop(self.op, rhs, lhs, context): yield val nodes.BinOp.infer = path_wrapper(infer_binop) def infer_arguments(self, context=None): name = context.lookupname if name is None: raise InferenceError() return _arguments_infer_argname(self, name, context) nodes.Arguments.infer = infer_arguments def infer_ass(self, context=None): """infer a AssName/AssAttr: need to inspect the RHS part of the assign node """ stmt = self.statement() if isinstance(stmt, nodes.AugAssign): return stmt.infer(context) stmts = list(self.assigned_stmts(context=context)) return _infer_stmts(stmts, context) nodes.AssName.infer = path_wrapper(infer_ass) nodes.AssAttr.infer = path_wrapper(infer_ass) def infer_augassign(self, context=None): failures = [] for lhs in self.target.infer_lhs(context): for val in _infer_binop(self.op, lhs, self.value, context, failures): yield val for lhs in failures: for rhs in self.value.infer(context): for val in _infer_binop(self.op, rhs, lhs, context): yield val nodes.AugAssign.infer = path_wrapper(infer_augassign) # no infer method on DelName and DelAttr (expected InferenceError) def infer_empty_node(self, context=None): if not self.has_underlying_object(): yield YES else: try: for infered in MANAGER.infer_astng_from_something(self.object, context=context): yield infered except ASTNGError: yield YES nodes.EmptyNode.infer = path_wrapper(infer_empty_node) ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/COPYINGscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000004310311242100540033526 0ustar andreasandreas GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead of this License. ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/nodes.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000000676311242100540033541 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """ on all nodes : .is_statement, returning true if the node should be considered as a statement node .root(), returning the root node of the tree (i.e. a Module) .previous_sibling(), returning previous sibling statement node .next_sibling(), returning next sibling statement node .statement(), returning the first parent node marked as statement node .frame(), returning the first node defining a new local scope (i.e. Module, Function or Class) .set_local(name, node), define an identifier on the first parent frame, with the node defining it. This is used by the astng builder and should not be used from out there. on From and Import : .real_name(name), """ __docformat__ = "restructuredtext en" from logilab.astng.node_classes import Arguments, AssAttr, Assert, Assign, \ AssName, AugAssign, Backquote, BinOp, BoolOp, Break, CallFunc, Compare, \ Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete, \ Dict, Discard, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For, \ From, Getattr, Global, If, IfExp, Import, Index, Keyword, \ List, ListComp, Name, Pass, Print, Raise, Return, Slice, Subscript, \ TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, const_factory from logilab.astng.scoped_nodes import Module, GenExpr, Lambda, Function, Class ALL_NODE_CLASSES = ( Arguments, AssAttr, Assert, Assign, AssName, AugAssign, Backquote, BinOp, BoolOp, Break, CallFunc, Class, Compare, Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete, Dict, Discard, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For, From, Function, Getattr, GenExpr, Global, If, IfExp, Import, Index, Keyword, Lambda, List, ListComp, Name, Module, Pass, Print, Raise, Return, Slice, Subscript, TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, ) ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/_nodes_compiler.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000007456511242100540033546 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """python < 2.5 compiler package compatibility module [1] [1] http://docs.python.org/lib/module-compiler.ast.html """ __docformat__ = "restructuredtext en" from compiler.ast import Const, Node, Sliceobj, Function import sys # nodes which are not part of astng from compiler.ast import And as _And, Or as _Or,\ UnaryAdd as _UnaryAdd, UnarySub as _UnarySub, Not as _Not,\ Invert as _Invert, Add as _Add, Div as _Div, FloorDiv as _FloorDiv,\ Mod as _Mod, Mul as _Mul, Power as _Power, Sub as _Sub, Bitand as _Bitand,\ Bitor as _Bitor, Bitxor as _Bitxor, LeftShift as _LeftShift,\ RightShift as _RightShift from logilab.astng import nodes as new from logilab.astng.rebuilder import RebuildVisitor from logilab.common.compat import set CONST_NAME_TRANSFORMS = {'None': None, 'True': True, 'False': False} def native_repr_tree(node, indent='', _done=None): """enhanced compiler.ast tree representation""" if _done is None: _done = set() if node in _done: print ('loop in tree: %r (%s)' % (node, getattr(node, 'lineno', None))) return _done.add(node) print indent + "<%s>" % node.__class__ indent += ' ' if not hasattr(node, "__dict__"): # XXX return for field, attr in node.__dict__.items(): if attr is None or field == "_proxied": continue if type(attr) is list: if not attr: continue print indent + field + ' [' for elt in attr: if type(elt) is tuple: for val in elt: native_repr_tree(val, indent, _done) else: native_repr_tree(elt, indent, _done) print indent + ']' continue if isinstance(attr, Node): print indent + field native_repr_tree(attr, indent, _done) else: print indent + field, repr(attr) # some astng nodes unexistent in compiler ##################################### BinOp_OP_CLASSES = {_Add: '+', _Div: '/', _FloorDiv: '//', _Mod: '%', _Mul: '*', _Power: '**', _Sub: '-', _Bitand: '&', _Bitor: '|', _Bitxor: '^', _LeftShift: '<<', _RightShift: '>>' } BinOp_BIT_CLASSES = {'&': _Bitand, '|': _Bitor, '^': _Bitxor } BoolOp_OP_CLASSES = {_And: 'and', _Or: 'or' } UnaryOp_OP_CLASSES = {_UnaryAdd: '+', _UnarySub: '-', _Not: 'not', _Invert: '~' } # compiler rebuilder ########################################################## def _filter_none(node): """transform Const(None) to None""" if isinstance(node, Const) and node.value is None: return None else: return node class TreeRebuilder(RebuildVisitor): """Rebuilds the compiler tree to become an ASTNG tree""" def _init_else_node(self, node, newnode): """visit else block; replace None by empty list""" if not node.else_: return [] return [self.visit(child, newnode) for child in node.else_.nodes] def _set_infos(self, oldnode, newnode, newparent): newnode.parent = newparent if hasattr(oldnode, 'lineno'): newnode.lineno = oldnode.lineno if hasattr(oldnode, 'fromlineno'): newnode.fromlineno = oldnode.fromlineno if hasattr(oldnode, 'tolineno'): newnode.tolineno = oldnode.tolineno if hasattr(oldnode, 'blockstart_tolineno'): newnode.blockstart_tolineno = oldnode.blockstart_tolineno def _check_del_node(self, node, parent, targets): """insert a Delete node if necessary. As for assignments we have a Assign (or For or ...) node, this method is only called in delete contexts. Hence we return a Delete node""" if self.asscontext is None: self.asscontext = "Del" newnode = new.Delete() self._set_infos(node, newnode, parent) newnode.targets = [self.visit(elt, newnode) for elt in targets] self.asscontext = None return newnode else: # this will trigger the visit_ass* methods to create the right nodes return False def _nodify_args(self, parent, values): """transform arguments and tuples or lists of arguments into astng nodes""" res = [] for arg in values: if isinstance(arg, (tuple, list)): n = new.Tuple() self._set_infos(parent, n, parent) n.elts = self._nodify_args(n, arg) else: assert isinstance(arg, basestring) n = new.AssName() self._set_infos(parent, n, parent) n.name = arg self._save_assignment(n, n.name) res.append(n) return res def visit_arguments(self, node, parent): """visit an Arguments node by returning a fresh instance of it""" # /!\ incoming node is Function or Lambda, coming directly from visit_* if node.flags & 8: kwarg = node.argnames.pop() else: kwarg = None if node.flags & 4: vararg = node.argnames.pop() else: vararg = None newnode = new.Arguments(vararg, kwarg) newnode.parent = parent newnode.fromlineno = parent.fromlineno try: newnode.tolineno = parent.blockstart_tolineno except AttributeError: # lambda newnode.tolineno = parent.tolineno newnode.args = self._nodify_args(newnode, node.argnames) self._save_argument_name(newnode) newnode.defaults = [self.visit(n, newnode) for n in node.defaults] return newnode def visit_assattr(self, node, parent): """visit an AssAttr node by returning a fresh instance of it""" delnode = self._check_del_node(node, parent, [node]) if delnode: return delnode elif self.asscontext == "Del": return self.visit_delattr(node, parent) elif self.asscontext in ("Ass", "Aug"): newnode = new.AssAttr() self._set_infos(node, newnode, parent) asscontext, self.asscontext = self.asscontext, None newnode.expr = self.visit(node.expr, newnode) self.asscontext = asscontext newnode.attrname = node.attrname self._delayed_assattr.append(newnode) return newnode def visit_assname(self, node, parent): """visit an AssName node by returning a fresh instance of it""" delnode = self._check_del_node(node, parent, [node]) if delnode: return delnode elif self.asscontext == "Del": return self.visit_delname(node, parent) assert self.asscontext in ("Ass", "Aug") newnode = new.AssName() self._set_infos(node, newnode, parent) newnode.name = node.name self._save_assignment(newnode) return newnode def visit_assert(self, node, parent): """visit an Assert node by returning a fresh instance of it""" newnode = new.Assert() self._set_infos(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.fail = self.visit(node.fail, newnode) return newnode def visit_assign(self, node, parent): """visit an Assign node by returning a fresh instance of it""" newnode = new.Assign() self._set_infos(node, newnode, parent) self.asscontext = 'Ass' newnode.targets = [self.visit(child, newnode) for child in node.nodes] # /!\ Subscript can appear on both sides, # so we need 'Ass' in rhs to avoid inserting a Delete node newnode.value = self.visit(node.expr, newnode) self.asscontext = None self._set_assign_infos(newnode) return newnode def visit_asslist(self, node, parent): # FIXME : use self._check_del_node(node, [node]) more precise ? delnode = self._check_del_node(node, parent, node.nodes) if delnode: return delnode return self.visit_list(node, parent) def visit_asstuple(self, node, parent): delnode = self._check_del_node(node, parent, node.nodes) if delnode: return delnode return self.visit_tuple(node, parent) def visit_augassign(self, node, parent): """visit an AugAssign node by returning a fresh instance of it""" newnode = new.AugAssign() self._set_infos(node, newnode, parent) self.asscontext = "Aug" newnode.target = self.visit(node.node, newnode) self.asscontext = None newnode.op = node.op newnode.value = self.visit(node.expr, newnode) return newnode def visit_backquote(self, node, parent): """visit a Backquote node by returning a fresh instance of it""" newnode = new.Backquote() self._set_infos(node, newnode, parent) newnode.value = self.visit(node.expr, newnode) return newnode def visit_binop(self, node, parent): """visit a BinOp node by returning a fresh instance of it""" newnode = new.BinOp() self._set_infos(node, newnode, parent) newnode.op = BinOp_OP_CLASSES[node.__class__] if newnode.op in ('&', '|', '^'): newnode.right = self.visit(node.nodes[-1], newnode) bitop = BinOp_BIT_CLASSES[newnode.op] if len(node.nodes) > 2: # create a bitop node on the fly and visit it: # XXX can't we create directly the right node ? newnode.left = self.visit(bitop(node.nodes[:-1]), newnode) else: newnode.left = self.visit(node.nodes[0], newnode) else: newnode.left = self.visit(node.left, newnode) newnode.right = self.visit(node.right, newnode) return newnode def visit_boolop(self, node, parent): """visit a BoolOp node by returning a fresh instance of it""" newnode = new.BoolOp() self._set_infos(node, newnode, parent) newnode.values = [self.visit(child, newnode) for child in node.nodes] newnode.op = BoolOp_OP_CLASSES[node.__class__] return newnode def visit_callfunc(self, node, parent): """visit a CallFunc node by returning a fresh instance of it""" newnode = new.CallFunc() self._set_infos(node, newnode, parent) newnode.func = self.visit(node.node, newnode) newnode.args = [self.visit(child, newnode) for child in node.args] if node.star_args: newnode.starargs = self.visit(node.star_args, newnode) if node.dstar_args: newnode.kwargs = self.visit(node.dstar_args, newnode) return newnode def _visit_class(self, node, parent): """visit a Class node by returning a fresh instance of it""" newnode = new.Class(node.name, node.doc) self._set_infos(node, newnode, parent) newnode.bases = [self.visit(child, newnode) for child in node.bases] newnode.body = [self.visit(child, newnode) for child in node.code.nodes] return newnode def visit_compare(self, node, parent): """visit a Compare node by returning a fresh instance of it""" newnode = new.Compare() self._set_infos(node, newnode, parent) newnode.left = self.visit(node.expr, newnode) newnode.ops = [(op, self.visit(child, newnode)) for op, child in node.ops] return newnode def visit_comprehension(self, node, parent): """visit a Comprehension node by returning a fresh instance of it""" newnode = new.Comprehension() self._set_infos(node, newnode, parent) self.asscontext = "Ass" newnode.target = self.visit(node.assign, newnode) self.asscontext = None if hasattr(node, 'list'):# ListCompFor iters = node.list else:# GenExprFor iters = node.iter newnode.iter = self.visit(iters, newnode) if node.ifs: newnode.ifs = [self.visit(iff.test, newnode) for iff in node.ifs] else: newnode.ifs = [] return newnode def visit_decorators(self, node, parent): """visit a Decorators node by returning a fresh instance of it""" newnode = new.Decorators() self._set_infos(node, newnode, parent) newnode.nodes = [self.visit(child, newnode) for child in node.nodes] return newnode def visit_delattr(self, node, parent): """visit a DelAttr node by returning a fresh instance of it""" newnode = new.DelAttr() self._set_infos(node, newnode, parent) newnode.expr = self.visit(node.expr, newnode) newnode.attrname = node.attrname return newnode def visit_delname(self, node, parent): """visit a DelName node by returning a fresh instance of it""" newnode = new.DelName() self._set_infos(node, newnode, parent) newnode.name = node.name self._save_assignment(newnode) # ??? return newnode def visit_dict(self, node, parent): """visit a Dict node by returning a fresh instance of it""" newnode = new.Dict() self._set_infos(node, newnode, parent) newnode.items = [(self.visit(key, newnode), self.visit(value, newnode)) for (key, value) in node.items] return newnode def visit_discard(self, node, parent): """visit a Discard node by returning a fresh instance of it""" newnode = new.Discard() if sys.version_info >= (2, 4) and node.lineno is None: # ignore dummy Discard introduced when a statement # is ended by a semi-colon: remove it at the end of rebuilding # however, it does also happen in regular Discard nodes on 2.3 self._remove_nodes.append((newnode, parent)) self._set_infos(node, newnode, parent) self.asscontext = "Dis" newnode.value = self.visit(node.expr, newnode) self.asscontext = None return newnode def visit_excepthandler(self, node, parent): """visit an ExceptHandler node by returning a fresh instance of it""" newnode = new.ExceptHandler() self._set_infos(node, newnode, parent) newnode.type = self.visit(node.type, newnode) newnode.name = self.visit(node.name, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] return newnode def visit_exec(self, node, parent): """visit an Exec node by returning a fresh instance of it""" newnode = new.Exec() self._set_infos(node, newnode, parent) newnode.expr = self.visit(node.expr, newnode) newnode.globals = self.visit(node.locals, newnode) newnode.locals = self.visit(node.globals, newnode) return newnode def visit_extslice(self, node, parent): """visit an ExtSlice node by returning a fresh instance of it""" newnode = new.ExtSlice() self._set_infos(node, newnode, parent) newnode.dims = [self.visit(dim, newnode) for dim in node.subs] return newnode def visit_for(self, node, parent): """visit a For node by returning a fresh instance of it""" newnode = new.For() self._set_infos(node, newnode, parent) self.asscontext = "Ass" newnode.target = self.visit(node.assign, newnode) self.asscontext = None newnode.iter = self.visit(node.list, newnode) newnode.body = [self.visit(child, newnode) for child in node.body.nodes] newnode.orelse = self._init_else_node(node, newnode) return newnode def visit_from(self, node, parent): """visit a From node by returning a fresh instance of it""" newnode = new.From(node.modname, node.names) self._set_infos(node, newnode, parent) self._store_from_node(newnode) return newnode def _visit_function(self, node, parent): """visit a Function node by returning a fresh instance of it""" newnode = new.Function(node.name, node.doc) self._set_infos(node, newnode, parent) if hasattr(node, 'decorators'): newnode.decorators = self.visit(node.decorators, newnode) newnode.args = self.visit_arguments(node, newnode) newnode.body = [self.visit(child, newnode) for child in node.code.nodes] return newnode def visit_genexpr(self, node, parent): """visit a GenExpr node by returning a fresh instance of it""" newnode = new.GenExpr() self._set_infos(node, newnode, parent) # remove GenExprInner node newnode.elt = self.visit(node.code.expr, newnode) newnode.generators = [self.visit(n, newnode) for n in node.code.quals] return newnode def visit_getattr(self, node, parent): """visit a Getattr node by returning a fresh instance of it""" newnode = new.Getattr() self._set_infos(node, newnode, parent) if self.asscontext == "Aug": return self.visit_assattr(node, parent) newnode.expr = self.visit(node.expr, newnode) newnode.attrname = node.attrname return newnode def visit_if(self, node, parent): """visit an If node by returning a fresh instance of it""" newnode = subnode = new.If() self._set_infos(node, newnode, parent) test, body = node.tests[0] newnode.test = self.visit(test, newnode) newnode.body = [self.visit(child, newnode) for child in body.nodes] for test, body in node.tests[1:]:# this represents 'elif' # create successively If nodes and put it in orelse of the previous subparent, subnode = subnode, new.If() subnode.parent = subparent subnode.fromlineno = test.fromlineno subnode.tolineno = body.nodes[-1].tolineno subnode.blockstart_tolineno = test.tolineno subnode.test = self.visit(test, subnode) subnode.body = [self.visit(child, subnode) for child in body.nodes] subparent.orelse = [subnode] # the last subnode gets the else block: subnode.orelse = self._init_else_node(node, subnode) return newnode def visit_ifexp(self, node, parent): """visit an IfExp node by returning a fresh instance of it""" newnode = new.IfExp() self._set_infos(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.orelse = self.visit(node.orelse, newnode) return newnode def visit_import(self, node, parent): """visit an Import node by returning a fresh instance of it""" newnode = new.Import() self._set_infos(node, newnode, parent) newnode.names = node.names self._save_import_locals(newnode) return newnode def visit_index(self, node, parent): """visit an Index node by returning a fresh instance of it""" newnode = new.Index() self._set_infos(node, newnode, parent) newnode.value = self.visit(node.subs[0], newnode) return newnode def visit_keyword(self, node, parent): """visit a Keyword node by returning a fresh instance of it""" newnode = new.Keyword() self._set_infos(node, newnode, parent) newnode.value = self.visit(node.expr, newnode) newnode.arg = node.name return newnode def visit_lambda(self, node, parent): """visit a Lambda node by returning a fresh instance of it""" newnode = new.Lambda() self._set_infos(node, newnode, parent) newnode.body = self.visit(node.code, newnode) newnode.args = self.visit_arguments(node, newnode) return newnode def visit_list(self, node, parent): """visit a List node by returning a fresh instance of it""" newnode = new.List() self._set_infos(node, newnode, parent) newnode.elts = [self.visit(child, newnode) for child in node.nodes] return newnode def visit_listcomp(self, node, parent): """visit a ListComp node by returning a fresh instance of it""" newnode = new.ListComp() self._set_infos(node, newnode, parent) newnode.elt = self.visit(node.expr, newnode) newnode.generators = [self.visit(child, newnode) for child in node.quals] return newnode def visit_module(self, node, modname, package): """visit a Module node by returning a fresh instance of it""" newnode = new.Module(modname, node.doc) newnode.package = package self._set_infos(node, newnode, None) self._remove_nodes = [] # list of ';' Discard nodes to be removed newnode.body = [self.visit(child, newnode) for child in node.node.nodes] for discard, d_parent in self._remove_nodes: d_parent.child_sequence(discard).remove(discard) return newnode def visit_name(self, node, parent): """visit a Name node by returning a fresh instance of it""" if node.name in CONST_NAME_TRANSFORMS: newnode = new.Const(CONST_NAME_TRANSFORMS[node.name]) self._set_infos(node, newnode, parent) return newnode if self.asscontext == "Aug": return self.visit_assname(node, parent) newnode = new.Name() self._set_infos(node, newnode, parent) newnode.name = node.name return newnode def visit_print(self, node, parent): """visit a Print node by returning a fresh instance of it""" newnode = new.Print() self._set_infos(node, newnode, parent) newnode.dest = self.visit(node.dest, newnode) newnode.values = [self.visit(child, newnode) for child in node.nodes] newnode.nl = False return newnode def visit_printnl(self, node, parent): newnode = self.visit_print(node, parent) self._set_infos(node, newnode, parent) newnode.nl = True return newnode def visit_raise(self, node, parent): """visit a Raise node by returning a fresh instance of it""" newnode = new.Raise() self._set_infos(node, newnode, parent) newnode.type = self.visit(node.expr1, newnode) newnode.inst = self.visit(node.expr2, newnode) newnode.tback = self.visit(node.expr3, newnode) return newnode def visit_return(self, node, parent): """visit a Return node by returning a fresh instance of it""" newnode = new.Return() self._set_infos(node, newnode, parent) newnode.value = self.visit(_filter_none(node.value), newnode) return newnode def visit_slice(self, node, parent): """visit a compiler.Slice by returning a astng.Subscript""" # compiler.Slice nodes represent astng.Subscript nodes # the astng.Subscript node has a astng.Slice node as child if node.flags == 'OP_DELETE': delnode = self._check_del_node(node, parent, [node]) if delnode: return delnode newnode = new.Subscript() self._set_infos(node, newnode, parent) newnode.value = self.visit(node.expr, newnode) newnode.slice = self.visit_sliceobj(node, newnode, slice=True) return newnode def visit_sliceobj(self, node, parent, slice=False): """visit a Slice or Sliceobj; transform Sliceobj into a astng.Slice""" newnode = new.Slice() self._set_infos(node, newnode, parent) if slice: subs = [node.lower, node.upper, None] else: subs = node.nodes if len(subs) == 2: subs.append(None) newnode.lower = self.visit(_filter_none(subs[0]), newnode) newnode.upper = self.visit(_filter_none(subs[1]), newnode) newnode.step = self.visit(_filter_none(subs[2]), newnode) return newnode def visit_subscript(self, node, parent): """visit a Subscript node by returning a fresh instance of it""" if node.flags == 'OP_DELETE': delnode = self._check_del_node(node, parent, [node]) if delnode: return delnode newnode = new.Subscript() self._set_infos(node, newnode, parent) self.asscontext, asscontext = None, self.asscontext newnode.value = self.visit(node.expr, newnode) if [n for n in node.subs if isinstance(n, Sliceobj)]: if len(node.subs) == 1: # Sliceobj -> new.Slice newnode.slice = self.visit_sliceobj(node.subs[0], newnode) else: # ExtSlice newnode.slice = self.visit_extslice(node, newnode) else: # Index newnode.slice = self.visit_index(node, newnode) self.asscontext = asscontext return newnode def visit_tryexcept(self, node, parent): """visit a TryExcept node by returning a fresh instance of it""" newnode = new.TryExcept() self._set_infos(node, newnode, parent) newnode.body = [self.visit(child, newnode) for child in node.body.nodes] newnode.handlers = [self._visit_excepthandler(newnode, values) for values in node.handlers] newnode.orelse = self._init_else_node(node, newnode) return newnode def _visit_excepthandler(self, parent, values): """build an ExceptHandler node from given values and visit children""" newnode = new.ExceptHandler() newnode.parent = parent exctype, excobj, body = values if exctype and exctype.lineno: newnode.fromlineno = exctype.lineno else: newnode.fromlineno = body.nodes[0].fromlineno - 1 newnode.tolineno = body.nodes[-1].tolineno if excobj: newnode.blockstart_tolineno = excobj.tolineno elif exctype: newnode.blockstart_tolineno = exctype.tolineno else: newnode.blockstart_tolineno = newnode.fromlineno newnode.type = self.visit(exctype, newnode) self.asscontext = "Ass" newnode.name = self.visit(excobj, newnode) self.asscontext = None newnode.body = [self.visit(child, newnode) for child in body.nodes] return newnode def visit_tryfinally(self, node, parent): """visit a TryFinally node by returning a fresh instance of it""" newnode = new.TryFinally() self._set_infos(node, newnode, parent) newnode.body = [self.visit(child, newnode) for child in node.body.nodes] newnode.finalbody = [self.visit(n, newnode) for n in node.final.nodes] return newnode def visit_tuple(self, node, parent): """visit a Tuple node by returning a fresh instance of it""" newnode = new.Tuple() self._set_infos(node, newnode, parent) newnode.elts = [self.visit(child, newnode) for child in node.nodes] return newnode def visit_unaryop(self, node, parent): """visit an UnaryOp node by returning a fresh instance of it""" newnode = new.UnaryOp() self._set_infos(node, newnode, parent) newnode.operand = self.visit(node.expr, newnode) newnode.op = UnaryOp_OP_CLASSES[node.__class__] return newnode def visit_while(self, node, parent): """visit a While node by returning a fresh instance of it""" newnode = new.While() self._set_infos(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.body = [self.visit(child, newnode) for child in node.body.nodes] newnode.orelse = self._init_else_node(node, newnode) return newnode def visit_with(self, node, parent): """visit a With node by returning a fresh instance of it""" newnode = new.With() self._set_infos(node, newnode, parent) newnode.expr = self.visit(node.expr, newnode) newnode.vars = self.visit(node.vars, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] return newnode def visit_yield(self, node, parent): """visit a Yield node by returning a fresh instance of it""" discard = self._check_discard(node, parent) if discard: return discard newnode = new.Yield() self._set_infos(node, newnode, parent) newnode.value = self.visit(node.value, newnode) return newnode def _check_discard(self, node, parent): """check if we introduced already a discard node.""" # XXX we should maybe use something else then 'asscontext' here if self.asscontext is None: self.asscontext = 'Dis' newnode = new.Discard() self._set_infos(node, newnode, parent) newnode.value = self.visit(node, newnode) self.asscontext = None return newnode return False ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/_nodes_ast.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000006521011242100540033531 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """python 2.5 builtin _ast compatibility module """ __docformat__ = "restructuredtext en" # aliased nodes from _ast import AST as Node, Expr as Discard # nodes which are not part of astng from _ast import ( # binary operators Add as _Add, Div as _Div, FloorDiv as _FloorDiv, Mod as _Mod, Mult as _Mult, Pow as _Pow, Sub as _Sub, BitAnd as _BitAnd, BitOr as _BitOr, BitXor as _BitXor, LShift as _LShift, RShift as _RShift, # logical operators And as _And, Or as _Or, # unary operators UAdd as _UAdd, USub as _USub, Not as _Not, Invert as _Invert, # comparison operators Eq as _Eq, Gt as _Gt, GtE as _GtE, In as _In, Is as _Is, IsNot as _IsNot, Lt as _Lt, LtE as _LtE, NotEq as _NotEq, NotIn as _NotIn, # other nodes which are not part of astng Num as _Num, Str as _Str, Load as _Load, Store as _Store, Del as _Del, ) from logilab.astng import nodes as new _BIN_OP_CLASSES = {_Add: '+', _BitAnd: '&', _BitOr: '|', _BitXor: '^', _Div: '/', _FloorDiv: '//', _Mod: '%', _Mult: '*', _Pow: '**', _Sub: '-', _LShift: '<<', _RShift: '>>'} _BOOL_OP_CLASSES = {_And: 'and', _Or: 'or'} _UNARY_OP_CLASSES = {_UAdd: '+', _USub: '-', _Not: 'not', _Invert: '~'} _CMP_OP_CLASSES = {_Eq: '==', _Gt: '>', _GtE: '>=', _In: 'in', _Is: 'is', _IsNot: 'is not', _Lt: '<', _LtE: '<=', _NotEq: '!=', _NotIn: 'not in'} CONST_NAME_TRANSFORMS = {'None': None, 'True': True, 'False': False} def _init_set_doc(node, newnode): newnode.doc = None try: if isinstance(node.body[0], Discard) and isinstance(node.body[0].value, _Str): newnode.tolineno = node.body[0].lineno newnode.doc = node.body[0].value.s node.body = node.body[1:] except IndexError: pass # ast built from scratch def native_repr_tree(node, indent='', _done=None): if _done is None: _done = set() if node in _done: print ('loop in tree: %r (%s)' % (node, getattr(node, 'lineno', None))) return _done.add(node) print indent + str(node) if type(node) is str: # XXX crash on Globals return indent += ' ' d = node.__dict__ if hasattr(node, '_attributes'): for a in node._attributes: attr = d[a] if attr is None: continue print indent + a, repr(attr) for f in node._fields or (): attr = d[f] if attr is None: continue if type(attr) is list: if not attr: continue print indent + f + ' [' for elt in attr: native_repr_tree(elt, indent, _done) print indent + ']' continue if isinstance(attr, (_Load, _Store, _Del)): continue if isinstance(attr, Node): print indent + f native_repr_tree(attr, indent, _done) else: print indent + f, repr(attr) from logilab.astng.rebuilder import RebuildVisitor # _ast rebuilder ############################################################## def _lineno_parent(oldnode, newnode, parent): newnode.parent = parent if hasattr(oldnode, 'lineno'): newnode.lineno = oldnode.lineno class TreeRebuilder(RebuildVisitor): """Rebuilds the _ast tree to become an ASTNG tree""" def _set_infos(self, oldnode, newnode, parent): newnode.parent = parent if hasattr(oldnode, 'lineno'): newnode.lineno = oldnode.lineno last = newnode.last_child() newnode.set_line_info(last) # set_line_info accepts None def visit_arguments(self, node, parent): """visit a Arguments node by returning a fresh instance of it""" newnode = new.Arguments() _lineno_parent(node, newnode, parent) self.asscontext = "Ass" newnode.args = [self.visit(child, newnode) for child in node.args] self.asscontext = None newnode.defaults = [self.visit(child, newnode) for child in node.defaults] newnode.vararg = node.vararg newnode.kwarg = node.kwarg self._save_argument_name(newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_assattr(self, node, parent): """visit a AssAttr node by returning a fresh instance of it""" assc, self.asscontext = self.asscontext, None newnode = new.AssAttr() _lineno_parent(node, newnode, parent) newnode.expr = self.visit(node.expr, newnode) self.asscontext = assc self._delayed_assattr.append(newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_assert(self, node, parent): """visit a Assert node by returning a fresh instance of it""" newnode = new.Assert() _lineno_parent(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.fail = self.visit(node.msg, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_assign(self, node, parent): """visit a Assign node by returning a fresh instance of it""" newnode = new.Assign() _lineno_parent(node, newnode, parent) self.asscontext = "Ass" newnode.targets = [self.visit(child, newnode) for child in node.targets] self.asscontext = None newnode.value = self.visit(node.value, newnode) self._set_assign_infos(newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_augassign(self, node, parent): """visit a AugAssign node by returning a fresh instance of it""" newnode = new.AugAssign() _lineno_parent(node, newnode, parent) newnode.op = _BIN_OP_CLASSES[node.op.__class__] + "=" self.asscontext = "Ass" newnode.target = self.visit(node.target, newnode) self.asscontext = None newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_backquote(self, node, parent): """visit a Backquote node by returning a fresh instance of it""" newnode = new.Backquote() _lineno_parent(node, newnode, parent) newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_binop(self, node, parent): """visit a BinOp node by returning a fresh instance of it""" newnode = new.BinOp() _lineno_parent(node, newnode, parent) newnode.left = self.visit(node.left, newnode) newnode.right = self.visit(node.right, newnode) newnode.op = _BIN_OP_CLASSES[node.op.__class__] newnode.set_line_info(newnode.last_child()) return newnode def visit_boolop(self, node, parent): """visit a BoolOp node by returning a fresh instance of it""" newnode = new.BoolOp() _lineno_parent(node, newnode, parent) newnode.values = [self.visit(child, newnode) for child in node.values] newnode.op = _BOOL_OP_CLASSES[node.op.__class__] newnode.set_line_info(newnode.last_child()) return newnode def visit_callfunc(self, node, parent): """visit a CallFunc node by returning a fresh instance of it""" newnode = new.CallFunc() _lineno_parent(node, newnode, parent) newnode.func = self.visit(node.func, newnode) newnode.args = [self.visit(child, newnode) for child in node.args] newnode.starargs = self.visit(node.starargs, newnode) newnode.kwargs = self.visit(node.kwargs, newnode) newnode.args.extend(self.visit(child, newnode) for child in node.keywords) newnode.set_line_info(newnode.last_child()) return newnode def _visit_class(self, node, parent): """visit a Class node by returning a fresh instance of it""" newnode = new.Class(node.name, None) _lineno_parent(node, newnode, parent) _init_set_doc(node, newnode) newnode.bases = [self.visit(child, newnode) for child in node.bases] newnode.body = [self.visit(child, newnode) for child in node.body] newnode.set_line_info(newnode.last_child()) return newnode def visit_compare(self, node, parent): """visit a Compare node by returning a fresh instance of it""" newnode = new.Compare() _lineno_parent(node, newnode, parent) newnode.left = self.visit(node.left, newnode) newnode.ops = [(_CMP_OP_CLASSES[op.__class__], self.visit(expr, newnode)) for (op, expr) in zip(node.ops, node.comparators)] newnode.set_line_info(newnode.last_child()) return newnode def visit_comprehension(self, node, parent): """visit a Comprehension node by returning a fresh instance of it""" newnode = new.Comprehension() _lineno_parent(node, newnode, parent) self.asscontext = "Ass" newnode.target = self.visit(node.target, newnode) self.asscontext = None newnode.iter = self.visit(node.iter, newnode) newnode.ifs = [self.visit(child, newnode) for child in node.ifs] newnode.set_line_info(newnode.last_child()) return newnode def visit_decorators(self, node, parent): """visit a Decorators node by returning a fresh instance of it""" # /!\ node is actually a _ast.Function node while # parent is a astng.nodes.Function node newnode = new.Decorators() _lineno_parent(node, newnode, parent) if 'decorators' in node._fields: # py < 2.6, i.e. 2.5 decorators = node.decorators else: decorators= node.decorator_list newnode.nodes = [self.visit(child, newnode) for child in decorators] newnode.set_line_info(newnode.last_child()) return newnode def visit_delete(self, node, parent): """visit a Delete node by returning a fresh instance of it""" newnode = new.Delete() _lineno_parent(node, newnode, parent) self.asscontext = "Del" newnode.targets = [self.visit(child, newnode) for child in node.targets] self.asscontext = None newnode.set_line_info(newnode.last_child()) return newnode def visit_dict(self, node, parent): """visit a Dict node by returning a fresh instance of it""" newnode = new.Dict() _lineno_parent(node, newnode, parent) newnode.items = [(self.visit(key, newnode), self.visit(value, newnode)) for key, value in zip(node.keys, node.values)] newnode.set_line_info(newnode.last_child()) return newnode def visit_discard(self, node, parent): """visit a Discard node by returning a fresh instance of it""" newnode = new.Discard() _lineno_parent(node, newnode, parent) newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_excepthandler(self, node, parent): """visit an ExceptHandler node by returning a fresh instance of it""" newnode = new.ExceptHandler() _lineno_parent(node, newnode, parent) newnode.type = self.visit(node.type, newnode) self.asscontext = "Ass" newnode.name = self.visit(node.name, newnode) self.asscontext = None newnode.body = [self.visit(child, newnode) for child in node.body] newnode.set_line_info(newnode.last_child()) return newnode def visit_exec(self, node, parent): """visit an Exec node by returning a fresh instance of it""" newnode = new.Exec() _lineno_parent(node, newnode, parent) newnode.expr = self.visit(node.body, newnode) newnode.globals = self.visit(node.globals, newnode) newnode.locals = self.visit(node.locals, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_extslice(self, node, parent): """visit an ExtSlice node by returning a fresh instance of it""" newnode = new.ExtSlice() _lineno_parent(node, newnode, parent) newnode.dims = [self.visit(dim, newnode) for dim in node.dims] newnode.set_line_info(newnode.last_child()) return newnode def visit_for(self, node, parent): """visit a For node by returning a fresh instance of it""" newnode = new.For() _lineno_parent(node, newnode, parent) self.asscontext = "Ass" newnode.target = self.visit(node.target, newnode) self.asscontext = None newnode.iter = self.visit(node.iter, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.orelse = [self.visit(child, newnode) for child in node.orelse] newnode.set_line_info(newnode.last_child()) return newnode def visit_from(self, node, parent): """visit a From node by returning a fresh instance of it""" names = [(alias.name, alias.asname) for alias in node.names] newnode = new.From(node.module, names, node.level) self._set_infos(node, newnode, parent) self._store_from_node(newnode) return newnode def _visit_function(self, node, parent): """visit a Function node by returning a fresh instance of it""" newnode = new.Function(node.name, None) _lineno_parent(node, newnode, parent) _init_set_doc(node, newnode) newnode.args = self.visit(node.args, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] if 'decorators' in node._fields: # py < 2.6 attr = 'decorators' else: attr = 'decorator_list' decorators = getattr(node, attr) if decorators: newnode.decorators = self.visit_decorators(node, newnode) else: newnode.decorators = None newnode.set_line_info(newnode.last_child()) return newnode def visit_genexpr(self, node, parent): """visit a GenExpr node by returning a fresh instance of it""" newnode = new.GenExpr() _lineno_parent(node, newnode, parent) newnode.elt = self.visit(node.elt, newnode) newnode.generators = [self.visit(child, newnode) for child in node.generators] newnode.set_line_info(newnode.last_child()) return newnode def visit_getattr(self, node, parent): """visit a Getattr node by returning a fresh instance of it""" if self.asscontext == "Del": # FIXME : maybe we should reintroduce and visit_delattr ? # for instance, deactivating asscontext newnode = new.DelAttr() elif self.asscontext == "Ass": # FIXME : maybe we should call visit_assattr ? newnode = new.AssAttr() self._delayed_assattr.append(newnode) else: newnode = new.Getattr() _lineno_parent(node, newnode, parent) asscontext, self.asscontext = self.asscontext, None newnode.expr = self.visit(node.value, newnode) self.asscontext = asscontext newnode.attrname = node.attr newnode.set_line_info(newnode.last_child()) return newnode def visit_if(self, node, parent): """visit a If node by returning a fresh instance of it""" newnode = new.If() _lineno_parent(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.orelse = [self.visit(child, newnode) for child in node.orelse] newnode.set_line_info(newnode.last_child()) return newnode def visit_ifexp(self, node, parent): """visit a IfExp node by returning a fresh instance of it""" newnode = new.IfExp() _lineno_parent(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.body = self.visit(node.body, newnode) newnode.orelse = self.visit(node.orelse, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_import(self, node, parent): """visit a Import node by returning a fresh instance of it""" newnode = new.Import() self._set_infos(node, newnode, parent) newnode.names = [(alias.name, alias.asname) for alias in node.names] self._save_import_locals(newnode) return newnode def visit_index(self, node, parent): """visit a Index node by returning a fresh instance of it""" newnode = new.Index() _lineno_parent(node, newnode, parent) newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_keyword(self, node, parent): """visit a Keyword node by returning a fresh instance of it""" newnode = new.Keyword() _lineno_parent(node, newnode, parent) newnode.arg = node.arg newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_lambda(self, node, parent): """visit a Lambda node by returning a fresh instance of it""" newnode = new.Lambda() _lineno_parent(node, newnode, parent) newnode.args = self.visit(node.args, newnode) newnode.body = self.visit(node.body, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_list(self, node, parent): """visit a List node by returning a fresh instance of it""" newnode = new.List() _lineno_parent(node, newnode, parent) newnode.elts = [self.visit(child, newnode) for child in node.elts] newnode.set_line_info(newnode.last_child()) return newnode def visit_listcomp(self, node, parent): """visit a ListComp node by returning a fresh instance of it""" newnode = new.ListComp() _lineno_parent(node, newnode, parent) newnode.elt = self.visit(node.elt, newnode) newnode.generators = [self.visit(child, newnode) for child in node.generators] newnode.set_line_info(newnode.last_child()) return newnode def visit_module(self, node, modname, package): """visit a Module node by returning a fresh instance of it""" newnode = new.Module(modname, None) newnode.package = package _lineno_parent(node, newnode, parent=None) _init_set_doc(node, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.set_line_info(newnode.last_child()) return newnode def visit_name(self, node, parent): """visit a Name node by returning a fresh instance of it""" if node.id in CONST_NAME_TRANSFORMS: newnode = new.Const(CONST_NAME_TRANSFORMS[node.id]) self._set_infos(node, newnode, parent) return newnode if self.asscontext == "Del": newnode = new.DelName() elif self.asscontext is not None: # Ass assert self.asscontext == "Ass" newnode = new.AssName() else: newnode = new.Name() _lineno_parent(node, newnode, parent) newnode.name = node.id # XXX REMOVE me : if self.asscontext in ('Del', 'Ass'): # 'Aug' ?? self._save_assignment(newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_num(self, node, parent): """visit a a Num node by returning a fresh instance of Const""" newnode = new.Const(node.n) self._set_infos(node, newnode, parent) return newnode def visit_str(self, node, parent): """visit a a Str node by returning a fresh instance of Const""" newnode = new.Const(node.s) self._set_infos(node, newnode, parent) return newnode def visit_print(self, node, parent): """visit a Print node by returning a fresh instance of it""" newnode = new.Print() _lineno_parent(node, newnode, parent) newnode.nl = node.nl newnode.dest = self.visit(node.dest, newnode) newnode.values = [self.visit(child, newnode) for child in node.values] newnode.set_line_info(newnode.last_child()) return newnode def visit_raise(self, node, parent): """visit a Raise node by returning a fresh instance of it""" newnode = new.Raise() _lineno_parent(node, newnode, parent) newnode.type = self.visit(node.type, newnode) newnode.inst = self.visit(node.inst, newnode) newnode.tback = self.visit(node.tback, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_return(self, node, parent): """visit a Return node by returning a fresh instance of it""" newnode = new.Return() _lineno_parent(node, newnode, parent) newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_slice(self, node, parent): """visit a Slice node by returning a fresh instance of it""" newnode = new.Slice() _lineno_parent(node, newnode, parent) newnode.lower = self.visit(node.lower, newnode) newnode.upper = self.visit(node.upper, newnode) newnode.step = self.visit(node.step, newnode) newnode.set_line_info(newnode.last_child()) return newnode def visit_subscript(self, node, parent): """visit a Subscript node by returning a fresh instance of it""" newnode = new.Subscript() _lineno_parent(node, newnode, parent) subcontext, self.asscontext = self.asscontext, None newnode.value = self.visit(node.value, newnode) newnode.slice = self.visit(node.slice, newnode) self.asscontext = subcontext newnode.set_line_info(newnode.last_child()) return newnode def visit_tryexcept(self, node, parent): """visit a TryExcept node by returning a fresh instance of it""" newnode = new.TryExcept() _lineno_parent(node, newnode, parent) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.handlers = [self.visit(child, newnode) for child in node.handlers] newnode.orelse = [self.visit(child, newnode) for child in node.orelse] newnode.set_line_info(newnode.last_child()) return newnode def visit_tryfinally(self, node, parent): """visit a TryFinally node by returning a fresh instance of it""" newnode = new.TryFinally() _lineno_parent(node, newnode, parent) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.finalbody = [self.visit(n, newnode) for n in node.finalbody] newnode.set_line_info(newnode.last_child()) return newnode def visit_tuple(self, node, parent): """visit a Tuple node by returning a fresh instance of it""" newnode = new.Tuple() _lineno_parent(node, newnode, parent) newnode.elts = [self.visit(child, newnode) for child in node.elts] newnode.set_line_info(newnode.last_child()) return newnode def visit_unaryop(self, node, parent): """visit a UnaryOp node by returning a fresh instance of it""" newnode = new.UnaryOp() _lineno_parent(node, newnode, parent) newnode.operand = self.visit(node.operand, newnode) newnode.op = _UNARY_OP_CLASSES[node.op.__class__] newnode.set_line_info(newnode.last_child()) return newnode def visit_while(self, node, parent): """visit a While node by returning a fresh instance of it""" newnode = new.While() _lineno_parent(node, newnode, parent) newnode.test = self.visit(node.test, newnode) newnode.body = [self.visit(child, newnode) for child in node.body] newnode.orelse = [self.visit(child, newnode) for child in node.orelse] newnode.set_line_info(newnode.last_child()) return newnode def visit_with(self, node, parent): """visit a With node by returning a fresh instance of it""" newnode = new.With() _lineno_parent(node, newnode, parent) newnode.expr = self.visit(node.context_expr, newnode) self.asscontext = "Ass" newnode.vars = self.visit(node.optional_vars, newnode) self.asscontext = None newnode.body = [self.visit(child, newnode) for child in node.body] newnode.set_line_info(newnode.last_child()) return newnode def visit_yield(self, node, parent): """visit a Yield node by returning a fresh instance of it""" newnode = new.Yield() _lineno_parent(node, newnode, parent) newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/scoped_nodes.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000010041411242100540033525 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """This module contains the classes for "scoped" node, i.e. which are opening a new local scope in the language definition : Module, Class, Function (and Lambda and GenExpr to some extends). """ from __future__ import generators __doctype__ = "restructuredtext en" import __builtin__ import sys from logilab.common.compat import chain, set from logilab.common.decorators import cached from logilab.astng import MANAGER, NotFoundError, NoDefault, \ ASTNGBuildingException, InferenceError from logilab.astng.node_classes import Const, DelName, DelAttr, \ Dict, From, List, Name, Pass, Raise, Return, Tuple, Yield, \ are_exclusive, LookupMixIn, const_factory as cf, unpack_infer from logilab.astng.bases import NodeNG, BaseClass, InferenceContext, Instance,\ YES, Generator, UnboundMethod, BoundMethod, _infer_stmts, copy_context from logilab.astng.mixins import StmtMixIn, FilterStmtsMixin from logilab.astng.nodes_as_string import as_string def remove_nodes(func, cls): def wrapper(*args, **kwargs): nodes = [n for n in func(*args, **kwargs) if not isinstance(n, cls)] if not nodes: raise NotFoundError() return nodes return wrapper def function_to_method(n, klass): if isinstance(n, Function): if n.type == 'classmethod': return BoundMethod(n, klass) if n.type != 'staticmethod': return UnboundMethod(n) return n def std_special_attributes(self, name, add_locals=True): if add_locals: locals = self.locals else: locals = {} if name == '__name__': return [cf(self.name)] + locals.get(name, []) if name == '__doc__': return [cf(self.doc)] + locals.get(name, []) if name == '__dict__': return [Dict()] + locals.get(name, []) raise NotFoundError(name) def builtin_lookup(name): """lookup a name into the builtin module return the list of matching statements and the astng for the builtin module """ # TODO : once there is no more monkey patching, make a BUILTINASTNG const builtinastng = MANAGER.astng_from_module(__builtin__) if name == '__dict__': return builtinastng, () try: stmts = builtinastng.locals[name] except KeyError: stmts = () return builtinastng, stmts # TODO move this Mixin to mixins.py; problem: 'Function' in _scope_lookup class LocalsDictNodeNG(LookupMixIn, NodeNG): """ this class provides locals handling common to Module, Function and Class nodes, including a dict like interface for direct access to locals information """ # attributes below are set by the builder module or by raw factories # dictionary of locals with name as key and node defining the local as # value def qname(self): """return the 'qualified' name of the node, eg module.name, module.class.name ... """ if self.parent is None: return self.name return '%s.%s' % (self.parent.frame().qname(), self.name) def frame(self): """return the first parent frame node (i.e. Module, Function or Class) """ return self def scope(self): """return the first node defining a new scope (i.e. Module, Function, Class, Lambda but also GenExpr) """ return self def _scope_lookup(self, node, name, offset=0): """XXX method for interfacing the scope lookup""" try: stmts = node._filter_stmts(self.locals[name], self, offset) except KeyError: stmts = () if stmts: return self, stmts if self.parent: # i.e. not Module # nested scope: if parent scope is a function, that's fine # else jump to the module pscope = self.parent.scope() if not isinstance(pscope, Function): pscope = pscope.root() return pscope.scope_lookup(node, name) return builtin_lookup(name) # Module def set_local(self, name, stmt): """define in locals ( is the node defining the name) if the node is a Module node (i.e. has globals), add the name to globals if the name is already defined, ignore it """ #assert not stmt in self.locals.get(name, ()), (self, stmt) self.locals.setdefault(name, []).append(stmt) __setitem__ = set_local def _append_node(self, child): """append a child, linking it in the tree""" self.body.append(child) child.parent = self def add_local_node(self, child_node, name=None): """append a child which should alter locals to the given node""" if name != '__class__': # add __class__ node as a child will cause infinite recursion later! self._append_node(child_node) self.set_local(name or child_node.name, child_node) def __getitem__(self, item): """method from the `dict` interface returning the first node associated with the given name in the locals dictionary :type item: str :param item: the name of the locally defined object :raises KeyError: if the name is not defined """ return self.locals[item][0] def __iter__(self): """method from the `dict` interface returning an iterator on `self.keys()` """ return iter(self.keys()) def keys(self): """method from the `dict` interface returning a tuple containing locally defined names """ return self.locals.keys() def values(self): """method from the `dict` interface returning a tuple containing locally defined nodes which are instance of `Function` or `Class` """ return [self[key] for key in self.keys()] def items(self): """method from the `dict` interface returning a list of tuple containing each locally defined name with its associated node, which is an instance of `Function` or `Class` """ return zip(self.keys(), self.values()) def has_key(self, name): """method from the `dict` interface returning True if the given name is defined in the locals dictionary """ return self.locals.has_key(name) __contains__ = has_key # Module ##################################################################### class Module(LocalsDictNodeNG): _astng_fields = ('body',) fromlineno = 0 lineno = 0 # attributes below are set by the builder module or by raw factories # the file from which as been extracted the astng representation. It may # be None if the representation has been built from a built-in module file = None # the module name name = None # boolean for astng built from source (i.e. ast) pure_python = None # boolean for package module package = None # dictionary of globals with name as key and node defining the global # as value globals = None # names of python special attributes (handled by getattr impl.) special_attributes = set(('__name__', '__doc__', '__file__', '__path__', '__dict__')) # names of module attributes available through the global scope scope_attrs = set(('__name__', '__doc__', '__file__', '__path__')) def __init__(self, name, doc, pure_python=True): self.name = name self.doc = doc self.pure_python = pure_python self.locals = self.globals = {} self.body = [] # Module is not a Statement node but needs the replace method (see StmtMixIn) def replace(self, child, newchild): sequence = self.child_sequence(child) newchild.parent = self child.parent = None sequence[sequence.index(child)] = newchild def block_range(self, lineno): """return block line numbers. start from the beginning whatever the given lineno """ return self.fromlineno, self.tolineno def scope_lookup(self, node, name, offset=0): if name in self.scope_attrs and not name in self.locals: try: return self, self.getattr(name) except NotFoundError: return self, () return self._scope_lookup(node, name, offset) def pytype(self): return '__builtin__.module' def display_type(self): return 'Module' def getattr(self, name, context=None): if not name in self.special_attributes: try: return self.locals[name] except KeyError: pass else: if name == '__file__': return [cf(self.file)] + self.locals.get(name, []) if name == '__path__': if self.package: return [List()] + self.locals.get(name, []) return std_special_attributes(self, name) if self.package: try: return [self.import_module(name, relative_only=True)] except (KeyboardInterrupt, SystemExit): raise except: pass raise NotFoundError(name) getattr = remove_nodes(getattr, DelName) def igetattr(self, name, context=None): """inferred getattr""" # set lookup name since this is necessary to infer on import nodes for # instance context = copy_context(context) context.lookupname = name try: return _infer_stmts(self.getattr(name, context), context, frame=self) except NotFoundError: raise InferenceError(name) def fully_defined(self): """return True if this module has been built from a .py file and so contains a complete representation including the code """ return self.file is not None and self.file.endswith('.py') def statement(self): """return the first parent node marked as statement node consider a module as a statement... """ return self def previous_sibling(self): """module has no sibling""" return def next_sibling(self): """module has no sibling""" return def absolute_import_activated(self): for stmt in self.locals.get('absolute_import', ()): if isinstance(stmt, From) and stmt.modname == '__future__': return True return False def import_module(self, modname, relative_only=False, level=None): """import the given module considering self as context""" try: absmodname = self.absolute_modname(modname, level) return MANAGER.astng_from_module_name(absmodname) except ASTNGBuildingException: # we only want to import a sub module or package of this module, # skip here if relative_only: raise module = MANAGER.astng_from_module_name(modname) return module def absolute_modname(self, modname, level): if self.absolute_import_activated() and not level: return modname if level: parts = self.name.split('.') if self.package: parts.append('__init__') package_name = '.'.join(parts[:-level]) elif self.package: package_name = self.name else: package_name = '.'.join(self.name.split('.')[:-1]) if package_name: return '%s.%s' % (package_name, modname) return modname def wildcard_import_names(self): """return the list of imported names when this module is 'wildcard imported' It doesn't include the '__builtins__' name which is added by the current CPython implementation of wildcard imports. """ # take advantage of a living module if it exists try: living = sys.modules[self.name] except KeyError: pass else: try: return living.__all__ except AttributeError: return [name for name in living.__dict__.keys() if not name.startswith('_')] # else lookup the astng # # We separate the different steps of lookup in try/excepts # to avoid catching too many Exceptions # However, we can not analyse dynamically constructed __all__ try: all = self['__all__'] except KeyError: return [name for name in self.keys() if not name.startswith('_')] try: explicit = all.assigned_stmts().next() except InferenceError: return [name for name in self.keys() if not name.startswith('_')] except AttributeError: # not an assignment node # XXX infer? return [name for name in self.keys() if not name.startswith('_')] try: # should be a Tuple/List of constant string / 1 string not allowed return [const.value for const in explicit.elts] except AttributeError: return [name for name in self.keys() if not name.startswith('_')] class GenExpr(LocalsDictNodeNG): _astng_fields = ('elt', 'generators') def __init__(self): self.locals = {} self.elt = None self.generators = [] def frame(self): return self.parent.frame() GenExpr.scope_lookup = LocalsDictNodeNG._scope_lookup # Function ################################################################### class Lambda(LocalsDictNodeNG, FilterStmtsMixin): _astng_fields = ('args', 'body',) # function's type, 'function' | 'method' | 'staticmethod' | 'classmethod' type = 'function' def __init__(self): self.locals = {} self.args = [] self.body = [] def pytype(self): if 'method' in self.type: return '__builtin__.instancemethod' return '__builtin__.function' def display_type(self): if 'method' in self.type: return 'Method' return 'Function' def callable(self): return True def argnames(self): """return a list of argument names""" if self.args.args: # maybe None with builtin functions names = _rec_get_names(self.args.args) else: names = [] if self.args.vararg: names.append(self.args.vararg) if self.args.kwarg: names.append(self.args.kwarg) return names def infer_call_result(self, caller, context=None): """infer what a function is returning when called""" return self.body.infer(context) def scope_lookup(self, node, name, offset=0): if node in self.args.defaults: frame = self.parent.frame() # line offset to avoid that def func(f=func) resolve the default # value to the defined function offset = -1 else: # check this is not used in function decorators frame = self return frame._scope_lookup(node, name, offset) class Function(StmtMixIn, Lambda): _astng_fields = ('decorators', 'args', 'body') special_attributes = set(('__name__', '__doc__', '__dict__')) # attributes below are set by the builder module or by raw factories blockstart_tolineno = None def __init__(self, name, doc): self.locals = {} self.args = [] self.body = [] self.decorators = None self.name = name self.doc = doc def set_line_info(self, lastchild): self.fromlineno = self.lineno # lineno is the line number of the first decorator, we want the def statement lineno if self.decorators is not None: self.fromlineno += len(self.decorators.nodes) self.tolineno = lastchild.tolineno self.blockstart_tolineno = self.args.tolineno def block_range(self, lineno): """return block line numbers. start from the "def" position whatever the given lineno """ return self.fromlineno, self.tolineno def getattr(self, name, context=None): """this method doesn't look in the instance_attrs dictionary since it's done by an Instance proxy at inference time. """ if name == '__module__': return [cf(self.root().qname())] return std_special_attributes(self, name, False) def is_method(self): """return true if the function node should be considered as a method""" # check we are defined in a Class, because this is usually expected # (e.g. pylint...) when is_method() return True return self.type != 'function' and isinstance(self.parent.frame(), Class) def decoratornames(self): """return a list of decorator qualified names""" result = set() decoratornodes = [] if self.decorators is not None: decoratornodes += self.decorators.nodes decoratornodes += getattr(self, 'extra_decorators', []) for decnode in decoratornodes: for infnode in decnode.infer(): result.add(infnode.qname()) return result decoratornames = cached(decoratornames) def is_bound(self): """return true if the function is bound to an Instance or a class""" return self.type == 'classmethod' def is_abstract(self, pass_is_abstract=True): """return true if the method is abstract It's considered as abstract if the only statement is a raise of NotImplementError, or, if pass_is_abstract, a pass statement """ for child_node in self.body: if isinstance(child_node, Raise) and child_node.type: try: name = child_node.type.nodes_of_class(Name).next() if name.name == 'NotImplementedError': return True except StopIteration: pass if pass_is_abstract and isinstance(child_node, Pass): return True return False # empty function is the same as function with a single "pass" statement if pass_is_abstract: return True def is_generator(self): """return true if this is a generator function""" # XXX should be flagged, not computed try: return self.nodes_of_class(Yield, skip_klass=Function).next() except StopIteration: return False def infer_call_result(self, caller, context=None): """infer what a function is returning when called""" if self.is_generator(): yield Generator(self) return returns = self.nodes_of_class(Return, skip_klass=Function) for returnnode in returns: if returnnode.value is None: yield None else: try: for infered in returnnode.value.infer(context): yield infered except InferenceError: yield YES def _rec_get_names(args, names=None): """return a list of all argument names""" if names is None: names = [] for arg in args: if isinstance(arg, Tuple): _rec_get_names(arg.elts, names) else: names.append(arg.name) return names def _format_args(args, defaults=None): values = [] if args is None: return '' if defaults is not None: default_offset = len(args) - len(defaults) for i, arg in enumerate(args): if isinstance(arg, Tuple): values.append('(%s)' % _format_args(arg.elts)) else: values.append(arg.name) if defaults is not None and i >= default_offset: values[-1] += '=' + defaults[i-default_offset].as_string() return ', '.join(values) # Class ###################################################################### def _class_type(klass): """return a Class node type to differ metaclass, interface and exception from 'regular' classes """ if klass._type is not None: return klass._type if klass.name == 'type': klass._type = 'metaclass' elif klass.name.endswith('Interface'): klass._type = 'interface' elif klass.name.endswith('Exception'): klass._type = 'exception' else: for base in klass.ancestors(recurs=False): if base.type != 'class': klass._type = base.type break if klass._type is None: klass._type = 'class' return klass._type def _iface_hdlr(iface_node): """a handler function used by interfaces to handle suspicious interface nodes """ return True class Class(StmtMixIn, LocalsDictNodeNG, FilterStmtsMixin): # some of the attributes below are set by the builder module or # by a raw factories # a dictionary of class instances attributes _astng_fields = ('bases', 'body',) # name instance_attrs = None special_attributes = set(('__name__', '__doc__', '__dict__', '__module__', '__bases__', '__mro__', '__subclasses__')) blockstart_tolineno = None _type = None type = property(_class_type, doc="class'type, possible values are 'class' | " "'metaclass' | 'interface' | 'exception'") def __init__(self, name, doc): self.instance_attrs = {} self.locals = {} self.bases = [] self.body = [] self.name = name self.doc = doc def _newstyle_impl(self, context=None): if context is None: context = InferenceContext() if self._newstyle is not None: return self._newstyle for base in self.ancestors(recurs=False, context=context): if base._newstyle_impl(context): self._newstyle = True break if self._newstyle is None: self._newstyle = False return self._newstyle _newstyle = None newstyle = property(_newstyle_impl, doc="boolean indicating if it's a new style class" "or not") def set_line_info(self, lastchild): self.fromlineno = self.lineno self.blockstart_tolineno = self.bases and self.bases[-1].tolineno or self.fromlineno if lastchild is not None: self.tolineno = lastchild.tolineno # else this is a class with only a docstring, then tolineno is (should be) already ok def block_range(self, lineno): """return block line numbers. start from the "class" position whatever the given lineno """ return self.fromlineno, self.tolineno def pytype(self): if self.newstyle: return '__builtin__.type' return '__builtin__.classobj' def display_type(self): return 'Class' def callable(self): return True def infer_call_result(self, caller, context=None): """infer what a class is returning when called""" yield Instance(self) def scope_lookup(self, node, name, offset=0): if node in self.bases: frame = self.parent.frame() # line offset to avoid that class A(A) resolve the ancestor to # the defined class offset = -1 else: frame = self return frame._scope_lookup(node, name, offset) # list of parent class as a list of string (i.e. names as they appear # in the class definition) XXX bw compat def basenames(self): return [as_string(bnode) for bnode in self.bases] basenames = property(basenames) def ancestors(self, recurs=True, context=None): """return an iterator on the node base classes in a prefixed depth first order :param recurs: boolean indicating if it should recurse or return direct ancestors only """ # FIXME: should be possible to choose the resolution order # XXX inference make infinite loops possible here (see BaseTransformer # manipulation in the builder module for instance !) if context is None: context = InferenceContext() for stmt in self.bases: try: for baseobj in stmt.infer(context): if not isinstance(baseobj, Class): # duh ? continue if baseobj is self: continue # cf xxx above yield baseobj if recurs: for grandpa in baseobj.ancestors(True, context): if grandpa is self: continue # cf xxx above yield grandpa except InferenceError: # XXX log error ? continue def local_attr_ancestors(self, name, context=None): """return an iterator on astng representation of parent classes which have defined in their locals """ for astng in self.ancestors(context=context): if astng.locals.has_key(name): yield astng def instance_attr_ancestors(self, name, context=None): """return an iterator on astng representation of parent classes which have defined in their instance attribute dictionary """ for astng in self.ancestors(context=context): if astng.instance_attrs.has_key(name): yield astng def has_base(self, node): return node in self.bases def local_attr(self, name, context=None): """return the list of assign node associated to name in this class locals or in its parents :raises `NotFoundError`: if no attribute with this name has been find in this class or its parent classes """ try: return self.locals[name] except KeyError: # get if from the first parent implementing it if any for class_node in self.local_attr_ancestors(name, context): return class_node.locals[name] raise NotFoundError(name) local_attr = remove_nodes(local_attr, DelAttr) def instance_attr(self, name, context=None): """return the astng nodes associated to name in this class instance attributes dictionary and in its parents :raises `NotFoundError`: if no attribute with this name has been find in this class or its parent classes """ values = self.instance_attrs.get(name, []) # get if from the first parent implementing it if any for class_node in self.instance_attr_ancestors(name, context): values += class_node.instance_attrs[name] if not values: raise NotFoundError(name) return values instance_attr = remove_nodes(instance_attr, DelAttr) def instanciate_class(self): """return Instance of Class node, else return self""" return Instance(self) def getattr(self, name, context=None): """this method doesn't look in the instance_attrs dictionary since it's done by an Instance proxy at inference time. It may return a YES object if the attribute has not been actually found but a __getattr__ or __getattribute__ method is defined """ values = self.locals.get(name, []) if name in self.special_attributes: if name == '__module__': return [cf(self.root().qname())] + values if name == '__bases__': return [cf(tuple(self.ancestors(recurs=False, context=context)))] + values # XXX need proper meta class handling + MRO implementation if name == '__mro__' and self.newstyle: # XXX mro is read-only but that's not our job to detect that return [cf(tuple(self.ancestors(recurs=True, context=context)))] + values return std_special_attributes(self, name) # don't modify the list in self.locals! values = list(values) for classnode in self.ancestors(recurs=False, context=context): try: values += classnode.getattr(name, context) except NotFoundError: continue if not values: raise NotFoundError(name) return values def igetattr(self, name, context=None): """inferred getattr, need special treatment in class to handle descriptors """ # set lookup name since this is necessary to infer on import nodes for # instance context = copy_context(context) context.lookupname = name try: for infered in _infer_stmts(self.getattr(name, context), context, frame=self): # yield YES object instead of descriptors when necessary if not isinstance(infered, Const) and isinstance(infered, Instance): try: infered._proxied.getattr('__get__', context) except NotFoundError: yield infered else: yield YES else: yield function_to_method(infered, self) except NotFoundError: if not name.startswith('__') and self.has_dynamic_getattr(context): # class handle some dynamic attributes, return a YES object yield YES else: raise InferenceError(name) def has_dynamic_getattr(self, context=None): """return True if the class has a custom __getattr__ or __getattribute__ method """ # need to explicitly handle optparse.Values (setattr is not detected) if self.name == 'Values' and self.root().name == 'optparse': return True try: self.getattr('__getattr__', context) return True except NotFoundError: #if self.newstyle: XXX cause an infinite recursion error try: getattribute = self.getattr('__getattribute__', context)[0] if getattribute.root().name != '__builtin__': # class has a custom __getattribute__ defined return True except NotFoundError: pass return False def methods(self): """return an iterator on all methods defined in the class and its ancestors """ done = {} # from itertools import chain for astng in chain(iter((self,)), self.ancestors()): for meth in astng.mymethods(): if done.has_key(meth.name): continue done[meth.name] = None yield meth def mymethods(self): """return an iterator on all methods defined in the class""" for member in self.values(): if isinstance(member, Function): yield member def interfaces(self, herited=True, handler_func=_iface_hdlr): """return an iterator on interfaces implemented by the given class node """ # FIXME: what if __implements__ = (MyIFace, MyParent.__implements__)... try: implements = Instance(self).getattr('__implements__')[0] except NotFoundError: return if not herited and not implements.frame() is self: return found = set() missing = False for iface in unpack_infer(implements): if iface is YES: missing = True continue if not iface in found and handler_func(iface): found.add(iface) yield iface if missing: raise InferenceError() ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/utils.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000002651511242100540033536 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """this module contains some utilities to navigate in the tree or to extract information from it """ __docformat__ = "restructuredtext en" from logilab.astng._exceptions import IgnoreChild, ASTNGBuildingException from logilab.common.compat import set class ASTVisitor(object): """Abstract Base Class for Python AST Visitors. Visitors inheriting from ASTVisitors could visit compiler.ast, _ast or astng trees. Not all methods will have to be implemented; so some methods are just empty interfaces for catching cases where we don't want to do anything on the concerned node. """ def visit_arguments(self, node): """dummy method for visiting an Arguments node""" def visit_assattr(self, node): """dummy method for visiting an AssAttr node""" def visit_assert(self, node): """dummy method for visiting an Assert node""" def visit_assign(self, node): """dummy method for visiting an Assign node""" def visit_assname(self, node): """dummy method for visiting an AssName node""" def visit_augassign(self, node): """dummy method for visiting an AugAssign node""" def visit_backquote(self, node): """dummy method for visiting an Backquote node""" def visit_binop(self, node): """dummy method for visiting an BinOp node""" def visit_boolop(self, node): """dummy method for visiting an BoolOp node""" def visit_break(self, node): """dummy method for visiting an Break node""" def visit_callfunc(self, node): """dummy method for visiting an CallFunc node""" def visit_class(self, node): """dummy method for visiting an Class node""" def visit_compare(self, node): """dummy method for visiting an Compare node""" def visit_comprehension(self, node): """dummy method for visiting an Comprehension node""" def visit_const(self, node): """dummy method for visiting an Const node""" def visit_continue(self, node): """dummy method for visiting an Continue node""" def visit_decorators(self, node): """dummy method for visiting an Decorators node""" def visit_delattr(self, node): """dummy method for visiting an DelAttr node""" def visit_delete(self, node): """dummy method for visiting an Delete node""" def visit_delname(self, node): """dummy method for visiting an DelName node""" def visit_dict(self, node): """dummy method for visiting an Dict node""" def visit_discard(self, node): """dummy method for visiting an Discard node""" def visit_emptynode(self, node): """dummy method for visiting an EmptyNode node""" def visit_excepthandler(self, node): """dummy method for visiting an ExceptHandler node""" def visit_ellipsis(self, node): """dummy method for visiting an Ellipsis node""" def visit_empty(self, node): """dummy method for visiting an Empty node""" def visit_exec(self, node): """dummy method for visiting an Exec node""" def visit_extslice(self, node): """dummy method for visiting an ExtSlice node""" def visit_for(self, node): """dummy method for visiting an For node""" def visit_from(self, node): """dummy method for visiting an From node""" def visit_function(self, node): """dummy method for visiting an Function node""" def visit_genexpr(self, node): """dummy method for visiting an ListComp node""" def visit_getattr(self, node): """dummy method for visiting an Getattr node""" def visit_global(self, node): """dummy method for visiting an Global node""" def visit_if(self, node): """dummy method for visiting an If node""" def visit_ifexp(self, node): """dummy method for visiting an IfExp node""" def visit_import(self, node): """dummy method for visiting an Import node""" def visit_index(self, node): """dummy method for visiting an Index node""" def visit_keyword(self, node): """dummy method for visiting an Keyword node""" def visit_lambda(self, node): """dummy method for visiting an Lambda node""" def visit_list(self, node): """dummy method for visiting an List node""" def visit_listcomp(self, node): """dummy method for visiting an ListComp node""" def visit_module(self, node): """dummy method for visiting an Module node""" def visit_name(self, node): """dummy method for visiting an Name node""" def visit_pass(self, node): """dummy method for visiting an Pass node""" def visit_print(self, node): """dummy method for visiting an Print node""" def visit_raise(self, node): """dummy method for visiting an Raise node""" def visit_return(self, node): """dummy method for visiting an Return node""" def visit_slice(self, node): """dummy method for visiting an Slice node""" def visit_subscript(self, node): """dummy method for visiting an Subscript node""" def visit_tryexcept(self, node): """dummy method for visiting an TryExcept node""" def visit_tryfinally(self, node): """dummy method for visiting an TryFinally node""" def visit_tuple(self, node): """dummy method for visiting an Tuple node""" def visit_unaryop(self, node): """dummy method for visiting an UnaryOp node""" def visit_while(self, node): """dummy method for visiting an While node""" def visit_with(self, node): """dummy method for visiting an With node""" def visit_yield(self, node): """dummy method for visiting an Yield node""" class ASTWalker: """a walker visiting a tree in preorder, calling on the handler: * visit_ on entering a node, where class name is the class of the node in lower case * leave_ on leaving a node, where class name is the class of the node in lower case """ def __init__(self, handler): self.handler = handler self._cache = {} def walk(self, node, _done=None): """walk on the tree from , getting callbacks from handler""" if _done is None: _done = set() if node in _done: raise AssertionError((id(node), node, node.parent)) _done.add(node) try: self.visit(node) except IgnoreChild: pass else: try: for child_node in node.get_children(): self.handler.set_context(node, child_node) assert child_node is not node self.walk(child_node, _done) except AttributeError: print node.__class__, id(node.__class__) raise self.leave(node) assert node.parent is not node def get_callbacks(self, node): """get callbacks from handler for the visited node""" klass = node.__class__ methods = self._cache.get(klass) if methods is None: handler = self.handler kid = klass.__name__.lower() e_method = getattr(handler, 'visit_%s' % kid, getattr(handler, 'visit_default', None)) l_method = getattr(handler, 'leave_%s' % kid, getattr(handler, 'leave_default', None)) self._cache[klass] = (e_method, l_method) else: e_method, l_method = methods return e_method, l_method def visit(self, node): """walk on the tree from , getting callbacks from handler""" method = self.get_callbacks(node)[0] if method is not None: method(node) def leave(self, node): """walk on the tree from , getting callbacks from handler""" method = self.get_callbacks(node)[1] if method is not None: method(node) class LocalsVisitor(ASTWalker): """visit a project by traversing the locals dictionary""" def __init__(self): ASTWalker.__init__(self, self) self._visited = {} def visit(self, node): """launch the visit starting from the given node""" if self._visited.has_key(node): return self._visited[node] = 1 # FIXME: use set ? methods = self.get_callbacks(node) recurse = 1 if methods[0] is not None: try: methods[0](node) except IgnoreChild: recurse = 0 if recurse: if 'locals' in node.__dict__: # skip Instance and other proxy for name, local_node in node.items(): self.visit(local_node) if methods[1] is not None: return methods[1](node) def _check_children(node): """a helper function to check children - parent relations""" for child in node.get_children(): ok = False if child is None: print "Hm, child of %s is None" % node continue if not hasattr(child, 'parent'): print " ERROR: %s has child %s %x with no parent" % (node, child, id(child)) elif not child.parent: print " ERROR: %s has child %s %x with parent %r" % (node, child, id(child), child.parent) elif child.parent is not node: print " ERROR: %s %x has child %s %x with wrong parent %s" % (node, id(node), child, id(child), child.parent) else: ok = True if not ok: print "lines;", node.lineno, child.lineno print "of module", node.root(), node.root().name raise ASTNGBuildingException _check_children(child) __all__ = ('LocalsVisitor', 'ASTWalker', 'ASTVisitor',) ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/inspector.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000002402411242100540033527 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """visitor doing some postprocessing on the astng tree. Try to resolve definitions (namespace) dictionary, relationship... This module has been imported from pyreverse """ __docformat__ = "restructuredtext en" from os.path import dirname from logilab.common.modutils import get_module_part, is_relative, \ is_standard_module from logilab import astng from logilab.astng import InferenceError from logilab.astng.utils import LocalsVisitor class IdGeneratorMixIn: """ Mixin adding the ability to generate integer uid """ def __init__(self, start_value=0): self.id_count = start_value def init_counter(self, start_value=0): """init the id counter """ self.id_count = start_value def generate_id(self): """generate a new identifier """ self.id_count += 1 return self.id_count class Linker(IdGeneratorMixIn, LocalsVisitor): """ walk on the project tree and resolve relationships. According to options the following attributes may be added to visited nodes: * uid, a unique identifier for the node (on astng.Project, astng.Module, astng.Class and astng.locals_type). Only if the linker has been instantiated with tag=True parameter (False by default). * Function a mapping from locals names to their bounded value, which may be a constant like a string or an integer, or an astng node (on astng.Module, astng.Class and astng.Function). * instance_attrs_type as locals_type but for klass member attributes (only on astng.Class) * implements, list of implemented interface _objects_ (only on astng.Class nodes) """ def __init__(self, project, inherited_interfaces=0, tag=False): IdGeneratorMixIn.__init__(self) LocalsVisitor.__init__(self) # take inherited interface in consideration or not self.inherited_interfaces = inherited_interfaces # tag nodes or not self.tag = tag # visited project self.project = project def visit_project(self, node): """visit an astng.Project node * optionally tag the node with a unique id """ if self.tag: node.uid = self.generate_id() for module in node.modules: self.visit(module) def visit_package(self, node): """visit an astng.Package node * optionally tag the node with a unique id """ if self.tag: node.uid = self.generate_id() for subelmt in node.values(): self.visit(subelmt) def visit_module(self, node): """visit an astng.Module node * set the locals_type mapping * set the depends mapping * optionally tag the node with a unique id """ if hasattr(node, 'locals_type'): return node.locals_type = {} node.depends = [] if self.tag: node.uid = self.generate_id() def visit_class(self, node): """visit an astng.Class node * set the locals_type and instance_attrs_type mappings * set the implements list and build it * optionally tag the node with a unique id """ if hasattr(node, 'locals_type'): return node.locals_type = {} if self.tag: node.uid = self.generate_id() # resolve ancestors for baseobj in node.ancestors(recurs=False): specializations = getattr(baseobj, 'specializations', []) specializations.append(node) baseobj.specializations = specializations # resolve instance attributes node.instance_attrs_type = {} for assattrs in node.instance_attrs.values(): for assattr in assattrs: self.handle_assattr_type(assattr, node) # resolve implemented interface try: node.implements = list(node.interfaces(self.inherited_interfaces)) except InferenceError: node.implements = () def visit_function(self, node): """visit an astng.Function node * set the locals_type mapping * optionally tag the node with a unique id """ if hasattr(node, 'locals_type'): return node.locals_type = {} if self.tag: node.uid = self.generate_id() link_project = visit_project link_module = visit_module link_class = visit_class link_function = visit_function def visit_assname(self, node): """visit an astng.AssName node handle locals_type """ # avoid double parsing done by different Linkers.visit # running over the same project: if hasattr(node, '_handled'): return node._handled = True if node.name in node.frame().keys(): frame = node.frame() else: # the name has been defined as 'global' in the frame and belongs # there. Btw the frame is not yet visited as the name is in the # root locals; the frame hence has no locals_type attribute frame = node.root() try: values = list(node.infer()) try: already_infered = frame.locals_type[node.name] for valnode in values: if not valnode in already_infered: already_infered.append(valnode) except KeyError: frame.locals_type[node.name] = values except astng.InferenceError: pass def handle_assattr_type(self, node, parent): """handle an astng.AssAttr node handle instance_attrs_type """ try: values = list(node.infer()) try: already_infered = parent.instance_attrs_type[node.attrname] for valnode in values: if not valnode in already_infered: already_infered.append(valnode) except KeyError: parent.instance_attrs_type[node.attrname] = values except astng.InferenceError: pass def visit_import(self, node): """visit an astng.Import node resolve module dependencies """ context_file = node.root().file for name in node.names: relative = is_relative(name[0], context_file) self._imported_module(node, name[0], relative) def visit_from(self, node): """visit an astng.From node resolve module dependencies """ basename = node.modname context_file = node.root().file if context_file is not None: relative = is_relative(basename, context_file) else: relative = False for name in node.names: if name[0] == '*': continue # analyze dependencies fullname = '%s.%s' % (basename, name[0]) if fullname.find('.') > -1: try: # XXX: don't use get_module_part, missing package precedence fullname = get_module_part(fullname) except ImportError: continue if fullname != basename: self._imported_module(node, fullname, relative) def compute_module(self, context_name, mod_path): """return true if the module should be added to dependencies""" package_dir = dirname(self.project.path) if context_name == mod_path: return 0 elif is_standard_module(mod_path, (package_dir,)): return 1 return 0 # protected methods ######################################################## def _imported_module(self, node, mod_path, relative): """notify an imported module, used to analyze dependencies """ module = node.root() context_name = module.name if relative: mod_path = '%s.%s' % ('.'.join(context_name.split('.')[:-1]), mod_path) if self.compute_module(context_name, mod_path): # handle dependencies if not hasattr(module, 'depends'): module.depends = [] mod_paths = module.depends if not mod_path in mod_paths: mod_paths.append(mod_path) ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/COPYING.LESSERscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000006363711242100540033544 0ustar andreasandreas GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/node_classes.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000006106011242100540033530 0ustar andreasandreas# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """Module for some node classes. More nodes in scoped_nodes.py """ #from itertools import chain, imap from logilab.common.compat import chain, imap from logilab.astng import NoDefault from logilab.astng.bases import NodeNG, BaseClass, Instance, copy_context, \ _infer_stmts, YES from logilab.astng.mixins import StmtMixIn, BlockRangeMixIn, AssignTypeMixin, \ ParentAssignTypeMixin, FromImportMixIn def unpack_infer(stmt, context=None): """return an iterator on nodes inferred by the given statement if the inferred value is a list or a tuple, recurse on it to get values inferred by its content """ if isinstance(stmt, (List, Tuple)): # XXX loosing context return chain(*imap(unpack_infer, stmt.elts)) infered = stmt.infer(context).next() if infered is stmt: return iter( (stmt,) ) return chain(*imap(unpack_infer, stmt.infer(context))) def are_exclusive(stmt1, stmt2, exceptions=None): """return true if the two given statements are mutually exclusive `exceptions` may be a list of exception names. If specified, discard If branches and check one of the statement is in an exception handler catching one of the given exceptions. algorithm : 1) index stmt1's parents 2) climb among stmt2's parents until we find a common parent 3) if the common parent is a If or TryExcept statement, look if nodes are in exclusive branches """ # index stmt1's parents stmt1_parents = {} children = {} node = stmt1.parent previous = stmt1 while node: stmt1_parents[node] = 1 children[node] = previous previous = node node = node.parent # climb among stmt2's parents until we find a common parent node = stmt2.parent previous = stmt2 while node: if stmt1_parents.has_key(node): # if the common parent is a If or TryExcept statement, look if # nodes are in exclusive branches if isinstance(node, If) and exceptions is None: if (node.locate_child(previous)[1] is not node.locate_child(children[node])[1]): return True elif isinstance(node, TryExcept): c2attr, c2node = node.locate_child(previous) c1attr, c1node = node.locate_child(children[node]) if c1node is not c2node: if ((c2attr == 'body' and c1attr == 'handlers' and children[node].catch(exceptions)) or (c2attr == 'handlers' and c1attr == 'body' and previous.catch(exceptions)) or (c2attr == 'handlers' and c1attr == 'orelse') or (c2attr == 'orelse' and c1attr == 'handlers')): return True elif c2attr == 'handlers' and c1attr == 'handlers': return previous is not children[node] return False previous = node node = node.parent return False class LookupMixIn(BaseClass): """Mixin looking up a name in the right scope """ def lookup(self, name): """lookup a variable name return the scope node and the list of assignments associated to the given name according to the scope where it has been found (locals, globals or builtin) The lookup is starting from self's scope. If self is not a frame itself and the name is found in the inner frame locals, statements will be filtered to remove ignorable statements according to self's location """ return self.scope().scope_lookup(self, name) def ilookup(self, name, context=None): """infered lookup return an iterator on infered values of the statements returned by the lookup method """ frame, stmts = self.lookup(name) context = copy_context(context) context.lookupname = name return _infer_stmts(stmts, context, frame) def _filter_stmts(self, stmts, frame, offset): """filter statements to remove ignorable statements. If self is not a frame itself and the name is found in the inner frame locals, statements will be filtered to remove ignorable statements according to self's location """ # if offset == -1, my actual frame is not the inner frame but its parent # # class A(B): pass # # we need this to resolve B correctly if offset == -1: myframe = self.frame().parent.frame() else: myframe = self.frame() if not myframe is frame or self is frame: return stmts mystmt = self.statement() # line filtering if we are in the same frame # # take care node may be missing lineno information (this is the case for # nodes inserted for living objects) if myframe is frame and mystmt.fromlineno is not None: assert mystmt.fromlineno is not None, mystmt mylineno = mystmt.fromlineno + offset else: # disabling lineno filtering mylineno = 0 _stmts = [] _stmt_parents = [] for node in stmts: stmt = node.statement() # line filtering is on and we have reached our location, break if mylineno > 0 and stmt.fromlineno > mylineno: break assert hasattr(node, 'ass_type'), (node, node.scope(), node.scope().locals) ass_type = node.ass_type() if node.has_base(self): break _stmts, done = ass_type._get_filtered_stmts(self, node, _stmts, mystmt) if done: break optional_assign = isinstance(ass_type, (For, Comprehension)) if optional_assign and ass_type.parent_of(self): # we are inside a loop, loop var assigment is hidding previous # assigment _stmts = [node] _stmt_parents = [stmt.parent] continue # XXX comment various branches below!!! try: pindex = _stmt_parents.index(stmt.parent) except ValueError: pass else: # we got a parent index, this means the currently visited node # is at the same block level as a previously visited node if _stmts[pindex].ass_type().parent_of(ass_type): # both statements are not at the same block level continue # if currently visited node is following previously considered # assignement and both are not exclusive, we can drop the # previous one. For instance in the following code :: # # if a: # x = 1 # else: # x = 2 # print x # # we can't remove neither x = 1 nor x = 2 when looking for 'x' # of 'print x'; while in the following :: # # x = 1 # x = 2 # print x # # we can remove x = 1 when we see x = 2 # # moreover, on loop assignment types, assignment won't # necessarily be done if the loop has no iteration, so we don't # want to clear previous assigments if any (hence the test on # optional_assign) if not (optional_assign or are_exclusive(_stmts[pindex], node)): del _stmt_parents[pindex] del _stmts[pindex] if isinstance(node, AssName): if not optional_assign and stmt.parent is mystmt.parent: _stmts = [] _stmt_parents = [] elif isinstance(node, DelName): _stmts = [] _stmt_parents = [] continue if not are_exclusive(self, node): _stmts.append(node) _stmt_parents.append(stmt.parent) return _stmts # Name classes class AssName(LookupMixIn, ParentAssignTypeMixin, NodeNG): """class representing an AssName node""" class DelName(LookupMixIn, ParentAssignTypeMixin, NodeNG): """class representing a DelName node""" class Name(LookupMixIn, NodeNG): """class representing a Name node""" ##################### node classes ######################################## class Arguments(NodeNG, AssignTypeMixin): """class representing an Arguments node""" _astng_fields = ('args', 'defaults') args = None defaults = None def __init__(self, vararg=None, kwarg=None): self.vararg = vararg self.kwarg = kwarg def _infer_name(self, frame, name): if self.parent is frame: return name return None def format_args(self): """return arguments formatted as string""" result = [_format_args(self.args, self.defaults)] if self.vararg: result.append('*%s' % self.vararg) if self.kwarg: result.append('**%s' % self.kwarg) return ', '.join(result) def default_value(self, argname): """return the default value for an argument :raise `NoDefault`: if there is no default value defined """ i = _find_arg(argname, self.args)[0] if i is not None: idx = i - (len(self.args) - len(self.defaults)) if idx >= 0: return self.defaults[idx] raise NoDefault() def is_argument(self, name): """return True if the name is defined in arguments""" if name == self.vararg: return True if name == self.kwarg: return True return self.find_argname(name, True)[1] is not None def find_argname(self, argname, rec=False): """return index and Name node with given name""" if self.args: # self.args may be None in some cases (builtin function) return _find_arg(argname, self.args, rec) return None, None def _find_arg(argname, args, rec=False): for i, arg in enumerate(args): if isinstance(arg, Tuple): if rec: found = _find_arg(argname, arg.elts) if found[0] is not None: return found elif arg.name == argname: return i, arg return None, None def _format_args(args, defaults=None): values = [] if args is None: return '' if defaults is not None: default_offset = len(args) - len(defaults) for i, arg in enumerate(args): if isinstance(arg, Tuple): values.append('(%s)' % _format_args(arg.elts)) else: values.append(arg.name) if defaults is not None and i >= default_offset: values[-1] += '=' + defaults[i-default_offset].as_string() return ', '.join(values) class AssAttr(NodeNG, ParentAssignTypeMixin): """class representing an AssAttr node""" _astng_fields = ('expr',) expr = None class Assert(StmtMixIn, NodeNG): """class representing an Assert node""" _astng_fields = ('test', 'fail',) test = None fail = None class Assign(StmtMixIn, NodeNG, AssignTypeMixin): """class representing an Assign node""" _astng_fields = ('targets', 'value',) targets = None value = None class AugAssign(StmtMixIn, NodeNG, AssignTypeMixin): """class representing an AugAssign node""" _astng_fields = ('target', 'value',) target = None value = None class Backquote(NodeNG): """class representing a Backquote node""" _astng_fields = ('value',) value = None class BinOp(NodeNG): """class representing a BinOp node""" _astng_fields = ('left', 'right',) left = None right = None class BoolOp(NodeNG): """class representing a BoolOp node""" _astng_fields = ('values',) values = None class Break(StmtMixIn, NodeNG): """class representing a Break node""" class CallFunc(NodeNG): """class representing a CallFunc node""" _astng_fields = ('func', 'args', 'starargs', 'kwargs') func = None args = None starargs = None kwargs = None def __init__(self): self.starargs = None self.kwargs = None class Compare(NodeNG): """class representing a Compare node""" _astng_fields = ('left', 'ops',) left = None ops = None def get_children(self): """override get_children for tuple fields""" yield self.left for _, comparator in self.ops: yield comparator # we don't want the 'op' def last_child(self): """override last_child""" # XXX maybe if self.ops: return self.ops[-1][1] #return self.left class Comprehension(NodeNG): """class representing a Comprehension node""" _astng_fields = ('target', 'iter' ,'ifs') target = None iter = None ifs = None def ass_type(self): return self def _get_filtered_stmts(self, lookup_node, node, stmts, mystmt): """method used in filter_stmts""" if self is mystmt: if isinstance(lookup_node, (Const, Name)): return [lookup_node], True elif self.statement() is mystmt: # original node's statement is the assignment, only keeps # current node (gen exp, list comp) return [node], True return stmts, False class Const(NodeNG, Instance): """represent a Str or Num node""" def __init__(self, value=None): self.value = value def getitem(self, index, context=None): if isinstance(self.value, basestring): return self.value[index] raise TypeError('%r (value=%s)' % (self, self.value)) def has_dynamic_getattr(self): return False def itered(self): if isinstance(self.value, basestring): return self.value raise TypeError() class Continue(StmtMixIn, NodeNG): """class representing a Continue node""" class Decorators(NodeNG): """class representing a Decorators node""" _astng_fields = ('nodes',) nodes = None def __init__(self, nodes=None): self.nodes = nodes def scope(self): # skip the function node to go directly to the upper level scope return self.parent.parent.scope() class DelAttr(NodeNG, ParentAssignTypeMixin): """class representing a DelAttr node""" _astng_fields = ('expr',) expr = None class Delete(StmtMixIn, NodeNG, AssignTypeMixin): """class representing a Delete node""" _astng_fields = ('targets',) targets = None class Dict(NodeNG, Instance): """class representing a Dict node""" _astng_fields = ('items',) items = None def pytype(self): return '__builtin__.dict' def get_children(self): """get children of a Dict node""" # overrides get_children for key, value in self.items: yield key yield value def last_child(self): """override last_child""" if self.items: return self.items[-1][1] return None def itered(self): return self.items[::2] def getitem(self, key, context=None): for i in xrange(0, len(self.items), 2): for inferedkey in self.items[i].infer(context): if inferedkey is YES: continue if isinstance(inferedkey, Const) and inferedkey.value == key: return self.items[i+1] raise IndexError(key) class Discard(StmtMixIn, NodeNG): """class representing a Discard node""" _astng_fields = ('value',) value = None class Ellipsis(NodeNG): """class representing an Ellipsis node""" class EmptyNode(NodeNG): """class representing an EmptyNode node""" class ExceptHandler(StmtMixIn, NodeNG, AssignTypeMixin): """class representing an ExceptHandler node""" _astng_fields = ('type', 'name', 'body',) type = None name = None body = None def _blockstart_toline(self): if self.name: return self.name.tolineno elif self.type: return self.type.tolineno else: return self.lineno def set_line_info(self, lastchild): self.fromlineno = self.lineno self.tolineno = lastchild.tolineno self.blockstart_tolineno = self._blockstart_toline() def catch(self, exceptions): if self.type is None or exceptions is None: return True for node in self.type.nodes_of_class(Name): if node.name in exceptions: return True class Exec(StmtMixIn, NodeNG): """class representing an Exec node""" _astng_fields = ('expr', 'globals', 'locals',) expr = None globals = None locals = None class ExtSlice(NodeNG): """class representing an ExtSlice node""" _astng_fields = ('dims',) dims = None class For(BlockRangeMixIn, StmtMixIn, AssignTypeMixin, NodeNG): """class representing a For node""" _astng_fields = ('target', 'iter', 'body', 'orelse',) target = None iter = None body = None orelse = None def _blockstart_toline(self): return self.iter.tolineno class From(FromImportMixIn, StmtMixIn, NodeNG): """class representing a From node""" def __init__(self, fromname, names, level=0): self.modname = fromname self.names = names self.level = level class Getattr(NodeNG): """class representing a Getattr node""" _astng_fields = ('expr',) expr = None class Global(StmtMixIn, NodeNG): """class representing a Global node""" def __init__(self, names): self.names = names def _infer_name(self, frame, name): return name class If(BlockRangeMixIn, StmtMixIn, NodeNG): """class representing an If node""" _astng_fields = ('test', 'body', 'orelse') test = None body = None orelse = None def _blockstart_toline(self): return self.test.tolineno def block_range(self, lineno): """handle block line numbers range for if statements""" if lineno == self.body[0].fromlineno: return lineno, lineno if lineno <= self.body[-1].tolineno: return lineno, self.body[-1].tolineno return self._elsed_block_range(lineno, self.orelse, self.body[0].fromlineno - 1) class IfExp(NodeNG): """class representing an IfExp node""" _astng_fields = ('test', 'body', 'orelse') test = None body = None orelse = None class Import(FromImportMixIn, StmtMixIn, NodeNG): """class representing an Import node""" class Index(NodeNG): """class representing an Index node""" _astng_fields = ('value',) value = None class Keyword(NodeNG): """class representing a Keyword node""" _astng_fields = ('value',) value = None class List(NodeNG, Instance, ParentAssignTypeMixin): """class representing a List node""" _astng_fields = ('elts',) elts = None def pytype(self): return '__builtin__.list' def getitem(self, index, context=None): return self.elts[index] def itered(self): return self.elts class ListComp(NodeNG): """class representing a ListComp node""" _astng_fields = ('elt', 'generators') elt = None generators = None class Pass(StmtMixIn, NodeNG): """class representing a Pass node""" class Print(StmtMixIn, NodeNG): """class representing a Print node""" _astng_fields = ('dest', 'values',) dest = None values = None class Raise(StmtMixIn, NodeNG): """class representing a Raise node""" _astng_fields = ('type', 'inst', 'tback') type = None inst = None tback = None class Return(StmtMixIn, NodeNG): """class representing a Return node""" _astng_fields = ('value',) value = None class Slice(NodeNG): """class representing a Slice node""" _astng_fields = ('lower', 'upper', 'step') lower = None upper = None step = None class Subscript(NodeNG): """class representing a Subscript node""" _astng_fields = ('value', 'slice') value = None slice = None class TryExcept(BlockRangeMixIn, StmtMixIn, NodeNG): """class representing a TryExcept node""" _astng_fields = ('body', 'handlers', 'orelse',) body = None handlers = None orelse = None def _infer_name(self, frame, name): return name def _blockstart_toline(self): return self.lineno def block_range(self, lineno): """handle block line numbers range for try/except statements""" last = None for exhandler in self.handlers: if exhandler.type and lineno == exhandler.type.fromlineno: return lineno, lineno if exhandler.body[0].fromlineno <= lineno <= exhandler.body[-1].tolineno: return lineno, exhandler.body[-1].tolineno if last is None: last = exhandler.body[0].fromlineno - 1 return self._elsed_block_range(lineno, self.orelse, last) class TryFinally(BlockRangeMixIn, StmtMixIn, NodeNG): """class representing a TryFinally node""" _astng_fields = ('body', 'finalbody',) body = None finalbody = None def _blockstart_toline(self): return self.lineno def block_range(self, lineno): """handle block line numbers range for try/finally statements""" child = self.body[0] # py2.5 try: except: finally: if (isinstance(child, TryExcept) and child.fromlineno == self.fromlineno and lineno > self.fromlineno and lineno <= child.tolineno): return child.block_range(lineno) return self._elsed_block_range(lineno, self.finalbody) class Tuple(NodeNG, Instance, ParentAssignTypeMixin): """class representing a Tuple node""" _astng_fields = ('elts',) elts = None def pytype(self): return '__builtin__.tuple' def getitem(self, index, context=None): return self.elts[index] def itered(self): return self.elts class UnaryOp(NodeNG): """class representing an UnaryOp node""" _astng_fields = ('operand',) operand = None class While(BlockRangeMixIn, StmtMixIn, NodeNG): """class representing a While node""" _astng_fields = ('test', 'body', 'orelse',) test = None body = None orelse = None def _blockstart_toline(self): return self.test.tolineno def block_range(self, lineno): """handle block line numbers range for for and while statements""" return self. _elsed_block_range(lineno, self.orelse) class With(BlockRangeMixIn, StmtMixIn, AssignTypeMixin, NodeNG): """class representing a With node""" _astng_fields = ('expr', 'vars', 'body') expr = None vars = None body = None def _blockstart_toline(self): if self.vars: return self.vars.tolineno else: return self.expr.tolineno class Yield(NodeNG): """class representing a Yield node""" _astng_fields = ('value',) value = None # constants ############################################################## CONST_CLS = { list: List, tuple: Tuple, dict: Dict, } def const_factory(value): """return an astng node for a python value""" try: # if value is of class list, tuple, dict use specific class, not Const cls = CONST_CLS[value.__class__] node = cls() if isinstance(node, Dict): node.items = () else: node.elts = () except KeyError: # why was value in (None, False, True) not OK? assert isinstance(value, (int, long, complex, float, basestring)) or value in (None, False, True) node = Const() node.value = value return node ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/manager.pyscribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/astng/0000644000175000017500000003147011242100540033532 0ustar andreasandreas# This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # logilab-astng 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 Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-astng. If not, see . """astng manager: avoid multiple astng build of a same module when possible by providing a class responsible to get astng representation from various source and using a cache of built modules) """ __docformat__ = "restructuredtext en" import sys import os from os.path import dirname, basename, abspath, join, isdir, exists from logilab.common.modutils import NoSourceFile, is_python_source, \ file_from_modpath, load_module_from_name, modpath_from_file, \ get_module_files, get_source_file, zipimport from logilab.common.configuration import OptionsProviderMixIn from logilab.astng._exceptions import ASTNGBuildingException def astng_wrapper(func, modname): """wrapper to give to ASTNGManager.project_from_files""" print 'parsing %s...' % modname try: return func(modname) except ASTNGBuildingException, exc: print exc except KeyboardInterrupt: raise except Exception, exc: import traceback traceback.print_exc() def safe_repr(obj): try: return repr(obj) except: return '???' def zip_import_data(filepath): if zipimport is None: return None, None for ext in ('.zip', '.egg'): try: eggpath, resource = filepath.split(ext + '/', 1) except ValueError: continue try: importer = zipimport.zipimporter(eggpath + ext) return importer.get_source(resource), resource.replace('/', '.') except: continue return None, None class ASTNGManager(OptionsProviderMixIn): """the astng manager, responsible to build astng from files or modules. Use the Borg pattern. """ name = 'astng loader' options = (("ignore", {'type' : "csv", 'metavar' : "", 'dest' : "black_list", "default" : ('CVS',), 'help' : "add (may be a directory) to the black list\ . It should be a base name, not a path. You may set this option multiple times\ ."}), ("project", {'default': "No Name", 'type' : 'string', 'short': 'p', 'metavar' : '', 'help' : 'set the project name.'}), ) brain = {} def __init__(self, borg=True): # if not self.__dict__: OptionsProviderMixIn.__init__(self) self.load_defaults() # NOTE: cache entries are added by the [re]builder self._cache = {} #Cache(cache_size) self._mod_file_cache = {} def reset_cache(self): self._cache = {} #Cache(cache_size) self._mod_file_cache = {} def from_directory(self, directory, modname=None): """given a module name, return the astng object""" modname = modname or basename(directory) directory = abspath(directory) return Package(directory, modname, self) def astng_from_file(self, filepath, modname=None, fallback=True): """given a module name, return the astng object""" try: filepath = get_source_file(filepath, include_no_ext=True) source = True except NoSourceFile: source = False if modname is None: modname = '.'.join(modpath_from_file(filepath)) if modname in self._cache: return self._cache[modname] if source: try: from logilab.astng.builder import ASTNGBuilder return ASTNGBuilder(self).file_build(filepath, modname) except (SyntaxError, KeyboardInterrupt, SystemExit): raise except Exception, ex: if __debug__: print 'error while building astng for', filepath import traceback traceback.print_exc() msg = 'Unable to load module %s (%s)' % (modname, ex) raise ASTNGBuildingException(msg), None, sys.exc_info()[-1] elif fallback and modname: return self.astng_from_module_name(modname) raise ASTNGBuildingException('unable to get astng for file %s' % filepath) def astng_from_module_name(self, modname, context_file=None): """given a module name, return the astng object""" if modname in self._cache: return self._cache[modname] old_cwd = os.getcwd() if context_file: os.chdir(dirname(context_file)) try: filepath = self.file_from_module_name(modname, context_file) if filepath is not None and not is_python_source(filepath): data, zmodname = zip_import_data(filepath) if data is not None: from logilab.astng.builder import ASTNGBuilder try: return ASTNGBuilder(self).string_build(data, zmodname, filepath) except (SyntaxError, KeyboardInterrupt, SystemExit): raise if filepath is None or not is_python_source(filepath): try: module = load_module_from_name(modname) # catch SystemError as well, we may get that on badly # initialized C-module except (SystemError, ImportError), ex: msg = 'Unable to load module %s (%s)' % (modname, ex) raise ASTNGBuildingException(msg) return self.astng_from_module(module, modname) return self.astng_from_file(filepath, modname, fallback=False) finally: os.chdir(old_cwd) def file_from_module_name(self, modname, contextfile): try: value = self._mod_file_cache[(modname, contextfile)] except KeyError: try: value = file_from_modpath(modname.split('.'), context_file=contextfile) except ImportError, ex: msg = 'Unable to load module %s (%s)' % (modname, ex) value = ASTNGBuildingException(msg) self._mod_file_cache[(modname, contextfile)] = value if isinstance(value, ASTNGBuildingException): raise value return value def astng_from_module(self, module, modname=None): """given an imported module, return the astng object""" modname = modname or module.__name__ if modname in self._cache: return self._cache[modname] try: # some builtin modules don't have __file__ attribute filepath = module.__file__ if is_python_source(filepath): return self.astng_from_file(filepath, modname) except AttributeError: pass from logilab.astng.builder import ASTNGBuilder return ASTNGBuilder(self).module_build(module, modname) def astng_from_class(self, klass, modname=None): """get astng for the given class""" if modname is None: try: modname = klass.__module__ except AttributeError: raise ASTNGBuildingException( 'Unable to get module for class %s' % safe_repr(klass)) modastng = self.astng_from_module_name(modname) return modastng.getattr(klass.__name__)[0] # XXX def infer_astng_from_something(self, obj, modname=None, context=None): """infer astng for the given class""" if hasattr(obj, '__class__') and not isinstance(obj, type): klass = obj.__class__ else: klass = obj if modname is None: try: modname = klass.__module__ except AttributeError: raise ASTNGBuildingException( 'Unable to get module for %s' % safe_repr(klass)) except Exception, ex: raise ASTNGBuildingException( 'Unexpected error while retrieving module for %s: %s' % (safe_repr(klass), ex)) try: name = klass.__name__ except AttributeError: raise ASTNGBuildingException( 'Unable to get name for %s' % safe_repr(klass)) except Exception, ex: raise ASTNGBuildingException( 'Unexpected error while retrieving name for %s: %s' % (safe_repr(klass), ex)) # take care, on living object __module__ is regularly wrong :( modastng = self.astng_from_module_name(modname) if klass is obj: for infered in modastng.igetattr(name, context): yield infered else: for infered in modastng.igetattr(name, context): yield infered.instanciate_class() def project_from_files(self, files, func_wrapper=astng_wrapper, project_name=None, black_list=None): """return a Project from a list of files or modules""" # build the project representation project_name = project_name or self.config.project black_list = black_list or self.config.black_list project = Project(project_name) for something in files: if not exists(something): fpath = file_from_modpath(something.split('.')) elif isdir(something): fpath = join(something, '__init__.py') else: fpath = something astng = func_wrapper(self.astng_from_file, fpath) if astng is None: continue project.path = project.path or astng.file project.add_module(astng) base_name = astng.name # recurse in package except if __init__ was explicitly given if astng.package and something.find('__init__') == -1: # recurse on others packages / modules if this is a package for fpath in get_module_files(dirname(astng.file), black_list): astng = func_wrapper(self.astng_from_file, fpath) if astng is None or astng.name == base_name: continue project.add_module(astng) return project class Package: """a package using a dictionary like interface load submodules lazily, as they are needed """ def __init__(self, path, name, manager): self.name = name self.path = abspath(path) self.manager = manager self.parent = None self.lineno = 0 self.__keys = None self.__subobjects = None def fullname(self): """return the full name of the package (i.e. prefix by the full name of the parent package if any """ if self.parent is None: return self.name return '%s.%s' % (self.parent.fullname(), self.name) def get_subobject(self, name): """method used to get sub-objects lazily : sub package or module are only build once they are requested """ if self.__subobjects is None: try: self.__subobjects = dict.fromkeys(self.keys()) except AttributeError: # python <= 2.3 self.__subobjects = dict([(k, None) for k in self.keys()]) obj = self.__subobjects[name] if obj is None: objpath = join(self.path, name) if isdir(objpath): obj = Package(objpath, name, self.manager) obj.parent = self else: modname = '%s.%s' % (self.fullname(), name) obj = self.manager.astng_from_file(objpath + '.py', modname) self.__subobjects[name] = obj return obj def get_module(self, modname): """return the Module or Package object with the given name if any """ path = modname.split('.') if path[0] != self.name: raise KeyError(modname) obj = self for part in path[1:]: obj = obj.get_subobject(part) return obj def keys(self): if self.__keys is None: self.__keys = [] for fname in os.listdir(self.path): if fname.endswith('.py'): self.__keys.append(fname[:-3]) continue fpath = join(self.path, fname) if isdir(fpath) and exists(join(fpath, '__init__.py')): self.__keys.append(fname) self.__keys.sort() return self.__keys[:] def values(self): return [self.get_subobject(name) for name in self.keys()] def items(self): return zip(self.keys(), self.values()) def has_key(self, name): return bool(self.get(name)) def get(self, name, default=None): try: return self.get_subobject(name) except KeyError: return default def __getitem__(self, name): return self.get_subobject(name) def __contains__(self, name): return self.has_key(name) def __iter__(self): return iter(self.keys()) class Project: """a project handle a set of modules / packages""" def __init__(self, name=''): self.name = name self.path = None self.modules = [] self.locals = {} self.__getitem__ = self.locals.__getitem__ self.__iter__ = self.locals.__iter__ self.values = self.locals.values self.keys = self.locals.keys self.items = self.locals.items self.has_key = self.locals.has_key def add_module(self, node): self.locals[node.name] = node self.modules.append(node) def get_module(self, name): return self.locals[name] def get_children(self): return self.modules def __repr__(self): return '' % (self.name, id(self), len(self.modules)) scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/Checker.py0000644000175000017500000000463611242100540024216 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "error-data", self.__error_cb) self.connect(editor.window, "focus-in-event", self.__check_cb, True) self.connect(editor, "saved-file", self.__check_cb, True) self.connect(editor.textbuffer, "changed", self.__remove_cb, True) self.connect(manager, "start-check", self.__check_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__remove_all_timers() self.disconnect() del self return False def __recheck(self): self.__remove_all_timers() from gobject import timeout_add, PRIORITY_LOW self.__timer1 = timeout_add(15000, self.__check_timeout, priority=PRIORITY_LOW) return False def __check(self): from Exceptions import RemoteFileError try: if self.__editor.window_is_active is False: raise ValueError if self.__is_local_file() is False: raise RemoteFileError self.__manager.emit("check") except ValueError: self.__recheck() except RemoteFileError: self.__remove_timer() self.__manager.emit("remote-file-error") return False def __is_local_file(self): uri = self.__editor.uri if not uri: return False if uri.startswith("file:///"): return True return False def __check_timeout(self): from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__check, priority=PRIORITY_LOW) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, 3: self.__timer3, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 4)] return False def __destroy_cb(self, *args): self.__destroy() return False def __check_cb(self, *args): self.__remove_all_timers() from gobject import timeout_add, PRIORITY_LOW self.__timer3 = timeout_add(3000, self.__check_timeout, priority=PRIORITY_LOW) return False def __error_cb(self, manager, data): if not data[0]: return False self.__recheck() return False def __remove_cb(self, *args): self.__remove_all_timers() return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/DatabaseWriter.py0000644000175000017500000000137111242100540025544 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "toggle-error-check", self.__check_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __write(self): from Metadata import get_value, set_value set_value(not get_value()) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __check_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__write, priority=PRIORITY_LOW) return False scribes-0.4~r910/LanguagePlugins/PythonErrorChecker/ProcessCommunicator.py0000644000175000017500000001121711242100540026642 0ustar andreasandreasfrom ErrorCheckerProcess.Utils import DBUS_SERVICE, DBUS_PATH from SCRIBES.SignalConnectionManager import SignalManager class Communicator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "check", self.__check_cb) self.connect(manager, "error-check-type", self.__check_type_cb) self.__sigid1 = self.connect(editor.textbuffer, "changed", self.__changed_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) editor.session_bus.add_signal_receiver(self.__finished_cb, signal_name="finished", dbus_interface=DBUS_SERVICE) self.__block() self.__manager.emit("start-check") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__checker = self.__get_checker() self.__session_id = 0 self.__is_blocked = False self.__modtime = 0 # 1 = syntax checking, 2 = syntax + pyflakes, 3 = syntax + pyflakes + pylint self.__check_type = 1 return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) self.__editor.session_bus.remove_signal_receiver(self.__finished_cb, signal_name="finished", dbus_interface=DBUS_SERVICE) del self return False def __get_checker(self): from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (DBUS_SERVICE in services): return None checker = session_bus.get_object(DBUS_SERVICE, DBUS_PATH) return checker def __recheck(self): self.__checker = self.__get_checker() self.__manager.emit("start-check") return False def __check(self): try: from Utils import get_modification_time if self.__editor.window_is_active is False: return False file_content, file_path = self.__editor.text.decode("utf8"), self.__editor.filename.decode("utf8") self.__session_id += 1 self.__modtime = get_modification_time(file_path) data = ( file_content, file_path, self.__editor.id_, self.__session_id, self.__check_type, self.__modtime, ) self.__checker.check(data, dbus_interface=DBUS_SERVICE, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) except AttributeError: from gobject import idle_add idle_add(self.__recheck) except Exception: print "ERROR: Cannot send message to python checker process" return False def __stop_analysis(self, session_id): try: data = (self.__editor.id_, self.__session_id) self.__checker.stop(data, dbus_interface=DBUS_SERVICE, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) except AttributeError: from gobject import idle_add idle_add(self.__recheck) except Exception: print "ERROR: Cannot send message to python checker process" return False def __block(self): if self.__is_blocked: return False self.__editor.textbuffer.handler_block(self.__sigid1) self.__is_blocked = True return False def __unblock(self): if self.__is_blocked is False: return False self.__editor.textbuffer.handler_unblock(self.__sigid1) self.__is_blocked = False return False def __destroy_cb(self, *args): self.__destroy() return False def __check_cb(self, *args): self.__unblock() from gobject import idle_add idle_add(self.__check) return False def __name_change_cb(self, *args): from gobject import idle_add idle_add(self.__recheck) return False def __finished_cb(self, data): modification_time, session_id, editor_id = data[-1], data[-2], data[-3] if self.__editor.window_is_active is False: return False if editor_id != self.__editor.id_: return False if session_id != self.__session_id: return False if modification_time != self.__modtime: return False self.__manager.emit("error-data", data) return False def __reply_handler_cb(self, *args): return False def __error_handler_cb(self, *args): print "ERROR: Failed to communicate with scribes python checker process" return False def __check_type_cb(self, manager, more_error_checks): # 1 = syntax checking, 2 = syntax + pyflakes, 3 = syntax + pyflakes + pylint error_check_type = 3 if more_error_checks else 1 self.__check_type = error_check_type return False def __changed_cb(self, *args): self.__block() self.__stop_analysis(self.__session_id) self.__session_id += 1 return False scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/0000755000175000017500000000000011242100540022522 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/__init__.py0000644000175000017500000000000011242100540024621 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/Updater.py0000644000175000017500000000450511242100540024504 0ustar andreasandreasclass Updater(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("show-window", self.__show_window_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager from collections import deque # symbols has the format [(line_number, name, type), ...] self.__symbols = deque([]) self.__depth = 0 self.__inside_class = False self.__class_depth = 0 self.__function_depth = 0 return def __get_symbols(self): try: self.__symbols.clear() from compiler import parse parse_tree = parse(self.__editor.text) nodes = parse_tree.getChildNodes() self.__extract_symbols(nodes, 0) self.__manager.emit("update", self.__symbols) except SyntaxError: pass return False def __extract_symbols(self, nodes, depth): self.__depth = depth class_flag = False function_flag = False for node in nodes: if self.__is_function_node(node): function_flag = True if self.__function_depth: value = "Function" else: value = "Method" if self.__class_depth else "Function" pixbuf = self.__manager.function_pixbuf if value == "Function" else self.__manager.method_pixbuf self.__symbols.append((node.lineno, node.name, value, depth, pixbuf)) self.__function_depth += 1 if self.__is_class_node(node): class_flag = True self.__symbols.append((node.lineno, node.name, "Class", depth, self.__manager.class_pixbuf)) self.__class_depth += 1 self.__extract_symbols(node.getChildNodes(), depth+1) if class_flag: self.__class_depth -= 1 if function_flag: self.__function_depth -= 1 class_flag = False function_flag = False return def __is_function_node(self, node): attributes = set(["decorators", "name", "argnames", "defaults", "flags", "doc", "code"]) return attributes.issubset(set(dir(node))) def __is_class_node(self, node): attributes = set(["name", "bases", "doc", "code"]) return attributes.issubset(set(dir(node))) def __precompile_methods(self): methods = (self.__extract_symbols, self.__get_symbols,) self.__editor.optimize(methods) return False def __show_window_cb(self, *args): from gobject import idle_add idle_add(self.__get_symbols, priority=9999) return scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/class.png0000644000175000017500000000126111242100540024335 0ustar andreasandreas‰PNG  IHDRóÿasBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<.IDAT8¥“OK[AÅwfÞ“&ÆTSµRISt¡ ucׂ`ÿÐBé¢_ÂâGû% ­‹º° ¡k»Q»PÔ` mQ£1†¨¼¼7ÓÅ‹Q”Bi/ ó‡™3÷žs®8çøŸ0×½‘.eÔ¬Ò2e#WPZŠ6rË6´s+óîäê}¹šÁÄŒLj_½ͧ³CY?s»€Ãã=Ê»å`ýk©öõ—·îó €‰™L¥R‹ÓÓ“‰´ágcƒFt„tz= $G8;YZúÔ¨×ëÏ/@Ä9§í©í—/^õ†·ª|k¬¢4ˆD &ÇQõn>,¼?°M›[™w' @5;6šO'҆匿h#hOÐ>h_Ђö…Á©^C¡O+£fT‹¤©ìPÖÿu¾Ò‚ò@µ@Œ?Ö~¼ßon’{pßWžLµlä ™î~N£#”¥íÑÎÂø‚ñãõ¹Té»Ó‡ c…Ú2Š€H\³Ò Zb0/ž\$( (i+wQB±RÝ£Ó ”¢Í‰hHš •Ã}´‘âÕ–Ë»å` 1Òúêr8Ö‚ÀYè÷‡ÙÚÞ ¢¦[¾íÜúz©Ö¨6LŒã,X밑ÆŽ(pÜ3©׊5Ú¹›FêJ->}ö$Ù™1ì579ã%BÒïánÇ0õJ“ Kzíš‘®[9ŸÏ§s¹û~o¦¨T÷ÙÚÙ J«¥Zø'+ßh&O¦.¤RFжùÍô/ñ9èü۫˘¶IEND®B`‚scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/method.png0000644000175000017500000000103211242100540024504 0ustar andreasandreas‰PNG  IHDRóÿasBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<—IDAT8¥“Íja†Ÿ3™o2É815mZbš¢)“‰‚!ÐBk n{®¼Á… 7¥˜ecDKÕ˲;IKé0½a2ßç&š!â»<çð¼/œsÄÃÿÈÊjž‹ôÏD޳fdQ‚"¡Rê›~$IøÖ˜èŸäàì Ùtv··• ƒEs·"{ù|~¿ÝhäžlnÚ¶ëŠì, Pð¥+ŠÈE‡A/Àç¥ïEŽ|Ï nlˆÑ£Íõu«P*=í‹<ÏôD,çÝ0ô1IB:¢G#Z­¢_‘…^VWVÖêå2f2AH®¯©ù>•Jåþ^Ü è‰¸6ô»a虫+R­IÐZ“\^²×n{9øØqþøðúAµZ\u¦qK®‚’:\ÉPQä 9K@D>@HeˆçM À6 Á‘˜fwŠ÷3owFîÎ=•L&/ÏIÊzWgÿ…*5Ít¹|{O’4”³×Y6. \BîÑ)$á.$gµþÈæå¢€zWgã¢à{û…É03LBfmßÝEž?±ÿÙgí.GÀEß»tž€ä=uC¦¨ïȯ¸GŠ=õˆÌþt H-î»Ñ.ž@+j|ÕAÖ>Á5päÀ/ÒŸ‡¨Øò Ÿøm'Å~Úà– ¤¡Z­WÙcž#÷ƒåK¶ùÜÒPµ²fº˜/ÊÓ÷ª†JÖLF÷®ó/ÿÎxp.ÓáIEND®B`‚scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/SymbolBrowser.glade0000644000175000017500000000376511242100540026344 0ustar andreasandreas 10 Classes and Functions ScribesSymbolBrowser center-on-parent 350 400 True scribes dialog True True True static ScribesSymbolBrowser True True never automatic in True False True True True False True 1 True 2 scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/Trigger.py0000644000175000017500000000204011242100540024473 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "show-python-symbol-brower", "F5", _("Show classes, methods and functions"), _("Python") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def __activate_cb(self, *args): try: self.__manager.show_browser() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show_browser() return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/Manager.py0000644000175000017500000000343711242100540024455 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import TYPE_PYOBJECT class Manager(GObject): __gsignals__ = { "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "update": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "show-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "hide-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from Updater import Updater Updater(editor, self) from TreeView import TreeView TreeView(editor, self) from Window import Window Window(editor, self) def __init_attributes(self, editor): self.__editor = editor from os.path import join, split current_folder = split(globals()["__file__"])[0] glade_file = join(current_folder, "SymbolBrowser.glade") from gtk.gdk import pixbuf_new_from_file class_pixbuf = join(current_folder, "class.png") self.__class_pixbuf = pixbuf_new_from_file(class_pixbuf) function_pixbuf = join(current_folder, "function.png") self.__function_pixbuf = pixbuf_new_from_file(function_pixbuf) method_pixbuf = join(current_folder, "method.png") self.__method_pixbuf = pixbuf_new_from_file(method_pixbuf) from gtk.glade import XML self.__glade = XML(glade_file, "Window", "scribes") return def __get_glade(self): return self.__glade def __get_class_pixbuf(self): return self.__class_pixbuf def __get_function_pixbuf(self): return self.__function_pixbuf def __get_method_pixbuf(self): return self.__method_pixbuf glade = property(__get_glade) class_pixbuf = property(__get_class_pixbuf) function_pixbuf = property(__get_function_pixbuf) method_pixbuf = property(__get_method_pixbuf) def show_browser(self): self.emit("show-window") return def destroy(self): self.emit("destroy") del self return scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/TreeView.py0000644000175000017500000001332211242100540024627 0ustar andreasandreasclass TreeView(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__manager.connect("update", self.__update_cb) self.__sigid3 = self.__treeview.connect("row-activated", self.__row_activated_cb) from gobject import idle_add idle_add(self.__precompile_method, priority=9999) def __init_attributes(self, editor, manager): self.__manager = manager self.__symbols = None self.__parent = None self.__editor = editor self.__treeview = manager.glade.get_widget("TreeView") self.__model = self.__create_model() self.__column = self.__create_column() self.__depth_level_iter = None return def __set_properties(self): self.__treeview.append_column(self.__column) self.__treeview.map() return def __create_model(self): from gtk import TreeStore from gtk.gdk import Pixbuf model = TreeStore(int, str, str, int, Pixbuf) return model def __create_column(self): from gtk import TreeViewColumn, CellRendererText, CellRendererPixbuf from gtk import TREE_VIEW_COLUMN_FIXED column = TreeViewColumn() pixbuf_renderer = CellRendererPixbuf() text_renderer = CellRendererText() column.pack_start(pixbuf_renderer, False) column.pack_start(text_renderer, False) column.set_sizing(TREE_VIEW_COLUMN_FIXED) column.set_resizable(False) column.set_attributes(text_renderer, text=1) column.set_attributes(pixbuf_renderer, pixbuf=4) return column def __populate_model(self, symbols): self.__treeview.set_property("sensitive", False) if self.__symbols != symbols: self.__treeview.window.freeze_updates() from copy import copy self.__symbols = copy(symbols) self.__treeview.set_model(None) self.__model.clear() indentation = self.__get_indentation_levels(symbols) append = self.__append_symbols for item in symbols: append(item, indentation) self.__treeview.set_model(self.__model) self.__treeview.window.thaw_updates() self.__select_row() self.__treeview.set_property("sensitive", True) self.__treeview.grab_focus() return False def __select_row(self): current_line = self.__editor.cursor.get_line() + 1 get_line = lambda x: x[0] lines = [get_line(symbol) for symbol in self.__symbols] lines.reverse() found_line = False for line in lines: if not (current_line == line or current_line > line): continue found_line = True current_line = line break if found_line: self.__select_line_in_treeview(current_line) else: self.__editor.select_row(self.__treeview) return def __select_line_in_treeview(self, line): iterator = self.__model.get_iter_root() while True: if self.__model.get_value(iterator, 0) == line: break if self.__model.iter_has_child(iterator): parent_iterator = iterator found_line = False for index in xrange(self.__model.iter_n_children(iterator)): iterator = self.__model.iter_nth_child(parent_iterator, index) if not (self.__model.get_value(iterator, 0) == line): continue found_line = True break if found_line: break iterator = parent_iterator iterator = self.__model.iter_next(iterator) if iterator is None: break # try: path = self.__model.get_path(iterator) self.__treeview.expand_to_path(path) self.__treeview.get_selection().select_iter(iterator) self.__treeview.set_cursor(path) self.__treeview.scroll_to_cell(path, use_align=True, row_align=0.5) # except TypeError: # pass return def __get_indentation_levels(self, symbols): get_indentation = lambda x: x[-2] indentations = [get_indentation(symbol) for symbol in symbols] indentation_levels = list(set(indentations)) indentation_levels.sort() return indentation_levels def __append_symbols(self, item, indentation): index = indentation.index(item[-2]) parent = self.__find_parent(index) self.__depth_level_iter = self.__model.append(parent, item) return def __find_parent(self, index): if not index: return None depth = self.__model.iter_depth(self.__depth_level_iter) if index == depth: parent = self.__model.iter_parent(self.__depth_level_iter) elif index < depth: self.__depth_level_iter = self.__model.iter_parent(self.__depth_level_iter) parent = self.__find_parent(index) elif index > depth: parent = self.__depth_level_iter return parent def __select_symbol(self, line, name): begin = self.__editor.textbuffer.get_iter_at_line(line - 1) end = self.__editor.forward_to_line_end(begin.copy()) from gtk import TEXT_SEARCH_TEXT_ONLY x, y = begin.forward_search(name, TEXT_SEARCH_TEXT_ONLY, end) self.__editor.textbuffer.select_range(x, y) self.__editor.move_view_to_cursor(True) return False def __forward_to_line_end(self, iterator): if iterator.ends_line(): return iterator iterator.forward_to_line_end() return iterator def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__treeview) self.__treeview.destroy() del self return def __row_activated_cb(self, treeview, path, column): iterator = self.__model.get_iter(path) self.__manager.emit("hide-window") self.__treeview.set_property("sensitive", False) line = self.__model.get_value(iterator, 0) name = self.__model.get_value(iterator, 1) self.__select_symbol(line, name) return True def __update_cb(self, manager, symbols): from gobject import idle_add idle_add(self.__populate_model, symbols, priority=9999) return False def __precompile_method(self): methods = [self.__select_symbol, self.__row_activated_cb, self.__populate_model] self.__editor.optimize(methods) return False scribes-0.4~r910/LanguagePlugins/PythonSymbolBrowser/Window.py0000644000175000017500000000362511242100540024351 0ustar andreasandreasclass Window(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-window", self.__show_window_cb) self.__sigid3 = manager.connect("hide-window", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.glade.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__editor.busy() message = "Python symbols" self.__editor.set_message(message, "yes") self.__window.show_all() return False def __hide(self): self.__editor.busy(False) message = "Python symbols" self.__editor.unset_message(message, "yes") self.__window.hide() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/LanguagePlugins/HashComments/0000755000175000017500000000000011242100540021100 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/HashComments/__init__.py0000644000175000017500000000000011242100540023177 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/HashComments/Exceptions.py0000644000175000017500000000004611242100540023573 0ustar andreasandreasclass ReadOnlyError(Exception): pass scribes-0.4~r910/LanguagePlugins/HashComments/Trigger.py0000644000175000017500000000204511242100540023056 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "toggle-comment", "c", _("(Un)comment line or selected lines"), _("Line Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def __activate_cb(self, *args): try: self.__manager.toggle_comment() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.toggle_comment() return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return scribes-0.4~r910/LanguagePlugins/HashComments/Manager.py0000644000175000017500000001330211242100540023023 0ustar andreasandreasclass Manager(object): """ This class (un)comments lines in several source code. """ def __init__(self, editor): self.__init_attributes(editor) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__has_selection = False self.__commented = False self.__readonly = False self.__selection_begin_index = None self.__selection_begin_line = None self.__selection_end_index = None self.__selection_end_line = None return def __backward_to_line_begin(self, iterator): if iterator.starts_line(): return iterator while True: iterator.backward_char() if iterator.starts_line(): break return iterator def __forward_to_line_end(self, iterator): if iterator.ends_line(): return iterator iterator.forward_to_line_end() return iterator def __get_selection_range(self): self.__has_selection = True begin, end = self.__buffer.get_selection_bounds() self.__selection_begin_index = begin.get_line_index() self.__selection_begin_line = begin.get_line() self.__selection_end_index = end.get_line_index() self.__selection_end_line = end.get_line() end_position = self.__forward_to_line_end(end) begin_position = self.__backward_to_line_begin(begin) return begin_position, end_position def __get_range(self): if self.__buffer.get_property("has-selection"): return self.__get_selection_range() iterator = self.__editor.cursor if iterator.starts_line() and iterator.ends_line(): return None end_position = self.__forward_to_line_end(iterator.copy()) begin_position = self.__backward_to_line_begin(iterator) return begin_position, end_position def __get_first_nonwhitespace(self, string): if not string: return None string = string.strip(" \t") if not string: return None return string[0] def __line_is_comment(self, line): is_comment = True if self.__get_first_nonwhitespace(line) == "#" else False return is_comment def __should_comment(self, lines): should_comment = True for line in lines: if self.__line_is_comment(line) is False: continue should_comment = False break return should_comment def __comment_line(self, line): if self.__line_is_comment(line): return line line = "#" + line return line def __uncomment_line(self, line): while self.__line_is_comment(line): line = line.replace("#", "", 1) return line def __comment_lines(self, lines): return [self.__comment_line(line) for line in lines] def __uncomment_lines(self, lines): return [self.__uncomment_line(line) for line in lines] def __update_feedback_message(self): if self.__readonly: from i18n import msg5 message = msg5 self.__editor.update_message(message, "fail") else: if self.__commented: if self.__has_selection: from i18n import msg1 message = msg1 else: line = self.__editor.cursor.get_line() + 1 from i18n import msg2 message = msg2 % line else: if self.__has_selection: from i18n import msg3 message = msg3 else: line = self.__editor.cursor.get_line() + 1 from i18n import msg4 message = msg4 % line self.__editor.update_message(message, "pass") return def __reset_flags(self): self.__has_selection = False self.__commented = False self.__readonly = False return def toggle_comment(self): from Exceptions import ReadOnlyError try: self.__editor.textview.window.freeze_updates() if self.__editor.readonly: raise ReadOnlyError offset = self.__editor.cursor.get_offset() begin, end = self.__get_range() text = self.__buffer.get_text(begin, end) lines = text.split("\n") if self.__should_comment(lines): self.__commented = True lines = self.__comment_lines(lines) offset += 1 else: self.__commented = False lines = self.__uncomment_lines(lines) # If line is not empty (offset - 1) if not (len(lines) == 1 and not lines[0]): offset -= 1 text = "\n".join(lines) self.__buffer.place_cursor(begin) self.__buffer.begin_user_action() self.__buffer.delete(begin, end) self.__buffer.insert_at_cursor(text) self.__buffer.end_user_action() if self.__has_selection: begin = self.__get_begin_selection() end = self.__get_end_selection() self.__buffer.select_range(begin, end) else: iterator = self.__buffer.get_iter_at_offset(offset) self.__buffer.place_cursor(iterator) except TypeError: self.__buffer.begin_user_action() self.__buffer.insert_at_cursor("#") self.__buffer.end_user_action() self.__commented = True iterator = self.__buffer.get_iter_at_offset(offset) self.__buffer.place_cursor(iterator) except ReadOnlyError: self.__readonly = True finally: self.__update_feedback_message() self.__reset_flags() self.__editor.textview.window.thaw_updates() return def __get_begin_selection(self): iterator = self.__buffer.get_iter_at_line(self.__selection_begin_line) line_size = iterator.get_bytes_in_line() if self.__selection_begin_index >= line_size: begin = self.__forward_to_line_end(iterator) begin.forward_char() else: begin = self.__buffer.get_iter_at_line_index(self.__selection_begin_line, self.__selection_begin_index) if self.__commented: begin.forward_char() else: begin.backward_char() return begin def __get_end_selection(self): iterator = self.__buffer.get_iter_at_line(self.__selection_end_line) line_size = iterator.get_bytes_in_line() if self.__selection_end_index >= line_size: end = self.__forward_to_line_end(iterator) end.forward_char() else: end = self.__buffer.get_iter_at_line_index(self.__selection_end_line, self.__selection_end_index) if self.__commented: end.forward_char() else: end.backward_char() return end def destroy(self): del self self = None return scribes-0.4~r910/LanguagePlugins/HashComments/i18n.py0000644000175000017500000000032211242100540022226 0ustar andreasandreasfrom gettext import gettext as _ msg1 = _("Commented selected lines") msg2 = _("Commented line %d") msg3 = _("Uncommented selected lines") msg4 = _("Uncommented line %d") msg5 = _("Editor is in readonly mode") scribes-0.4~r910/LanguagePlugins/PluginZenCoding.py0000644000175000017500000000105511242100540022121 0ustar andreasandreasname = "Zen Coding Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 languages = ["html", "xml", "css", "javascript", "php"] autoload = True class_name = "ZenCodingPlugin" short_description = "Zen Coding Plugin" long_description = """Zen Coding Plugin""" class ZenCodingPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from zencoding.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/PythonNavigationSelection/0000755000175000017500000000000011242100540023656 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonNavigationSelection/__init__.py0000644000175000017500000000000011242100540025755 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonNavigationSelection/Trigger.py0000644000175000017500000000537411242100540025644 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(self.__trigger4, "activate", self.__activate_cb) self.connect(self.__trigger5, "activate", self.__activate_cb) self.connect(self.__trigger6, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "move-to-previous-block", "bracketleft", _("Move cursor to previous block"), _("Python") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "move-to-next-block", "bracketright", _("Move cursor to next block"), _("Python") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-python-block", "h", _("Select a block of code"), _("Python") ) self.__trigger5 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "move-to-block-end", "e", _("Move cursor to end of block"), _("Python") ) self.__trigger6 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-python-function", "f", _("Select function or method"), _("Python") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-python-class", "a", _("Select class"), _("Python") ) self.__trigger4 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return def __create_manager(self): from Manager import Manager manager = Manager(self.__editor) return manager def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__create_manager() function = { self.__trigger1: self.__manager.previous_block, self.__trigger2: self.__manager.next_block, self.__trigger3: self.__manager.select_function, self.__trigger4: self.__manager.select_class, self.__trigger5: self.__manager.select_block, self.__trigger6: self.__manager.end_of_block, } function[trigger]() return False scribes-0.4~r910/LanguagePlugins/PythonNavigationSelection/Manager.py0000644000175000017500000003274211242100540025612 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__textview = editor.textview return def __is_empty_line(self, iterator): text = self.__editor.get_line_text(iterator).strip(" \t\n") if not text: return True return False def __is_comment_line(self, iterator): text = self.__editor.get_line_text(iterator).strip(" \t") if text.startswith("#"): return True return False def __is_possible_start_block(self, current_indentation, pivot_indentation): if current_indentation < pivot_indentation: return True return False def __is_block_begin(self, iterator): iterator = self.__move_to_indented_character(iterator) if self.__is_primary_block_line(iterator): return True return False def __is_block_start(self, iterator, indentation): if self.__is_block_begin(iterator) is False: return False possible_start_block = self.__is_possible_start_block(iterator.get_line_offset(), indentation) if possible_start_block is False: return False return True def __is_class_block_start(self, iterator, indentation): if self.__is_class_line(iterator.copy()) is False: return False possible_start_block = self.__is_possible_start_block(iterator.get_line_offset(), indentation) if possible_start_block is False: return False return True def __is_def_block_start(self, iterator, indentation): if self.__is_def_line(iterator.copy()) is False: return False possible_start_block = self.__is_possible_start_block(iterator.get_line_offset(), indentation) if possible_start_block is False: return False return True def __is_past_block_end(self, iterator, indentation): if self.__is_secondary_block_line(iterator.copy()): return False iterator = self.__move_to_indented_character(iterator) offset = iterator.get_line_offset() if offset <= indentation: return True return False def __get_start_block(self, iterator): indentation = iterator.get_line_offset() while True: try: if self.__editor.is_empty_line(iterator): raise ValueError if self.__is_comment_line(iterator): raise ValueError if self.__is_block_start(iterator.copy(), indentation): break # if self.__is_inside_block(iterator.copy()): break except ValueError: pass success = iterator.backward_line() if success is False: raise ValueError iterator = self.__move_to_indented_character(iterator) # while iterator.get_char() in (" ", "\t"): iterator.forward_char() return iterator def __find_start_def_block(self, iterator): if self.__is_def_line(iterator.copy()): return self.__move_to_indented_character(iterator.copy()) indentation = iterator.get_line_offset() while True: try: if self.__editor.is_empty_line(iterator): raise ValueError if self.__is_comment_line(iterator): raise ValueError if self.__is_def_block_start(iterator.copy(), indentation): break except ValueError: pass success = iterator.backward_line() if success is False: raise ValueError iterator = self.__move_to_indented_character(iterator) return iterator def __find_start_class_block(self, iterator): if self.__is_class_line(iterator.copy()): return self.__move_to_indented_character(iterator.copy()) indentation = iterator.get_line_offset() while True: try: if self.__editor.is_empty_line(iterator): raise ValueError if self.__is_comment_line(iterator): raise ValueError if self.__is_class_block_start(iterator.copy(), indentation): break except ValueError: pass success = iterator.backward_line() if success is False: raise ValueError iterator = self.__move_to_indented_character(iterator) return iterator def __move_to_previous_block(self, iterator): while True: try: success = iterator.backward_line() if success is False: raise TypeError if self.__editor.is_empty_line(iterator): raise ValueError if self.__is_comment_line(iterator): raise ValueError if self.__is_primary_block_line(iterator.copy()): break # if self.__is_inside_block(iterator.copy()): break except ValueError: pass iterator = self.__move_to_indented_character(iterator) # while iterator.get_char() in (" ", "\t"): iterator.forward_char() return iterator def __move_to_next_block(self, iterator): while True: try: success = iterator.forward_line() if success is False: raise TypeError if self.__editor.is_empty_line(iterator): raise ValueError if self.__is_comment_line(iterator): raise ValueError if self.__is_primary_block_line(iterator.copy()): break # if self.__is_inside_block(iterator.copy()): break except ValueError: pass iterator = self.__move_to_indented_character(iterator) # while iterator.get_char() in (" ", "\t"): iterator.forward_char() return iterator def __move_to_indented_character(self, iterator): iterator = self.__editor.backward_to_line_begin(iterator) while iterator.get_char() in (" ", "\t"): iterator.forward_char() return iterator def __move_backward_to_inner_indentation(self, iterator, indentation): if indentation < iterator.get_line_offset(): return iterator while True: success = iterator.backward_line() if success is False: raise ValueError if self.__editor.is_empty_line(iterator): continue iterator = self.__move_to_indented_character(iterator) if indentation < iterator.get_line_offset(): break return iterator def __move_to_end_of_line(self, iterator): iterator = self.__editor.forward_to_line_end(iterator) while iterator.get_char() in (" ", "\t", "\n"): iterator.backward_char() iterator.forward_char() return iterator def __find_end_block(self, iterator): indentation = iterator.get_line_offset() while True: success = iterator.forward_line() if success is False: break if self.__editor.is_empty_line(iterator.copy()): continue if self.__is_comment_line(iterator.copy()): continue if self.__is_past_block_end(iterator.copy(), indentation): break iterator = self.__move_backward_to_inner_indentation(iterator, indentation) iterator = self.__move_to_end_of_line(iterator) return iterator def __find_start_block(self, iterator): if self.__is_block_begin(iterator.copy()): iterator = self.__move_to_indented_character(iterator.copy()) else: iterator = self.__get_start_block(iterator.copy()) return iterator def __get_pivot_iterator(self): iterator = self.__editor.cursor # Search for non-empty lines. empty_or_comment = lambda x: self.__editor.is_empty_line(x) or self.__is_comment_line(x) or self.__line_starts_with_secondary_block_keyword(x) while empty_or_comment(iterator): success = iterator.backward_line() if success is False: break if empty_or_comment(iterator): raise TypeError # FIXME Raise an exception here instead. # Move iterator to the first non-whitespace character on the # line. iterator = self.__move_to_indented_character(iterator.copy()) return iterator def __is_block_line(self, iterator): if self.__line_starts_with_block_keyword(iterator.copy()): return True return False def __is_primary_block_line(self, iterator): primary_block = self.__line_starts_with_primary_block_keyword(iterator.copy()) has_block_colon = self.__has_block_line_colon(iterator.copy()) if primary_block and has_block_colon: return True return False def __is_secondary_block_line(self, iterator): if self.__line_starts_with_secondary_block_keyword(iterator.copy()): return True return False def __line_starts_with_keyword(self, iterator): # Possible Python keywords found at the beginning of a line. keywords = ("del", "from", "while", "elif", "with", "assert", "else", "if", "pass", "yield", "break", "except", "import", "print", "class", "raise", "continue", "finally", "return", "def", "for", "try") return self.__token_in_keywords(iterator, keywords) def __line_starts_with_block_keyword(self, iterator): keywords = ("while", "elif", "with", "else", "if", "except", "class", "finally", "def", "for", "try") return self.__token_in_keywords(iterator, keywords) def __line_starts_with_primary_block_keyword(self, iterator): keywords = ("while", "with", "if", "class", "def", "for", "try") return self.__token_in_keywords(iterator, keywords) def __is_def_line(self, iterator): if self.__line_starts_with_primary_block_keyword(iterator) is False: return False keywords = ("def",) return self.__token_in_keywords(iterator.copy(), keywords) def __is_class_line(self, iterator): if self.__line_starts_with_primary_block_keyword(iterator) is False: return False keywords = ("class",) return self.__token_in_keywords(iterator.copy(), keywords) def __line_starts_with_secondary_block_keyword(self, iterator): keywords = ("else", "elif", "except", "finally") return self.__token_in_keywords(iterator, keywords) def __token_in_keywords(self, iterator, keywords): token = self.__get_first_token_on_line(iterator.copy()) if token in keywords: return True return False def __has_block_line_colon(self, iterator): if self.__ends_with_colon(iterator.copy()): return True while True: success = iterator.forward_line() if success is False: return False if self.__line_starts_with_keyword(iterator): return False if self.__ends_with_colon(iterator.copy()): return True return True def __get_first_token_on_line(self, iterator): text = self.__strip_line_text(iterator) token = text.split(" ")[0].split(":")[0] return token def __ends_with_colon(self, iterator): text = self.__strip_line_text(iterator.copy()) if text.endswith(":"): return True return False def __strip_line_text(self, iterator): text = self.__editor.get_line_text(iterator).strip(" \t\n") return text ######################################################################## # # Public Methods # ######################################################################## def select_block(self): try: # Point to start searching from. iterator = self.__get_pivot_iterator() start_block_iterator = self.__find_start_block(iterator) end_block_iterator = self.__find_end_block(start_block_iterator.copy()) self.__editor.textbuffer.select_range(start_block_iterator, end_block_iterator) message = "Selected block" self.__editor.update_message(message, "yes") self.__editor.move_view_to_cursor() except ValueError: message = "Block not found" self.__editor.update_message(message, "no") except TypeError: message = "Block not found" self.__editor.update_message(message, "no") return True def next_block(self): try: iterator = self.__get_pivot_iterator() iterator = self.__move_to_next_block(iterator.copy()) self.__editor.textbuffer.place_cursor(iterator) self.__editor.move_view_to_cursor(True) message = "Moved cursor to next block" self.__editor.update_message(message, "yes") except ValueError: message = "Next block not found" self.__editor.update_message(message, "no") except TypeError: message = "Next block not found" self.__editor.update_message(message, "no") return def previous_block(self): try: iterator = self.__get_pivot_iterator() iterator = self.__move_to_previous_block(iterator.copy()) self.__editor.textbuffer.place_cursor(iterator) self.__editor.move_view_to_cursor(True) message = "Move cursor to previous block" self.__editor.update_message(message, "yes") except ValueError: message = "Previous block not found" self.__editor.update_message(message, "no") except TypeError: message = "Previous block not found" self.__editor.update_message(message, "no") return def select_class(self): try: # Point to start searching from. iterator = self.__get_pivot_iterator() start = self.__find_start_class_block(iterator.copy()) end = self.__find_end_block(start.copy()) end_line = end.get_line() current_line = self.__editor.cursor.get_line() if end_line < current_line: raise TypeError self.__buffer.select_range(start, end) message = "Selected class block" self.__editor.update_message(message, "yes") except ValueError: message = "Out of class block range" self.__editor.update_message(message, "no") except TypeError: message = "Out of class block range" self.__editor.update_message(message, "no") return def select_function(self): try: # Point to start searching from. iterator = self.__get_pivot_iterator() start = self.__find_start_def_block(iterator.copy()) end = self.__find_end_block(start.copy()) end_line = end.get_line() current_line = self.__editor.cursor.get_line() if end_line < current_line: raise TypeError self.__buffer.select_range(start, end) message = "Selected function block" self.__editor.update_message(message, "yes") except ValueError: message = "Out of function range" self.__editor.update_message(message, "no") except TypeError: message = "Out of function range" self.__editor.update_message(message, "no") return def end_of_block(self): try: # Point to start searching from. iterator = self.__get_pivot_iterator() start_block_iterator = self.__find_start_block(iterator) end_block_iterator = self.__find_end_block(start_block_iterator.copy()) self.__editor.textbuffer.place_cursor(end_block_iterator) self.__editor.move_view_to_cursor(True) message = "Move cursor to end of block" self.__editor.update_message(message, "yes") except ValueError: message = "End block not found" self.__editor.update_message(message, "no") except TypeError: message = "End block not found" self.__editor.update_message(message, "no") return def destroy(self): del self return scribes-0.4~r910/LanguagePlugins/PluginJavaScriptComment.py0000644000175000017500000000123211242100540023627 0ustar andreasandreasname = "JavaScript Comment Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True languages = ["js", "php", "c", "cpp", "chdr"] class_name = "JavaScriptCommentPlugin" short_description = "Toggle comments in JavaScript source code" long_description = """ "//" is used for single line comments. "/* */" is used for multiline comments. """ class JavaScriptCommentPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from JavaScriptComment.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/PluginPythonNavigationSelection.py0000644000175000017500000000117411242100540025412 0ustar andreasandreasname = "Navigation and selection plugin" authors = ["Lateef Alabi-Oki "] languages = ["python"] version = 0.2 autoload = True class_name = "NavigationSelectionPlugin" short_description = "Navigation and selection for Python source code." long_description = """Navigation and selection for Python source code.""" class NavigationSelectionPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from PythonNavigationSelection.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/PluginHashComments.py0000644000175000017500000000121511242100540022630 0ustar andreasandreasname = "Hash (un)comment plugin" authors = ["Lateef Alabi-Oki "] languages = ["python", "ruby", "perl", "sh", "makefile", "r"] version = 0.2 autoload = True class_name = "CommentPlugin" short_description = "(Un)comment lines in source code" long_description = """This plugin allows users to (un)comment lines in hash source code by pressing (alt - c)""" class CommentPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from HashComments.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/LanguagePlugins/Sparkup/0000755000175000017500000000000011242100540020134 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/Sparkup/BoundaryCursorMonitor.py0000644000175000017500000000426111242100540025042 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "boundary-marks", self.__marks_cb) self.connect(manager, "exit-sparkup-mode", self.__exit_cb) self.__sigid1 = self.connect(editor, "cursor-moved", self.__moved_cb, True) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__nesting_level = 0 self.__blocked = False self.__boundaries = {} return def __check(self): if not self.__nesting_level: return False cursor_offset = self.__editor.cursor.get_offset() start_mark, end_mark = self.__boundaries[self.__nesting_level] go = lambda mark: self.__buffer.get_iter_at_mark(mark).get_offset() start_offset, end_offset = go(start_mark), go(end_mark) if start_offset <= cursor_offset <= end_offset: return False self.__manager.emit("exit-sparkup-mode") return False def __block(self): if self.__blocked: return False self.__editor.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.handler_unblock(self.__sigid1) self.__blocked = False return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __marks_cb(self, manager, boundaries): self.__nesting_level += 1 self.__boundaries[self.__nesting_level] = boundaries self.__unblock() return False def __exit_cb(self, *args): del self.__boundaries[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 if self.__nesting_level: return False self.__block() return False def __moved_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__check, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/__init__.py0000644000175000017500000000000011242100540022233 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/Sparkup/Signals.py0000644000175000017500000000212511242100540022106 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "mapped": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "failed": (SSIGNAL, TYPE_NONE, ()), "finish": (SSIGNAL, TYPE_NONE, ()), # "remove-marks": (SSIGNAL, TYPE_NONE, ()), "removed-placeholders": (SSIGNAL, TYPE_NONE, ()), "exit-sparkup-mode": (SSIGNAL, TYPE_NONE, ()), "next-placeholder": (SSIGNAL, TYPE_NONE, ()), "previous-placeholder": (SSIGNAL, TYPE_NONE, ()), "execute": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "inserted-template": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "placeholder-offsets": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "boundary-marks": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "placeholder-marks": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "cursor-in-placeholder": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "sparkup-template": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/LanguagePlugins/Sparkup/PlaceholderNavigator.py0000644000175000017500000000540511242100540024607 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Navigator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "next-placeholder", self.__next_cb) self.connect(manager, "previous-placeholder", self.__previous_cb) self.connect(manager, "removed-placeholders", self.__removed_cb) self.connect(manager, "exit-sparkup-mode", self.__exit_cb) self.connect(manager, "placeholder-marks", self.__marks_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__marks = {} self.__nesting_level = 0 return def __select_first_placeholder(self): first_marks = self.__marks[self.__nesting_level][0] self.__select(first_marks) return False def __get_offset_from(self, mark): gifm = self.__buffer.get_iter_at_mark return gifm(mark).get_offset() def __select_next_placeholder(self): self.__editor.freeze() offset = self.__editor.cursor.get_offset() gof = self.__get_offset_from next_marks = () for smark, emark in self.__marks[self.__nesting_level]: self.__editor.refresh(False) if gof(smark) <= offset: continue next_marks = smark, emark break emit = self.__manager.emit self.__select(next_marks) if next_marks else emit("exit-sparkup-mode") self.__editor.thaw() return False def __select_previous_placeholder(self): self.__editor.freeze() offset = self.__editor.cursor.get_offset() gof = self.__get_offset_from previous_marks = () marks = self.__marks[self.__nesting_level] for smark, emark in reversed(marks): self.__editor.refresh(False) if gof(emark) >= offset: continue previous_marks = smark, emark break self.__select(previous_marks) if previous_marks else self.__select(marks[-1]) self.__editor.thaw() return False def __select(self, marks): gifm = self.__buffer.get_iter_at_mark start, end = gifm(marks[0]), gifm(marks[1]) self.__buffer.select_range(start, end) self.__editor.textview.scroll_mark_onscreen(marks[1]) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __marks_cb(self, manager, marks): self.__nesting_level += 1 self.__marks[self.__nesting_level] = marks return False def __exit_cb(self, *args): del self.__marks[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 return False def __removed_cb(self, *args): self.__select_first_placeholder() return False def __next_cb(self, *args): self.__select_next_placeholder() return False def __previous_cb(self, *args): self.__select_previous_placeholder() return False scribes-0.4~r910/LanguagePlugins/Sparkup/TextInsertionMonitor.py0000644000175000017500000000462011242100540024677 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "boundary-marks", self.__marks_cb) self.connect(manager, "exit-sparkup-mode", self.__exit_cb) self.__sigid1 = self.connect(self.__buffer, "insert-text", self.__insert_cb, True) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__nesting_level = 0 self.__blocked = False self.__boundaries = {} return def __check_on_idle(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__check, priority=PRIORITY_LOW) return False def __check(self): cursor_offset = self.__editor.cursor.get_offset() end_mark = self.__boundaries[self.__nesting_level][-1] go = self.__offset_at_mark end_offset = go(end_mark) if end_offset is None: return False if cursor_offset < end_offset: return False self.__manager.emit("exit-sparkup-mode") return False def __offset_at_mark(self, mark): if mark.get_deleted(): return None return self.__buffer.get_iter_at_mark(mark).get_offset() def __block(self): if self.__blocked: return False self.__buffer.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__buffer.handler_unblock(self.__sigid1) self.__blocked = False return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __marks_cb(self, manager, boundaries): self.__nesting_level += 1 self.__boundaries[self.__nesting_level] = boundaries self.__unblock() return False def __exit_cb(self, *args): del self.__boundaries[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 if self.__nesting_level: return False self.__block() return False def __insert_cb(self, textbuffer, iterator, text, length): self.__remove_timer() from gobject import PRIORITY_LOW, timeout_add self.__timer = timeout_add(125, self.__check_on_idle, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/TemplateInserter.py0000644000175000017500000000516111242100540024000 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "sparkup-template", self.__template_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __insert(self, template): # convert spaces to tabs over vice versa depending on user's configuration. template = self.__format(template) # add indentation to templates before inserting it in the buffer. template = self.__indent(template) # insert proper. self.__editor.textbuffer.insert_at_cursor(template) self.__manager.emit("inserted-template", template) return False def __indent(self, template): indentation = self.__get_indentation() if not indentation: return template lines = template.split("\n") if len(lines) == 1: return template indent = lambda line: indentation + line indented_lines = [indent(line) for line in lines[1:]] indented_lines.insert(0, lines[0]) return "\n".join(indented_lines) def __get_indentation(self): text = self.__editor.get_line_text() indentation = [] for character in text: if not (character in (" ", "\t")): break indentation.append(character) return "".join(indentation) def __format(self, template): view = self.__editor.textview tab_width = view.get_property("tab-width") # Convert tabs to spaces template = template.expandtabs(tab_width) use_spaces = view.get_property("insert-spaces-instead-of-tabs") if use_spaces: return template # Convert spaces to tabs return self.__indentation_to_tabs(template, tab_width) def __indentation_to_tabs(self, template, tab_width): tab_indented_lines = [self.__spaces_to_tabs(line, tab_width) for line in template.splitlines(True)] return "".join(tab_indented_lines) def __spaces_to_tabs(self, line, tab_width): if line[0] != " ": return line indentation_width = self.__get_indentation_width(line) if indentation_width < tab_width: return line indentation = ("\t" * (indentation_width/tab_width)) + (" " * (indentation_width%tab_width)) return indentation + line[indentation_width:] def __get_indentation_width(self, line): from itertools import takewhile is_space = lambda character: character == " " return len([space for space in takewhile(is_space, line)]) def __template_cb(self, manager, template): from gobject import idle_add idle_add(self.__insert, template) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/UndoRedoManager.py0000644000175000017500000000136211242100540023522 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "execute", self.__begin_cb) self.connect(manager, "removed-placeholders", self.__end_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy_cb(self, *args): self.disconnect() del self return False def __begin_cb(self, *args): self.__editor.textbuffer.begin_user_action() return False def __end_cb(self, *args): self.__editor.textbuffer.end_user_action() return False scribes-0.4~r910/LanguagePlugins/Sparkup/PlaceholderRemover.py0000644000175000017500000000167011242100540024274 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Remover(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "placeholder-marks", self.__marks_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __rm(self, marks): giam = self.__editor.textbuffer.get_iter_at_mark start, end = giam(marks[0]), giam(marks[1]) self.__editor.textbuffer.delete(start, end) return False def __remove(self, placeholder_marks): [self.__rm(marks) for marks in placeholder_marks] self.__manager.emit("removed-placeholders") return False def __destroy_cb(self, *args): self.disconnect() del self return False def __marks_cb(self, manager, placeholder_marks): self.__remove(placeholder_marks) return False scribes-0.4~r910/LanguagePlugins/Sparkup/Trigger.py0000644000175000017500000000225511242100540022115 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "show-sparkup-interface", "e", _("Show sparkup interface"), _("Markup Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/LanguagePlugins/Sparkup/PlaceholderSearcher.py0000644000175000017500000000231711242100540024410 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Searcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "boundary-marks", self.__boundary_cb) self.connect(manager, "inserted-template", self.__template_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__boundary = () self.__template = "" return def __search(self, template): offset = self.__buffer.get_iter_at_mark(self.__boundary[0]).get_offset() placeholder_pattern = "\$+\d+" from re import finditer, M, U flags = M|U matches = finditer(placeholder_pattern, template, flags) offsets = [(offset+match.start(), offset+match.end()) for match in matches] self.__manager.emit("placeholder-offsets", offsets) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __boundary_cb(self, manager, boundary): self.__boundary = boundary return False def __template_cb(self, manager, template): self.__search(template) return False scribes-0.4~r910/LanguagePlugins/Sparkup/PlaceholderCursorMonitor.py0000644000175000017500000000561011242100540025500 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "exit-sparkup-mode", self.__exit_cb) self.connect(manager, "removed-placeholders", self.__moved_cb, True) self.connect(manager, "placeholder-marks", self.__marks_cb, True) self.__sigid1 = self.connect(editor, "cursor-moved", self.__moved_cb, True) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__nesting_level = 0 self.__marks = {} self.__current_placeholder = () self.__blocked = False return def __check(self): try: if self.__in_range(self.__current_placeholder): return False current_placeholder = self.__get_current_placeholder() if current_placeholder == self.__current_placeholder: return False self.__current_placeholder = current_placeholder self.__manager.emit("cursor-in-placeholder", current_placeholder) except KeyError: pass return False def __get_current_placeholder(self): marks = self.__marks[self.__nesting_level] current_placeholder = () for placeholder in marks: if not self.__in_range(placeholder): continue current_placeholder = placeholder break return current_placeholder def __in_range(self, marks): if not marks: return False go = self.__get_offset smark, emark = marks offset = self.__editor.cursor.get_offset() if go(smark) <= offset <= go(emark): return True return False def __get_offset(self, mark): return self.__buffer.get_iter_at_mark(mark).get_offset() def __block(self): if self.__blocked: return False self.__editor.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.handler_unblock(self.__sigid1) self.__blocked = False return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __marks_cb(self, manager, marks): self.__nesting_level += 1 self.__marks[self.__nesting_level] = marks self.__current_placeholder = () self.__unblock() return False def __exit_cb(self, *args): if self.__nesting_level in self.__marks: del self.__marks[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 self.__current_placeholder = () self.__check() if self.__nesting_level else self.__block() return False def __moved_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__check, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/MarkManager.py0000644000175000017500000000465611242100540022706 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "exit-sparkup-mode", self.__remove_cb, True) self.connect(manager, "placeholder-offsets", self.__offsets_cb) self.connect(manager, "execute", self.__execute_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = {} self.__nesting_level = 0 return def __create_boundary_marks(self): lmark = self.__editor.create_left_mark() rmark = self.__editor.create_right_mark() self.__update_marks(lmark) self.__update_marks(rmark) self.__manager.emit("boundary-marks", (lmark, rmark)) return False def __update_marks(self, mark): self.__marks[self.__nesting_level].append(mark) return False def __del(self, mark): self.__editor.refresh(False) mark.set_visible(False) self.__editor.delete_mark(mark) self.__editor.refresh(False) return False def __remove_marks(self): if not self.__nesting_level: return False self.__editor.freeze() [self.__del(mark) for mark in self.__marks[self.__nesting_level]] del self.__marks[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 self.__editor.thaw() return False def __offset_to_mark(self, offset, left=True): iterator = self.__editor.textbuffer.get_iter_at_offset(offset) ed = self.__editor create_mark = ed.create_left_mark if left else ed.create_right_mark mark = create_mark(iterator) mark.set_visible(True) return mark def __marks_from(self, offsets): otm = self.__offset_to_mark marks = [(otm(start, True), otm(end, False)) for start, end in offsets] update = self.__update_marks [(update(smark), update(emark)) for smark, emark in marks] self.__manager.emit("placeholder-marks", marks) return False def __execute_cb(self, *args): self.__nesting_level += 1 self.__marks[self.__nesting_level] = [] self.__create_boundary_marks() return False def __remove_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__remove_marks, priority=PRIORITY_LOW) return False def __offsets_cb(self, manager, offsets): self.__marks_from(offsets) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/KeyboardHandler.py0000644000175000017500000000434011242100540023545 0ustar andreasandreasfrom gtk.gdk import SHIFT_MASK, CONTROL_MASK, MOD1_MASK, SUPER_MASK, HYPER_MASK, META_MASK from gtk.keysyms import Tab, Escape, ISO_Left_Tab from SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "inserted-template", self.__unblock_cb, True) self.connect(manager, "exit-sparkup-mode", self.__block_cb, True) self.__sigid1 = self.connect(editor.textview, "key-press-event", self.__event_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__blocked = False from gtk.gdk import keymap_get_default self.__keymap = keymap_get_default() self.__quit_count = 0 return def __block(self): if self.__blocked: return False self.__editor.textview.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.textview.handler_unblock(self.__sigid1) self.__blocked = False return False def __emit(self, signal): self.__manager.emit(signal) return True def __destroy_cb(self, *args): self.disconnect() del self return False def __event_cb(self, view, event): translate = self.__keymap.translate_keyboard_state data = translate(event.hardware_keycode, event.state, event.group) keyval, egroup, level, consumed = data ALL_MASK = CONTROL_MASK | SHIFT_MASK | MOD1_MASK | SUPER_MASK | HYPER_MASK | META_MASK any_on = event.state & ~consumed & ALL_MASK # Handle backspace key press event. if not any_on and event.keyval == ISO_Left_Tab: return self.__emit("previous-placeholder") # Handle delete key press event. if not any_on and event.keyval == Tab: return self.__emit("next-placeholder") if not any_on and event.keyval == Escape: return self.__emit("exit-sparkup-mode") return False def __block_cb(self, *args): self.__quit_count -= 1 if self.__quit_count: return False self.__block() return False def __unblock_cb(self, *args): self.__quit_count += 1 self.__unblock() return False scribes-0.4~r910/LanguagePlugins/Sparkup/PlaceholderColorer.py0000644000175000017500000001034511242100540024261 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Colorer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "boundary-marks", self.__marks_cb) self.connect(manager, "exit-sparkup-mode", self.__exit_cb) self.connect(manager, "cursor-in-placeholder", self.__placeholder_cb) self.connect(manager, "removed-placeholders", self.__removed_cb, True) self.__sigid1 = self.connect(editor, "cursor-moved", self.__moved_cb, True) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__blocked = False self.__marks = {} self.__placeholder = () self.__nesting_level = 0 self.__post_tag = self.__create_post_modification_tag() self.__mod_tag = self.__create_modification_tag() return def __update_tags(self, placeholder): try: self.__editor.freeze() self.__remove_tags_at(self.__placeholder) self.__tag(self.__placeholder, self.__post_tag) self.__placeholder = placeholder if not placeholder: raise AssertionError self.__tag(placeholder, self.__mod_tag) except AssertionError: pass except TypeError: pass finally: self.__editor.thaw() return False def __update_mod_tag(self): if not self.__placeholder: return False self.__editor.freeze() self.__tag(self.__placeholder, self.__mod_tag) self.__editor.thaw() return False def __tag(self, placeholder, tag): if not placeholder: return False start, end = self.__iter_at_marks(placeholder) self.__editor.textbuffer.apply_tag(tag, start, end) return False def __remove_tags_at(self, boundary): if not boundary: return False start, end = self.__iter_at_marks(boundary) self.__editor.textbuffer.remove_tag(self.__mod_tag, start, end) self.__editor.textbuffer.remove_tag(self.__post_tag, start, end) return False def __remove_tags(self): boundary = self.__marks[self.__nesting_level] self.__remove_tags_at(boundary) return False def __iter_at_marks(self, marks): if not marks: return None if marks[0].get_deleted() or marks[1].get_deleted(): return None begin = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) return begin, end def __block(self): if self.__blocked: return False self.__editor.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.handler_unblock(self.__sigid1) self.__blocked = False return False def __create_post_modification_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "white") tag.set_property("foreground", "blue") from pango import WEIGHT_HEAVY, STYLE_ITALIC tag.set_property("weight", WEIGHT_HEAVY) tag.set_property("style", STYLE_ITALIC) return tag def __create_modification_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "#ADD8E6") # tag.set_property("foreground", "white") tag.set_property("foreground", "#CB5A30") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __destroy_cb(self, *args): self.disconnect() del self return False def __marks_cb(self, manager, marks): self.__nesting_level += 1 self.__marks[self.__nesting_level] = marks return False def __exit_cb(self, *args): self.__remove_tags() if self.__nesting_level in self.__marks: del self.__marks[self.__nesting_level] self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 self.__placeholder = () if self.__nesting_level: return False self.__block() return False def __placeholder_cb(self, manager, placeholder): self.__update_tags(placeholder) return False def __moved_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__update_mod_tag, priority=PRIORITY_LOW) return False def __removed_cb(self, *args): self.__unblock() return False scribes-0.4~r910/LanguagePlugins/Sparkup/Feedback.py0000644000175000017500000000271011242100540022172 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager SPARKUP_MESSAGE = _("Sparkup mode") class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "inserted-template", self.__inserted_cb, True) self.connect(manager, "exit-sparkup-mode", self.__exit_cb, True) self.connect(manager, "next-placeholder", self.__next_cb, True) self.connect(manager, "previous-placeholder", self.__previous_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__nesting_level = 0 return def __destroy_cb(self, *args): self.disconnect() del self return False def __inserted_cb(self, *args): if not self.__nesting_level: self.__editor.set_message(SPARKUP_MESSAGE) self.__nesting_level += 1 return False def __exit_cb(self, *args): self.__nesting_level -= 1 if self.__nesting_level < 0: self.__nesting_level = 0 if self.__nesting_level: return False self.__editor.unset_message(SPARKUP_MESSAGE) self.__editor.update_message(_("leaving sparkup mode"), "yes") return False def __next_cb(self, *args): self.__editor.update_message(_("Next placeholder"), "yes") return False def __previous_cb(self, *args): self.__editor.update_message(_("Previous placeholder"), "yes") return False scribes-0.4~r910/LanguagePlugins/Sparkup/Manager.py0000644000175000017500000000262011242100540022060 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from ViewUpdater import Updater Updater(self, editor) from UndoRedoManager import Manager Manager(self, editor) from Feedback import Feedback Feedback(self, editor) from PlaceholderColorer import Colorer Colorer(self, editor) from PlaceholderCursorMonitor import Monitor Monitor(self, editor) from TextInsertionMonitor import Monitor Monitor(self, editor) from BoundaryCursorMonitor import Monitor Monitor(self, editor) from PlaceholderNavigator import Navigator Navigator(self, editor) from KeyboardHandler import Handler Handler(self, editor) from PlaceholderRemover import Remover Remover(self, editor) from PlaceholderSearcher import Searcher Searcher(self, editor) from MarkManager import Manager Manager(self, editor) from TemplateInserter import Inserter Inserter(self, editor) from AbbreviationExpander import Expander Expander(self, editor) from GUI.Manager import Manager Manager(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/LanguagePlugins/Sparkup/GUI/0000755000175000017500000000000011242100540020560 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/Sparkup/GUI/Entry.py0000644000175000017500000000165011242100540022235 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Entry(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "mapped", self.__show_cb) self.connect(self.__entry, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_object("Entry") return def __show(self): self.__entry.grab_focus() return False def __destroy_cb(self, *args): self.disconnect() del self return False def __show_cb(self, *args): self.__show() return False def __activate_cb(self, *args): abbreviation = self.__entry.get_text().strip() if not abbreviation: return False self.__manager.emit("hide") self.__manager.emit("execute", abbreviation) return False scribes-0.4~r910/LanguagePlugins/Sparkup/GUI/__init__.py0000644000175000017500000000000011242100540022657 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/Sparkup/GUI/GUI.glade0000644000175000017500000000472111242100540022206 0ustar andreasandreas True popup True dock True True False False False False True True 5 5 10 10 True True 10 True <b>Sparkup _Abbreviation:</b> True True Entry True False False 0 True True 1 scribes-0.4~r910/LanguagePlugins/Sparkup/GUI/Manager.py0000644000175000017500000000026011242100540022502 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Entry import Entry Entry(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/LanguagePlugins/Sparkup/GUI/Displayer.py0000644000175000017500000000437611242100540023100 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "destroy", self.__destroy_cb) self.__sig1 = self.connect(self.__view, "focus-in-event", self.__hide_cb) self.__sig2 = self.connect(self.__view, "button-press-event", self.__hide_cb) self.__sig3 = self.connect(self.__window, "key-press-event", self.__key_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__window = editor.window self.__container = manager.gui.get_object("Alignment") self.__visible = False self.__blocked = False return def __show(self): if self.__visible: return False self.__unblock() self.__editor.add_bar_object(self.__container) self.__visible = True self.__manager.emit("mapped") return False def __hide(self): if self.__visible is False: return False self.__block() self.__view.grab_focus() self.__editor.remove_bar_object(self.__container) self.__visible = False return False def __block(self): if self.__blocked: return False self.__view.handler_block(self.__sig1) self.__view.handler_block(self.__sig2) self.__window.handler_block(self.__sig3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__view.handler_unblock(self.__sig1) self.__view.handler_unblock(self.__sig2) self.__window.handler_unblock(self.__sig3) self.__blocked = False return False def __destroy_cb(self, *args): self.disconnect() del self return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __activate_cb(self, *args): self.__manager.emit("show") return False def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/LanguagePlugins/Sparkup/AbbreviationExpander.py0000644000175000017500000000164111242100540024604 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Expander(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "execute", self.__execute_cb, True) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __expand(self, _string): options = { 'textmate': False, 'no-last-newline': True, 'indent-spaces': self.__editor.textview.get_tab_width() } from sparkup import Router string = Router().start(options, _string, True) self.__manager.emit("sparkup-template", string) return False def __execute_cb(self, manager, string): from gobject import idle_add idle_add(self.__expand, string) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/Sparkup/sparkup.py0000755000175000017500000006707111242100540022211 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- version = "0.1.3" import os import fileinput import getopt import sys import re # =============================================================================== class Dialect: shortcuts = {} synonyms = {} required = {} short_tags = () class HtmlDialect(Dialect): shortcuts = { 'cc:ie': { 'opening_tag': ''}, 'cc:ie6': { 'opening_tag': ''}, 'cc:ie7': { 'opening_tag': ''}, 'cc:noie': { 'opening_tag': '', 'closing_tag': ''}, 'html:4t': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'html:4s': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'html:xt': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'html:xs': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'html:xxs': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'html:5': { 'expand': True, 'opening_tag': '\n' + '\n' + '\n' + ' ' + '\n' + ' ' + '\n' + '\n' + '', 'closing_tag': '\n' + ''}, 'input:button': { 'name': 'input', 'attributes': { 'class': 'button', 'type': 'button', 'name': '', 'value': '' } }, 'input:password': { 'name': 'input', 'attributes': { 'class': 'text password', 'type': 'password', 'name': '', 'value': '' } }, 'input:radio': { 'name': 'input', 'attributes': { 'class': 'radio', 'type': 'radio', 'name': '', 'value': '' } }, 'input:checkbox': { 'name': 'input', 'attributes': { 'class': 'checkbox', 'type': 'checkbox', 'name': '', 'value': '' } }, 'input:file': { 'name': 'input', 'attributes': { 'class': 'file', 'type': 'file', 'name': '', 'value': '' } }, 'input:text': { 'name': 'input', 'attributes': { 'class': 'text', 'type': 'text', 'name': '', 'value': '' } }, 'input:submit': { 'name': 'input', 'attributes': { 'class': 'submit', 'type': 'submit', 'value': '' } }, 'input:hidden': { 'name': 'input', 'attributes': { 'type': 'hidden', 'name': '', 'value': '' } }, 'script:src': { 'name': 'script', 'attributes': { 'src': '' } }, 'script:jquery': { 'name': 'script', 'attributes': { 'src': 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' } }, 'script:jsapi': { 'name': 'script', 'attributes': { 'src': 'http://www.google.com/jsapi' } }, 'script:jsapix': { 'name': 'script', 'text': '\n google.load("jquery", "1.3.2");\n google.setOnLoadCallback(function() {\n \n });\n' }, 'link:css': { 'name': 'link', 'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'all' }, }, 'link:print': { 'name': 'link', 'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'print' }, }, 'link:favicon': { 'name': 'link', 'attributes': { 'rel': 'shortcut icon', 'type': 'image/x-icon', 'href': '' }, }, 'link:touch': { 'name': 'link', 'attributes': { 'rel': 'apple-touch-icon', 'href': '' }, }, 'link:rss': { 'name': 'link', 'attributes': { 'rel': 'alternate', 'type': 'application/rss+xml', 'title': 'RSS', 'href': '' }, }, 'link:atom': { 'name': 'link', 'attributes': { 'rel': 'alternate', 'type': 'application/atom+xml', 'title': 'Atom', 'href': '' }, }, 'meta:ie7': { 'name': 'meta', 'attributes': { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=7' }, }, 'meta:ie8': { 'name': 'meta', 'attributes': { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=8' }, }, 'form:get': { 'name': 'form', 'attributes': { 'method': 'get' }, }, 'form:g': { 'name': 'form', 'attributes': { 'method': 'get' }, }, 'form:post': { 'name': 'form', 'attributes': { 'method': 'post' }, }, 'form:p': { 'name': 'form', 'attributes': { 'method': 'post' }, }, } synonyms = { 'checkbox': 'input:checkbox', 'check': 'input:checkbox', 'input:c': 'input:checkbox', 'button': 'input:button', 'input:b': 'input:button', 'input:h': 'input:hidden', 'hidden': 'input:hidden', 'submit': 'input:submit', 'input:s': 'input:submit', 'radio': 'input:radio', 'input:r': 'input:radio', 'text': 'input:text', 'passwd': 'input:password', 'password': 'input:password', 'pw': 'input:password', 'input:t': 'input:text', 'linkcss': 'link:css', 'scriptsrc': 'script:src', 'jquery': 'script:jquery', 'jsapi': 'script:jsapi', 'html5': 'html:5', 'html4': 'html:4s', 'html4s': 'html:4s', 'html4t': 'html:4t', 'xhtml': 'html:xxs', 'xhtmlt': 'html:xt', 'xhtmls': 'html:xs', 'xhtml11': 'html:xxs', 'opt': 'option', 'st': 'strong', 'css': 'style', 'csss': 'link:css', 'css:src': 'link:css', 'csssrc': 'link:css', 'js': 'script', 'jss': 'script:src', 'js:src': 'script:src', 'jssrc': 'script:src', } short_tags = ( 'area', 'base', 'basefont', 'br', 'embed', 'hr', \ 'input', 'img', 'link', 'param', 'meta') required = { 'a': {'href':''}, 'base': {'href':''}, 'abbr': {'title': ''}, 'acronym':{'title': ''}, 'bdo': {'dir': ''}, 'link': {'rel': 'stylesheet', 'href': ''}, 'style': {'type': 'text/css'}, 'script': {'type': 'text/javascript'}, 'img': {'src':'', 'alt':''}, 'iframe': {'src': '', 'frameborder': '0'}, 'embed': {'src': '', 'type': ''}, 'object': {'data': '', 'type': ''}, 'param': {'name': '', 'value': ''}, 'form': {'action': '', 'method': 'post'}, 'table': {'cellspacing': '0'}, 'input': {'type': '', 'name': '', 'value': ''}, 'base': {'href': ''}, 'area': {'shape': '', 'coords': '', 'href': '', 'alt': ''}, 'select': {'name': ''}, 'option': {'value': ''}, 'textarea':{'name': ''}, 'meta': {'content': ''}, } class Parser: """The parser. """ # Constructor # --------------------------------------------------------------------------- def __init__(self, options=None, str='', dialect=HtmlDialect()): """Constructor. """ self.tokens = [] self.str = str self.options = options self.dialect = dialect self.root = Element(parser=self) self.caret = [] self.caret.append(self.root) self._last = [] # Methods # --------------------------------------------------------------------------- def load_string(self, str): """Loads a string to parse. """ self.str = str self._tokenize() self._parse() def render(self): """Renders. Called by [[Router]]. """ # Get the initial render of the root node output = self.root.render() # Indent by whatever the input is indented with indent = re.findall("^[\r\n]*(\s*)", self.str)[0] output = indent + output.replace("\n", "\n" + indent) # Strip newline if not needed if self.options.has("no-last-newline") \ or self.prefix or self.suffix: output = re.sub(r'\n\s*$', '', output) # TextMate mode if self.options.has("textmate"): output = self._textmatify(output) return output # Protected methods # --------------------------------------------------------------------------- def _textmatify(self, output): """Returns a version of the output with TextMate placeholders in it. """ matches = re.findall(r'(>$%i]+>\s*)", str) if match is None: break if self.prefix is None: self.prefix = '' self.prefix += match.group(0) str = str[len(match.group(0)):] while True: match = re.findall(r"(\s*<[^>]+>[\s\n\r]*)$", str) if not match: break if self.suffix is None: self.suffix = '' self.suffix = match[0] + self.suffix str = str[:-len(match[0])] # Split by the element separators for token in re.split('(<|>|\+(?!\\s*\+|$))', str): if token.strip() != '': self.tokens.append(Token(token, parser=self)) def _parse(self): """Takes the tokens and does its thing. Populates [[self.root]]. """ # Carry it over to the root node. if self.prefix or self.suffix: self.root.prefix = self.prefix self.root.suffix = self.suffix self.root.depth += 1 for token in self.tokens: if token.type == Token.ELEMENT: # Reset the "last elements added" list. We will # repopulate this with the new elements added now. self._last[:] = [] # Create [[Element]]s from a [[Token]]. # They will be created as many as the multiplier specifies, # multiplied by how many carets we have count = 0 for caret in self.caret: local_count = 0 for i in range(token.multiplier): count += 1 local_count += 1 new = Element(token, caret, count = count, local_count = local_count, parser = self) self._last.append(new) caret.append(new) # For > elif token.type == Token.CHILD: # The last children added. self.caret[:] = self._last # For < elif token.type == Token.PARENT: # If we're the root node, don't do anything parent = self.caret[0].parent if parent is not None: self.caret[:] = [parent] return # Properties # --------------------------------------------------------------------------- # Property: dialect # The dialect of XML dialect = None # Property: str # The string str = '' # Property: tokens # The list of tokens tokens = [] # Property: options # Reference to the [[Options]] instance options = None # Property: root # The root [[Element]] node. root = None # Property: caret # The current insertion point. caret = None # Property: _last # List of the last appended stuff _last = None # Property: indent # Yeah indent = '' # Property: prefix # (String) The trailing tag in the beginning. # # Description: # For instance, in `

    ul>li
    `, the `prefix` is `
    `. prefix = '' # Property: suffix # (string) The trailing tag at the end. suffix = '' pass # =============================================================================== class Element: """An element. """ def __init__(self, token=None, parent=None, count=None, local_count=None, \ parser=None, opening_tag=None, closing_tag=None, \ attributes=None, name=None, text=None): """Constructor. This is called by ???. Description: All parameters are optional. token - (Token) The token (required) parent - (Element) Parent element; `None` if root count - (Int) The number to substitute for `&` (e.g., in `li.item-$`) local_count - (Int) The number to substitute for `$` (e.g., in `li.item-&`) parser - (Parser) The parser attributes - ... name - ... text - ... """ self.children = [] self.attributes = {} self.parser = parser if token is not None: # Assumption is that token is of type [[Token]] and is # a [[Token.ELEMENT]]. self.name = token.name self.attributes = token.attributes.copy() self.text = token.text self.populate = token.populate self.expand = token.expand self.opening_tag = token.opening_tag self.closing_tag = token.closing_tag # `count` can be given. This will substitude & in classname and ID if count is not None: for key in self.attributes: attrib = self.attributes[key] attrib = attrib.replace('&', ("%i" % count)) if local_count is not None: attrib = attrib.replace('$', ("%i" % local_count)) self.attributes[key] = attrib # Copy over from parameters if attributes: self.attributes = attribues if name: self.name = name if text: self.text = text self._fill_attributes() self.parent = parent if parent is not None: self.depth = parent.depth + 1 if self.populate: self._populate() def render(self): """Renders the element, along with it's subelements, into HTML code. [Grouped under "Rendering methods"] """ output = "" try: spaces_count = int(self.parser.options.options['indent-spaces']) except: spaces_count = 4 spaces = ' ' * spaces_count indent = self.depth * spaces prefix, suffix = ('', '') if self.prefix: prefix = self.prefix + "\n" if self.suffix: suffix = self.suffix # Make the guide from the ID (/#header), or the class if there's no ID (/.item) # This is for the start-guide, end-guide and post-tag-guides guide_str = '' if 'id' in self.attributes: guide_str += "#%s" % self.attributes['id'] elif 'class' in self.attributes: guide_str += ".%s" % self.attributes['class'].replace(' ', '.') # Build the post-tag guide (e.g.,
    ), # the start guide, and the end guide. guide = '' start_guide = '' end_guide = '' if ((self.name == 'div') and \ (('id' in self.attributes) or ('class' in self.attributes))): if (self.parser.options.has('post-tag-guides')): guide = "" % guide_str if (self.parser.options.has('start-guide-format')): format = self.parser.options.get('start-guide-format') try: start_guide = format % guide_str except: start_guide = (format + " " + guide_str).strip() start_guide = "%s\n" % (indent, start_guide) if (self.parser.options.has('end-guide-format')): format = self.parser.options.get('end-guide-format') try: end_guide = format % guide_str except: end_guide = (format + " " + guide_str).strip() end_guide = "\n%s" % (indent, end_guide) # Short, self-closing tags (
    ) short_tags = self.parser.dialect.short_tags # When it should be expanded.. # (That is,
    \n...\n
    or similar -- wherein something must go # inside the opening/closing tags) if len(self.children) > 0 \ or self.expand \ or prefix or suffix \ or (self.parser.options.has('expand-divs') and self.name == 'div'): for child in self.children: output += child.render() # For expand divs: if there are no children (that is, `output` # is still blank despite above), fill it with a blank line. if (output == ''): output = indent + spaces + "\n" # If we're a root node and we have a prefix or suffix... # (Only the root node can have a prefix or suffix.) if prefix or suffix: output = "%s%s%s%s%s\n" % \ (indent, prefix, output, suffix, guide) # Uh.. elif self.name != '' or \ self.opening_tag is not None or \ self.closing_tag is not None: output = start_guide + \ indent + self.get_opening_tag() + "\n" + \ output + \ indent + self.get_closing_tag() + \ guide + end_guide + "\n" # Short, self-closing tags (
    ) elif self.name in short_tags: output = "%s<%s />\n" % (indent, self.get_default_tag()) # Tags with text, possibly elif self.name != '' or \ self.opening_tag is not None or \ self.closing_tag is not None: output = "%s%s%s%s%s%s%s%s" % \ (start_guide, indent, self.get_opening_tag(), \ self.text, \ self.get_closing_tag(), \ guide, end_guide, "\n") # Else, it's an empty-named element (like the root). Pass. else: pass return output def get_default_tag(self): """Returns the opening tag (without brackets). Usage: element.get_default_tag() [Grouped under "Rendering methods"] """ output = '%s' % (self.name) for key, value in self.attributes.iteritems(): output += ' %s="%s"' % (key, value) return output def get_opening_tag(self): if self.opening_tag is None: return "<%s>" % self.get_default_tag() else: return self.opening_tag def get_closing_tag(self): if self.closing_tag is None: return "" % self.name else: return self.closing_tag def append(self, object): """Registers an element as a child of this element. Usage: element.append(child) Description: Adds a given element `child` to the children list of this element. It will be rendered when [[render()]] is called on the element. See also: - [[get_last_child()]] [Grouped under "Traversion methods"] """ self.children.append(object) def get_last_child(self): """Returns the last child element which was [[append()]]ed to this element. Usage: element.get_last_child() Description: This is the same as using `element.children[-1]`. [Grouped under "Traversion methods"] """ return self.children[-1] def _populate(self): """Expands with default items. This is called when the [[populate]] flag is turned on. """ if self.name == 'ul': elements = [Element(name='li', parent=self, parser=self.parser)] elif self.name == 'dl': elements = [ Element(name='dt', parent=self, parser=self.parser), Element(name='dd', parent=self, parser=self.parser)] elif self.name == 'table': tr = Element(name='tr', parent=self, parser=self.parser) td = Element(name='td', parent=tr, parser=self.parser) tr.children.append(td) elements = [tr] else: elements = [] for el in elements: self.children.append(el) def _fill_attributes(self): """Fills default attributes for certain elements. Description: This is called by the constructor. [Protected, grouped under "Protected methods"] """ # Make sure 's have a href, 's have an src, etc. required = self.parser.dialect.required for element, attribs in required.iteritems(): if self.name == element: for attrib in attribs: if attrib not in self.attributes: self.attributes[attrib] = attribs[attrib] # --------------------------------------------------------------------------- # Property: last_child # [Read-only] last_child = property(get_last_child) # --------------------------------------------------------------------------- # Property: parent # (Element) The parent element. parent = None # Property: name # (String) The name of the element (e.g., `div`) name = '' # Property: attributes # (Dict) The dictionary of attributes (e.g., `{'src': 'image.jpg'}`) attributes = None # Property: children # (List of Elements) The children children = None # Property: opening_tag # (String or None) The opening tag. Optional; will use `name` and # `attributes` if this is not given. opening_tag = None # Property: closing_tag # (String or None) The closing tag closing_tag = None text = '' depth = -1 expand = False populate = False parser = None # Property: prefix # Only the root note can have this. prefix = None suffix = None # =============================================================================== class Token: def __init__(self, str, parser=None): """Token. Description: str - The string to parse In the string `div > ul`, there are 3 tokens. (`div`, `>`, and `ul`) For `>`, it will be a `Token` with `type` set to `Token.CHILD` """ self.str = str.strip() self.attributes = {} self.parser = parser # Set the type. if self.str == '<': self.type = Token.PARENT elif self.str == '>': self.type = Token.CHILD elif self.str == '+': self.type = Token.SIBLING else: self.type = Token.ELEMENT self._init_element() def _init_element(self): """Initializes. Only called if the token is an element token. [Private] """ # Get the tag name. Default to DIV if none given. name = re.findall('^([\w\-:]*)', self.str)[0] name = name.lower().replace('-', ':') # Find synonyms through this thesaurus synonyms = self.parser.dialect.synonyms if name in synonyms.keys(): name = synonyms[name] if ':' in name: try: spaces_count = int(self.parser.options.get('indent-spaces')) except: spaces_count = 4 indent = ' ' * spaces_count shortcuts = self.parser.dialect.shortcuts if name in shortcuts.keys(): for key, value in shortcuts[name].iteritems(): setattr(self, key, value) if 'html' in name: return else: self.name = name elif (name == ''): self.name = 'div' else: self.name = name # Look for attributes attribs = [] for attrib in re.findall('\[([^\]]*)\]', self.str): attribs.append(attrib) self.str = self.str.replace("[" + attrib + "]", "") if len(attribs) > 0: for attrib in attribs: try: key, value = attrib.split('=', 1) except: key, value = attrib, '' self.attributes[key] = value # Try looking for text text = None for text in re.findall('\{([^\}]*)\}', self.str): self.str = self.str.replace("{" + text + "}", "") if text is not None: self.text = text # Get the class names classes = [] for classname in re.findall('\.([\$a-zA-Z0-9_\-\&]+)', self.str): classes.append(classname) if len(classes) > 0: try: self.attributes['class'] except: self.attributes['class'] = '' self.attributes['class'] += ' ' + ' '.join(classes) self.attributes['class'] = self.attributes['class'].strip() # Get the ID id = None for id in re.findall('#([\$a-zA-Z0-9_\-\&]+)', self.str): pass if id is not None: self.attributes['id'] = id # See if there's a multiplier (e.g., "li*3") multiplier = None for multiplier in re.findall('\*\s*([0-9]+)', self.str): pass if multiplier is not None: self.multiplier = int(multiplier) # Populate flag (e.g., ul+) flags = None for flags in re.findall('[\+\!]+$', self.str): pass if flags is not None: if '+' in flags: self.populate = True if '!' in flags: self.expand = True def __str__(self): return self.str str = '' parser = None # For elements # See the properties of `Element` for description on these. name = '' attributes = None multiplier = 1 expand = False populate = False text = '' opening_tag = None closing_tag = None # Type type = 0 ELEMENT = 2 CHILD = 4 PARENT = 8 SIBLING = 16 # =============================================================================== class Router: """The router. """ # Constructor # --------------------------------------------------------------------------- def __init__(self): pass # Methods # --------------------------------------------------------------------------- def start(self, options=None, str=None, ret=None): if (options): self.options = Options(router=self, options=options, argv=None) else: self.options = Options(router=self, argv=sys.argv[1:], options=None) if (self.options.has('help')): return self.help() elif (self.options.has('version')): return self.version() else: return self.parse(str=str, ret=ret) def help(self): print "Usage: %s [OPTIONS]" % sys.argv[0] print "Expands input into HTML." print "" for short, long, info in self.options.cmdline_keys: if "Deprecated" in info: continue if not short == '': short = '-%s,' % short if not long == '': long = '--%s' % long.replace("=", "=XXX") print "%6s %-25s %s" % (short, long, info) print "" print "\n".join(self.help_content) def version(self): print "Uhm, yeah." def parse(self, str=None, ret=None): self.parser = Parser(self.options) try: # Read the files # for line in fileinput.input(): lines.append(line.rstrip(os.linesep)) if str is not None: lines = str else: lines = [sys.stdin.read()] lines = " ".join(lines) except KeyboardInterrupt: pass except: sys.stderr.write("Reading failed.\n") return try: self.parser.load_string(lines) output = self.parser.render() if ret: return output sys.stdout.write(output) except: sys.stderr.write("Parse error. Check your input.\n") print sys.exc_info()[0] print sys.exc_info()[1] def exit(self): sys.exit() help_content = [ "Please refer to the manual for more information.", ] # =============================================================================== class Options: def __init__(self, router, argv, options=None): # Init self self.router = router # `options` can be given as a dict of stuff to preload if options: for k, v in options.iteritems(): self.options[k] = v return # Prepare for getopt() short_keys, long_keys = "", [] for short, long, info in self.cmdline_keys: # 'v', 'version' short_keys += short long_keys.append(long) try: getoptions, arguments = getopt.getopt(argv, short_keys, long_keys) except getopt.GetoptError: err = sys.exc_info()[1] sys.stderr.write("Options error: %s\n" % err) sys.stderr.write("Try --help for a list of arguments.\n") return router.exit() # Sort them out into options options = {} i = 0 for option in getoptions: key, value = option # '--version', '' if (value == ''): value = True # If the key is long, write it if key[0:2] == '--': clean_key = key[2:] options[clean_key] = value # If the key is short, look for the long version of it elif key[0:1] == '-': for short, long, info in self.cmdline_keys: if short == key[1:]: print long options[long] = True # Done for k, v in options.iteritems(): self.options[k] = v def __getattr__(self, attr): return self.get(attr) def get(self, attr): try: return self.options[attr] except: return None def has(self, attr): try: return self.options.has_key(attr) except: return False options = { 'indent-spaces': 4 } cmdline_keys = [ ('h', 'help', 'Shows help'), ('v', 'version', 'Shows the version'), ('', 'no-guides', 'Deprecated'), ('', 'post-tag-guides', 'Adds comments at the end of DIV tags'), ('', 'textmate', 'Adds snippet info (textmate mode)'), ('', 'indent-spaces=', 'Indent spaces'), ('', 'expand-divs', 'Automatically expand divs'), ('', 'no-last-newline', 'Skip the trailing newline'), ('', 'start-guide-format=', 'To be documented'), ('', 'end-guide-format=', 'To be documented'), ] # Property: router # Router router = 1 # =============================================================================== if __name__ == "__main__": z = Router() z.start() scribes-0.4~r910/LanguagePlugins/Sparkup/ViewUpdater.py0000644000175000017500000000170611242100540022751 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "execute", self.__freeze_cb) self.connect(manager, "removed-placeholders", self.__thaw_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__frozen = False return def __freeze(self): if self.__frozen: return False self.__editor.freeze() self.__frozen = True return False def __thaw(self): if self.__frozen is False: return False self.__editor.thaw() self.__frozen = False return False def __freeze_cb(self, *args): self.__freeze() return False def __thaw_cb(self, *args): self.__thaw() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/LanguagePlugins/PythonSmartIndentation/0000755000175000017500000000000011242100540023174 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonSmartIndentation/__init__.py0000644000175000017500000000000011242100540025273 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/PythonSmartIndentation/Manager.py0000644000175000017500000001241211242100540025120 0ustar andreasandreasfrom gobject import signal_query, signal_new, SIGNAL_ACTION from gobject import TYPE_BOOLEAN, TYPE_STRING, SIGNAL_NO_RECURSE from gobject import SIGNAL_RUN_LAST, type_register SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION from gtksourceview2 import View class Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.textview.connect("key-press-event", self.__key_press_event_cb) def __init_attributes(self, editor): self.__editor = editor self.__textview = editor.textview return def __backward_to_line_begin(self, iterator): if iterator.starts_line(): return iterator while True: iterator.backward_char() if iterator.starts_line(): break return iterator def __forward_to_line_end(self, iterator): if iterator.ends_line(): return iterator iterator.forward_to_line_end() return iterator def __get_line_text(self): iterator = self.__editor.cursor begin = self.__backward_to_line_begin(iterator.copy()) end = self.__forward_to_line_end(iterator) text = self.__editor.textbuffer.get_text(begin, end) return text def __line_ends_with_colon(self): line_text = self.__get_line_text().strip(" \t") value = True if line_text.endswith(":") else False return value def __get_line_indentation(self): iterator = self.__editor.cursor begin = self.__backward_to_line_begin(iterator) iterator = begin.copy() while True: if not (begin.get_char() in (" ", "\t")): break begin.forward_char() whitespaces = self.__editor.textbuffer.get_text(iterator, begin) return whitespaces def __get_indentation_for_next_line(self): whitespaces = self.__get_line_indentation() indentation_width = self.__textview.get_tab_width() if not whitespaces: if self.__textview.get_insert_spaces_instead_of_tabs(): whitespaces = " " * indentation_width else: whitespaces = "\t" else: whitespaces = whitespaces.replace("\t", " " * indentation_width) number = whitespaces.count(" ") number_of_indentation_spaces = number - (number % indentation_width) if self.__textview.get_insert_spaces_instead_of_tabs(): whitespaces = " " * (number_of_indentation_spaces + indentation_width) else: whitespaces = "\t" * ((number_of_indentation_spaces / indentation_width) + 1) return whitespaces def __get_dedentation_for_next_line(self): whitespaces = self.__get_line_indentation() indentation_width = self.__textview.get_tab_width() if not whitespaces: return "" whitespaces = whitespaces.replace("\t", " " * indentation_width) number = whitespaces.count(" ") number_of_indentation_spaces = number - (number % indentation_width) if self.__textview.get_insert_spaces_instead_of_tabs(): whitespaces = " " * number_of_indentation_spaces if indentation_width == whitespaces.count(" "): return "" whitespaces = whitespaces[:indentation_width] else: whitespaces = "\t" * ((number_of_indentation_spaces / indentation_width) - 1) return whitespaces def __insert_indentation_on_next_line(self, whitespaces): iterator = self.__editor.cursor iterator = self.__forward_to_line_end(iterator) self.__editor.textbuffer.place_cursor(iterator) self.__editor.textbuffer.insert_at_cursor("\n" + whitespaces) return def __insert_indentation(self, whitespaces): self.__editor.textview.window.freeze_updates() self.__insert_indentation_on_next_line(whitespaces) mark = self.__editor.textbuffer.get_insert() self.__editor.textview.scroll_mark_onscreen(mark) self.__editor.textview.window.thaw_updates() return False def __indent_next_line(self): whitespaces = self.__get_indentation_for_next_line() self.__insert_indentation(whitespaces) return def __dedent_next_line(self): whitespaces = self.__get_dedentation_for_next_line() self.__insert_indentation(whitespaces) return def __cursor_is_before_colon(self): iterator = self.__editor.cursor end = self.__forward_to_line_end(iterator.copy()) from gtk import TEXT_SEARCH_TEXT_ONLY if iterator.forward_search(":", TEXT_SEARCH_TEXT_ONLY ,end): return True return False def __cursor_is_before_return(self): iterator = self.__editor.cursor end = self.__editor.forward_to_line_end(iterator.copy()) text = self.__editor.textbuffer.get_text(iterator, end).strip(" \t") if text: return True return False def __starts_with_return(self): text = self.__get_line_text() text = text.strip(" \t") if not text: return False word = text.split()[0] if word in ("return", "pass", "yield", "break", "continue"): return True return False def __key_press_event_cb(self, widget, event): from gtk.gdk import keyval_name if keyval_name(event.keyval) != "Return": return False from gtk.gdk import SHIFT_MASK, MOD1_MASK, CONTROL_MASK if event.state & SHIFT_MASK: return False if event.state & MOD1_MASK: return False if event.state & CONTROL_MASK: return False ends_with_colon = self.__line_ends_with_colon() if ends_with_colon: if self.__cursor_is_before_colon(): return False self.__indent_next_line() return True starts_with_return = self.__starts_with_return() if not starts_with_return: return False if self.__cursor_is_before_return(): return False self.__dedent_next_line() return True def destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__textview) del self self = None return scribes-0.4~r910/LanguagePlugins/zencoding/0000755000175000017500000000000011242100540020467 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/zencoding/GenericActionHandler.py0000644000175000017500000000204711242100540025054 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager IGNORE_LIST = ("wrap_with_abbreviation", ) class Handler(SignalManager): def __init__(self, manager, editor, zeditor): SignalManager.__init__(self) self.__init_attributes(manager, editor, zeditor) self.connect(manager, "destroy", self.__quit_cb) self.connect(manager, "action", self.__action_cb) def __init_attributes(self, manager, editor, zeditor): self.__manager = manager self.__editor = editor self.__zeditor = zeditor return def __destroy(self): self.disconnect() del self return False def __action(self, action): from zen_core import run_action self.__zeditor.set_context(self.__editor) self.__editor.textview.window.freeze_updates() run_action(action, self.__zeditor) self.__editor.textview.window.thaw_updates() return False def __quit_cb(self, *args): self.__destroy() return False def __action_cb(self, manager, action): if action in IGNORE_LIST: return False from gobject import idle_add idle_add(self.__action, action) return False scribes-0.4~r910/LanguagePlugins/zencoding/__init__.py0000644000175000017500000000000011242100540022566 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/zencoding/Signals.py0000644000175000017500000000117611242100540022446 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "mapped": (SSIGNAL, TYPE_NONE, ()), "mark-selection": (SSIGNAL, TYPE_NONE, ()), "selection-marks": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "action": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "insertion-offsets": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "wrap-abbreviation": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/LanguagePlugins/zencoding/filters/0000755000175000017500000000000011242100540022137 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/zencoding/filters/haml.py0000644000175000017500000000722411242100540023437 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Filter that produces HAML tree @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' from zencoding import zen_core as zen_coding child_token = '${child}' def make_attributes_string(tag, profile): """ Creates HTML attributes string from tag according to profile settings @type tag: ZenNode @type profile: dict """ # make attribute string attrs = '' attr_quote = profile['attr_quotes'] == 'single' and "'" or '"' cursor = profile['place_cursor'] and zen_coding.get_caret_placeholder() or '' # use short notation for ID and CLASS attributes for a in tag.attributes: name_lower = a['name'].lower() if name_lower == 'id': attrs += '#' + (a['value'] or cursor) elif name_lower == 'class': attrs += '.' + (a['value'] or cursor) other_attrs = [] # process other attributes for a in tag.attributes: name_lower = a['name'].lower() if name_lower != 'id' and name_lower != 'class': attr_name = profile['attr_case'] == 'upper' and a['name'].upper() or name_lower other_attrs.append(':' + attr_name + ' => ' + attr_quote + (a['value'] or cursor) + attr_quote) if other_attrs: attrs += '{' + ', '.join(other_attrs) + '}' return attrs def _replace(placeholder, value): if placeholder: return placeholder % value else: return value def process_snippet(item, profile, level=0): """ Processes element with snippet type @type item: ZenNode @type profile: dict @type level: int """ data = item.source.value if not data: # snippet wasn't found, process it as tag return process_tag(item, profile, level) tokens = data.split(child_token) if len(tokens) < 2: start = tokens[0] end = '' else: start, end = tokens padding = item.parent and item.parent.padding or '' item.start = _replace(item.start, zen_coding.pad_string(start, padding)) item.end = _replace(item.end, zen_coding.pad_string(end, padding)) return item def has_block_sibling(item): """ Test if passed node has block-level sibling element @type item: ZenNode @return: bool """ return item.parent and item.parent.has_block_children() def process_tag(item, profile, level=0): """ Processes element with tag type @type item: ZenNode @type profile: dict @type level: int """ if not item.name: # looks like it's root element return item attrs = make_attributes_string(item, profile) cursor = profile['place_cursor'] and zen_coding.get_caret_placeholder() or '' self_closing = '' is_unary = item.is_unary() and not item.children if profile['self_closing_tag'] and is_unary: self_closing = '/' # define tag name tag_name = '%' + (profile['tag_case'] == 'upper' and item.name.upper() or item.name.lower()) if tag_name.lower() == '%div' and '{' not in attrs: # omit div tag tag_name = '' item.end = '' item.start = _replace(item.start, tag_name + attrs + self_closing) if not item.children and not is_unary: item.start += cursor return item def process(tree, profile, level=0): """ Processes simplified tree, making it suitable for output as HTML structure @type tree: ZenNode @type profile: dict @type level: int """ if level == 0: # preformat tree tree = zen_coding.run_filters(tree, profile, '_format') for i, item in enumerate(tree.children): if item.type == 'tag': process_tag(item, profile, level) else: process_snippet(item, profile, level) # replace counters item.start = zen_coding.unescape_text(zen_coding.replace_counter(item.start, item.counter)) item.end = zen_coding.unescape_text(zen_coding.replace_counter(item.end, item.counter)) process(item, profile, level + 1) return treescribes-0.4~r910/LanguagePlugins/zencoding/filters/__init__.py0000644000175000017500000000133111242100540024246 0ustar andreasandreasimport os.path import sys # import all filters __sub_modules = [] __prefix = 'zencoding.filters' __filter_dir = os.path.dirname(__file__) sys.path.append(__filter_dir) filter_map = {} for file in os.listdir(__filter_dir): name, ext = os.path.splitext(file) if ext.lower() == '.py': __sub_modules.append(name) __filters = __import__(__prefix, globals(), locals(), __sub_modules) for key in dir(__filters): __module = getattr(__filters, key) if hasattr(__module, '__name__') and __module.__name__.startswith(__prefix + '.') and hasattr(__module, 'process'): if hasattr(__module, 'alias'): filter_map[__module.alias] = __module.process else: filter_map[__module.__name__[len(__prefix) + 1:]] = __module.process scribes-0.4~r910/LanguagePlugins/zencoding/filters/xsl.py0000644000175000017500000000121311242100540023314 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Filter for trimming "select" attributes from some tags that contains child elements @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' import re tags = { 'xsl:variable': 1, 'xsl:with-param': 1 } re_attr = re.compile(r'\s+select\s*=\s*([\'"]).*?\1') def trim_attribute(node): """ Removes "select" attribute from node @type node: ZenNode """ node.start = re_attr.sub('', node.start) def process(tree, profile): for item in tree.children: if item.type == 'tag' and item.name.lower() in tags and item.children: trim_attribute(item) process(item, profile)scribes-0.4~r910/LanguagePlugins/zencoding/filters/format.py0000644000175000017500000001147011242100540024004 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generic formatting filter: creates proper indentation for each tree node, placing "%s" placeholder where the actual output should be. You can use this filter to preformat tree and then replace %s placeholder to whatever you need. This filter should't be called directly from editor as a part of abbreviation. @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru """ import re from zencoding import zen_core as zen_coding alias = '_format' "Filter name alias (if not defined, ZC will use module name)" child_token = '${child}' placeholder = '%s' def get_newline(): return zen_coding.get_newline() def get_indentation(): return zen_coding.get_indentation() def has_block_sibling(item): """ Test if passed node has block-level sibling element @type item: ZenNode @return: bool """ return item.parent and item.parent.has_block_children() def is_very_first_child(item): """ Test if passed itrem is very first child of the whole tree @type tree: ZenNode """ return item.parent and not item.parent.parent and not item.previous_sibling def should_break_line(node, profile): """ Need to add line break before element @type node: ZenNode @type profile: dict @return: bool """ if not profile['inline_break']: return False # find toppest non-inline sibling while node.previous_sibling and node.previous_sibling.is_inline(): node = node.previous_sibling if not node.is_inline(): return False # calculate how many inline siblings we have node_count = 1 node = node.next_sibling while node: if node.is_inline(): node_count += 1 else: break node = node.next_sibling return node_count >= profile['inline_break'] def should_break_child(node, profile): """ Need to add newline because item has too many inline children @type node: ZenNode @type profile: dict @return: bool """ # we need to test only one child element, because # has_block_children() method will do the rest return node.children and should_break_line(node.children[0], profile) def process_snippet(item, profile, level=0): """ Processes element with snippet type @type item: ZenNode @type profile: dict @param level: Depth level @type level: int """ data = item.source.value; if not data: # snippet wasn't found, process it as tag return process_tag(item, profile, level) item.start = placeholder item.end = placeholder padding = item.parent.padding if item.parent else get_indentation() * level if not is_very_first_child(item): item.start = get_newline() + padding + item.start # adjust item formatting according to last line of start property parts = data.split(child_token) lines = zen_coding.split_by_lines(parts[0] or '') padding_delta = get_indentation() if len(lines) > 1: m = re.match(r'^(\s+)', lines[-1]) if m: padding_delta = m.group(1) item.padding = padding + padding_delta return item def process_tag(item, profile, level=0): """ Processes element with tag type @type item: ZenNode @type profile: dict @param level: Depth level @type level: int """ if not item.name: # looks like it's a root element return item item.start = placeholder item.end = placeholder is_unary = item.is_unary() and not item.children # formatting output if profile['tag_nl'] is not False: padding = item.parent.padding if item.parent else get_indentation() * level force_nl = profile['tag_nl'] is True should_break = should_break_line(item, profile) # formatting block-level elements if ((item.is_block() or should_break) and item.parent) or force_nl: # snippet children should take different formatting if not item.parent or (item.parent.type != 'snippet' and not is_very_first_child(item)): item.start = get_newline() + padding + item.start if item.has_block_children() or should_break_child(item, profile) or (force_nl and not is_unary): item.end = get_newline() + padding + item.end if item.has_tags_in_content() or (force_nl and not item.has_children() and not is_unary): item.start += get_newline() + padding + get_indentation() elif item.is_inline() and has_block_sibling(item) and not is_very_first_child(item): item.start = get_newline() + padding + item.start item.padding = padding + get_indentation() return item def process(tree, profile, level=0): """ Processes simplified tree, making it suitable for output as HTML structure @type item: ZenNode @type profile: dict @param level: Depth level @type level: int """ for item in tree.children: if item.type == 'tag': item = process_tag(item, profile, level) else: item = process_snippet(item, profile, level) if item.content: item.content = zen_coding.pad_string(item.content, item.padding) process(item, profile, level + 1) return treescribes-0.4~r910/LanguagePlugins/zencoding/filters/html.py0000644000175000017500000000666111242100540023466 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Filter that produces HTML tree @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' from zencoding import zen_core as zen_coding child_token = '${child}' def make_attributes_string(tag, profile): """ Creates HTML attributes string from tag according to profile settings @type tag: ZenNode @type profile: dict """ # make attribute string attrs = '' attr_quote = profile['attr_quotes'] == 'single' and "'" or '"' cursor = profile['place_cursor'] and zen_coding.get_caret_placeholder() or '' # process other attributes for a in tag.attributes: attr_name = profile['attr_case'] == 'upper' and a['name'].upper() or a['name'].lower() attrs += ' ' + attr_name + '=' + attr_quote + (a['value'] or cursor) + attr_quote return attrs def _replace(placeholder, value): if placeholder: return placeholder % value else: return value def process_snippet(item, profile, level): """ Processes element with snippet type @type item: ZenNode @type profile: dict @type level: int """ data = item.source.value; if not data: # snippet wasn't found, process it as tag return process_tag(item, profile, level) tokens = data.split(child_token) if len(tokens) < 2: start = tokens[0] end = '' else: start, end = tokens padding = item.parent and item.parent.padding or '' item.start = _replace(item.start, zen_coding.pad_string(start, padding)) item.end = _replace(item.end, zen_coding.pad_string(end, padding)) return item def has_block_sibling(item): """ Test if passed node has block-level sibling element @type item: ZenNode @return: bool """ return item.parent and item.parent.has_block_children() def process_tag(item, profile, level): """ Processes element with tag type @type item: ZenNode @type profile: dict @type level: int """ if not item.name: # looks like it's root element return item attrs = make_attributes_string(item, profile) cursor = profile['place_cursor'] and zen_coding.get_caret_placeholder() or '' self_closing = '' is_unary = item.is_unary() and not item.children start= '' end = '' if profile['self_closing_tag'] == 'xhtml': self_closing = ' /' elif profile['self_closing_tag'] is True: self_closing = '/' # define opening and closing tags tag_name = profile['tag_case'] == 'upper' and item.name.upper() or item.name.lower() if is_unary: start = '<' + tag_name + attrs + self_closing + '>' item.end = '' else: start = '<' + tag_name + attrs + '>' end = '' item.start = _replace(item.start, start) item.end = _replace(item.end, end) if not item.children and not is_unary: item.start += cursor return item def process(tree, profile, level=0): """ Processes simplified tree, making it suitable for output as HTML structure @type tree: ZenNode @type profile: dict @type level: int """ if level == 0: # preformat tree tree = zen_coding.run_filters(tree, profile, '_format') zen_coding.max_tabstop = 0 for item in tree.children: if item.type == 'tag': process_tag(item, profile, level) else: process_snippet(item, profile, level) # replace counters item.start = zen_coding.unescape_text(zen_coding.replace_counter(item.start, item.counter)) item.end = zen_coding.unescape_text(zen_coding.replace_counter(item.end, item.counter)) zen_coding.upgrade_tabstops(item) process(item, profile, level + 1) return tree scribes-0.4~r910/LanguagePlugins/zencoding/filters/format-css.py0000644000175000017500000000106411242100540024570 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Format CSS properties: add space after property name: padding:0; -> padding: 0; @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' import re alias = 'fc' "Filter name alias (if not defined, ZC will use module name)" re_css_prop = re.compile(r'([\w\-]+\s*:)\s*') def process(tree, profile): for item in tree.children: # CSS properties are always snippets if item.type == 'snippet': item.start = re_css_prop.sub(r'\1 ', item.start) process(item, profile) return treescribes-0.4~r910/LanguagePlugins/zencoding/filters/escape.py0000644000175000017500000000114411242100540023751 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Filter for escaping unsafe XML characters: <, >, & @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' import re alias = 'e' "Filter name alias (if not defined, ZC will use module name)" char_map = { '<': '<', '>': '>', '&': '&' } re_chars = re.compile(r'[<>&]') def escape_chars(text): return re_chars.sub(lambda m: char_map[m.group(0)], text) def process(tree, profile=None): for item in tree.children: item.start = escape_chars(item.start) item.end = escape_chars(item.end) process(item) return treescribes-0.4~r910/LanguagePlugins/zencoding/filters/comment.py0000644000175000017500000000233611242100540024157 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Comment important tags (with 'id' and 'class' attributes) @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' from zencoding import zen_core as zen_coding alias = 'c' "Filter name alias (if not defined, ZC will use module name)" def add_comments(node, i): """ Add comments to tag @type node: ZenNode @type i: int """ id_attr = node.get_attribute('id') class_attr = node.get_attribute('class') nl = zen_coding.get_newline() if id_attr or class_attr: comment_str = '' padding = node.parent and node.parent.padding or '' if id_attr: comment_str += '#' + id_attr if class_attr: comment_str += '.' + class_attr node.start = node.start.replace('<', '' + nl + padding + '<', 1) node.end = node.end.replace('>', '>' + nl + padding + '', 1) # replace counters node.start = zen_coding.replace_counter(node.start, i + 1) node.end = zen_coding.replace_counter(node.end, i + 1) def process(tree, profile): if profile['tag_nl'] is False: return tree for i, item in enumerate(tree.children): if item.is_block(): add_comments(item, i) process(item, profile) return treescribes-0.4~r910/LanguagePlugins/zencoding/Utils.py0000644000175000017500000000012711242100540022141 0ustar andreasandreas# Utility functions shared among modules belong here. def answer_to_life(): return 42scribes-0.4~r910/LanguagePlugins/zencoding/zen_editor.py0000644000175000017500000001353211242100540023207 0ustar andreasandreas''' High-level editor interface that communicates with underlying editor (like Espresso, Coda, etc.) or browser. Basically, you should call set_context(obj) method to set up undelying editor context before using any other method. This interface is used by zen_actions.py for performing different actions like Expand abbreviation @example import zen_editor zen_editor.set_context(obj); //now you are ready to use editor object zen_editor.get_selection_range(); @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' class ZenEditor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) def __init_attributes(self, manager, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__manager = manager return def set_context(self, context): """ Setup underlying editor context. You should call this method before using any Zen Coding action. @param context: context object """ self.context = context # default_locale = locale.getdefaultlocale()[0] # lang = re.sub(r'_[^_]+$', '', default_locale) from zen_core import set_caret_placeholder, set_variable set_caret_placeholder('') # if lang != default_locale: # set_variable('lang', lang) # set_variable('locale', default_locale.replace('_', '-')) # else: # set_variable('lang', default_locale) # set_variable('locale', default_locale) self.encoding = "utf8" # self.document.get_encoding().get_charset() set_variable('charset', self.encoding) if self.__view.get_insert_spaces_instead_of_tabs(): set_variable('indentation', " " * self.__view.get_tab_width()) else: set_variable('indentation', "\t") return def get_selection_range(self): """ Returns character indexes of selected text @return: list of start and end indexes @example start, end = zen_editor.get_selection_range(); print('%s, %s' % (start, end)) """ cursor_offset = self.__editor.cursor.get_offset() if self.__editor.has_selection is False: return cursor_offset, cursor_offset start, end = self.__editor.selection_bounds return start.get_offset(), end.get_offset() def create_selection(self, start, end=None): """ Creates selection from start to end character indexes. If end is ommited, this method should place caret and start index @type start: int @type end: int @example zen_editor.create_selection(10, 40) # move caret to 15th character zen_editor.create_selection(15) """ try: get_iterator = self.__buffer.get_iter_at_offset start_iterator = get_iterator(start) if end is None: raise ValueError end_iterator = get_iterator(end) self.__buffer.select_range(start_iterator, end_iterator) except ValueError: self.__buffer.place_cursor(start_iterator) return def get_current_line_range(self): """ Returns current line's start and end indexes @return: list of start and end indexes @example start, end = zen_editor.get_current_line_range(); print('%s, %s' % (start, end)) """ start = self.__editor.backward_to_line_begin() end = self.__editor.forward_to_line_end() return start.get_offset(), end.get_offset() def get_caret_pos(self): """ Returns current caret position """ return self.__editor.cursor.get_offset() def set_caret_pos(self, pos): """ Set new caret position @type pos: int """ iterator = self.__buffer.get_iter_at_offset(pos) self.__buffer.place_cursor(iterator) return def get_current_line(self): """ Returns content of current line @return: str """ return self.__editor.get_line_text() def replace_content(self, value, start=None, end=None): """ Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value. If you pass start argument only, the value will be placed at start string index of current content. If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value @param value: Content you want to paste @type value: str @param start: Start index of editor's content @type start: int @param end: End index of editor's content @type end: int """ if start is None and end is None: iter_start, iter_end = self.__buffer.get_bounds() elif end is None: iter_start = self.__buffer.get_iter_at_offset(start) iter_end = iter_start.copy() else: iter_start = self.__buffer.get_iter_at_offset(start) iter_end = self.__buffer.get_iter_at_offset(end) self.__buffer.begin_user_action() self.__buffer.delete(iter_start, iter_end) start_insertion_offset = self.__editor.cursor.get_offset() from zen_actions import get_current_line_padding padding = get_current_line_padding(self) from zen_core import pad_string self.__buffer.insert_at_cursor(pad_string(value, padding)) end_insertion_offset = self.__editor.cursor.get_offset() self.__buffer.end_user_action() self.__manager.emit("insertion-offsets", (start_insertion_offset, end_insertion_offset)) return def get_content(self): """ Returns editor's content @return: str """ return self.__editor.text def get_syntax(self): """ Returns current editor's syntax mode @return: str """ language = self.__editor.language if language.lower() == "html": return "html" if language.lower() == "css": return "css" if language.lower() in ("xslt", "xsl"): return "xsl" def get_profile_name(self): """ Returns current output profile name (@see zen_coding#setup_profile) @return {String} """ return 'xhtml' scribes-0.4~r910/LanguagePlugins/zencoding/SelectionMarker.py0000644000175000017500000000220111242100540024123 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__quit_cb) self.connect(manager, "mark-selection", self.__mark_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bmark = editor.create_left_mark() self.__emark = editor.create_right_mark() return def __destroy(self): self.disconnect() del self return False def __mark(self): try: if not self.__editor.has_selection: raise ValueError start_iterator, end_iterator = self.__editor.selection_bounds self.__editor.textbuffer.move_mark(self.__bmark, start_iterator) self.__editor.textbuffer.move_mark(self.__emark, end_iterator) self.__manager.emit("selection-marks", (self.__bmark, self.__emark)) except ValueError: self.__manager.emit("selection-marks", (None, None)) return False def __quit_cb(self, *args): self.__destroy() return False def __mark_cb(self, *args): self.__mark() return False scribes-0.4~r910/LanguagePlugins/zencoding/zen_actions.py0000644000175000017500000004404611242100540023365 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- """ Middleware layer that communicates between editor and Zen Coding. This layer describes all available Zen Coding actions, like "Expand Abbreviation". @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru """ from zencoding import zen_core as zen_coding from zencoding import html_matcher import re from zen_core import char_at def find_abbreviation(editor): """ Search for abbreviation in editor from current caret position @param editor: Editor instance @type editor: ZenEditor @return: str """ start, end = editor.get_selection_range() if start != end: # abbreviation is selected by user return editor.get_content()[start:end]; # search for new abbreviation from current caret position cur_line_start, cur_line_end = editor.get_current_line_range() return zen_coding.extract_abbreviation(editor.get_content()[cur_line_start:start]) def expand_abbreviation(editor, syntax=None, profile_name=None): """ Find from current caret position and expand abbreviation in editor @param editor: Editor instance @type editor: ZenEditor @param syntax: Syntax type (html, css, etc.) @type syntax: str @param profile_name: Output profile name (html, xml, xhtml) @type profile_name: str @return: True if abbreviation was expanded successfully """ if syntax is None: syntax = editor.get_syntax() if profile_name is None: profile_name = editor.get_profile_name() range_start, caret_pos = editor.get_selection_range() abbr = find_abbreviation(editor) content = '' if abbr: content = zen_coding.expand_abbreviation(abbr, syntax, profile_name) if content: editor.replace_content(content, caret_pos - len(abbr), caret_pos) return True return False def expand_abbreviation_with_tab(editor, syntax, profile_name='xhtml'): """ A special version of expandAbbreviation function: if it can't find abbreviation, it will place Tab character at caret position @param editor: Editor instance @type editor: ZenEditor @param syntax: Syntax type (html, css, etc.) @type syntax: str @param profile_name: Output profile name (html, xml, xhtml) @type profile_name: str """ if not expand_abbreviation(editor, syntax, profile_name): editor.replace_content(zen_coding.get_variable('indentation'), editor.get_caret_pos()) return True def match_pair(editor, direction='out', syntax=None): """ Find and select HTML tag pair @param editor: Editor instance @type editor: ZenEditor @param direction: Direction of pair matching: 'in' or 'out'. @type direction: str """ direction = direction.lower() if syntax is None: syntax = editor.get_profile_name() range_start, range_end = editor.get_selection_range() cursor = range_end content = editor.get_content() rng = None old_open_tag = html_matcher.last_match['opening_tag'] old_close_tag = html_matcher.last_match['closing_tag'] if direction == 'in' and old_open_tag and range_start != range_end: # user has previously selected tag and wants to move inward if not old_close_tag: # unary tag was selected, can't move inward return False elif old_open_tag.start == range_start: if content[old_open_tag.end] == '<': # test if the first inward tag matches the entire parent tag's content _r = html_matcher.find(content, old_open_tag.end + 1, syntax) if _r[0] == old_open_tag.end and _r[1] == old_close_tag.start: rng = html_matcher.match(content, old_open_tag.end + 1, syntax) else: rng = (old_open_tag.end, old_close_tag.start) else: rng = (old_open_tag.end, old_close_tag.start) else: new_cursor = content[0:old_close_tag.start].find('<', old_open_tag.end) search_pos = new_cursor + 1 if new_cursor != -1 else old_open_tag.end rng = html_matcher.match(content, search_pos, syntax) else: rng = html_matcher.match(content, cursor, syntax) if rng and rng[0] is not None: editor.create_selection(rng[0], rng[1]) return True else: return False def match_pair_inward(editor): return match_pair(editor, 'in') def match_pair_outward(editor): return match_pair(editor, 'out') def narrow_to_non_space(text, start, end): """ Narrow down text indexes, adjusting selection to non-space characters @type text: str @type start: int @type end: int @return: list """ # narrow down selection until first non-space character while start < end: if not text[start].isspace(): break start += 1 while end > start: end -= 1 if not text[end].isspace(): end += 1 break return start, end def wrap_with_abbreviation(editor, abbr, syntax=None, profile_name=None): """ Wraps content with abbreviation @param editor: Editor instance @type editor: ZenEditor @param syntax: Syntax type (html, css, etc.) @type syntax: str @param profile_name: Output profile name (html, xml, xhtml) @type profile_name: str """ if not abbr: return None if syntax is None: syntax = editor.get_syntax() if profile_name is None: profile_name = editor.get_profile_name() start_offset, end_offset = editor.get_selection_range() content = editor.get_content() if start_offset == end_offset: # no selection, find tag pair rng = html_matcher.match(content, start_offset, profile_name) if rng[0] is None: # nothing to wrap return None else: start_offset, end_offset = rng start_offset, end_offset = narrow_to_non_space(content, start_offset, end_offset) line_bounds = get_line_bounds(content, start_offset) padding = get_line_padding(content[line_bounds[0]:line_bounds[1]]) new_content = content[start_offset:end_offset] result = zen_coding.wrap_with_abbreviation(abbr, unindent_text(new_content, padding), syntax, profile_name) if result: editor.replace_content(result, start_offset, end_offset) return True return False def unindent(editor, text): """ Unindent content, thus preparing text for tag wrapping @param editor: Editor instance @type editor: ZenEditor @param text: str @return str """ return unindent_text(text, get_current_line_padding(editor)) def unindent_text(text, pad): """ Removes padding at the beginning of each text's line @type text: str @type pad: str """ lines = zen_coding.split_by_lines(text) for i,line in enumerate(lines): if line.startswith(pad): lines[i] = line[len(pad):] return zen_coding.get_newline().join(lines) def get_current_line_padding(editor): """ Returns padding of current editor's line @return str """ return get_line_padding(editor.get_current_line()) def get_line_padding(line): """ Returns padding of current editor's line @return str """ m = re.match(r'^(\s+)', line) return m and m.group(0) or '' def find_new_edit_point(editor, inc=1, offset=0): """ Search for new caret insertion point @param editor: Editor instance @type editor: ZenEditor @param inc: Search increment: -1 — search left, 1 — search right @param offset: Initial offset relative to current caret position @return: -1 if insertion point wasn't found """ cur_point = editor.get_caret_pos() + offset content = editor.get_content() max_len = len(content) next_point = -1 re_empty_line = r'^\s+$' def get_line(ix): start = ix while start >= 0: c = content[start] if c == '\n' or c == '\r': break start -= 1 return content[start:ix] while cur_point < max_len and cur_point > 0: cur_point += inc cur_char = char_at(content, cur_point) next_char = char_at(content, cur_point + 1) prev_char = char_at(content, cur_point - 1) if cur_char in '"\'': if next_char == cur_char and prev_char == '=': # empty attribute next_point = cur_point + 1 elif cur_char == '>' and next_char == '<': # between tags next_point = cur_point + 1 elif cur_char in '\r\n': # empty line if re.search(re_empty_line, get_line(cur_point - 1)): next_point = cur_point if next_point != -1: break return next_point def prev_edit_point(editor): """ Move caret to previous edit point @param editor: Editor instance @type editor: ZenEditor """ cur_pos = editor.get_caret_pos() new_point = find_new_edit_point(editor, -1) if new_point == cur_pos: # we're still in the same point, try searching from the other place new_point = find_new_edit_point(editor, -1, -2) if new_point != -1: editor.set_caret_pos(new_point) return True return False def next_edit_point(editor): """ Move caret to next edit point @param editor: Editor instance @type editor: ZenEditor """ new_point = find_new_edit_point(editor, 1) if new_point != -1: editor.set_caret_pos(new_point) return True return False def insert_formatted_newline(editor, mode='html'): """ Inserts newline character with proper indentation @param editor: Editor instance @type editor: ZenEditor @param mode: Syntax mode (only 'html' is implemented) @type mode: str """ caret_pos = editor.get_caret_pos() nl = zen_coding.get_newline() pad = zen_coding.get_variable('indentation') if mode == 'html': # let's see if we're breaking newly created tag pair = html_matcher.get_tags(editor.get_content(), editor.get_caret_pos(), editor.get_profile_name()) if pair[0] and pair[1] and pair[0]['type'] == 'tag' and pair[0]['end'] == caret_pos and pair[1]['start'] == caret_pos: editor.replace_content(nl + pad + zen_coding.get_caret_placeholder() + nl, caret_pos) else: editor.replace_content(nl, caret_pos) else: editor.replace_content(nl, caret_pos) return True def select_line(editor): """ Select line under cursor @param editor: Editor instance @type editor: ZenEditor """ start, end = editor.get_current_line_range(); editor.create_selection(start, end) return True def go_to_matching_pair(editor): """ Moves caret to matching opening or closing tag @param editor: Editor instance @type editor: ZenEditor """ content = editor.get_content() caret_pos = editor.get_caret_pos() if content[caret_pos] == '<': # looks like caret is outside of tag pair caret_pos += 1 tags = html_matcher.get_tags(content, caret_pos, editor.get_profile_name()) if tags and tags[0]: # match found open_tag, close_tag = tags if close_tag: # exclude unary tags if open_tag['start'] <= caret_pos and open_tag['end'] >= caret_pos: editor.set_caret_pos(close_tag['start']) elif close_tag['start'] <= caret_pos and close_tag['end'] >= caret_pos: editor.set_caret_pos(open_tag['start']) return True return False def merge_lines(editor): """ Merge lines spanned by user selection. If there's no selection, tries to find matching tags and use them as selection @param editor: Editor instance @type editor: ZenEditor """ start, end = editor.get_selection_range() if start == end: # find matching tag pair = html_matcher.match(editor.get_content(), editor.get_caret_pos(), editor.get_profile_name()) if pair and pair[0] is not None: start, end = pair if start != end: # got range, merge lines text = editor.get_content()[start:end] lines = map(lambda s: re.sub(r'^\s+', '', s), zen_coding.split_by_lines(text)) text = re.sub(r'\s{2,}', ' ', ''.join(lines)) editor.replace_content(text, start, end) editor.create_selection(start, start + len(text)) return True return False def toggle_comment(editor): """ Toggle comment on current editor's selection or HTML tag/CSS rule @type editor: ZenEditor """ syntax = editor.get_syntax() if syntax == 'css': return toggle_css_comment(editor) else: return toggle_html_comment(editor) def toggle_html_comment(editor): """ Toggle HTML comment on current selection or tag @type editor: ZenEditor @return: True if comment was toggled """ start, end = editor.get_selection_range() content = editor.get_content() if start == end: # no selection, find matching tag pair = html_matcher.get_tags(content, editor.get_caret_pos(), editor.get_profile_name()) if pair and pair[0]: # found pair start = pair[0].start end = pair[1] and pair[1].end or pair[0].end return generic_comment_toggle(editor, '', start, end) def toggle_css_comment(editor): """ Simple CSS commenting @type editor: ZenEditor @return: True if comment was toggled """ start, end = editor.get_selection_range() if start == end: # no selection, get current line start, end = editor.get_current_line_range() # adjust start index till first non-space character start, end = narrow_to_non_space(editor.get_content(), start, end) return generic_comment_toggle(editor, '/*', '*/', start, end) def search_comment(text, pos, start_token, end_token): """ Search for nearest comment in str, starting from index from @param text: Where to search @type text: str @param pos: Search start index @type pos: int @param start_token: Comment start string @type start_token: str @param end_token: Comment end string @type end_token: str @return: None if comment wasn't found, list otherwise """ start_ch = start_token[0] end_ch = end_token[0] comment_start = -1 comment_end = -1 def has_match(tx, start): return text[start:start + len(tx)] == tx # search for comment start while pos: pos -= 1 if text[pos] == start_ch and has_match(start_token, pos): comment_start = pos break if comment_start != -1: # search for comment end pos = comment_start content_len = len(text) while content_len >= pos: pos += 1 if text[pos] == end_ch and has_match(end_token, pos): comment_end = pos + len(end_token) break if comment_start != -1 and comment_end != -1: return comment_start, comment_end else: return None def generic_comment_toggle(editor, comment_start, comment_end, range_start, range_end): """ Generic comment toggling routine @type editor: ZenEditor @param comment_start: Comment start token @type comment_start: str @param comment_end: Comment end token @type comment_end: str @param range_start: Start selection range @type range_start: int @param range_end: End selection range @type range_end: int @return: bool """ content = editor.get_content() caret_pos = [editor.get_caret_pos()] new_content = None def adjust_caret_pos(m): caret_pos[0] -= len(m.group(0)) return '' def remove_comment(text): """ Remove comment markers from string @param {Sting} str @return {String} """ text = re.sub(r'^' + re.escape(comment_start) + r'\s*', adjust_caret_pos, text) return re.sub(r'\s*' + re.escape(comment_end) + '$', '', text) def has_match(tx, start): return content[start:start + len(tx)] == tx # first, we need to make sure that this substring is not inside comment comment_range = search_comment(content, caret_pos[0], comment_start, comment_end) if comment_range and comment_range[0] <= range_start and comment_range[1] >= range_end: # we're inside comment, remove it range_start, range_end = comment_range new_content = remove_comment(content[range_start:range_end]) else: # should add comment # make sure that there's no comment inside selection new_content = '%s %s %s' % (comment_start, re.sub(re.escape(comment_start) + r'\s*|\s*' + re.escape(comment_end), '', content[range_start:range_end]), comment_end) # adjust caret position caret_pos[0] += len(comment_start) + 1 # replace editor content if new_content is not None: d = caret_pos[0] - range_start new_content = new_content[0:d] + zen_coding.get_caret_placeholder() + new_content[d:] editor.replace_content(unindent(editor, new_content), range_start, range_end) return True return False def split_join_tag(editor, profile_name=None): """ Splits or joins tag, e.g. transforms it into a short notation and vice versa:
    →
    : join
    →
    : split @param editor: Editor instance @type editor: ZenEditor @param profile_name: Profile name @type profile_name: str """ caret_pos = editor.get_caret_pos() profile = zen_coding.get_profile(profile_name or editor.get_profile_name()) caret = zen_coding.get_caret_placeholder() # find tag at current position pair = html_matcher.get_tags(editor.get_content(), caret_pos, profile_name or editor.get_profile_name()) if pair and pair[0]: new_content = pair[0].full_tag if pair[1]: # join tag closing_slash = '' if profile['self_closing_tag'] is True: closing_slash = '/' elif profile['self_closing_tag'] == 'xhtml': closing_slash = ' /' new_content = re.sub(r'\s*>$', closing_slash + '>', new_content) # add caret placeholder if len(new_content) + pair[0].start < caret_pos: new_content += caret else: d = caret_pos - pair[0].start new_content = new_content[0:d] + caret + new_content[d:] editor.replace_content(new_content, pair[0].start, pair[1].end) else: # split tag nl = zen_coding.get_newline() pad = zen_coding.get_variable('indentation') # define tag content depending on profile tag_content = profile['tag_nl'] is True and nl + pad + caret + nl or caret new_content = '%s%s' % (re.sub(r'\s*\/>$', '>', new_content), tag_content, pair[0].name) editor.replace_content(new_content, pair[0].start, pair[0].end) return True else: return False def get_line_bounds(text, pos): """ Returns line bounds for specific character position @type text: str @param pos: Where to start searching @type pos: int @return: list """ start = 0 end = len(text) - 1 # search left for i in range(pos - 1, 0, -1): if text[i] in '\n\r': start = i + 1 break # search right for i in range(pos, len(text)): if text[i] in '\n\r': end = i break return start, end def remove_tag(editor): """ Gracefully removes tag under cursor @type editor: ZenEditor """ caret_pos = editor.get_caret_pos() content = editor.get_content() # search for tag pair = html_matcher.get_tags(content, caret_pos, editor.get_profile_name()) if pair and pair[0]: if not pair[1]: # simply remove unary tag editor.replace_content(zen_coding.get_caret_placeholder(), pair[0].start, pair[0].end) else: tag_content_range = narrow_to_non_space(content, pair[0].end, pair[1].start) start_line_bounds = get_line_bounds(content, tag_content_range[0]) start_line_pad = get_line_padding(content[start_line_bounds[0]:start_line_bounds[1]]) tag_content = content[tag_content_range[0]:tag_content_range[1]] tag_content = unindent_text(tag_content, start_line_pad) editor.replace_content(zen_coding.get_caret_placeholder() + tag_content, pair[0].start, pair[1].end) return True else: return False scribes-0.4~r910/LanguagePlugins/zencoding/Exceptions.py0000644000175000017500000000011511242100540023157 0ustar andreasandreas# Custom exceptions belong in this module. class FooError(Exception): pass scribes-0.4~r910/LanguagePlugins/zencoding/Trigger.py0000644000175000017500000001055211242100540022447 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self, editor) TriggerManager.__init__(self, editor) self.__init_attributes(editor) # self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(self.__trigger4, "activate", self.__activate_cb) self.connect(self.__trigger5, "activate", self.__activate_cb) self.connect(self.__trigger6, "activate", self.__activate_cb) self.connect(self.__trigger7, "activate", self.__activate_cb) self.connect(self.__trigger8, "activate", self.__activate_cb) self.connect(self.__trigger9, "activate", self.__activate_cb) self.connect(self.__trigger10, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None # name, shortcut, description, category = ( # "zencoding-toggle-comment", # "c", # _("Add or remove comments in most web languages"), # _("Markup Operations") # ) # self.__trigger1 = self.create_trigger(name, shortcut, description, category) # self.__trigger1.zen_action = "toggle_comment" name, shortcut, description, category = ( "zencoding-expand-abbreviation", "comma", _("Expand markup abbreviations"), _("Markup Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.zen_action = "expand_abbreviation" name, shortcut, description, category = ( "zencoding-next-edit-point", "Right", _("Move cursor to next edit point"), _("Markup Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__trigger3.zen_action = "next_edit_point" name, shortcut, description, category = ( "zencoding-previous-edit-point", "Left", _("Move cursor to previous edit point"), _("Markup Operations") ) self.__trigger4 = self.create_trigger(name, shortcut, description, category) self.__trigger4.zen_action = "prev_edit_point" name, shortcut, description, category = ( "zencoding-remove-tag", "r", _("Remove a tag"), _("Markup Operations") ) self.__trigger5 = self.create_trigger(name, shortcut, description, category) self.__trigger5.zen_action = "remove_tag" name, shortcut, description, category = ( "zencoding-select-in-tag", "i", _("Select inner tag's content"), _("Markup Operations") ) self.__trigger6 = self.create_trigger(name, shortcut, description, category) self.__trigger6.zen_action = "match_pair_inward" name, shortcut, description, category = ( "zencoding-select-out-tag", "o", _("Select outer tag's content"), _("Markup Operations") ) self.__trigger7 = self.create_trigger(name, shortcut, description, category) self.__trigger7.zen_action = "match_pair_outward" name, shortcut, description, category = ( "zencoding-split", "j", _("Toggle between single and double tag"), _("Markup Operations") ) self.__trigger8 = self.create_trigger(name, shortcut, description, category) self.__trigger8.zen_action = "split_join_tag" name, shortcut, description, category = ( "zencoding-merge", "m", _("Merge lines"), _("Markup Operations") ) self.__trigger9 = self.create_trigger(name, shortcut, description, category) self.__trigger9.zen_action = "merge_lines" name, shortcut, description, category = ( "zencoding-wrap-with-abbreviation", "less", _("Wrap with abbreviation"), _("Markup Operations") ) self.__trigger10 = self.create_trigger(name, shortcut, description, category) self.__trigger10.zen_action = "wrap_with_abbreviation" return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() return False def __create_manager(self): from Manager import Manager manager = Manager(self.__editor) return manager def __activate(self, action): if not self.__manager: self.__manager = self.__create_manager() self.__manager.activate(action) return False def __activate_cb(self, trigger): from gobject import idle_add idle_add(self.__activate, trigger.zen_action) return scribes-0.4~r910/LanguagePlugins/zencoding/stparser.py0000644000175000017500000000722611242100540022713 0ustar andreasandreas''' Zen Coding's settings parser Created on Jun 14, 2009 @author: sergey ''' from copy import deepcopy import re import types from zen_settings import zen_settings _original_settings = deepcopy(zen_settings) TYPE_ABBREVIATION = 'zen-tag', TYPE_EXPANDO = 'zen-expando', TYPE_REFERENCE = 'zen-reference'; """ Reference to another abbreviation or tag """ re_tag = r'^<([\w\-]+(?:\:[\w\-]+)?)((?:\s+[\w\-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\s]+))?)*)\s*(\/?)>' "Regular expression for XML tag matching" re_attrs = r'([\w\-]+)\s*=\s*([\'"])(.*?)\2' "Regular expression for matching XML attributes" class Entry: """ Unified object for parsed data """ def __init__(self, entry_type, key, value): """ @type entry_type: str @type key: str @type value: dict """ self.type = entry_type self.key = key self.value = value def _make_expando(key, value): """ Make expando from string @type key: str @type value: str @return: Entry """ return Entry(TYPE_EXPANDO, key, value) def _make_abbreviation(key, tag_name, attrs, is_empty=False): """ Make abbreviation from string @param key: Abbreviation key @type key: str @param tag_name: Expanded element's tag name @type tag_name: str @param attrs: Expanded element's attributes @type attrs: str @param is_empty: Is expanded element empty or not @type is_empty: bool @return: dict """ result = { 'name': tag_name, 'is_empty': is_empty }; if attrs: result['attributes'] = []; for m in re.findall(re_attrs, attrs): result['attributes'].append({ 'name': m[0], 'value': m[2] }) return Entry(TYPE_ABBREVIATION, key, result) def _parse_abbreviations(obj): """ Parses all abbreviations inside dictionary @param obj: dict """ for key, value in obj.items(): key = key.strip() if key[-1] == '+': # this is expando, leave 'value' as is obj[key] = _make_expando(key, value) else: m = re.search(re_tag, value) if m: obj[key] = _make_abbreviation(key, m.group(1), m.group(2), (m.group(3) == '/')) else: # assume it's reference to another abbreviation obj[key] = Entry(TYPE_REFERENCE, key, value) def parse(settings): """ Parse user's settings. This function must be called *before* any activity in zen coding (for example, expanding abbreviation) @type settings: dict """ for p, value in settings.items(): if p == 'abbreviations': _parse_abbreviations(value) elif p == 'extends': settings[p] = [v.strip() for v in value.split(',')] elif type(value) == types.DictType: parse(value) def extend(parent, child): """ Recursevly extends parent dictionary with children's keys. Used for merging default settings with user's @type parent: dict @type child: dict """ for p, value in child.items(): if type(value) == types.DictType: if p not in parent: parent[p] = {} extend(parent[p], value) else: parent[p] = value def create_maps(obj): """ Create hash maps on certain string properties of zen settings @type obj: dict """ for p, value in obj.items(): if p == 'element_types': for k, v in value.items(): if isinstance(v, str): value[k] = [el.strip() for el in v.split(',')] elif type(value) == types.DictType: create_maps(value) if __name__ == '__main__': pass def get_settings(user_settings=None): """ Main function that gather all settings and returns parsed dictionary @param user_settings: A dictionary of user-defined settings """ settings = deepcopy(_original_settings) create_maps(settings) if user_settings: user_settings = deepcopy(user_settings) create_maps(user_settings) extend(settings, user_settings) # now we need to parse final set of settings parse(settings) return settings scribes-0.4~r910/LanguagePlugins/zencoding/Manager.py0000644000175000017500000000162311242100540022415 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from GenericActionHandler import Handler Handler(self, editor, self.__zeditor) from EditPointHandler import Handler Handler(self, editor, self.__zeditor) from WrapAbbreviationHandler import Handler Handler(self, editor, self.__zeditor) from SelectionMarker import Marker Marker(self, editor) def __init_attributes(self, editor): self.__editor = editor from zen_editor import ZenEditor self.__zeditor = ZenEditor(self, editor) from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def activate(self, action): self.emit("mark-selection") self.emit("action", action) return False scribes-0.4~r910/LanguagePlugins/zencoding/my_zen_settings.py0000644000175000017500000000033211242100540024260 0ustar andreasandreasmy_zen_settings = { 'html': { 'abbreviations': { 'jq': '', 'demo': '
    ' } } }scribes-0.4~r910/LanguagePlugins/zencoding/GUI/0000755000175000017500000000000011242100540021113 5ustar andreasandreasscribes-0.4~r910/LanguagePlugins/zencoding/GUI/Entry.py0000644000175000017500000000203311242100540022564 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Entry(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__quit_cb) self.connect(manager, "mapped", self.__show_cb) self.connect(self.__entry, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_object("Entry") return def __destroy(self): self.disconnect() del self return False def __show(self): self.__entry.grab_focus() return False def __activate(self): abbreviation = self.__entry.get_text() self.__manager.emit("hide") self.__manager.emit("wrap-abbreviation", abbreviation) return False def __quit_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__show() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/LanguagePlugins/zencoding/GUI/__init__.py0000644000175000017500000000000011242100540023212 0ustar andreasandreasscribes-0.4~r910/LanguagePlugins/zencoding/GUI/GUI.glade0000644000175000017500000000472311242100540022543 0ustar andreasandreas True popup True dock True True False False False False True True 5 5 10 10 True True 10 True <b>Zencoding _Abbreviation:</b> True True Entry True False False 0 True True 1 scribes-0.4~r910/LanguagePlugins/zencoding/GUI/Manager.py0000644000175000017500000000066511242100540023046 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) from Entry import Entry Entry(manager, editor) from Displayer import Displayer Displayer(manager, editor) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def show(self): self.__manager.emit("show") return False def destroy(self): del self return False scribes-0.4~r910/LanguagePlugins/zencoding/GUI/Displayer.py0000644000175000017500000000425211242100540023424 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "destroy", self.__quit_cb) self.__sig1 = self.connect(self.__view, "focus-in-event", self.__hide_cb) self.__sig2 = self.connect(self.__view, "button-press-event", self.__hide_cb) self.__sig3 = self.connect(self.__window, "key-press-event", self.__key_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__window = editor.window self.__container = manager.gui.get_object("Alignment") self.__visible = False self.__blocked = False return def __destroy(self): self.disconnect() del self return False def __show(self): if self.__visible: return False self.__unblock() self.__editor.add_bar_object(self.__container) self.__visible = True self.__manager.emit("mapped") return False def __hide(self): if self.__visible is False: return False self.__block() self.__view.grab_focus() self.__editor.remove_bar_object(self.__container) self.__visible = False return False def __block(self): if self.__blocked: return False self.__view.handler_block(self.__sig1) self.__view.handler_block(self.__sig2) self.__window.handler_block(self.__sig3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__view.handler_unblock(self.__sig1) self.__view.handler_unblock(self.__sig2) self.__window.handler_unblock(self.__sig3) self.__blocked = False return False def __quit_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/LanguagePlugins/zencoding/zen_settings.py0000644000175000017500000006503511242100540023566 0ustar andreasandreas""" Zen Coding settings @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru """ zen_settings = { # Variables that can be placed inside snippets or abbreviations as ${variable} # ${child} variable is reserved, don't use it 'variables': { 'lang': 'en', 'locale': 'en-US', 'charset': 'UTF-8', 'profile': 'xhtml', # Inner element indentation 'indentation': '\t' }, # common settings are used for quick injection of user-defined snippets 'common': { }, 'css': { 'extends': 'common', 'snippets': { "@i": "@import url(|);", "@m": "@media print {\n\t|\n}", "@f": "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}", "!": "!important", "pos": "position:|;", "pos:s": "position:static;", "pos:a": "position:absolute;", "pos:r": "position:relative;", "pos:f": "position:fixed;", "t": "top:|;", "t:a": "top:auto;", "r": "right:|;", "r:a": "right:auto;", "b": "bottom:|;", "b:a": "bottom:auto;", "brad": "-webkit-border-radius: ${1:radius};\n-moz-border-radius: $1;\n-ms-border-radius: $1;\nborder-radius: $1;", "bsha": "-webkit-box-shadow: ${1:hoff} ${2:voff} ${3:blur} ${4:rgba(0,0,0,0.5)};\n-moz-box-shadow: $1 $2 $3 $4;\n-ms-box-shadow: $1 $2 $3 $4;\nbox-shadow: $1 $2 $3 $4;", "l": "left:|;", "l:a": "left:auto;", "z": "z-index:|;", "z:a": "z-index:auto;", "fl": "float:|;", "fl:n": "float:none;", "fl:l": "float:left;", "fl:r": "float:right;", "cl": "clear:|;", "cl:n": "clear:none;", "cl:l": "clear:left;", "cl:r": "clear:right;", "cl:b": "clear:both;", "d": "display:|;", "d:n": "display:none;", "d:b": "display:block;", "d:i": "display:inline;", "d:ib": "display:inline-block;", "d:li": "display:list-item;", "d:ri": "display:run-in;", "d:cp": "display:compact;", "d:tb": "display:table;", "d:itb": "display:inline-table;", "d:tbcp": "display:table-caption;", "d:tbcl": "display:table-column;", "d:tbclg": "display:table-column-group;", "d:tbhg": "display:table-header-group;", "d:tbfg": "display:table-footer-group;", "d:tbr": "display:table-row;", "d:tbrg": "display:table-row-group;", "d:tbc": "display:table-cell;", "d:rb": "display:ruby;", "d:rbb": "display:ruby-base;", "d:rbbg": "display:ruby-base-group;", "d:rbt": "display:ruby-text;", "d:rbtg": "display:ruby-text-group;", "v": "visibility:|;", "v:v": "visibility:visible;", "v:h": "visibility:hidden;", "v:c": "visibility:collapse;", "ov": "overflow:|;", "ov:v": "overflow:visible;", "ov:h": "overflow:hidden;", "ov:s": "overflow:scroll;", "ov:a": "overflow:auto;", "ovx": "overflow-x:|;", "ovx:v": "overflow-x:visible;", "ovx:h": "overflow-x:hidden;", "ovx:s": "overflow-x:scroll;", "ovx:a": "overflow-x:auto;", "ovy": "overflow-y:|;", "ovy:v": "overflow-y:visible;", "ovy:h": "overflow-y:hidden;", "ovy:s": "overflow-y:scroll;", "ovy:a": "overflow-y:auto;", "ovs": "overflow-style:|;", "ovs:a": "overflow-style:auto;", "ovs:s": "overflow-style:scrollbar;", "ovs:p": "overflow-style:panner;", "ovs:m": "overflow-style:move;", "ovs:mq": "overflow-style:marquee;", "zoo": "zoom:1;", "cp": "clip:|;", "cp:a": "clip:auto;", "cp:r": "clip:rect(|);", "bxz": "box-sizing:|;", "bxz:cb": "box-sizing:content-box;", "bxz:bb": "box-sizing:border-box;", "bxsh": "box-shadow:|;", "bxsh:n": "box-shadow:none;", "bxsh:w": "-webkit-box-shadow:0 0 0 #000;", "bxsh:m": "-moz-box-shadow:0 0 0 0 #000;", "m": "margin:|;", "m:a": "margin:auto;", "m:0": "margin:0;", "m:2": "margin:0 0;", "m:3": "margin:0 0 0;", "m:4": "margin:0 0 0 0;", "mt": "margin-top:|;", "mt:a": "margin-top:auto;", "mr": "margin-right:|;", "mr:a": "margin-right:auto;", "mb": "margin-bottom:|;", "mb:a": "margin-bottom:auto;", "ml": "margin-left:|;", "ml:a": "margin-left:auto;", "p": "padding:|;", "p:0": "padding:0;", "p:2": "padding:0 0;", "p:3": "padding:0 0 0;", "p:4": "padding:0 0 0 0;", "pt": "padding-top:|;", "pr": "padding-right:|;", "pb": "padding-bottom:|;", "pl": "padding-left:|;", "w": "width:|;", "w:a": "width:auto;", "h": "height:|;", "h:a": "height:auto;", "maw": "max-width:|;", "maw:n": "max-width:none;", "mah": "max-height:|;", "mah:n": "max-height:none;", "miw": "min-width:|;", "mih": "min-height:|;", "o": "outline:|;", "o:n": "outline:none;", "oo": "outline-offset:|;", "ow": "outline-width:|;", "os": "outline-style:|;", "oc": "outline-color:#000;", "oc:i": "outline-color:invert;", "bd": "border:|;", "bd+": "border:1px solid #000;", "bd:n": "border:none;", "bdbk": "border-break:|;", "bdbk:c": "border-break:close;", "bdcl": "border-collapse:|;", "bdcl:c": "border-collapse:collapse;", "bdcl:s": "border-collapse:separate;", "bdc": "border-color:#000;", "bdi": "border-image:url(|);", "bdi:n": "border-image:none;", "bdi:w": "-webkit-border-image:url(|) 0 0 0 0 stretch stretch;", "bdi:m": "-moz-border-image:url(|) 0 0 0 0 stretch stretch;", "bdti": "border-top-image:url(|);", "bdti:n": "border-top-image:none;", "bdri": "border-right-image:url(|);", "bdri:n": "border-right-image:none;", "bdbi": "border-bottom-image:url(|);", "bdbi:n": "border-bottom-image:none;", "bdli": "border-left-image:url(|);", "bdli:n": "border-left-image:none;", "bdci": "border-corner-image:url(|);", "bdci:n": "border-corner-image:none;", "bdci:c": "border-corner-image:continue;", "bdtli": "border-top-left-image:url(|);", "bdtli:n": "border-top-left-image:none;", "bdtli:c": "border-top-left-image:continue;", "bdtri": "border-top-right-image:url(|);", "bdtri:n": "border-top-right-image:none;", "bdtri:c": "border-top-right-image:continue;", "bdbri": "border-bottom-right-image:url(|);", "bdbri:n": "border-bottom-right-image:none;", "bdbri:c": "border-bottom-right-image:continue;", "bdbli": "border-bottom-left-image:url(|);", "bdbli:n": "border-bottom-left-image:none;", "bdbli:c": "border-bottom-left-image:continue;", "bdf": "border-fit:|;", "bdf:c": "border-fit:clip;", "bdf:r": "border-fit:repeat;", "bdf:sc": "border-fit:scale;", "bdf:st": "border-fit:stretch;", "bdf:ow": "border-fit:overwrite;", "bdf:of": "border-fit:overflow;", "bdf:sp": "border-fit:space;", "bdl": "border-length:|;", "bdl:a": "border-length:auto;", "bdsp": "border-spacing:|;", "bds": "border-style:|;", "bds:n": "border-style:none;", "bds:h": "border-style:hidden;", "bds:dt": "border-style:dotted;", "bds:ds": "border-style:dashed;", "bds:s": "border-style:solid;", "bds:db": "border-style:double;", "bds:dtds": "border-style:dot-dash;", "bds:dtdtds": "border-style:dot-dot-dash;", "bds:w": "border-style:wave;", "bds:g": "border-style:groove;", "bds:r": "border-style:ridge;", "bds:i": "border-style:inset;", "bds:o": "border-style:outset;", "bdw": "border-width:|;", "bdt": "border-top:|;", "bdt+": "border-top:1px solid #000;", "bdt:n": "border-top:none;", "bdtw": "border-top-width:|;", "bdts": "border-top-style:|;", "bdts:n": "border-top-style:none;", "bdtc": "border-top-color:#000;", "bdr": "border-right:|;", "bdr+": "border-right:1px solid #000;", "bdr:n": "border-right:none;", "bdrw": "border-right-width:|;", "bdrs": "border-right-style:|;", "bdrs:n": "border-right-style:none;", "bdrc": "border-right-color:#000;", "bdb": "border-bottom:|;", "bdb+": "border-bottom:1px solid #000;", "bdb:n": "border-bottom:none;", "bdbw": "border-bottom-width:|;", "bdbs": "border-bottom-style:|;", "bdbs:n": "border-bottom-style:none;", "bdbc": "border-bottom-color:#000;", "bdl": "border-left:|;", "bdl+": "border-left:1px solid #000;", "bdl:n": "border-left:none;", "bdlw": "border-left-width:|;", "bdls": "border-left-style:|;", "bdls:n": "border-left-style:none;", "bdlc": "border-left-color:#000;", "bdrs": "border-radius:|;", "bdtrrs": "border-top-right-radius:|;", "bdtlrs": "border-top-left-radius:|;", "bdbrrs": "border-bottom-right-radius:|;", "bdblrs": "border-bottom-left-radius:|;", "bg": "background:|;", "bg+": "background:#FFF url(|) 0 0 no-repeat;", "bg:n": "background:none;", "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='|x.png');", "bgc": "background-color:#FFF;", "bgi": "background-image:url(|);", "bgi:n": "background-image:none;", "bgr": "background-repeat:|;", "bgr:n": "background-repeat:no-repeat;", "bgr:x": "background-repeat:repeat-x;", "bgr:y": "background-repeat:repeat-y;", "bga": "background-attachment:|;", "bga:f": "background-attachment:fixed;", "bga:s": "background-attachment:scroll;", "bgp": "background-position:0 0;", "bgpx": "background-position-x:|;", "bgpy": "background-position-y:|;", "bgbk": "background-break:|;", "bgbk:bb": "background-break:bounding-box;", "bgbk:eb": "background-break:each-box;", "bgbk:c": "background-break:continuous;", "bgcp": "background-clip:|;", "bgcp:bb": "background-clip:border-box;", "bgcp:pb": "background-clip:padding-box;", "bgcp:cb": "background-clip:content-box;", "bgcp:nc": "background-clip:no-clip;", "bgo": "background-origin:|;", "bgo:pb": "background-origin:padding-box;", "bgo:bb": "background-origin:border-box;", "bgo:cb": "background-origin:content-box;", "bgz": "background-size:|;", "bgz:a": "background-size:auto;", "bgz:ct": "background-size:contain;", "bgz:cv": "background-size:cover;", "c": "color:#000;", "tbl": "table-layout:|;", "tbl:a": "table-layout:auto;", "tbl:f": "table-layout:fixed;", "cps": "caption-side:|;", "cps:t": "caption-side:top;", "cps:b": "caption-side:bottom;", "ec": "empty-cells:|;", "ec:s": "empty-cells:show;", "ec:h": "empty-cells:hide;", "lis": "list-style:|;", "lis:n": "list-style:none;", "lisp": "list-style-position:|;", "lisp:i": "list-style-position:inside;", "lisp:o": "list-style-position:outside;", "list": "list-style-type:|;", "list:n": "list-style-type:none;", "list:d": "list-style-type:disc;", "list:c": "list-style-type:circle;", "list:s": "list-style-type:square;", "list:dc": "list-style-type:decimal;", "list:dclz": "list-style-type:decimal-leading-zero;", "list:lr": "list-style-type:lower-roman;", "list:ur": "list-style-type:upper-roman;", "lisi": "list-style-image:|;", "lisi:n": "list-style-image:none;", "q": "quotes:|;", "q:n": "quotes:none;", "q:ru": "quotes:'\00AB' '\00BB' '\201E' '\201C';", "q:en": "quotes:'\201C' '\201D' '\2018' '\2019';", "ct": "content:|;", "ct:n": "content:normal;", "ct:oq": "content:open-quote;", "ct:noq": "content:no-open-quote;", "ct:cq": "content:close-quote;", "ct:ncq": "content:no-close-quote;", "ct:a": "content:attr(|);", "ct:c": "content:counter(|);", "ct:cs": "content:counters(|);", "coi": "counter-increment:|;", "cor": "counter-reset:|;", "va": "vertical-align:|;", "va:sup": "vertical-align:super;", "va:t": "vertical-align:top;", "va:tt": "vertical-align:text-top;", "va:m": "vertical-align:middle;", "va:bl": "vertical-align:baseline;", "va:b": "vertical-align:bottom;", "va:tb": "vertical-align:text-bottom;", "va:sub": "vertical-align:sub;", "ta": "text-align:|;", "ta:l": "text-align:left;", "ta:c": "text-align:center;", "ta:r": "text-align:right;", "tal": "text-align-last:|;", "tal:a": "text-align-last:auto;", "tal:l": "text-align-last:left;", "tal:c": "text-align-last:center;", "tal:r": "text-align-last:right;", "td": "text-decoration:|;", "td:n": "text-decoration:none;", "td:u": "text-decoration:underline;", "td:o": "text-decoration:overline;", "td:l": "text-decoration:line-through;", "te": "text-emphasis:|;", "te:n": "text-emphasis:none;", "te:ac": "text-emphasis:accent;", "te:dt": "text-emphasis:dot;", "te:c": "text-emphasis:circle;", "te:ds": "text-emphasis:disc;", "te:b": "text-emphasis:before;", "te:a": "text-emphasis:after;", "th": "text-height:|;", "th:a": "text-height:auto;", "th:f": "text-height:font-size;", "th:t": "text-height:text-size;", "th:m": "text-height:max-size;", "ti": "text-indent:|;", "ti:-": "text-indent:-9999px;", "tj": "text-justify:|;", "tj:a": "text-justify:auto;", "tj:iw": "text-justify:inter-word;", "tj:ii": "text-justify:inter-ideograph;", "tj:ic": "text-justify:inter-cluster;", "tj:d": "text-justify:distribute;", "tj:k": "text-justify:kashida;", "tj:t": "text-justify:tibetan;", "to": "text-outline:|;", "to+": "text-outline:0 0 #000;", "to:n": "text-outline:none;", "tr": "text-replace:|;", "tr:n": "text-replace:none;", "tt": "text-transform:|;", "tt:n": "text-transform:none;", "tt:c": "text-transform:capitalize;", "tt:u": "text-transform:uppercase;", "tt:l": "text-transform:lowercase;", "tw": "text-wrap:|;", "tw:n": "text-wrap:normal;", "tw:no": "text-wrap:none;", "tw:u": "text-wrap:unrestricted;", "tw:s": "text-wrap:suppress;", "tsh": "text-shadow:|;", "tsh+": "text-shadow:0 0 0 #000;", "tsh:n": "text-shadow:none;", "lh": "line-height:|;", "whs": "white-space:|;", "whs:n": "white-space:normal;", "whs:p": "white-space:pre;", "whs:nw": "white-space:nowrap;", "whs:pw": "white-space:pre-wrap;", "whs:pl": "white-space:pre-line;", "whsc": "white-space-collapse:|;", "whsc:n": "white-space-collapse:normal;", "whsc:k": "white-space-collapse:keep-all;", "whsc:l": "white-space-collapse:loose;", "whsc:bs": "white-space-collapse:break-strict;", "whsc:ba": "white-space-collapse:break-all;", "wob": "word-break:|;", "wob:n": "word-break:normal;", "wob:k": "word-break:keep-all;", "wob:l": "word-break:loose;", "wob:bs": "word-break:break-strict;", "wob:ba": "word-break:break-all;", "wos": "word-spacing:|;", "wow": "word-wrap:|;", "wow:nm": "word-wrap:normal;", "wow:n": "word-wrap:none;", "wow:u": "word-wrap:unrestricted;", "wow:s": "word-wrap:suppress;", "lts": "letter-spacing:|;", "f": "font:|;", "f+": "font:1em Arial,sans-serif;", "fw": "font-weight:|;", "fw:n": "font-weight:normal;", "fw:b": "font-weight:bold;", "fw:br": "font-weight:bolder;", "fw:lr": "font-weight:lighter;", "fs": "font-style:|;", "fs:n": "font-style:normal;", "fs:i": "font-style:italic;", "fs:o": "font-style:oblique;", "fv": "font-variant:|;", "fv:n": "font-variant:normal;", "fv:sc": "font-variant:small-caps;", "fz": "font-size:|;", "fza": "font-size-adjust:|;", "fza:n": "font-size-adjust:none;", "ff": "font-family:|;", "ff:s": "font-family:serif;", "ff:ss": "font-family:sans-serif;", "ff:c": "font-family:cursive;", "ff:f": "font-family:fantasy;", "ff:m": "font-family:monospace;", "fef": "font-effect:|;", "fef:n": "font-effect:none;", "fef:eg": "font-effect:engrave;", "fef:eb": "font-effect:emboss;", "fef:o": "font-effect:outline;", "fem": "font-emphasize:|;", "femp": "font-emphasize-position:|;", "femp:b": "font-emphasize-position:before;", "femp:a": "font-emphasize-position:after;", "fems": "font-emphasize-style:|;", "fems:n": "font-emphasize-style:none;", "fems:ac": "font-emphasize-style:accent;", "fems:dt": "font-emphasize-style:dot;", "fems:c": "font-emphasize-style:circle;", "fems:ds": "font-emphasize-style:disc;", "fsm": "font-smooth:|;", "fsm:a": "font-smooth:auto;", "fsm:n": "font-smooth:never;", "fsm:aw": "font-smooth:always;", "fst": "font-stretch:|;", "fst:n": "font-stretch:normal;", "fst:uc": "font-stretch:ultra-condensed;", "fst:ec": "font-stretch:extra-condensed;", "fst:c": "font-stretch:condensed;", "fst:sc": "font-stretch:semi-condensed;", "fst:se": "font-stretch:semi-expanded;", "fst:e": "font-stretch:expanded;", "fst:ee": "font-stretch:extra-expanded;", "fst:ue": "font-stretch:ultra-expanded;", "op": "opacity:|;", "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);", "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';", "rz": "resize:|;", "rz:n": "resize:none;", "rz:b": "resize:both;", "rz:h": "resize:horizontal;", "rz:v": "resize:vertical;", "cur": "cursor:|;", "cur:a": "cursor:auto;", "cur:d": "cursor:default;", "cur:c": "cursor:crosshair;", "cur:ha": "cursor:hand;", "cur:he": "cursor:help;", "cur:m": "cursor:move;", "cur:p": "cursor:pointer;", "cur:t": "cursor:text;", "pgbb": "page-break-before:|;", "pgbb:au": "page-break-before:auto;", "pgbb:al": "page-break-before:always;", "pgbb:l": "page-break-before:left;", "pgbb:r": "page-break-before:right;", "pgbi": "page-break-inside:|;", "pgbi:au": "page-break-inside:auto;", "pgbi:av": "page-break-inside:avoid;", "pgba": "page-break-after:|;", "pgba:au": "page-break-after:auto;", "pgba:al": "page-break-after:always;", "pgba:l": "page-break-after:left;", "pgba:r": "page-break-after:right;", "orp": "orphans:|;", "wid": "widows:|;" } }, 'html': { 'extends': 'common', 'filters': 'html', 'snippets': { 'cc:ie6': '', 'cc:ie': '', 'cc:noie': '\n\t${child}|\n', 'html:4t': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '', 'html:4s': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '', 'html:xt': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '', 'html:xs': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '', 'html:xxs': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '', 'html:5': '\n' + '\n' + '\n' + ' \n' + ' \n' + '\n' + '\n\t${child}|\n\n' + '' }, 'abbreviations': { 'a': '
    ', 'a:link': '', 'a:mail': '', 'abbr': '', 'acronym': '', 'base': '', 'bdo': '', 'bdo:r': '', 'bdo:l': '', 'link:css': '', 'link:print': '', 'link:favicon': '', 'link:touch': '', 'link:rss': '', 'link:atom': '', 'meta:utf': '', 'meta:win': '', 'meta:compat': '', 'style': '', 'script': '', 'script:src': '', 'img': '', 'iframe': '', 'embed': '', 'object': '', 'param': '', 'map': '', 'area': '', 'area:d': '', 'area:c': '', 'area:r': '', 'area:p': '', 'link': '', 'form': '
    ', 'form:get': '
    ', 'form:post': '
    ', 'label': '', 'input': '', 'input:hidden': '', 'input:h': '', 'input:text': '', 'input:t': '', 'input:search': '', 'input:email': '', 'input:url': '', 'input:password': '', 'input:p': '', 'input:datetime': '', 'input:date': '', 'input:datetime-local': '', 'input:month': '', 'input:week': '', 'input:time': '', 'input:number': '', 'input:color': '', 'input:checkbox': '', 'input:c': '', 'input:radio': '', 'input:r': '', 'input:range': '', 'input:file': '', 'input:f': '', 'input:submit': '', 'input:s': '', 'input:image': '', 'input:i': '', 'input:reset': '', 'input:button': '', 'input:b': '', 'select': '', 'option': '', 'textarea': '', 'menu:context': '', 'menu:c': '', 'menu:toolbar': '', 'menu:t': '', 'video': '', 'audio': '', 'html:xml': '', 'bq': '
    ', 'acr': '', 'fig': '
    ', 'ifr': '', 'emb': '', 'obj': '', 'src': '', 'cap': '', 'colg': '', 'fst': '
    ', 'btn': '', 'optg': '', 'opt': '', 'tarea': '', 'leg': '', 'sect': '
    ', 'art': '
    ', 'hdr': '
    ', 'ftr': '
    ', 'adr': '
    ', 'dlg': '', 'str': '', 'prog': '', 'fset': '
    ', 'datag': '', 'datal': '', 'kg': '', 'out': '', 'det': '
    ', 'cmd': '', # expandos 'ol+': 'ol>li', 'ul+': 'ul>li', 'dl+': 'dl>dt+dd', 'map+': 'map>area', 'table+': 'table>tr>td', 'colgroup+': 'colgroup>col', 'colg+': 'colgroup>col', 'tr+': 'tr>td', 'select+': 'select>option', 'optgroup+': 'optgroup>option', 'optg+': 'optgroup>option' }, 'element_types': { 'empty': 'area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command', 'block_level': 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6', 'inline_level': 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var' } }, 'xsl': { 'extends': 'common,html', 'filters': 'html, xsl', 'abbreviations': { 'tm': '', 'tmatch': 'tm', 'tn': '', 'tname': 'tn', 'xsl:when': '', 'wh': 'xsl:when', 'var': '|', 'vare': '', 'if': '', 'call': '', 'attr': '', 'wp': '', 'par': '', 'val': '', 'co': '', 'each': '', 'ap': '', # expandos 'choose+': 'xsl:choose>xsl:when+xsl:otherwise' } }, 'haml': { 'filters': 'haml', 'extends': 'html' } }scribes-0.4~r910/LanguagePlugins/zencoding/zen_core.py0000644000175000017500000007700511242100540022656 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Core Zen Coding library. Contains various text manipulation functions: == Expand abbreviation Expands abbreviation like ul#nav>li*5>a into a XHTML string. === How to use First, you have to extract current string (where cursor is) from your test editor and use find_abbr_in_line() method to extract abbreviation. If abbreviation was found, this method will return it as well as position index of abbreviation inside current line. If abbreviation wasn't found, method returns empty string. With abbreviation found, you should call parse_into_tree() method to transform abbreviation into a tag tree. This method returns Tag object on success, None on failure. Then simply call to_string() method of returned Tag object to transoform tree into a XHTML string You can setup output profile using setup_profile() method (see default_profile definition for available options) Created on Apr 17, 2009 @author: Sergey Chikuyonok (http://chikuyonok.ru) ''' from zen_settings import zen_settings import re import stparser newline = '\n' "Newline symbol" caret_placeholder = '{%::zen-caret::%}' default_tag = 'div' re_tag = re.compile(r'<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\s]+))?)*\s*(\/?)>$') profiles = {} "Available output profiles" default_profile = { 'tag_case': 'lower', # values are 'lower', 'upper' 'attr_case': 'lower', # values are 'lower', 'upper' 'attr_quotes': 'double', # values are 'single', 'double' 'tag_nl': 'decide', # each tag on new line, values are True, False, 'decide' 'place_cursor': True, # place cursor char — | (pipe) — in output 'indent': True, # indent tags 'inline_break': 3, # how many inline elements should be to force line break (set to 0 to disable) 'self_closing_tag': 'xhtml' # use self-closing style for writing empty elements, e.g.
    or
    . # values are True, False, 'xhtml' } basic_filters = 'html'; "Filters that will be applied for unknown syntax" max_tabstop = 0 "Maximum tabstop index for current session" def char_at(text, pos): """ Returns character at specified index of text. If index if out of range, returns empty string """ return text[pos] if pos < len(text) else '' def has_deep_key(obj, key): """ Check if obj dictionary contains deep key. For example, example, it will allow you to test existance of my_dict[key1][key2][key3], testing existance of my_dict[key1] first, then my_dict[key1][key2], and finally my_dict[key1][key2][key3] @param obj: Dictionary to test @param obj: dict @param key: Deep key to test. Can be list (like ['key1', 'key2', 'key3']) or string (like 'key1.key2.key3') @type key: list, tuple, str @return: bool """ if isinstance(key, str): key = key.split('.') last_obj = obj for v in key: if hasattr(last_obj, v): last_obj = getattr(last_obj, v) elif last_obj.has_key(v): last_obj = last_obj[v] else: return False return True def is_allowed_char(ch): """ Test if passed symbol is allowed in abbreviation @param ch: Symbol to test @type ch: str @return: bool """ return ch.isalnum() or ch in "#.>+*:$-_!@[]()|" def split_by_lines(text, remove_empty=False): """ Split text into lines. Set remove_empty to true to filter out empty lines @param text: str @param remove_empty: bool @return list """ lines = text.splitlines() return remove_empty and [line for line in lines if line.strip()] or lines def make_map(prop): """ Helper function that transforms string into dictionary for faster search @param prop: Key name in zen_settings['html'] dictionary @type prop: str """ obj = {} for a in zen_settings['html'][prop].split(','): obj[a] = True zen_settings['html'][prop] = obj def create_profile(options): """ Create profile by adding default values for passed optoin set @param options: Profile options @type options: dict """ for k, v in default_profile.items(): options.setdefault(k, v) return options def setup_profile(name, options = {}): """ @param name: Profile name @type name: str @param options: Profile options @type options: dict """ profiles[name.lower()] = create_profile(options); def get_newline(): """ Returns newline symbol which is used in editor. This function must be redefined to return current editor's settings @return: str """ return newline def set_newline(char): """ Sets newline character used in Zen Coding """ global newline newline = char def string_to_hash(text): """ Helper function that transforms string into hash @return: dict """ obj = {} items = text.split(",") for i in items: obj[i] = True return obj def pad_string(text, pad): """ Indents string with space characters (whitespace or tab) @param text: Text to indent @type text: str @param pad: Indentation level (number) or indentation itself (string) @type pad: int, str @return: str """ pad_str = '' result = '' if isinstance(pad, basestring): pad_str = pad else: pad_str = get_indentation() * pad nl = get_newline() lines = split_by_lines(text) if lines: result += lines[0] for line in lines[1:]: result += nl + pad_str + line return result def is_snippet(abbr, doc_type = 'html'): """ Check is passed abbreviation is a snippet @return bool """ return get_snippet(doc_type, abbr) and True or False def is_ends_with_tag(text): """ Test is string ends with XHTML tag. This function used for testing if '<' symbol belogs to tag or abbreviation @type text: str @return: bool """ return re_tag.search(text) != None def get_elements_collection(resource, type): """ Returns specified elements collection (like 'empty', 'block_level') from resource. If collections wasn't found, returns empty object @type resource: dict @type type: str @return: dict """ if 'element_types' in resource and type in resource['element_types']: return resource['element_types'][type] else: return {} def replace_variables(text, vars=zen_settings['variables']): """ Replace variables like ${var} in string @param text: str @return: str """ return re.sub(r'\$\{([\w\-]+)\}', lambda m: m.group(1) in vars and vars[m.group(1)] or m.group(0), text) def get_abbreviation(res_type, abbr): """ Returns abbreviation value from data set @param res_type: Resource type (html, css, ...) @type res_type: str @param abbr: Abbreviation name @type abbr: str @return dict, None """ return get_settings_resource(res_type, abbr, 'abbreviations') def get_snippet(res_type, snippet_name): """ Returns snippet value from data set @param res_type: Resource type (html, css, ...) @type res_type: str @param snippet_name: Snippet name @type snippet_name: str @return dict, None """ return get_settings_resource(res_type, snippet_name, 'snippets'); def get_variable(name): """ Returns variable value @return: str """ return zen_settings['variables'][name] def set_variable(name, value): """ Set variable value """ zen_settings['variables'][name] = value def get_indentation(): """ Returns indentation string @return {String} """ return get_variable('indentation'); def create_resource_chain(syntax, name): """ Creates resource inheritance chain for lookups @param syntax: Syntax name @type syntax: str @param name: Resource name @type name: str @return: list """ result = [] if syntax in zen_settings: resource = zen_settings[syntax] if name in resource: result.append(resource[name]) if 'extends' in resource: # find resource in ancestors for type in resource['extends']: if has_deep_key(zen_settings, [type, name]): result.append(zen_settings[type][name]) return result def get_resource(syntax, name): """ Get resource collection from settings file for specified syntax. It follows inheritance chain if resource wasn't directly found in syntax settings @param syntax: Syntax name @type syntax: str @param name: Resource name @type name: str """ chain = create_resource_chain(syntax, name) return chain[0] if chain else None def get_settings_resource(syntax, abbr, name): """ Returns resurce value from data set with respect of inheritance @param syntax: Resource syntax (html, css, ...) @type syntax: str @param abbr: Abbreviation name @type abbr: str @param name: Resource name ('snippets' or 'abbreviation') @type name: str @return dict, None """ for item in create_resource_chain(syntax, name): if abbr in item: return item[abbr] return None def get_word(ix, text): """ Get word, starting at ix character of text @param ix: int @param text: str """ m = re.match(r'^[\w\-:\$]+', text[ix:]) return m.group(0) if m else '' def extract_attributes(attr_set): """ Extract attributes and their values from attribute set @param attr_set: str """ attr_set = attr_set.strip() loop_count = 100 # endless loop protection re_string = r'^(["\'])((?:(?!\1)[^\\]|\\.)*)\1' result = [] while attr_set and loop_count: loop_count -= 1 attr_name = get_word(0, attr_set) attr = None if attr_name: attr = {'name': attr_name, 'value': ''} # let's see if attribute has value ch = attr_set[len(attr_name)] if len(attr_set) > len(attr_name) else '' if ch == '=': ch2 = attr_set[len(attr_name) + 1] if ch2 in '"\'': # we have a quoted string m = re.match(re_string, attr_set[len(attr_name) + 1:]) if m: attr['value'] = m.group(2) attr_set = attr_set[len(attr_name) + len(m.group(0)) + 1:].strip() else: # something wrong, break loop attr_set = '' else: # unquoted string m = re.match(r'^(.+?)(\s|$)', attr_set[len(attr_name) + 1:]) if m: attr['value'] = m.group(1) attr_set = attr_set[len(attr_name) + len(m.group(1)) + 1:].strip() else: # something wrong, break loop attr_set = '' else: attr_set = attr_set[len(attr_name):].strip() else: # something wrong, can't extract attribute name break if attr: result.append(attr) return result def parse_attributes(text): """ Parses tag attributes extracted from abbreviation """ # Example of incoming data: # #header # .some.data # .some.data#header # [attr] # #item[attr=Hello other="World"].class result = [] class_name = None char_map = {'#': 'id', '.': 'class'} # walk char-by-char i = 0 il = len(text) while i < il: ch = text[i] if ch == '#': # id val = get_word(i, text[1:]) result.append({'name': char_map[ch], 'value': val}) i += len(val) + 1 elif ch == '.': #class val = get_word(i, text[1:]) if not class_name: # remember object pointer for value modification class_name = {'name': char_map[ch], 'value': ''} result.append(class_name) if class_name['value']: class_name['value'] += ' ' + val else: class_name['value'] = val i += len(val) + 1 elif ch == '[': # begin attribute set # search for end of set end_ix = text.find(']', i) if end_ix == -1: # invalid attribute set, stop searching i = len(text) else: result.extend(extract_attributes(text[i + 1:end_ix])) i = end_ix else: i += 1 return result class AbbrGroup(object): """ Abreviation's group element """ def __init__(self, parent=None): """ @param parent: Parent group item element @type parent: AbbrGroup """ self.expr = '' self.parent = parent self.children = [] def add_child(self): child = AbbrGroup(self) self.children.append(child) return child def clean_up(self): for item in self.children: expr = item.expr if not expr: self.children.remove(item) else: # remove operators at the and of expression item.clean_up() def split_by_groups(abbr): """ Split abbreviation by groups @type abbr: str @return: AbbrGroup """ root = AbbrGroup() last_parent = root cur_item = root.add_child() stack = [] i = 0 il = len(abbr) while i < il: ch = abbr[i] if ch == '(': # found new group operator = i and abbr[i - 1] or '' if operator == '>': stack.append(cur_item) last_parent = cur_item else: stack.append(last_parent) cur_item = None elif ch == ')': last_parent = stack.pop() cur_item = None next_char = char_at(abbr, i + 1) if next_char == '+' or next_char == '>': # next char is group operator, skip it i += 1 else: if ch == '+' or ch == '>': # skip operator if it's followed by parenthesis next_char = char_at(abbr, i + 1) if next_char == '(': i += 1 continue if not cur_item: cur_item = last_parent.add_child() cur_item.expr += ch i += 1 root.clean_up() return root def rollout_tree(tree, parent=None): """ Roll outs basic Zen Coding tree into simplified, DOM-like tree. The simplified tree, for example, represents each multiplied element as a separate element sets with its own content, if exists. The simplified tree element contains some meta info (tag name, attributes, etc.) as well as output strings, which are exactly what will be outputted after expanding abbreviation. This tree is used for filtering: you can apply filters that will alter output strings to get desired look of expanded abbreviation. @type tree: Tag @param parent: ZenNode """ if not parent: parent = ZenNode(tree) how_many = 1 tag_content = '' for child in tree.children: how_many = child.count if child.repeat_by_lines: # it's a repeating element tag_content = split_by_lines(child.get_content(), True) how_many = max(len(tag_content), 1) else: tag_content = child.get_content() for j in range(how_many): tag = ZenNode(child) parent.add_child(tag) tag.counter = j + 1 if child.children: rollout_tree(child, tag) add_point = tag.find_deepest_child() or tag if tag_content: if isinstance(tag_content, basestring): add_point.content = tag_content else: add_point.content = tag_content[j] or '' return parent def run_filters(tree, profile, filter_list): """ Runs filters on tree @type tree: ZenNode @param profile: str, object @param filter_list: str, list @return: ZenNode """ import filters if isinstance(profile, basestring) and profile in profiles: profile = profiles[profile]; if not profile: profile = profiles['plain'] if isinstance(filter_list, basestring): filter_list = re.split(r'[\|,]', filter_list) for name in filter_list: name = name.strip() if name and name in filters.filter_map: tree = filters.filter_map[name](tree, profile) return tree def abbr_to_primary_tree(abbr, doc_type='html'): """ Transforms abbreviation into a primary internal tree. This tree should'n be used ouside of this scope @param abbr: Abbreviation to transform @type abbr: str @param doc_type: Document type (xsl, html), a key of dictionary where to search abbreviation settings @type doc_type: str @return: Tag """ root = Tag('', 1, doc_type) token = re.compile(r'([\+>])?([a-z@\!\#\.][\w:\-]*)((?:(?:[#\.][\w\-\$]+)|(?:\[[^\]]+\]))+)?(\*(\d*))?(\+$)?', re.IGNORECASE) if not abbr: return None def expando_replace(m): ex = m.group(0) a = get_abbreviation(doc_type, ex) return a and a.value or ex def token_expander(operator, tag_name, attrs, has_multiplier, multiplier, has_expando): multiply_by_lines = (has_multiplier and not multiplier) multiplier = multiplier and int(multiplier) or 1 tag_ch = tag_name[0] if tag_ch == '#' or tag_ch == '.': if attrs: attrs = tag_name + attrs else: attrs = tag_name tag_name = default_tag if has_expando: tag_name += '+' current = is_snippet(tag_name, doc_type) and Snippet(tag_name, multiplier, doc_type) or Tag(tag_name, multiplier, doc_type) if attrs: attrs = parse_attributes(attrs) for attr in attrs: current.add_attribute(attr['name'], attr['value']) # dive into tree if operator == '>' and token_expander.last: token_expander.parent = token_expander.last; token_expander.parent.add_child(current) token_expander.last = current if multiply_by_lines: root.multiply_elem = current return '' # replace expandos abbr = re.sub(r'([a-z][a-z0-9]*)\+$', expando_replace, abbr) token_expander.parent = root token_expander.last = None # abbr = re.sub(token, lambda m: token_expander(m.group(1), m.group(2), m.group(3), m.group(4), m.group(5), m.group(6), m.group(7)), abbr) # Issue from Einar Egilsson abbr = token.sub(lambda m: token_expander(m.group(1), m.group(2), m.group(3), m.group(4), m.group(5), m.group(6)), abbr) root.last = token_expander.last # empty 'abbr' variable means that abbreviation was expanded successfully, # non-empty variable means there was a syntax error return not abbr and root or None; def expand_group(group, doc_type, parent): """ Expand single group item @param group: AbbrGroup @param doc_type: str @param parent: Tag """ tree = abbr_to_primary_tree(group.expr, doc_type) last_item = None if tree: for item in tree.children: last_item = item parent.add_child(last_item) else: raise Exception('InvalidGroup') # set repeating element to the topmost node root = parent while root.parent: root = root.parent root.last = tree.last if tree.multiply_elem: root.multiply_elem = tree.multiply_elem # process child groups if group.children: add_point = last_item.find_deepest_child() or last_item for child in group.children: expand_group(child, doc_type, add_point) def replace_unescaped_symbol(text, symbol, replace): """ Replaces unescaped symbols in text. For example, the '$' symbol will be replaced in 'item$count', but not in 'item\$count'. @param text: Original string @type text: str @param symbol: Symbol to replace @type symbol: st @param replace: Symbol replacement @type replace: str, function @return: str """ i = 0 il = len(text) sl = len(symbol) match_count = 0 while i < il: if text[i] == '\\': # escaped symbol, skip next character i += sl + 1 elif text[i:i + sl] == symbol: # have match cur_sl = sl match_count += 1 new_value = replace if callable(new_value): replace_data = replace(text, symbol, i, match_count) if replace_data: cur_sl = len(replace_data[0]) new_value = replace_data[1] else: new_value = False if new_value is False: # skip replacement i += 1 continue text = text[0:i] + new_value + text[i + cur_sl:] # adjust indexes il = len(text) i += len(new_value) else: i += 1 return text def run_action(name, *args, **kwargs): """ Runs Zen Coding action. For list of available actions and their arguments see zen_actions.py file. @param name: Action name @type name: str @param args: Additional arguments. It may be array of arguments or inline arguments. The first argument should be zen_editor instance @type args: list @example zen_coding.run_actions('expand_abbreviation', zen_editor) zen_coding.run_actions('wrap_with_abbreviation', zen_editor, 'div') """ import zen_actions try: if hasattr(zen_actions, name): return getattr(zen_actions, name)(*args, **kwargs) except: return False def expand_abbreviation(abbr, syntax='html', profile_name='plain'): """ Expands abbreviation into a XHTML tag string @type abbr: str @return: str """ tree_root = parse_into_tree(abbr, syntax); if tree_root: tree = rollout_tree(tree_root) apply_filters(tree, syntax, profile_name, tree_root.filters) return replace_variables(tree.to_string()) return '' def extract_abbreviation(text): """ Extracts abbreviations from text stream, starting from the end @type text: str @return: Abbreviation or empty string """ cur_offset = len(text) start_index = -1 brace_count = 0 while True: cur_offset -= 1 if cur_offset < 0: # moved at string start start_index = 0 break ch = text[cur_offset] if ch == ']': brace_count += 1 elif ch == '[': brace_count -= 1 else: if brace_count: # respect all characters inside attribute sets continue if not is_allowed_char(ch) or (ch == '>' and is_ends_with_tag(text[0:cur_offset + 1])): # found stop symbol start_index = cur_offset + 1 break return text[start_index:] if start_index != -1 else '' def parse_into_tree(abbr, doc_type='html'): """ Parses abbreviation into a node set @param abbr: Abbreviation to transform @type abbr: str @param doc_type: Document type (xsl, html), a key of dictionary where to search abbreviation settings @type doc_type: str @return: Tag """ # remove filters from abbreviation filter_list = [] def filter_replace(m): filter_list.append(m.group(1)) return '' re_filter = re.compile(r'\|([\w\|\-]+)$') abbr = re_filter.sub(filter_replace, abbr) # split abbreviation by groups group_root = split_by_groups(abbr) tree_root = Tag('', 1, doc_type) # then recursively expand each group item try: for item in group_root.children: expand_group(item, doc_type, tree_root) except: # there's invalid group, stop parsing return None tree_root.filters = ''.join(filter_list) return tree_root def is_inside_tag(html, cursor_pos): re_tag = re.compile(r'^<\/?\w[\w\:\-]*.*?>') # search left to find opening brace pos = cursor_pos while pos > -1: if html[pos] == '<': break pos -= 1 if pos != -1: m = re_tag.match(html[pos:]); if m and cursor_pos > pos and cursor_pos < pos + len(m.group(0)): return True return False def wrap_with_abbreviation(abbr, text, doc_type='html', profile='plain'): """ Wraps passed text with abbreviation. Text will be placed inside last expanded element @param abbr: Abbreviation @type abbr: str @param text: Text to wrap @type text: str @param doc_type: Document type (html, xml, etc.) @type doc_type: str @param profile: Output profile's name. @type profile: str @return {String} """ tree_root = parse_into_tree(abbr, doc_type) if tree_root: repeat_elem = tree_root.multiply_elem or tree_root.last repeat_elem.set_content(text) repeat_elem.repeat_by_lines = bool(tree_root.multiply_elem) tree = rollout_tree(tree_root) apply_filters(tree, doc_type, profile, tree_root.filters); return replace_variables(tree.to_string()) return None def get_caret_placeholder(): """ Returns caret placeholder @return: str """ if callable(caret_placeholder): return caret_placeholder() else: return caret_placeholder def set_caret_placeholder(value): """ Set caret placeholder: a string (like '|') or function. You may use a function as a placeholder generator. For example, TextMate uses ${0}, ${1}, ..., ${n} natively for quick Tab-switching between them. @param {String|Function} """ global caret_placeholder caret_placeholder = value def apply_filters(tree, syntax, profile, additional_filters=None): """ Applies filters to tree according to syntax @param tree: Tag tree to apply filters to @type tree: ZenNode @param syntax: Syntax name ('html', 'css', etc.) @type syntax: str @param profile: Profile or profile's name @type profile: str, object @param additional_filters: List or pipe-separated string of additional filters to apply @type additional_filters: str, list @return: ZenNode """ _filters = get_resource(syntax, 'filters') or basic_filters if additional_filters: _filters += '|' if isinstance(additional_filters, basestring): _filters += additional_filters else: _filters += '|'.join(additional_filters) if not _filters: # looks like unknown syntax, apply basic filters _filters = basic_filters return run_filters(tree, profile, _filters) def replace_counter(text, value): """ Replaces '$' character in string assuming it might be escaped with '\' @type text: str @type value: str, int @return: str """ symbol = '$' value = str(value) def replace_func(tx, symbol, pos, match_num): if char_at(tx, pos + 1) == '{' or char_at(tx, pos + 1).isdigit(): # it's a variable, skip it return False # replace sequense of $ symbols with padded number j = pos + 1 if j < len(text): while tx[j] == '$' and char_at(tx, j + 1) != '{': j += 1 return (tx[pos:j], value.zfill(j - pos)) return replace_unescaped_symbol(text, symbol, replace_func) def upgrade_tabstops(node): """ Upgrades tabstops in zen node in order to prevent naming conflicts @type node: ZenNode @param offset: Tab index offset @type offset: int @returns Maximum tabstop index in element """ max_num = [0] props = ('start', 'end', 'content') def _replace(m): num = int(m.group(1) or m.group(2)) if num > max_num[0]: max_num[0] = num return re.sub(r'\d+', str(num + max_tabstop), m.group(0), 1) for prop in props: node.__setattr__(prop, re.sub(r'\$(\d+)|\$\{(\d+):[^\}]+\}', _replace, node.__getattribute__(prop))) globals()['max_tabstop'] += max_num[0] + 1 return max_num[0] def unescape_text(text): """ Unescapes special characters used in Zen Coding, like '$', '|', etc. @type text: str @return: str """ return re.sub(r'\\(.)', r'\1', text) def get_profile(name): """ Get profile by it's name. If profile wasn't found, returns 'plain' profile """ return profiles[name] if name in profiles else profiles['plain'] def update_settings(settings): globals()['zen_settings'] = settings class Tag(object): def __init__(self, name, count=1, doc_type='html'): """ @param name: Tag name @type name: str @param count: How many times this tag must be outputted @type count: int @param doc_type: Document type (xsl, html) @type doc_type: str """ name = name.lower() abbr = get_abbreviation(doc_type, name) if abbr and abbr.type == stparser.TYPE_REFERENCE: abbr = get_abbreviation(doc_type, abbr.value) self.name = abbr and abbr.value['name'] or name.replace('+', '') self.count = count self.children = [] self.attributes = [] self.multiply_elem = None self.__attr_hash = {} self._abbr = abbr self.__content = '' self.repeat_by_lines = False self._res = zen_settings.has_key(doc_type) and zen_settings[doc_type] or {} self.parent = None # add default attributes if self._abbr and 'attributes' in self._abbr.value: for a in self._abbr.value['attributes']: self.add_attribute(a['name'], a['value']) def add_child(self, tag): """ Add new child @type tag: Tag """ tag.parent = self self.children.append(tag) def add_attribute(self, name, value): """ Add attribute to tag. If the attribute with the same name already exists, it will be overwritten, but if it's name is 'class', it will be merged with the existed one @param name: Attribute nama @type name: str @param value: Attribute value @type value: str """ # the only place in Tag where pipe (caret) character may exist # is the attribute: escape it with internal placeholder value = replace_unescaped_symbol(value, '|', get_caret_placeholder()); if name in self.__attr_hash: # attribue already exists a = self.__attr_hash[name] if name == 'class': # 'class' is a magic attribute if a['value']: value = ' ' + value a['value'] += value else: a['value'] = value else: a = {'name': name, 'value': value} self.__attr_hash[name] = a self.attributes.append(a) def has_tags_in_content(self): """ This function tests if current tags' content contains XHTML tags. This function is mostly used for output formatting """ return self.get_content() and re_tag.search(self.get_content()) def get_content(self): return self.__content def set_content(self, value): self.__content = value def set_content(self, content): #@DuplicatedSignature self.__content = content def get_content(self): #@DuplicatedSignature return self.__content def find_deepest_child(self): """ Search for deepest and latest child of current element. Returns None if there's no children @return Tag or None """ if not self.children: return None deepest_child = self while True: deepest_child = deepest_child.children[-1] if not deepest_child.children: break return deepest_child class Snippet(Tag): def __init__(self, name, count=1, doc_type='html'): super(Snippet, self).__init__(name, count, doc_type) self.value = replace_unescaped_symbol(get_snippet(doc_type, name), '|', get_caret_placeholder()) self.attributes = {'id': get_caret_placeholder(), 'class': get_caret_placeholder()} self._res = zen_settings[doc_type] def is_block(self): return True class ZenNode(object): """ Creates simplified tag from Zen Coding tag """ def __init__(self, tag): """ @type tag: Tag """ self.type = 'snippet' if isinstance(tag, Snippet) else 'tag' self.name = tag.name self.attributes = tag.attributes self.children = []; self.counter = 1 self.source = tag "Source element from which current tag was created" # relations self.parent = None self.next_sibling = None self.previous_sibling = None # output params self.start = '' self.end = '' self.content = '' self.padding = '' def add_child(self, tag): """ @type tag: ZenNode """ tag.parent = self if self.children: last_child = self.children[-1] tag.previous_sibling = last_child last_child.next_sibling = tag self.children.append(tag) def get_attribute(self, name): """ Get attribute's value. @type name: str @return: None if attribute wasn't found """ name = name.lower() for attr in self.attributes: if attr['name'].lower() == name: return attr['value'] return None def is_unary(self): """ Test if current tag is unary (no closing tag) @return: bool """ if self.type == 'snippet': return False return (self.source._abbr and self.source._abbr.value['is_empty']) or (self.name in get_elements_collection(self.source._res, 'empty')) def is_inline(self): """ Test if current tag is inline-level (like , ) @return: bool """ return self.name in get_elements_collection(self.source._res, 'inline_level') def is_block(self): """ Test if current element is block-level @return: bool """ return self.type == 'snippet' or not self.is_inline() def has_tags_in_content(self): """ This function tests if current tags' content contains xHTML tags. This function is mostly used for output formatting """ return self.content and re_tag.search(self.content) def has_children(self): """ Check if tag has child elements @return: bool """ return bool(self.children) def has_block_children(self): """ Test if current tag contains block-level children @return: bool """ if self.has_tags_in_content() and self.is_block(): return True for item in self.children: if item.is_block(): return True return False def find_deepest_child(self): """ Search for deepest and latest child of current element Returns None if there's no children @return: ZenNode|None """ if not self.children: return None deepest_child = self while True: deepest_child = deepest_child.children[-1] if not deepest_child.children: break return deepest_child def to_string(self): "@return {String}" content = ''.join([item.to_string() for item in self.children]) return self.start + self.content + content + self.end # create default profiles setup_profile('xhtml'); setup_profile('html', {'self_closing_tag': False}); setup_profile('xml', {'self_closing_tag': True, 'tag_nl': True}); setup_profile('plain', {'tag_nl': False, 'indent': False, 'place_cursor': False}); # This method call explicity loads default settings from zen_settings.py on start up # Comment this line if you want to load data from other resources (like editor's # native snippet) update_settings(stparser.get_settings()) scribes-0.4~r910/LanguagePlugins/zencoding/WrapAbbreviationHandler.py0000644000175000017500000000364411242100540025605 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor, zeditor): SignalManager.__init__(self) self.__init_attributes(manager, editor, zeditor) self.connect(manager, "destroy", self.__quit_cb) self.connect(manager, "action", self.__action_cb) self.connect(manager, "wrap-abbreviation", self.__wrap_cb) self.connect(manager, "selection-marks", self.__marks_cb) def __init_attributes(self, manager, editor, zeditor): self.__manager = manager self.__editor = editor self.__zeditor = zeditor self.__gui = None self.__bmark = None self.__emark = None return def __destroy(self): self.disconnect() del self return False def __create_gui(self): from GUI.Manager import Manager gui = Manager(self.__manager, self.__editor) return gui def __show(self): if not self.__gui: self.__gui = self.__create_gui() self.__gui.show() return False def __expand(self, abbreviation): self.__zeditor.set_context(self.__editor) self.__editor.textview.grab_focus() if self.__bmark: #raise ValueError start_iterator = self.__editor.textbuffer.get_iter_at_mark(self.__bmark) end_iterator = self.__editor.textbuffer.get_iter_at_mark(self.__emark) self.__editor.textbuffer.select_range(start_iterator, end_iterator) self.__manager.emit("action", "wrap_with_abbreviation") from zen_core import run_action run_action("wrap_with_abbreviation", self.__zeditor, abbreviation) return False def __quit_cb(self, *args): self.__destroy() return False def __action_cb(self, manager, action): if action != "wrap_with_abbreviation": return False from gobject import idle_add idle_add(self.__show) return False def __wrap_cb(self, manager, abbreviation): from gobject import idle_add idle_add(self.__expand, abbreviation) return False def __marks_cb(self, manager, marks): self.__bmark, self.__emark = marks return False scribes-0.4~r910/LanguagePlugins/zencoding/EditPointHandler.py0000644000175000017500000000247011242100540024241 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager ACTION_LIST = ("expand_abbreviation", "expand_with_abbreviation", "wrap_with_abbreviation") class Handler(SignalManager): def __init__(self, manager, editor, zeditor): SignalManager.__init__(self) self.__init_attributes(manager, editor, zeditor) self.connect(manager, "destroy", self.__quit_cb) self.connect(manager, "action", self.__action_cb) self.connect(manager, "insertion-offsets", self.__offsets_cb) def __init_attributes(self, manager, editor, zeditor): self.__manager = manager self.__editor = editor self.__zeditor = zeditor self.__ignore = False return def __destroy(self): self.disconnect() del self return False def __place_cursor_at_edit_point(self, offsets): start_offset, end_offset = offsets iterator = self.__editor.textbuffer.get_iter_at_offset(start_offset+1) self.__editor.textbuffer.place_cursor(iterator) from zen_actions import next_edit_point next_edit_point(self.__zeditor) return False def __quit_cb(self, *args): self.__destroy() return False def __offsets_cb(self, manager, offsets): if self.__ignore: return False self.__place_cursor_at_edit_point(offsets) return False def __action_cb(self, manager, action): self.__ignore = False if action in ACTION_LIST else True return False scribes-0.4~r910/LanguagePlugins/zencoding/html_matcher.py0000644000175000017500000001777411242100540023530 0ustar andreasandreas#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Context-independent xHTML pair matcher Use method match(html, start_ix) to find matching pair. If pair was found, this function returns a list of indexes where tag pair starts and ends. If pair wasn't found, None will be returned. The last matched (or unmatched) result is saved in last_match dictionary for later use. @author: Sergey Chikuyonok (serge.che@gmail.com) ''' import re start_tag = r'<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\s]+))?)*)\s*(\/?)>' end_tag = r'<\/([\w\:\-]+)[^>]*>' attr = r'([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?' "Last matched HTML pair" last_match = { 'opening_tag': None, # Tag() or Comment() object 'closing_tag': None, # Tag() or Comment() object 'start_ix': -1, 'end_ix': -1 } cur_mode = 'xhtml' "Current matching mode" def set_mode(new_mode): global cur_mode if new_mode != 'html': new_mode = 'xhtml' cur_mode = new_mode def make_map(elems): """ Create dictionary of elements for faster searching @param elems: Elements, separated by comma @type elems: str """ obj = {} for elem in elems.split(','): obj[elem] = True return obj # Empty Elements - HTML 4.01 empty = make_map("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"); # Block Elements - HTML 4.01 block = make_map("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"); # Inline Elements - HTML 4.01 inline = make_map("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"); # Elements that you can, intentionally, leave open # (and which close themselves) close_self = make_map("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); # Attributes that have their values filled in disabled="disabled" fill_attrs = make_map("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"); #Special Elements (can contain anything) # serge.che: parsing data inside elements is a "feature" special = make_map("style"); class Tag(): """Matched tag""" def __init__(self, match, ix): """ @type match: MatchObject @param match: Matched HTML tag @type ix: int @param ix: Tag's position """ global cur_mode name = match.group(1).lower() self.name = name self.full_tag = match.group(0) self.start = ix self.end = ix + len(self.full_tag) self.unary = ( len(match.groups()) > 2 and bool(match.group(3)) ) or (name in empty and cur_mode == 'html') self.type = 'tag' self.close_self = (name in close_self and cur_mode == 'html') class Comment(): "Matched comment" def __init__(self, start, end): self.start = start self.end = end self.type = 'comment' def make_range(opening_tag=None, closing_tag=None, ix=0): """ Makes selection ranges for matched tag pair @type opening_tag: Tag @type closing_tag: Tag @type ix: int @return list """ start_ix, end_ix = -1, -1 if opening_tag and not closing_tag: # unary element start_ix = opening_tag.start end_ix = opening_tag.end elif opening_tag and closing_tag: # complete element if (opening_tag.start < ix and opening_tag.end > ix) or (closing_tag.start <= ix and closing_tag.end > ix): start_ix = opening_tag.start end_ix = closing_tag.end; else: start_ix = opening_tag.end end_ix = closing_tag.start return start_ix, end_ix def save_match(opening_tag=None, closing_tag=None, ix=0): """ Save matched tag for later use and return found indexes @type opening_tag: Tag @type closing_tag: Tag @type ix: int @return list """ last_match['opening_tag'] = opening_tag; last_match['closing_tag'] = closing_tag; last_match['start_ix'], last_match['end_ix'] = make_range(opening_tag, closing_tag, ix) return last_match['start_ix'] != -1 and (last_match['start_ix'], last_match['end_ix']) or (None, None) def match(html, start_ix, mode='xhtml'): """ Search for matching tags in html, starting from start_ix position. The result is automatically saved in last_match property """ return _find_pair(html, start_ix, mode, save_match) def find(html, start_ix, mode='xhtml'): """ Search for matching tags in html, starting from start_ix position. """ return _find_pair(html, start_ix, mode) def get_tags(html, start_ix, mode='xhtml'): """ Search for matching tags in html, starting from start_ix position. The difference between match function itself is that get_tags method doesn't save matched result in last_match property and returns array of opening and closing tags This method is generally used for lookups """ return _find_pair(html, start_ix, mode, lambda op, cl=None, ix=0: (op, cl) if op and op.type == 'tag' else None) def _find_pair(html, start_ix, mode='xhtml', action=make_range): """ Search for matching tags in html, starting from start_ix position @param html: Code to search @type html: str @param start_ix: Character index where to start searching pair (commonly, current caret position) @type start_ix: int @param action: Function that creates selection range @type action: function @return: list """ forward_stack = [] backward_stack = [] opening_tag = None closing_tag = None html_len = len(html) set_mode(mode) def has_match(substr, start=None): if start is None: start = ix return html.find(substr, start) == start def find_comment_start(start_pos): while start_pos: if html[start_pos] == '<' and has_match('') + ix + 3; if ix < start_ix and end_ix >= start_ix: return action(Comment(ix, end_ix)) elif ch == '-' and has_match('-->'): # found comment end # search left until comment start is reached ix = find_comment_start(ix) ix -= 1 if not opening_tag: return action(None) # find closing tag if not closing_tag: ix = start_ix while ix < html_len: ch = html[ix] if ch == '<': check_str = html[ix:] m = re.match(start_tag, check_str) if m: # found opening tag tmp_tag = Tag(m, ix); if not tmp_tag.unary: forward_stack.append(tmp_tag) else: m = re.match(end_tag, check_str) if m: #found closing tag tmp_tag = Tag(m, ix); if forward_stack and forward_stack[-1].name == tmp_tag.name: forward_stack.pop() else: # found matched closing tag closing_tag = tmp_tag; break elif has_match('') + 3 continue elif ch == '-' and has_match('-->'): # looks like cursor was inside comment with invalid HTML if not forward_stack or forward_stack[-1].type != 'comment': end_ix = ix + 3 return action(Comment( find_comment_start(ix), end_ix )) ix += 1 return action(opening_tag, closing_tag, start_ix)scribes-0.4~r910/LanguagePlugins/PluginPythonErrorChecker.py0000644000175000017500000000121111242100540024013 0ustar andreasandreasname = "Python error checker plugin" authors = ["Lateef Alabi-Oki "] languages = ["python"] version = 0.3 autoload = True class_name = "ErrorCheckerPlugin" short_description = "Automatically check Python source code for errors." long_description = """Automatically check Python source code for common syntax, semantic and logic errors.""" class ErrorCheckerPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from PythonErrorChecker.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/README0000644000175000017500000000222611242100540014304 0ustar andreasandreasVersion ======= 0.4 (development version) What is Scribes? ================ Scribes is an ultra minimalist text editor for GNOME that combines simplicity with power. Scribes enhances your workflow by ensuring common and repetitive operations are intelligently automated and by eliminating factors that prevent you from focusing on your tasks. http://scribes.sf.net/ You can also write Python plugins to extend or customize the editor for specialized text editing needs. Requirements ============ To use Scribes you need the following software installed on your computer: - python-xdg - D-Bus-0.70 - Python-2.5 - PyGTK-2.10 - PyGTKSourceView2 - Yelp-2.12 Installation ============ To install Scribes, launch gnome-terminal and type the following at the command prompt as root: ./configure make make install You can install Scribes into a test or temporary location as follows: ./configure --prefix=/home/$(USERNAME)/testScribes make make install Usage ===== To start Scribes, type the following at the command prompt: scribes You can also start Scribes from the GNOME Application Menu. Application Menu -> Accessories -> Scribes Text Editor scribes-0.4~r910/GenericPlugins/0000755000175000017500000000000011242100540016340 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/PluginTriggerArea.py0000644000175000017500000000111711242100540022265 0ustar andreasandreasname = "Trigger Area Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "TriggerAreaPlugin" short_description = "Implement trigger area as a plugin." long_description = """A custom widget that reveals the toolbar and menu bar when the mouse is over it.""" class TriggerAreaPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from TriggerArea.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginOpenFile.py0000644000175000017500000000105411242100540021572 0ustar andreasandreasname = "Open File Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "OpenFilePlugin" short_description = "The plugin opens, or creates, files via a GUI." long_description = """This plug-in opens, or creates files via a GUI.""" class OpenFilePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from OpenFile.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/__init__.py0000644000175000017500000000000011242100540020437 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketHighlight/0000755000175000017500000000000011242100540021543 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketHighlight/__init__.py0000644000175000017500000000000011242100540023642 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketHighlight/LexicalScopeHighlightMetadata.py0000644000175000017500000000070011242100540027756 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "LexicalScopeHighlight.gdb") def get_value(): try: value = "orange" database = open_database(basepath, "r") value = database["color"] except KeyError: pass finally: database.close() return value def set_value(color): try: database = open_database(basepath, "w") database["color"] = color finally: database.close() return scribes-0.4~r910/GenericPlugins/BracketHighlight/Highlighter.py0000644000175000017500000001453111242100540024357 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Highlighter(SignalManager): """ The class implements and object that highlights regions within pair characters. The following characters are supported "(", ")", "[", "]" "<", ">", "{" and "}" """ def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "cursor-moved", self.__cursor_moved_cb) self.connect(editor.textbuffer, "apply-tag", self.__apply_tag_cb) self.connect(editor.textbuffer, "remove-tag", self.__remove_tag_cb) self.connect(editor, "loaded-file", self.__generic_highlight_on_cb) self.connect(editor, "readonly", self.__generic_highlight_on_cb) self.connect(editor, "load-error", self.__generic_highlight_on_cb) self.__monitor.connect("changed", self.__highlight_cb) self.__highlight_region() from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor): self.__editor = editor self.__can_highlight = True self.__buffer_is_tagged = False self.__highlight_tag = self.__create_highlight_tag() self.__match = editor.find_matching_bracket self.__start_mark = None self.__end_mark = None self.__start_characters = ("(", "[", "{") self.__end_characters = (")", "]", "}") from os.path import join preference_folder = join(editor.metadata_folder, "PluginPreferences") database_path = join(preference_folder, "LexicalScopeHighlight.gdb") self.__monitor = editor.get_file_monitor(database_path) return def __precompile_methods(self): methods = (self.__cursor_moved_cb, self.__apply_tag_cb, self.__remove_tag_cb, self.__highlight_region, self.__highlight_cb,) self.__editor.optimize(methods) return False def destroy(self): self.__destroy() return def __highlight_region(self): textbuffer = self.__editor.textbuffer if (self.__buffer_is_tagged): begin = textbuffer.get_iter_at_mark(self.__start_mark) end = textbuffer.get_iter_at_mark(self.__end_mark) textbuffer.remove_tag(self.__highlight_tag, begin, end) iterator = self.__editor.cursor match = self.__match(iterator.copy()) if not match: return False try: start, end = self.__get_boundary(iterator, match) textbuffer.apply_tag(self.__highlight_tag, start, end) except: pass return False def __get_boundary(self, iterator, end): # The madness going on over here is as a result of the strangeness # of the GtkSourceView API. If your head hurts, kindly move along. if self.__is_start_character(iterator.copy()): end.forward_char() elif self.__is_end_character(iterator.copy()): pass else: return None return iterator, end def __is_start_character(self, iterator): if iterator.get_char() in self.__start_characters: return True return False def __is_end_character(self, iterator): success = iterator.backward_char() if not success: return False if iterator.get_char() in self.__end_characters: return True return False def __create_highlight_tag(self): from gtk import TextTag tag = TextTag("lexical_scope_tag") self.__editor.textbuffer.get_tag_table().add(tag) from LexicalScopeHighlightMetadata import get_value tag.set_property("background", get_value()) tag.set_property("foreground", "white") return tag def __destroy(self): self.__remove_all_timers() self.__monitor.cancel() self.disconnect() self.__remove_highlight_tag() if self.__start_mark: self.__editor.delete_mark(self.__start_mark) if self.__end_mark: self.__editor.delete_mark(self.__end_mark) del self return def __remove_highlight_tag(self): try: self.__editor.textbuffer.get_tag_table().remove(self.__highlight_tag) except ValueError: pass return False def __highlight_on_idle(self): from gobject import idle_add self.__timer4 = idle_add(self.__highlight_region, priority=9999) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, 3: self.__timer3, 4: self.__timer4, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 5)] return False ######################################################################## # # Signal and Event Handlers # ######################################################################## def __cursor_moved_cb(self, editor): if not (self.__can_highlight): return self.__remove_all_timers() from gobject import timeout_add as tadd, PRIORITY_LOW self.__timer3 = tadd(250, self.__highlight_on_idle, priority=PRIORITY_LOW) return def __apply_tag_cb(self, textbuffer, tag, start, end): if (tag != self.__highlight_tag): return False textbuffer = self.__editor.textbuffer if self.__start_mark is None: self.__start_mark = textbuffer.create_mark(None, start, True) if self.__end_mark is None: self.__end_mark = textbuffer.create_mark(None, end, False) textbuffer.move_mark(self.__start_mark, start) textbuffer.move_mark(self.__end_mark, end) self.__buffer_is_tagged = True return True def __remove_tag_cb(self, textbuffer, tag, start, end): if (tag != self.__highlight_tag): return False self.__buffer_is_tagged = False return True def __generic_highlight_off_cb(self, *args): self.__can_highlight = False begin, end = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__highlight_tag, begin, end) return def __generic_highlight_on_cb(self, *args): self.__can_highlight = True self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__highlight_region, priority=PRIORITY_LOW) return ######################################################################## # # GConf Signal Handlers # ######################################################################## def __highlight_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False textbuffer = self.__editor.textbuffer begin, end = textbuffer.get_bounds() textbuffer.remove_tag(self.__highlight_tag, begin, end) from LexicalScopeHighlightMetadata import get_value color = get_value() self.__highlight_tag.set_property("background", color) self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__highlight_region, priority=PRIORITY_LOW) return scribes-0.4~r910/GenericPlugins/PreferencesGUI/0000755000175000017500000000000011242100540021146 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/__init__.py0000644000175000017500000000000011242100540023245 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/Signals.py0000644000175000017500000000122611242100540023121 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "updated-language-combobox": (SSIGNAL, TYPE_NONE, ()), "language-combobox-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-language": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "sensitive": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "margin-display": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "database-update": (SSIGNAL, TYPE_NONE, ()), "reset": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/PreferencesGUI/Utils.py0000644000175000017500000000000011242100540022606 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/DatabaseMonitor.py0000644000175000017500000000155011242100540024575 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join preference_folder = join(editor.metadata_folder, "Preferences", "Languages") self.__monitor = editor.get_folder_monitor(preference_folder) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__manager.emit("database-update") return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/Trigger.py0000644000175000017500000000231111242100540023120 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) editor.get_toolbutton("PreferenceToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-preferences-window", "F12", _("Show preferences window"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try : self.__manager.show() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return scribes-0.4~r910/GenericPlugins/PreferencesGUI/Manager.py0000644000175000017500000000111211242100540023065 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self self = None return False def show(self): self.emit("show") return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/0000755000175000017500000000000011242100540021572 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/SpellCheckButton.py0000644000175000017500000000525011242100540025357 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("SpellCheckButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __update(self, language=""): if language: self.__language = language self.__button.handler_block(self.__sigid1) from SCRIBES.SpellCheckMetadata import get_value self.__button.set_active(get_value(self.__language)) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return def __set(self): check = self.__button.get_active() from SCRIBES.SpellCheckMetadata import set_value set_value((self.__language, check)) return def __reset(self): from SCRIBES.SpellCheckMetadata import reset reset(self.__language) return False def __toggled_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = idle_add(self.__set) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__update) return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/__init__.py0000644000175000017500000000000011242100540023671 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/MarginSpinButton.py0000644000175000017500000000714211242100540025413 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__button.connect("value-changed", self.__changed_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("margin-display", self.__display_cb) self.__sigid7 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("MarginSpinButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) del self return False def __delayed_set(self): try: from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__set, priority=9999) return False def __set(self): position = int(self.__button.get_value()) from SCRIBES.MarginPositionMetadata import set_value set_value((self.__language, position)) return False def __update(self, language=""): if language: self.__language = language from SCRIBES.MarginPositionMetadata import get_value position = get_value(self.__language) self.__button.handler_block(self.__sigid1) self.__button.set_value(position) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return False def __reset(self): from SCRIBES.MarginPositionMetadata import reset reset(self.__language) return False def __set_properties(self): self.__button.set_max_length(3) self.__button.set_width_chars(3) self.__button.set_digits(0) self.__button.set_increments(1, 5) self.__button.set_range(1, 300) from gtk import UPDATE_ALWAYS self.__button.set_update_policy(UPDATE_ALWAYS) self.__button.set_numeric(True) self.__button.set_snap_to_ticks(True) return def __changed_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__delayed_set, priority=9999) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update) return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer4) except AttributeError: pass finally: self.__timer4 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __display_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/SensitivityEmitter.py0000644000175000017500000000215511242100540026033 0ustar andreasandreasclass Emitter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("selected-language", self.__selected_cb) self.__sigid3 = self.__combo.connect("changed", self.__changed_cb) self.__sigid4 = manager.connect("reset", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("LanguageComboBox") return def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), (self.__sigid3, self.__combo), (self.__sigid4, self.__manager), ) self.__editor.disconnect_signals(signals_data) del self self = None return False def __sensitive(self, sensitive=True): self.__manager.emit("sensitive", sensitive) return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): self.__sensitive(False) return False def __selected_cb(self, *args): self.__sensitive() return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/GUI.glade0000644000175000017500000004744711242100540023234 0ustar andreasandreas 10 Preferences ScribesPreferencesWindowRole False True center-on-parent True scribes dialog True True static True 10 True 10 True <b>Document _Type:</b> True True True False False 0 True False False 1 False False 0 True 10 False True 10 5 True 0 <b>Font</b> True True 0 True 10 True 10 True _Font: True FontButton True False False 0 True False False False False True True 1 1 True 0 <b>Tab Stops</b> True True 2 True 10 True 10 True 0 _Tab Width: True TabSpinButton True False False 0 True False 3 3 1 True False 1 True True True if-valid False False 1 3 True 10 _Use spaces instead of tabs True False False False True False True 4 True 0 <b>Text Wrapping</b> True True 5 True 10 Enable text _wrapping True False False True False True 6 True 0 <b>Right Margin</b> True True 7 True 10 _Show right margin True False False False True False True 8 True 10 True 10 True _Right margin position: True True False False 0 True False 3 3 1 False True True True if-valid False False 1 9 True 0 <b>Spell Checking</b> True True 10 True 10 _Enable spell checking True False False True False True 11 1 True end _Reset to Default True False True False image1 True False False False 0 2 True gtk-preferences scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/0000755000175000017500000000000011242100540024746 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/__init__.py0000644000175000017500000000000011242100540027045 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/Initializer.py0000644000175000017500000000172511242100540027610 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("LanguageComboBox") self.__model = self.__create_model() return def __destroy(self): self.__editor.disconnect_signals(((self.__sigid1, self.__manager),)) del self self = None return False def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/ModelUpdater.py0000644000175000017500000000225011242100540027704 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("language-combobox-data", self.__data_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("LanguageComboBox") self.__model = self.__combo.get_model() return def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), ) self.__editor.disconnect_signals(signals_data) del self return False def __update(self, data): self.__combo.set_model(None) self.__model.clear() for language_name, language_id in data: self.__editor.refresh(False) self.__model.append([language_name, language_id]) self.__editor.refresh(False) self.__combo.set_model(self.__model) self.__manager.emit("updated-language-combobox") return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__update, data, priority=9999) return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/LanguageEmitter.py0000644000175000017500000000255311242100540030402 0ustar andreasandreasclass Emitter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__combo.connect_after("changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("LanguageComboBox") self.__model = self.__combo.get_model() return def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__combo), ) self.__editor.disconnect_signals(signals_data) del self self = None return False def __emit(self): iterator = self.__combo.get_active_iter() language = self.__model.get_value(iterator, 1) self.__manager.emit("selected-language", language) return False def __delayed_emit(self): try: from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__emit, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__delayed_emit, priority=9999) return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/Manager.py0000644000175000017500000000061611242100540026675 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from LanguageEmitter import Emitter Emitter(manager, editor) from LanguageSelector import Selector Selector(manager, editor) from ModelUpdater import Updater Updater(manager, editor) from DataModelGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/LanguageSelector.py0000644000175000017500000000214111242100540030542 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("updated-language-combobox", self.__updated_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("LanguageComboBox") self.__model = self.__combo.get_model() return def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), ) self.__editor.disconnect_signals(signals_data) del self self = None return False def __select(self): language = self.__editor.language if self.__editor.language else "plain text" _row = -1 for row in self.__model: _row += 1 if language == row[1]: break self.__combo.set_active(_row) self.__combo.set_property("sensitive", True) return False def __destroy_cb(self, *args): self.__destroy() return False def __updated_cb(self, *args): from gobject import idle_add idle_add(self.__select) return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/DataModelGenerator.py0000644000175000017500000000170311242100540031022 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) from gobject import idle_add idle_add(self.__generate, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signals(((self.__sigid1, self.__manager),)) del self return False def __extract(self, _object): self.__editor.refresh(False) return _object.get_name(), _object.get_id() def __generate(self): from gettext import gettext as _ data = [self.__extract(_object) for _object in self.__editor.language_objects] data.append((_("Plain Text"), "plain text")) by_id = lambda x: x[1] data = sorted(data, key=by_id) self.__manager.emit("language-combobox-data", data) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Manager.py0000644000175000017500000000137711242100540023526 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window.Manager import Manager Manager(manager, editor) from SensitivityEmitter import Emitter Emitter(manager, editor) from FontButton import Button Button(manager, editor) from TabSpinButton import Button Button(manager, editor) from SpacesCheckButton import Button Button(manager, editor) from WrapCheckButton import Button Button(manager, editor) from MarginSpinButton import Button Button(manager, editor) from MarginCheckButton import Button Button(manager, editor) from SpellCheckButton import Button Button(manager, editor) from ResetButton import Button Button(manager, editor) from LanguageComboBox.Manager import Manager Manager(manager, editor) scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/0000755000175000017500000000000011242100540023041 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/Destroyer.py0000644000175000017500000000104211242100540025370 0ustar andreasandreasclass Destroyer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/__init__.py0000644000175000017500000000000011242100540025140 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/Initializer.py0000644000175000017500000000127111242100540025677 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __set_properties(self): self.__window.set_property("sensitive", True) self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/.goutputstream-SAXB2U0000644000175000017500000000374411242100540026737 0ustar andreasandreasfrom gettext import gettext as _ class Displayer(object): def __init__(self, manager, editor): editor.response() self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_window_cb) self.__sigid3 = manager.connect("hide", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("rename", self.__hide_window_cb) editor.response() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.open_gui.get_object("Window") return def __show(self): self.__editor.response() self.__window.show_all() self.__editor.busy() self.__editor.set_message(_("Rename Document"), "save") self.__editor.response() return False def __hide(self): self.__editor.response() self.__editor.busy(False) self.__editor.unset_message(_("Open Document"), "open") self.__window.hide() self.__editor.response() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/Manager.py0000644000175000017500000000040111242100540024760 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Destroyer import Destroyer Destroyer(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/Window/Displayer.py0000644000175000017500000000276411242100540025360 0ustar andreasandreasfrom gettext import gettext as _ class Displayer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_window_cb) self.__sigid3 = manager.connect("hide", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), (self.__sigid3, self.__manager), (self.__sigid4, self.__manager), (self.__sigid5, self.__window), ) self.__editor.disconnect_signals(signals_data) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__manager.emit("hide") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/FontButton.py0000644000175000017500000000446211242100540024254 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("font-set", self.__set_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("FontButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __set(self): font_name = self.__button.get_font_name() from SCRIBES.FontMetadata import set_value set_value((self.__language, font_name)) return False def __reset(self): from SCRIBES.FontMetadata import reset reset(self.__language) return False def __update(self, language=""): if language: self.__language = language from SCRIBES.FontMetadata import get_value font_name = get_value(self.__language) self.__button.handler_block(self.__sigid1) self.__button.set_font_name(font_name) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update) return def __language_cb(self, manager, language): from gobject import idle_add idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __set_cb(self, *args): self.__set() return True def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/SpacesCheckButton.py0000644000175000017500000000532411242100540025520 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("SpacesCheckButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __update(self, language=""): if language: self.__language = language self.__button.handler_block(self.__sigid1) from SCRIBES.UseTabsMetadata import get_value use_tabs = get_value(self.__language) self.__button.set_active(not use_tabs) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return False def __set(self): use_spaces = self.__button.get_active() from SCRIBES.UseTabsMetadata import set_value set_value((self.__language, not use_spaces)) return False def __reset(self): from SCRIBES.UseTabsMetadata import reset reset(self.__language) return False def __toggled_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = idle_add(self.__set) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__update) return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/WrapCheckButton.py0000644000175000017500000000526711242100540025221 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("WrapCheckButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __update(self, language=""): if language: self.__language = language self.__button.handler_block(self.__sigid1) from SCRIBES.TextWrappingMetadata import get_value as can_wrap self.__button.set_active(can_wrap(self.__language)) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return def __reset(self): from SCRIBES.TextWrappingMetadata import reset reset(self.__language) return False def __set(self): wrap = self.__button.get_active() from SCRIBES.TextWrappingMetadata import set_value set_value((self.__language, wrap)) return def __toggled_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = idle_add(self.__set) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__update) return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/TabSpinButton.py0000644000175000017500000000654011242100540024705 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__button.connect("value-changed", self.__changed_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("TabSpinButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __delayed_set(self): try: from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__set, priority=9999) return False def __reset(self): from SCRIBES.TabWidthMetadata import reset reset(self.__language) return False def __set(self): tab_size = int(self.__button.get_value()) from SCRIBES.TabWidthMetadata import set_value set_value((self.__language, tab_size)) return False def __update(self, language=""): if language: self.__language = language from SCRIBES.TabWidthMetadata import get_value tab_size = get_value(self.__language) self.__button.handler_block(self.__sigid1) self.__button.set_value(tab_size) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return False def __set_properties(self): self.__button.set_max_length(3) self.__button.set_width_chars(3) self.__button.set_digits(0) self.__button.set_increments(1, 5) self.__button.set_range(1, 24) from gtk import UPDATE_ALWAYS self.__button.set_update_policy(UPDATE_ALWAYS) self.__button.set_numeric(True) self.__button.set_snap_to_ticks(True) return def __changed_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__delayed_set, priority=9999) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update) return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer4) except AttributeError: pass finally: self.__timer4 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/ResetButton.py0000644000175000017500000000171611242100540024427 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid3 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_object("ResetButton") return def __destroy(self): signals_data = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), (self.__sigid3, self.__button), ) self.__editor.disconnect_signals(signals_data) del self self = None return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__manager.emit("reset") return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PreferencesGUI/GUI/MarginCheckButton.py0000644000175000017500000000534211242100540025517 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("database-update", self.__update_cb) self.__sigid4 = manager.connect("selected-language", self.__language_cb) self.__sigid5 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("MarginCheckButton") self.__language = "plain text" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self return False def __update(self, language=""): if language: self.__language = language self.__button.handler_block(self.__sigid1) from SCRIBES.DisplayRightMarginMetadata import get_value value = get_value(self.__language) self.__button.set_active(value) self.__manager.emit("margin-display", value) self.__button.handler_unblock(self.__sigid1) self.__button.set_property("sensitive", True) return def __set(self): from SCRIBES.DisplayRightMarginMetadata import set_value set_value((self.__language, self.__button.get_active())) return def __reset(self): from SCRIBES.DisplayRightMarginMetadata import reset reset(self.__language) return False def __toggled_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = idle_add(self.__set) return True def __update_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__update) return False def __language_cb(self, manager, language): try: from gobject import idle_add, source_remove source_remove(self.__timer3) except AttributeError: pass finally: self.__timer3 = idle_add(self.__update, language) return def __sensitive_cb(self, manager, sensitive): if not sensitive: self.__button.set_property("sensitive", False) return False def __reset_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/PluginAdvancedConfiguration.py0000644000175000017500000000124011242100540024323 0ustar andreasandreasname = "Advanced configuration plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "AdvancedConfigurationPlugin" short_description = "Shows the advanced configuration window." long_description = """Shows the advanced configuration window. The window allows user to configure advanced options provided by the editor.""" class AdvancedConfigurationPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from AdvancedConfiguration.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginMultiEdit.py0000644000175000017500000000124111242100540021767 0ustar andreasandreasname = "Multi Edit Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "MultiEditPlugin" short_description = "Edit several places in the editing area simultaneously" long_description = """Press i to enable multi editing mode. i adds or removes edit points in the editing area. Type to edit the edit points simultaneously.""" class MultiEditPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from MultiEdit.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/SearchSystem/0000755000175000017500000000000011242100540020752 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SearchSystem/RegexCreator.py0000644000175000017500000000233211242100540023716 0ustar andreasandreasclass Creator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("new-pattern", self.__pattern_cb) self.__sigid3 = manager.connect("match-case-flag", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__ignore_case = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __regex_object(self, pattern): from re import I, U, M, L, compile as compile_ flags = I|M|U|L if self.__ignore_case else U|M|L self.__manager.emit("regex-flags", flags) regex_object = compile_(pattern, flags) self.__manager.emit("new-regex", regex_object) return False def __destroy_cb(self, *args): self.__destroy() return False def __pattern_cb(self, manager, pattern): self.__regex_object(pattern) return False def __update_cb(self, manager, match_case): self.__ignore_case = not match_case return False scribes-0.4~r910/GenericPlugins/SearchSystem/__init__.py0000644000175000017500000000000011242100540023051 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SearchSystem/SearchModeMetadata.py0000644000175000017500000000107311242100540025000 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "SearchMode.gdb") def get_value(): try: # Mode values are: "default", "regex" and "findasyoutype" mode = "findasyoutype" database = open_database(basepath, "r") mode = database["mode"] except KeyError: pass finally: database.close() return mode def set_value(mode): if not (mode in ("default", "regex", "findasyoutype")): raise ValueError try: database = open_database(basepath, "w") database["mode"] = mode finally: database.close() return scribes-0.4~r910/GenericPlugins/SearchSystem/MatchMapper.py0000644000175000017500000000230011242100540023520 0ustar andreasandreasclass Mapper(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("found-matches", self.__matches_cb) self.__sigid3 = manager.connect("search-boundary", self.__boundary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__offset = 0 return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __map_matches(self, matches): if not matches: return False factor = self.__offset remap = lambda start, end: (factor+start, factor+end) matches = [remap(*offset) for offset in matches] self.__manager.emit("mapped-matches", matches) return False def __destroy_cb(self, *args): self.__destroy() return False def __matches_cb(self, manager, matches): self.__map_matches(matches) return False def __boundary_cb(self, manager, boundary): self.__offset = boundary[0].get_offset() return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchWordMetadata.py0000644000175000017500000000070511242100540024657 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "MatchWord.gdb") def get_value(): try: value = False database = open_database(basepath, "r") value = database["match_word"] except KeyError: pass finally: database.close() return value def set_value(match_word): try: database = open_database(basepath, "w") database["match_word"] = match_word finally: database.close() return scribes-0.4~r910/GenericPlugins/SearchSystem/SearchTypeMetadata.py0000644000175000017500000000106411242100540025035 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "SearchType.gdb") def get_value(): try: # Type values are: "normal", "forward" and "backward" type_ = "normal" database = open_database(basepath, "r") type_ = database["type_"] except KeyError: pass finally: database.close() return type_ def set_value(type_): if not (type_ in ("normal", "forward", "backward")): raise ValueError try: database = open_database(basepath, "w") database["type_"] = type_ finally: database.close() return scribes-0.4~r910/GenericPlugins/SearchSystem/ConfigurationManager.py0000644000175000017500000000254611242100540025435 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__word_monitor.connect("changed", self.__changed_cb) self.__mode_monitor.connect("changed", self.__changed_cb) self.__emit_change_signal() def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join preference_folder = join(editor.metadata_folder, "PluginPreferences") word_path = join(preference_folder, "MatchWord.gdb") mode_path = join(preference_folder, "SearchMode.gdb") self.__word_monitor = editor.get_file_monitor(word_path) self.__mode_monitor = editor.get_file_monitor(mode_path) return def __emit_change_signal(self): from MatchWordMetadata import get_value self.__manager.emit("match-word-flag", get_value()) from SearchModeMetadata import get_value self.__manager.emit("search-mode-flag", get_value()) return def __destroy(self): self.__word_monitor.cancel() self.__mode_monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __changed_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__emit_change_signal() return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchCaseMetadata.py0000644000175000017500000000070511242100540024617 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "MatchCase.gdb") def get_value(): try: value = False database = open_database(basepath, "r") value = database["match_case"] except KeyError: pass finally: database.close() return value def set_value(match_case): try: database = open_database(basepath, "w") database["match_case"] = match_case finally: database.close() return scribes-0.4~r910/GenericPlugins/SearchSystem/ReplaceManager.py0000644000175000017500000001030411242100540024170 0ustar andreasandreasfrom gettext import gettext as _ class Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("selected-mark", self.__selected_mark_cb) self.__sigid3 = manager.connect("marked-matches", self.__marked_matches_cb) self.__sigid4 = manager.connect("replace", self.__replace_cb) self.__sigid5 = manager.connect("replace-all", self.__replace_all_cb) self.__sigid6 = manager.connect("reset", self.__reset_cb) self.__sigid7 = manager.connect("hide-bar", self.__reset_cb) self.__sigid8 = manager.connect("search-string", self.__search_string_cb) self.__sigid9 = manager.connect("replace-string", self.__replace_string_cb) self.__sigid10 = manager.connect("match-object", self.__match_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__selected_mark = None self.__marks = None self.__string = "" self.__search_string = "" self.__match = None return def __destroy(self, *args): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__editor.disconnect_signal(self.__sigid9, self.__manager) self.__editor.disconnect_signal(self.__sigid10, self.__manager) del self self = None return def __reset_flags(self): self.__selected_mark, self.__marks, self.__string = None, None, "" return False def __replace(self, marks, feedback=True): if not self.__search_string: return start = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) self.__editor.textview.window.freeze_updates() self.__editor.textbuffer.begin_user_action() self.__editor.textbuffer.delete(start, end) start = self.__editor.textbuffer.get_iter_at_mark(marks[0]) self.__editor.textbuffer.insert(start, self.__string) self.__editor.textbuffer.end_user_action() self.__editor.textview.window.thaw_updates() self.__manager.emit("replaced-mark", marks) if feedback: message = _("Replaced '%s' with '%s'") % (self.__search_string, self.__string) if feedback: self.__editor.update_message(message, "pass", 10) return def __replace_all(self): if not self.__search_string: return False self.__editor.textview.window.freeze_updates() self.__editor.textbuffer.begin_user_action() [self.__replace(mark, False) for mark in self.__marks] self.__editor.textbuffer.end_user_action() self.__editor.textview.window.thaw_updates() message = _("Replaced all occurrences of '%s' with '%s'") % (self.__search_string, self.__string) self.__editor.update_message(message, "pass", 10) return False def __destroy_cb(self, *args): self.__destroy() return False def __reset_cb(self, *args): self.__reset_flags() return False def __selected_mark_cb(self, manager, mark): self.__selected_mark = mark return False def __marked_matches_cb(self, manager, marks): self.__marks = marks return False def __replace_cb(self, *args): if self.__selected_mark: self.__replace(self.__selected_mark) return False def __replace_all_cb(self, *args): if self.__marks: self.__replace_all() return False def __replace_string_cb(self, manager, string): # self.__string = unicode(string, "utf-8") string = string.decode("utf-8") self.__string = self.__match.expand(string) if self.__match else string return False def __search_string_cb(self, manager, string): self.__search_string = string return False def __match_cb(self, manager, match): self.__match = match return False def __precompile_methods(self): methods = (self.__replace,) self.__editor.optimize(methods) return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchIndexer.py0000644000175000017500000000404311242100540023700 0ustar andreasandreasfrom gettext import gettext as _ class Indexer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marked-matches", self.__marked_matches_cb) self.__sigid3 = manager.connect("current-match", self.__current_match_cb) self.__sigid4 = manager.connect("reset", self.__reset_cb) self.__sigid5 = manager.connect("hide-bar", self.__reset_cb) self.__sigid6 = manager.connect("replaced-mark", self.__replaced_mark_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__matches = deque() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __get_count(self, match): count = 0 for match_ in self.__matches: if match == match_: break count += 1 return count + 1 def __send_index(self, match): if not self.__matches: return count = self.__get_count(match) index = count, len(self.__matches) self.__manager.emit("match-index", index) message = _("Match %d of %d") % (index[0], index[1]) self.__editor.update_message(message, "pass", 10) return def __destroy_cb(self, *args): self.__destroy() return False def __marked_matches_cb(self, manager, matches): from collections import deque self.__matches = deque(matches) return False def __current_match_cb(self, manager, match): self.__send_index(match) return False def __reset_cb(self, *args): self.__matches.clear() return False def __replaced_mark_cb(self, manager, mark): if mark in self.__matches: self.__matches.remove(mark) return False scribes-0.4~r910/GenericPlugins/SearchSystem/Trigger.py0000644000175000017500000000310211242100540022723 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) editor.get_toolbutton("SearchToolButton").props.sensitive = True editor.get_toolbutton("ReplaceToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-findbar", "f", _("Search for text"), _("Navigation Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "show-replacebar", "r", _("Search for and replace text"), _("Navigation Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__get_manager() function = { self.__trigger1: self.__manager.show, self.__trigger2: self.__manager.show_replacebar, } function[trigger]() return scribes-0.4~r910/GenericPlugins/SearchSystem/BoundaryManager.py0000644000175000017500000000351211242100540024403 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("search", self.__search_cb) self.__sigid3 = manager.connect("search-type-flag", self.__update_cb) self.__sigid4 = manager.connect("selection-bounds", self.__selection_bounds_cb) self.__sigid5 = manager.connect("hide-bar", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__type = "normal" self.__selection_bounds = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __send_boundary(self): if self.__selection_bounds: bounds = self.__selection_bounds elif self.__type == "normal": bounds = self.__editor.textbuffer.get_bounds() elif self.__type == "forward": bounds = self.__editor.textbuffer.get_bounds() bounds = self.__editor.cursor, bounds[1] else: bounds = self.__editor.textbuffer.get_bounds() bounds = bounds[0], self.__editor.cursor self.__manager.emit("search-boundary", bounds) return def __destroy_cb(self, *args): self.__destroy() return def __search_cb(self, *args): self.__send_boundary() return False def __update_cb(self, manager, search_type): self.__type = search_type return False def __selection_bounds_cb(self, manager, bounds): self.__selection_bounds = bounds return False def __hide_cb(self, *args): self.__selection_bounds = None return False scribes-0.4~r910/GenericPlugins/SearchSystem/Marker.py0000644000175000017500000000362311242100540022551 0ustar andreasandreasclass Marker(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("mapped-matches", self.__found_matches_cb) self.__sigid3 = manager.connect("hide-bar", self.__clear_cb) self.__sigid4 = manager.connect("search-string", self.__clear_cb) self.__sigid5 = manager.connect("reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __clear(self): if not self.__marks: return del_ = self.__editor.delete_mark remove_marks = lambda start, end: (del_(start), del_(end)) (remove_marks(*mark) for mark in self.__marks) self.__marks[:] self.__marks = None return def __mark_matches(self, matches): if not matches: return self.__clear() mr = self.__editor.create_right_mark ml = self.__editor.create_left_mark iao = self.__editor.textbuffer.get_iter_at_offset iaos = lambda start, end: (iao(start), iao(end)) mark_ = lambda start, end: (ml(start), mr(end)) mark_from_offsets = lambda start, end: mark_(*(iaos(start, end))) marks = [mark_from_offsets(*offset) for offset in matches] self.__marks = marks self.__manager.emit("marked-matches", marks) return def __destroy_cb(self, *args): self.__destroy() return False def __clear_cb(self, *args): self.__clear() return False def __found_matches_cb(self, manager, matches): self.__mark_matches(matches) return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchSelector.py0000644000175000017500000000357111242100540024067 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("current-match", self.__current_match_cb) self.__sigid3 = manager.connect("search-string", self.__clear_cb) self.__sigid4 = manager.connect("found-matches", self.__clear_cb) self.__sigid5 = manager.connect("hide-bar", self.__select_cb) self.__sigid6 = manager.connect("replaced-mark", self.__current_match_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__offsets = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __clear(self): self.__offsets = None return def __update_offsets(self, match): get_iter = self.__editor.textbuffer.get_iter_at_mark self.__offsets = get_iter(match[0]).get_offset(), get_iter(match[1]).get_offset() return def __select(self): if not self.__offsets: return get_iter = self.__editor.textbuffer.get_iter_at_offset get_range = lambda start, end: (get_iter(start), get_iter(end)) self.__editor.textbuffer.select_range(*(get_range(*(self.__offsets)))) self.__clear() return False def __destroy_cb(self, *args): self.__destroy() return False def __select_cb(self, *args): self.__select() return False def __clear_cb(self, *args): self.__clear() return False def __current_match_cb(self, manager, match): self.__update_offsets(match) return False scribes-0.4~r910/GenericPlugins/SearchSystem/ReplaceMatchColorer.py0000644000175000017500000000374611242100540025214 0ustar andreasandreasclass Colorer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("replaced-mark", self.__replaced_mark_cb) self.__sigid3 = manager.connect("search-string", self.__clear_cb) self.__sigid4 = manager.connect("hide-bar", self.__clear_cb) self.__sigid5 = manager.connect("reset", self.__clear_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tag = self.__create_tag() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __create_tag(self): from gtk import TextTag tag = TextTag("replace_tag") self.__editor.textbuffer.get_tag_table().add(tag) tag.set_property("background", "green") tag.set_property("foreground", "blue") return tag def __clear(self): bounds = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__tag, *bounds) return def __tag_mark(self, mark): start = self.__editor.textbuffer.get_iter_at_mark(mark[0]) end = self.__editor.textbuffer.get_iter_at_mark(mark[1]) self.__editor.textbuffer.apply_tag(self.__tag, start, end) self.__editor.move_view_to_cursor(False, start) return False def __destroy_cb(self, *args): self.__destroy() return False def __replaced_mark_cb(self, manager, mark): self.__tag_mark(mark) return False def __clear_cb(self, *args): self.__clear() return False def __precompile_methods(self): methods = (self.__tag_mark,) self.__editor.optimize(methods) return False scribes-0.4~r910/GenericPlugins/SearchSystem/Searcher.py0000644000175000017500000000433711242100540023067 0ustar andreasandreasfrom gettext import gettext as _ message = _("No matches found") class Searcher(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("search-boundary", self.__boundary_cb) self.__sigid3 = manager.connect("new-regex", self.__regex_cb) self.__sigid4 = manager.connect("regex-flags", self.__regex_flags_cb) self.__sigid5 = manager.connect("search-mode-flag", self.__search_mode_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__text = None self.__regex_flags = None self.__regex_mode = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __find_matches(self, regex_object): iterator = regex_object.finditer(self.__text) matches = [match.span() for match in iterator] match_object = regex_object.search(self.__text) if self.__regex_mode else None self.__manager.emit("match-object", match_object) self.__manager.emit("found-matches", matches) if not matches: self.__manager.emit("search-complete") if not matches: self.__editor.update_message(message, "fail", 10) return def __destroy_cb(self, *args): self.__destroy() return False def __boundary_cb(self, manager, boundary): self.__text = self.__editor.textbuffer.get_text(*(boundary)).decode("utf-8") return False def __regex_cb(self, manager, regex_object): self.__find_matches(regex_object) return False def __regex_flags_cb(self, manager, flags): self.__regex_flags = flags return False def __precompile_methods(self): methods = (self.__find_matches,) self.__editor.optimize(methods) return False def __search_mode_cb(self, manager, search_mode): self.__regex_mode = True if search_mode == "regex" else False return False scribes-0.4~r910/GenericPlugins/SearchSystem/SelectionMatchColorer.py0000644000175000017500000000373311242100540025562 0ustar andreasandreasclass Colorer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("current-match", self.__current_match_cb) self.__sigid3 = manager.connect("search-string", self.__clear_cb) self.__sigid4 = manager.connect("hide-bar", self.__clear_cb) self.__sigid5 = manager.connect("reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tag = self.__create_tag() self.__colored = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __create_tag(self): from gtk import TextTag tag = TextTag("match_selection_tag") self.__editor.textbuffer.get_tag_table().add(tag) tag.set_property("background", "blue") tag.set_property("foreground", "yellow") return tag def __clear(self): if self.__colored is False: return bounds = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__tag, *bounds) self.__colored = False return def __tag_mark(self, mark): self.__clear() apply_tag = self.__editor.textbuffer.apply_tag giam = self.__editor.textbuffer.get_iter_at_mark iter1 = giam(mark[0]) iter2 = giam(mark[1]) apply_tag(self.__tag, iter1, iter2) self.__editor.move_view_to_cursor(False, iter1) self.__colored = True self.__manager.emit("selected-mark", mark) return False def __destroy_cb(self, *args): self.__destroy() return False def __current_match_cb(self, manager, mark): self.__tag_mark(mark) return False def __clear_cb(self, *args): self.__clear() return False scribes-0.4~r910/GenericPlugins/SearchSystem/Manager.py0000644000175000017500000001101711242100540022676 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_INT from gobject import TYPE_STRING, TYPE_PYOBJECT, SIGNAL_RUN_FIRST from gobject import TYPE_BOOLEAN, SIGNAL_ACTION, SIGNAL_NO_RECURSE from gobject import SIGNAL_RUN_CLEANUP SCRIBES_SIGNAL = SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-bar": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-replacebar": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-bar": (SCRIBES_SIGNAL, TYPE_NONE, ()), "no-search-string": (SCRIBES_SIGNAL, TYPE_NONE, ()), "search-string": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-pattern": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-regex": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-boundary": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search": (SCRIBES_SIGNAL, TYPE_NONE, ()), "search-complete": (SCRIBES_SIGNAL, TYPE_NONE, ()), "focus-entry": (SCRIBES_SIGNAL, TYPE_NONE, ()), "found-matches": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "marked-matches": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "mapped-matches": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "match-object": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-mode": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "popup-menu": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-menu": (SCRIBES_SIGNAL, TYPE_NONE, ()), "reset": (SCRIBES_SIGNAL, TYPE_NONE, ()), "next": (SCRIBES_SIGNAL, TYPE_NONE, ()), "previous": (SCRIBES_SIGNAL, TYPE_NONE, ()), "navigator-is-ready": (SCRIBES_SIGNAL, TYPE_NONE, ()), "current-match": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-mark": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "match-index": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "entry-activated": (SCRIBES_SIGNAL, TYPE_NONE, ()), "back-button": (SCRIBES_SIGNAL, TYPE_NONE, ()), "select-match": (SCRIBES_SIGNAL, TYPE_NONE, ()), "match-word-flag": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "match-case-flag": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-type-flag": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-mode-flag": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selection-bounds": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "replace": (SCRIBES_SIGNAL, TYPE_NONE, ()), "replace-all": (SCRIBES_SIGNAL, TYPE_NONE, ()), "replace-entry-activated": (SCRIBES_SIGNAL, TYPE_NONE, ()), "focus-replace-entry": (SCRIBES_SIGNAL, TYPE_NONE, ()), "replace-string": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "replaced-mark": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "regex-flags": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "cursor-mark": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "entry-change-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from SearchCaseDetector import Detector Detector(self, editor) from MatchSelector import Selector Selector(self, editor) from GUI.Manager import Manager Manager(self, editor) from BoundaryManager import Manager Manager(self, editor) from PatternCreator import Creator Creator(self, editor) from RegexCreator import Creator Creator(self, editor) from CursorMarker import Marker Marker(self, editor) from Searcher import Searcher Searcher(self, editor) from MatchMapper import Mapper Mapper(self, editor) from Marker import Marker Marker(self, editor) from MatchColorer import Colorer Colorer(self, editor) from MatchIndexer import Indexer Indexer(self, editor) from SelectionMatchColorer import Colorer Colorer(self, editor) from MatchNavigator import Navigator Navigator(self, editor) from ConfigurationManager import Manager Manager(self, editor) from ReplaceMatchColorer import Colorer Colorer(self, editor) from ReplaceManager import Manager Manager(self, editor) def __init_attributes(self, editor): self.__editor = editor self.__manager = None from os.path import join folder = editor.get_current_folder(globals()) file_ = join(folder, "GUI", "FindBar.glade") from gtk.glade import XML self.__glade = XML(file_, "BarWindow", "scribes") self.__mglade = XML(file_, "MenuWindow", "scribes") return gui = property(lambda self: self.__glade) menu_gui = property(lambda self: self.__mglade) def destroy(self): self.emit("destroy") del self self = None return def show(self): self.emit("show-bar") return def show_replacebar(self): self.emit("show-replacebar") self.emit("show-bar") return scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/0000755000175000017500000000000011242100540021376 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ReplaceWidgetDisplayer.py0000644000175000017500000000263011242100540026345 0ustar andreasandreasclass Displayer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-replacebar", self.__show_cb) self.__sigid3 = manager.connect("hide-bar", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_widget("ReplaceLabel") self.__separator = manager.gui.get_widget("Separator") self.__button = manager.gui.get_widget("ReplaceButton") self.__abutton = manager.gui.get_widget("ReplaceAllButton") self.__entry = manager.gui.get_widget("ReplaceEntry") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __show(self): self.__label.show() self.__separator.show() self.__button.show() self.__abutton.show() self.__entry.show() return def __hide(self): self.__label.hide() self.__separator.hide() self.__button.hide() self.__abutton.hide() self.__entry.hide() return def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__show() return False def __hide_cb(self, *args): self.__hide() return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/NextButton.py0000644000175000017500000000271711242100540024071 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__sigid3 = manager.connect("match-index", self.__index_cb) self.__sigid4 = manager.connect("reset", self.__reset_cb) self.__sigid5 = manager.connect("no-search-string", self.__reset_cb) self.__button.props.sensitive = False def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("NextButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__button.destroy() del self self = None return def __check_sensitive(self, index): self.__button.props.sensitive = True return def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("next") self.__manager.emit("focus-entry") return False def __index_cb(self, manager, index): self.__check_sensitive(index) return False def __reset_cb(self, *args): self.__button.props.sensitive = False return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/Entry.py0000644000175000017500000001132311242100540023051 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-bar", self.__show_cb) self.__sigid3 = self.__entry.connect_after("changed", self.__changed_cb) self.__sigid4 = self.__entry.connect("activate", self.__activate_cb) self.__sigid5 = self.__entry.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = self.__manager.connect("focus-entry", self.__focus_entry_cb) self.__sigid7 = self.__manager.connect("hide-menu", self.__focus_entry_cb) self.__sigid8 = self.__manager.connect("search", self.__search_cb) self.__sigid9 = self.__manager.connect("search-complete", self.__search_complete_cb) self.__sigid10 = self.__entry.connect("button-press-event", self.__button_press_event_cb) self.__sigid11 = manager.connect("search-mode-flag", self.__search_mode_flag_cb) self.__sigid12 = self.__entry.connect("changed", self.__entry_changed_cb) self.__entry.props.sensitive = True from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_widget("Entry") self.__findasyoutype = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__entry) self.__editor.disconnect_signal(self.__sigid4, self.__entry) self.__editor.disconnect_signal(self.__sigid5, self.__entry) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__editor.disconnect_signal(self.__sigid9, self.__manager) self.__editor.disconnect_signal(self.__sigid10, self.__entry) self.__editor.disconnect_signal(self.__sigid11, self.__manager) self.__editor.disconnect_signal(self.__sigid12, self.__entry) self.__entry.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): if self.__editor.selection_range > 1: self.__manager.emit("selection-bounds", self.__editor.selection_bounds) text = self.__editor.selected_text if self.__editor.has_selection and self.__editor.selection_range <= 1 else self.__entry.get_text() self.__manager.emit("search-string", text) self.__entry.set_text("") self.__entry.set_text(text) self.__entry.grab_focus() return False def __change_timeout(self): try: text = self.__entry.get_text() self.__manager.emit("search-string", text) if not text: raise ValueError if self.__findasyoutype is False: return False self.__manager.emit("search") except ValueError: self.__manager.emit("no-search-string") return False def __change_idleadd(self): try: from gobject import source_remove, timeout_add source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(500, self.__change_timeout, priority=9999) return False def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__change_idleadd, priority=9999) return False def __activate_cb(self, *args): text = self.__entry.get_text() if not text: return False # self.__manager.emit("search-string", text) self.__manager.emit("entry-activated") return True def __key_press_event_cb(self, entry, event): from gtk.gdk import keyval_name, SHIFT_MASK keyname = keyval_name(event.keyval) ShiftKey = (event.state & SHIFT_MASK) Return = (keyname == "Return") Escape = (keyname == "Escape") if ShiftKey: if Return: self.__manager.emit("back-button") if Escape: self.__manager.emit("hide-bar") return False def __focus_entry_cb(self, *args): self.__entry.grab_focus() return False def __search_cb(self, *args): if self.__findasyoutype is False: self.__entry.props.sensitive = False return False def __search_complete_cb(self, *args): self.__entry.props.sensitive = True return False def __button_press_event_cb(self, *args): self.__manager.emit("hide-menu") return False def __search_mode_flag_cb(self, manager, mode): self.__findasyoutype = True if mode == "findasyoutype" else False text = self.__entry.get_text() self.__entry.set_text("") self.__entry.set_text(text) self.__entry.grab_focus() return False def __precompile_methods(self): methods = (self.__changed_cb,) self.__editor.optimize(methods) return False def __entry_changed_cb(self, *args): text = self.__entry.get_text() self.__manager.emit("entry-change-text", text) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/__init__.py0000644000175000017500000000000011242100540023475 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SearchSystem/GUI/FindButton.py0000644000175000017500000000513211242100540024025 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("search-string", self.__search_string_cb) self.__sigid3 = self.__button.connect("clicked", self.__clicked_cb) self.__sigid4 = manager.connect("match-index", self.__index_cb) self.__sigid5 = manager.connect("reset", self.__reset_cb) self.__sigid6 = manager.connect("found-matches", self.__found_cb) self.__sigid7 = manager.connect("no-search-string", self.__no_search_cb) self.__sigid8 = manager.connect("search-mode-flag", self.__search_mode_flag_cb) self.__manager.set_data("activate_button", self.__button) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("FindButton") self.__string = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__button) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__button.destroy() del self self = None return def __check_sensitive(self, index): sensitive = False if index == (1, 1) else False self.__button.props.sensitive = sensitive return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("search") self.__manager.emit("focus-entry") return False def __search_string_cb(self, manager, string): self.__string = string sensitive = True if string else False self.__button.props.sensitive = sensitive return False def __search_mode_flag_cb(self, *args): sensitive = True if self.__string else False self.__button.props.sensitive = sensitive return False def __index_cb(self, manager, index): self.__check_sensitive(index) return False def __reset_cb(self, *args): sensitive = True if self.__string else False self.__button.props.sensitive = sensitive self.__manager.set_data("activate_button", self.__button) return False def __found_cb(self, manager, matches): if not matches: self.__button.props.sensitive = False return False def __no_search_cb(self, *args): self.__button.props.sensitive = False return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/NormalButton.py0000644000175000017500000000256011242100540024377 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("search-type-flag", self.__update_cb) self.__button.props.active = False def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.menu_gui.get_widget("NormalButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return def __update_database(self): from ..SearchTypeMetadata import set_value set_value("normal") return def __set_active(self, search_type): self.__button.handler_block(self.__sigid2) self.__button.props.active = True if search_type == "normal" else False self.__button.handler_unblock(self.__sigid2) return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, manager, *args): self.__manager.emit("reset") self.__update_database() return False def __update_cb(self, manager, search_type): self.__set_active(search_type) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/MatchCaseButton.py0000644000175000017500000000247711242100540025006 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("match-case-flag", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.menu_gui.get_widget("MatchCaseButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return def __update_database(self): from ..MatchCaseMetadata import set_value set_value(self.__button.props.active) return def __set_active(self, match_case): self.__button.handler_block(self.__sigid2) self.__button.props.active = match_case self.__button.handler_unblock(self.__sigid2) return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, manager, *args): self.__manager.emit("reset") self.__update_database() return False def __update_cb(self, manager, match_case): self.__set_active(match_case) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/MatchWordButton.py0000644000175000017500000000247311242100540025042 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("match-word-flag", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.menu_gui.get_widget("MatchWordButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return def __update_database(self): from ..MatchWordMetadata import set_value set_value(self.__button.props.active) return def __set_active(self, match_word): self.__button.handler_block(self.__sigid2) self.__button.props.active = match_word self.__button.handler_unblock(self.__sigid2) return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, manager, *args): self.__manager.emit("reset") self.__update_database() return False def __update_cb(self, manager, match_word): self.__set_active(match_word) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/Bar.py0000644000175000017500000000442711242100540022463 0ustar andreasandreasfrom gettext import gettext as _ message = _("Search for text") class Bar(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("hide-bar", self.__hide_cb) self.__sigid3 = manager.connect("show-bar", self.__show_cb) self.__sigid4 = editor.textview.connect("focus-in-event", self.__hide_signal_cb) self.__sigid5 = editor.textview.connect("button-press-event", self.__hide_signal_cb) self.__block_signals() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__container = manager.gui.get_widget("alignment1") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__editor.textview) self.__editor.disconnect_signal(self.__sigid5, self.__editor.textview) del self self = None return def __block_signals(self): self.__editor.textview.handler_block(self.__sigid4) self.__editor.textview.handler_block(self.__sigid5) return False def __unblock_signals(self): self.__editor.textview.handler_unblock(self.__sigid4) self.__editor.textview.handler_unblock(self.__sigid5) return False def __hide(self): from SCRIBES.Exceptions import BarBoxInvalidObjectError try: self.__editor.remove_bar_object(self.__container) self.__block_signals() self.__editor.unset_message(message, "find") self.__editor.textview.grab_focus() except BarBoxInvalidObjectError: pass return False def __show(self): from SCRIBES.Exceptions import BarBoxAddError try: self.__editor.add_bar_object(self.__container) self.__unblock_signals() self.__editor.set_message(message, "find") except BarBoxAddError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __hide_cb(self, *args): self.__hide() return False def __show_cb(self, *args): self.__show() return False def __hide_signal_cb(self, *args): self.__manager.emit("select-match") self.__manager.emit("reset") self.__manager.emit("hide-bar") return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/MenuToolButton.py0000644000175000017500000000215111242100540024705 0ustar andreasandreasfrom gtk import MenuToolButton class ToolButton(MenuToolButton): def __init__(self, manager, editor): from gtk import STOCK_PROPERTIES MenuToolButton.__init__(self, STOCK_PROPERTIES) self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self) self.destroy() del self self = None return def __set_properties(self): hbox = self.__manager.gui.get_widget("HBox") hbox.add(self) hbox.reorder_child(self, 5) from gtk import PACK_START hbox.set_child_packing(self, False, False, 5, PACK_START) from gtk import Menu self.set_menu(Menu()) self.show_all() return def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.get_menu().activate() return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ReplaceEntry.py0000644000175000017500000000566611242100540024362 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("hide-bar", self.__reset_cb) self.__sigid3 = manager.connect("search-string", self.__reset_cb) self.__sigid4 = manager.connect("reset", self.__reset_cb) self.__sigid5 = manager.connect("found-matches", self.__found_matches_cb) self.__sigid6 = manager.connect("focus-replace-entry", self.__focus_entry_cb) self.__sigid7 = self.__entry.connect("key-press-event", self.__key_press_event_cb) self.__sigid8 = self.__entry.connect("button-press-event", self.__button_press_event_cb) self.__sigid9 = self.__entry.connect("activate", self.__activate_cb) self.__sigid10 = self.__entry.connect("changed", self.__changed_cb) self.__sigid11 = manager.connect("show-replacebar", self.__changed_cb) self.__sigid12 = manager.connect("no-search-string", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_widget("ReplaceEntry") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__entry) self.__editor.disconnect_signal(self.__sigid8, self.__entry) self.__editor.disconnect_signal(self.__sigid9, self.__entry) self.__editor.disconnect_signal(self.__sigid10, self.__entry) self.__editor.disconnect_signal(self.__sigid11, self.__manager) self.__entry.destroy() del self self = None return def __emit_replace_string(self): string = self.__entry.get_text() self.__manager.emit("replace-string", string) return False def __destroy_cb(self, *args): self.__destroy() return False def __reset_cb(self, *args): self.__entry.props.sensitive = False self.__emit_replace_string() return False def __found_matches_cb(self, manager, matches): sensitive = True if matches else False self.__entry.props.sensitive = sensitive return False def __focus_entry_cb(self, *args): self.__entry.grab_focus() return False def __button_press_event_cb(self, *args): self.__manager.emit("hide-menu") return False def __key_press_event_cb(self, entry, event): from gtk.gdk import keyval_name, SHIFT_MASK keyname = keyval_name(event.keyval) if keyname != "Escape": return False self.__manager.emit("hide-bar") return False def __activate_cb(self, *args): self.__emit_replace_string() self.__manager.emit("replace-entry-activated") return False def __changed_cb(self, *args): self.__emit_replace_string() return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ForwardButton.py0000644000175000017500000000256611242100540024561 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("search-type-flag", self.__update_cb) self.__button.props.active = False def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.menu_gui.get_widget("ForwardButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return def __update_database(self): from ..SearchTypeMetadata import set_value set_value("forward") return def __set_active(self, search_type): self.__button.handler_block(self.__sigid2) self.__button.props.active = True if search_type == "forward" else False self.__button.handler_unblock(self.__sigid2) return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, manager, *args): self.__manager.emit("reset") self.__update_database() return False def __update_cb(self, manager, search_type): self.__set_active(search_type) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/FindBar.glade0000644000175000017500000003777111242100540023720 0ustar andreasandreas True True GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK 5 popup False popup-menu False False True 5 True 2 True 0 <b>Alt+W</b> True 1 2 GTK_FILL 12 Match _Word True True True False none True True True False False 0 popup True dock True True True 3 3 10 10 True 2 10 2 2 True 1 <b>_Search:</b> True True Entry True GTK_SHRINK GTK_SHRINK True False True True 1 2 GTK_SHRINK GTK_SHRINK True 2 3 GTK_SHRINK GTK_SHRINK | GTK_FILL gtk-go-back True False True True True 3 4 GTK_FILL GTK_SHRINK True gtk-find True False True True True 0 gtk-go-forward True True True True 1 gtk-stop True True True True 2 4 5 GTK_FILL GTK_SHRINK True 5 6 GTK_SHRINK GTK_SHRINK | GTK_FILL True True True True up 6 7 GTK_SHRINK GTK_SHRINK True 7 8 GTK_SHRINK GTK_SHRINK | GTK_FILL True <b>_Mode:</b> True True ComboBox 8 9 GTK_SHRINK GTK_SHRINK True False 9 10 GTK_SHRINK GTK_SHRINK True 1 <b>_Replace</b>: True True True 1 2 GTK_SHRINK GTK_SHRINK False True True 1 2 1 2 GTK_SHRINK GTK_SHRINK True 2 3 1 2 GTK_SHRINK GTK_SHRINK | GTK_FILL Repla_ce False True True True True 3 4 1 2 GTK_FILL GTK_SHRINK Replace _All False True True True True 4 5 1 2 GTK_FILL GTK_SHRINK scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/PopupMenu.py0000644000175000017500000000353211242100540023703 0ustar andreasandreasclass PopupMenu(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("popup-menu", self.__popup_menu_cb) self.__sigid3 = manager.connect("hide-menu", self.__hide_menu_cb) self.__sigid4 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid5 = manager.connect("hide-bar", self.__hide_menu_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("MenuButton") self.__container = manager.gui.get_widget("Table") self.__window = manager.menu_gui.get_widget("MenuWindow") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __hide_menu_cb(self, *args): self.__hide() return False def __position(self): winx, winy = self.__editor.window.window.get_origin() hbox_y = winy + self.__container.allocation.y hbox_x = winx + self.__button.allocation.x y = hbox_y - self.__window.size_request()[1] self.__window.move(hbox_x, y) return def __hide(self): self.__window.hide() return def __show(self): self.__position() self.__window.show_all() return def __popup_menu_cb(self, *args): self.__show() return False def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-menu") return True scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ComboBox.py0000644000175000017500000000567711242100540023477 0ustar andreasandreasfrom gettext import gettext as _ data = ((_("Default"), "default"), (_("Regular Expression"), "regex"), (_("Find As You Type"), "findasyoutype")) class ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__quit_cb) self.__sigid2 = self.__combo.connect("changed", self.__changed_cb) self.__sigid3 = manager.connect("search-mode-flag", self.__update_cb) self.__sigid4 = manager.connect("search", self.__search_cb) self.__sigid5 = manager.connect("search-complete", self.__search_complete_cb) self.__populate_model(data) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_widget("ComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__combo) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__combo.destroy() del self return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __populate_model(self, data): self.__combo.handler_block(self.__sigid2) self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() for search_mode, alias in data: self.__model.append([search_mode, alias]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) self.__combo.handler_unblock(self.__sigid2) return False def __emit_new_mode(self): iterator = self.__combo.get_active_iter() search_mode = self.__model.get_value(iterator, 1) from ..SearchModeMetadata import set_value set_value(search_mode) self.__manager.emit("reset") self.__manager.emit("focus-entry") return False def __update_combo(self, search_mode): self.__combo.handler_block(self.__sigid2) dictionary = {"default": 0, "regex": 1, "findasyoutype": 2} self.__combo.set_active(dictionary[search_mode]) self.__combo.handler_unblock(self.__sigid2) return def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): self.__emit_new_mode() return False def __update_cb(self, manager, search_mode): self.__update_combo(search_mode) return False def __search_cb(self, *args): self.__combo.props.sensitive = False return False def __search_complete_cb(self, *args): self.__combo.props.sensitive = True return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/MenuComboBox.py0000644000175000017500000000472211242100540024312 0ustar andreasandreasfrom gettext import gettext as _ data = ((_("Normal"), "normal"), (_("Forward"), "forward"), (_("Backward"), "backward")) class ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__quit_cb) self.__sigid2 = self.__combo.connect("changed", self.__changed_cb) self.__sigid3 = manager.connect("search-type-flag", self.__update_cb) self.__populate_model(data) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.menu_gui.get_widget("MenuComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__combo) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__combo.destroy() del self self = None return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __populate_model(self, data): self.__combo.handler_block(self.__sigid2) self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() for search_mode, alias in data: self.__model.append([search_mode, alias]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) self.__combo.handler_unblock(self.__sigid2) return False def __emit_new_mode(self): iterator = self.__combo.get_active_iter() search_type = self.__model.get_value(iterator, 1) from ..SearchTypeMetadata import set_value set_value(search_type) self.__manager.emit("reset") return False def __update_combo(self, search_type): self.__combo.handler_block(self.__sigid2) dictionary = {"normal": 0, "forward": 1, "backward": 2} self.__combo.set_active(dictionary[search_type]) self.__combo.handler_unblock(self.__sigid2) return def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): self.__emit_new_mode() return False def __update_cb(self, manager, search_type): self.__update_combo(search_type) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ReplaceAllButton.py0000644000175000017500000000330311242100540025147 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("reset", self.__reset_cb) self.__sigid3 = manager.connect("hide-bar", self.__reset_cb) self.__sigid4 = manager.connect("search-string", self.__reset_cb) self.__sigid5 = manager.connect("found-matches", self.__found_matches_cb) self.__sigid7 = manager.connect("no-search-string", self.__reset_cb) self.__sigid6 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("ReplaceAllButton") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__button) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__button.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __reset_cb(self, *args): self.__button.props.sensitive = False return False def __found_matches_cb(self, manager, matches): sensitive = True if len(matches) > 1 else False self.__button.props.sensitive = sensitive return False def __clicked_cb(self, *args): self.__manager.emit("replace-all") self.__manager.emit("focus-replace-entry") return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/Manager.py0000644000175000017500000000221311242100540023320 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from ButtonSwitcher import Switcher Switcher(manager, editor) from Bar import Bar Bar(manager, editor) from Entry import Entry Entry(manager, editor) from ComboBox import ComboBox ComboBox(manager, editor) from MenuButton import Button Button(manager, editor) from PopupMenu import PopupMenu PopupMenu(manager, editor) # from MatchCaseButton import Button # Button(manager, editor) from MatchWordButton import Button Button(manager, editor) # from MenuComboBox import ComboBox # ComboBox(manager, editor) from EntryActivator import Activator Activator(manager, editor) from PreviousButton import Button Button(manager, editor) from NextButton import Button Button(manager, editor) from StopButton import Button Button(manager, editor) from FindButton import Button Button(manager, editor) from ReplaceWidgetDisplayer import Displayer Displayer(manager, editor) from ReplaceEntry import Entry Entry(manager, editor) from ReplaceButton import Button Button(manager, editor) from ReplaceAllButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/BackwardButton.py0000644000175000017500000000256611242100540024673 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("search-type-flag", self.__update_cb) self.__button.props.active = False def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.menu_gui.get_widget("BackwardButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return def __update_database(self): from ..SearchTypeMetadata import set_value set_value("backward") return def __set_active(self, search_type): self.__button.handler_block(self.__sigid2) self.__button.props.active = True if search_type == "backward" else False self.__button.handler_unblock(self.__sigid2) return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, manager, *args): self.__manager.emit("reset") self.__update_database() return False def __update_cb(self, manager, search_type): self.__set_active(search_type) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/MenuButton.py0000644000175000017500000000335011242100540024051 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid3 = manager.connect("hide-menu", self.__hide_cb) self.__sigid4 = manager.connect("hide-bar", self.__hide_cb) self.__sigid5 = manager.connect("search", self.__search_cb) self.__sigid6 = manager.connect("search-complete", self.__search_complete_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("MenuButton") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__button.destroy() del self self = None return def __toggle(self): self.__manager.emit("popup-menu") return def __untoggle(self): self.__manager.emit("hide-menu") return def __destroy_cb(self, *args): self.__destroy() return False def __toggled_cb(self, *args): self.__untoggle() if not self.__button.props.active else self.__toggle() return True def __hide_cb(self, *args): if self.__button.props.active: self.__button.props.active = False return False def __search_cb(self, *args): self.__button.props.sensitive = False return False def __search_complete_cb(self, *args): self.__button.props.sensitive = True return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ButtonSwitcher.py0000644000175000017500000000413511242100540024737 0ustar andreasandreasclass Switcher(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid4 = manager.connect("found-matches", self.__found_matches_cb) self.__sigid2 = manager.connect("search", self.__search_cb) self.__sigid3 = manager.connect("reset", self.__reset_cb) self.__sigid5 = manager.connect("hide-bar", self.__reset_cb) self.__sigid6 = manager.connect("search-string", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__search_button = manager.gui.get_widget("FindButton") self.__stop_button = manager.gui.get_widget("StopButton") self.__next_button = manager.gui.get_widget("NextButton") self.__hbox = manager.gui.get_widget("HBox") self.__matches = [] self.__current_button = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __hide_buttons(self): self.__stop_button.hide() self.__search_button.hide() self.__next_button.hide() return False def __change_button(self, matches): show = self.__show_button nbutton = self.__next_button sbutton = self.__search_button show(nbutton) if len(matches) > 1 else show(sbutton) return def __show_button(self, button): self.__hide_buttons() button.show() self.__manager.set_data("activate_button", button) return False def __destroy_cb(self, *args): self.__destroy() return False def __search_cb(self, *args): self.__show_button(self.__stop_button) return False def __found_matches_cb(self, manager, matches): self.__change_button(matches) return False def __reset_cb(self, *args): self.__show_button(self.__search_button) return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/StopButton.py0000644000175000017500000000143711242100540024076 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.props.sensitive = True def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("StopButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__button.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("reset") return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/PreviousButton.py0000644000175000017500000000412411242100540024761 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__sigid3 = manager.connect("match-index", self.__index_cb) self.__sigid4 = manager.connect("reset", self.__reset_cb) self.__sigid6 = manager.connect("hide-bar", self.__reset_cb) self.__sigid5 = manager.connect("back-button", self.__activate_cb) self.__sigid7 = manager.connect("search-string", self.__search_string_cb) self.__sigid8 = manager.connect("no-search-string", self.__reset_cb) self.__button.props.sensitive = False def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("PreviousButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__button.destroy() del self self = None return def __check_sensitive(self, index): # sensitive = False if index[0] == 1 else True self.__button.props.sensitive = True return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("previous") self.__manager.emit("focus-entry") return False def __index_cb(self, manager, index): self.__check_sensitive(index) return False def __reset_cb(self, *args): self.__button.props.sensitive = False return False def __activate_cb(self, *args): self.__button.activate() return False def __search_string_cb(self, manager, string): self.__button.props.sensitive = False return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/ReplaceButton.py0000644000175000017500000000366511242100540024531 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("reset", self.__reset_cb) self.__sigid3 = manager.connect("hide-bar", self.__reset_cb) self.__sigid4 = manager.connect("search-string", self.__reset_cb) self.__sigid5 = manager.connect("replace-entry-activated", self.__activated_cb) self.__sigid6 = manager.connect("found-matches", self.__found_matches_cb) self.__sigid8 = manager.connect("no-search-string", self.__reset_cb) self.__sigid7 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("ReplaceButton") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__button) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__button.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __reset_cb(self, *args): self.__button.props.sensitive = False return False def __activated_cb(self, *args): if self.__button.props.sensitive: self.__button.activate() return False def __found_matches_cb(self, manager, matches): sensitive = True if matches else False self.__button.props.sensitive = sensitive return False def __clicked_cb(self, *args): self.__manager.emit("replace") self.__manager.emit("focus-replace-entry") return False scribes-0.4~r910/GenericPlugins/SearchSystem/GUI/EntryActivator.py0000644000175000017500000000131011242100540024721 0ustar andreasandreasclass Activator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("entry-activated", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__manager.get_data("activate_button").activate() return False scribes-0.4~r910/GenericPlugins/SearchSystem/SearchCaseDetector.py0000644000175000017500000000212111242100540025013 0ustar andreasandreasclass Detector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("entry-change-text", self.__changed_cb) manager.emit("match-case-flag", False) from gobject import idle_add idle_add(self.__optimize, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__case = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __emit(self, text): match_case = text.islower() if self.__case == match_case: return False self.__case = match_case self.__manager.emit("match-case-flag", not match_case) return False def __optimize(self): self.__editor.optimize((self.__emit,)) return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, manager, text): self.__emit(text) return False scribes-0.4~r910/GenericPlugins/SearchSystem/PatternCreator.py0000644000175000017500000000406611242100540024267 0ustar andreasandreasclass Creator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("search-string", self.__search_string_cb) self.__sigid3 = manager.connect("search", self.__search_cb) self.__sigid4 = manager.connect("search-mode-flag", self.__search_mode_cb) self.__sigid5 = manager.connect("match-word-flag", self.__match_word_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__string = None self.__regex_mode = True self.__match_word = True return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __create_pattern(self): try: if not self.__string: raise AssertionError if self.__regex_mode: raise ValueError from re import escape string = escape(self.__string) pattern = r"\b%s\b" % string if self.__match_word else r"%s" % string except ValueError: pattern = r"%s" % self.__string except AssertionError: self.__manager.emit("reset") message = _("ERROR: Empty search string") self.__editor.update_message(message, "fail", 10) self.__manager.emit("search-complete") finally: if self.__string: self.__manager.emit("new-pattern", pattern) return def __destroy_cb(self, *args): self.__destroy() return False def __search_string_cb(self, manager, string): self.__string = string.decode("utf-8") return False def __search_cb(self, *args): self.__create_pattern() return False def __search_mode_cb(self, manager, search_mode): self.__regex_mode = True if search_mode == "regex" else False return False def __match_word_cb(self, manager, match_word): self.__match_word = match_word return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchNavigator.py0000644000175000017500000001041111242100540024230 0ustar andreasandreasfrom gettext import gettext as _ class Navigator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marked-matches", self.__marked_matches_cb) self.__sigid3 = manager.connect("next", self.__next_cb) self.__sigid4 = manager.connect("previous", self.__previous_cb) self.__sigid5 = manager.connect("reset", self.__clear_cb) self.__sigid6 = manager.connect("search-type-flag", self.__search_type_cb) self.__sigid7 = manager.connect("replaced-mark", self.__replaced_mark_cb) self.__sigid8 = manager.connect("cursor-mark", self.__cursor_mark_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__next_queue = deque([]) self.__prev_queue = deque([]) self.__current_match = None self.__backward_flag = False self.__cursor_mark = None return def __clear(self): self.__next_queue.clear() self.__prev_queue.clear() return def __swap(self): from collections import deque if not self.__next_queue: self.__next_queue = deque(reversed(self.__prev_queue)) self.__prev_queue = deque() else: self.__prev_queue = deque(reversed(self.__next_queue)) self.__next_queue = deque() return def __process_next(self): if not self.__next_queue: self.__swap() if self.__current_match: self.__prev_queue.appendleft(self.__current_match) match = self.__next_queue.popleft() self.__current_match = match self.__manager.emit("current-match", match) return False def __process_previous(self): if not self.__prev_queue: self.__swap() if self.__current_match: self.__next_queue.appendleft(self.__current_match) match = self.__prev_queue.popleft() self.__current_match = match self.__manager.emit("current-match", match) return def __old_navigation_behavior(self, matches): self.__clear() from collections import deque if self.__backward_flag: match = matches[-1] matches = matches[:-1] matches.reverse() self.__prev_queue = deque(matches) else: self.__next_queue = deque(matches) match = self.__next_queue.popleft() self.__current_match = match self.__manager.emit("current-match", match) return False def __process(self, matches): self.__clear() get_offset = lambda mark: self.__editor.textbuffer.get_iter_at_mark(mark).get_offset() pappend = lambda mark: self.__prev_queue.appendleft(mark) nappend = lambda mark: self.__next_queue.append(mark) cursor_offset = get_offset(self.__cursor_mark) for marks in matches: mark = marks[0] pappend(marks) if cursor_offset > get_offset(mark) else nappend(marks) match = self.__next_queue.popleft() if self.__next_queue else self.__prev_queue.popleft() self.__current_match = match self.__manager.emit("current-match", match) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __marked_matches_cb(self, manager, matches): self.__process(matches) # self.__default(matches) return False def __next_cb(self, *args): self.__process_next() return False def __previous_cb(self, *args): self.__process_previous() return False def __clear_cb(self, *args): self.__clear() return False def __search_type_cb(self, manager, search_type): self.__backward_flag = True if search_type == "backward" else False return False def __replaced_mark_cb(self, manager, mark): if mark in self.__next_queue: self.__next_queue.remove(mark) if mark in self.__prev_queue: self.__prev_queue.remove(mark) if mark == self.__current_match: self.__current_match = None return False def __cursor_mark_cb(self, manager, mark): self.__cursor_mark = mark return False scribes-0.4~r910/GenericPlugins/SearchSystem/CursorMarker.py0000644000175000017500000000212511242100540023743 0ustar andreasandreasclass Marker(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-bar", self.__show_cb) self.__sigid3 = manager.connect("hide-bar", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__mark = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __update(self): self.__mark = self.__editor.mark(self.__editor.cursor) self.__manager.emit("cursor-mark", self.__mark) return False def __delete(self): self.__editor.delete_mark(self.__mark) self.__mark = None return False def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__update() return False def __hide_cb(self, *args): self.__delete() return False scribes-0.4~r910/GenericPlugins/SearchSystem/MatchColorer.py0000644000175000017500000000374611242100540023720 0ustar andreasandreasclass Colorer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marked-matches", self.__marked_matches_cb) self.__sigid3 = manager.connect("search-string", self.__clear_cb) self.__sigid4 = manager.connect("hide-bar", self.__clear_cb) self.__sigid5 = manager.connect("reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tag = self.__create_tag() self.__colored = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __create_tag(self): from gtk import TextTag tag = TextTag("find_tag") self.__editor.textbuffer.get_tag_table().add(tag) tag.set_property("background", "yellow") tag.set_property("foreground", "blue") return tag def __clear(self): if self.__colored is False: return bounds = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__tag, *bounds) self.__colored = False return def __tag_marks(self, marks): self.__clear() apply_tag = self.__editor.textbuffer.apply_tag giam = self.__editor.textbuffer.get_iter_at_mark iam = lambda start, end: (giam(start), giam(end)) tag = lambda start, end: apply_tag(self.__tag, *(iam(start, end))) [tag(*mark) for mark in marks] self.__colored = True return False def __destroy_cb(self, *args): self.__destroy() return False def __marked_matches_cb(self, manager, marks): self.__tag_marks(marks) self.__manager.emit("search-complete") return False def __clear_cb(self, *args): self.__clear() return False scribes-0.4~r910/GenericPlugins/LineEndings/0000755000175000017500000000000011242100540020537 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineEndings/__init__.py0000644000175000017500000000000011242100540022636 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineEndings/PopupMenuItem.py0000644000175000017500000000351511242100540023664 0ustar andreasandreasfrom gtk import MenuItem from gettext import gettext as _ class PopupMenuItem(MenuItem): def __init__(self, editor): MenuItem.__init__(self, _("Line En_dings")) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = self.__menuitem1.connect("activate", self.__activate_cb) self.__sigid2 = self.__menuitem2.connect("activate", self.__activate_cb) self.__sigid3 = self.__menuitem3.connect("activate", self.__activate_cb) self.__sigid4 = editor.textview.connect("focus-in-event", self.__destroy_cb) def __init_attributes(self, editor): self.__editor = editor from gtk import Menu self.__menu = Menu() self.__menuitem1 = self.__editor.create_menuitem(_("Convert to _Unix (alt + 1)")) self.__menuitem2 = self.__editor.create_menuitem(_("Convert to _Mac (alt + 2)")) self.__menuitem3 = self.__editor.create_menuitem(_("Convert to _Windows (alt + 3)")) return def __set_properties(self): self.set_property("name", "Line Endings Popup MenuItem") self.set_submenu(self.__menu) self.__menu.append(self.__menuitem1) self.__menu.append(self.__menuitem2) self.__menu.append(self.__menuitem3) return def __activate_cb(self, menuitem): if menuitem == self.__menuitem1: self.__editor.trigger("line-endings-to-unix") elif menuitem == self.__menuitem2: self.__editor.trigger("line-endings-to-mac") else: self.__editor.trigger("line-endings-to-windows") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid2, self.__menuitem2) self.__editor.disconnect_signal(self.__sigid3, self.__menuitem3) self.__editor.disconnect_signal(self.__sigid4, self.__editor.textview) self.__menu.destroy() self.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/LineEndings/Trigger.py0000644000175000017500000000405411242100540022517 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "line-endings-to-unix", "1", _("Convert to unix line endings"), _("Line Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "line-endings-to-mac", "2", _("Convert to mac line endings"), _("Line Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "line-endings-to-windows", "3", _("Convert to windows line endings"), _("Line Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __create_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if self.__manager is None: self.__manager = self.__create_manager() dictionary = { "line-endings-to-unix": self.__manager.to_unix, "line-endings-to-windows": self.__manager.to_windows, "line-endings-to-mac": self.__manager.to_mac, } dictionary[trigger.name]() return False def __popup_cb(self, textview, menu): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/LineEndings/Manager.py0000644000175000017500000000141211242100540022461 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT from gobject import SIGNAL_NO_RECURSE, SIGNAL_ACTION SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "to-unix": (SCRIBES_SIGNAL, TYPE_NONE, ()), "to-mac": (SCRIBES_SIGNAL, TYPE_NONE, ()), "to-windows": (SCRIBES_SIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from Converter import Converter Converter(self, editor) def to_unix(self): self.emit("to-unix") return def to_mac(self): self.emit("to-mac") return def to_windows(self): self.emit("to-windows") return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/LineEndings/Converter.py0000644000175000017500000000402311242100540023057 0ustar andreasandreasfrom gettext import gettext as _ class Converter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("to-unix", self.__to_unix_cb) self.__sigid3 = manager.connect("to-mac", self.__to_mac_cb) self.__sigid4 = manager.connect("to-windows", self.__to_windows_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __convert(self, character): self.__editor.textview.window.freeze_updates() self.__editor.busy(True) offset = self.__editor.cursor.get_offset() lines = self.__editor.text.splitlines() self.__editor.textbuffer.set_text(character.join(lines)) iterator = self.__editor.textbuffer.get_iter_at_offset(offset) from gobject import timeout_add timeout_add(100, self.__center, iterator, priority=9999) return False def __center(self, iterator): self.__editor.textbuffer.place_cursor(iterator) self.__editor.textview.scroll_to_iter(iterator, 0.3, use_align=True, xalign=1.0) self.__editor.busy(False) self.__editor.textview.window.thaw_updates() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) del self return def __to_unix_cb(self, *args): self.__convert("\n") message = _("Converted line endings to UNIX") self.__editor.update_message(message, "pass") return False def __to_mac_cb(self, *args): self.__convert("\r") message = _("Converted line endings to MAC") self.__editor.update_message(message, "pass") return False def __to_windows_cb(self, *args): self.__convert("\r\n") message = _("Converted line ends to WINDOWS") self.__editor.update_message(message, "pass") return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PluginWordCompletion.py0000644000175000017500000000105311242100540023035 0ustar andreasandreasname = "Automatic Word Completion Plugin" authors = ["Lateef Alabi-Oki "] version = 0.6 autoload = True class_name = "WordCompletionPlugin" short_description = "Automatic word completion for Scribes" long_description = """Automatic word completion plugin for Scribes.""" class WordCompletionPlugin(object): def __init__(self, editor): self.__editor = editor def load(self): from WordCompletion.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/NewLineInserter/0000755000175000017500000000000011242100540021415 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/NewLineInserter/__init__.py0000644000175000017500000000000011242100540023514 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/NewLineInserter/Signals.py0000644000175000017500000000045611242100540023374 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "dummy-signal": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/NewLineInserter/NewLineInserter.py0000644000175000017500000000206311242100540025045 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class NewLineInserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__sigid1 = self.connect(editor.textbuffer, "insert-text", self.__insert_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __insert_cb(self, textbuffer, iterator, text, length): if text not in ("\n", "\r", "\r\n"): return False textbuffer.emit_stop_by_name("insert-text") self.__editor.freeze() textbuffer.handler_block(self.__sigid1) indentation = self.__editor.line_indentation newline = self.__editor.newline_character text = "%s%s" % (newline, indentation) textbuffer.begin_user_action() textbuffer.insert_at_cursor(text) textbuffer.end_user_action() textbuffer.handler_unblock(self.__sigid1) self.__editor.thaw() return True def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/NewLineInserter/Manager.py0000644000175000017500000000047311242100540023345 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from NewLineInserter import NewLineInserter NewLineInserter(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/DocumentBrowser/0000755000175000017500000000000011242100540021462 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentBrowser/__init__.py0000644000175000017500000000000011242100540023561 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentBrowser/Updater.py0000644000175000017500000000252511242100540023444 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("get-uris", self.__get_uris_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __process(self): uris = self.__editor.uris if not uris: return False get_mimetype = self.__editor.get_mimetype from gio import File, content_type_get_description as get_desc get_mime = lambda uri: get_desc(get_mimetype(uri)).split()[0].capitalize() get_filename = lambda uri: File(uri).get_basename() get_path = lambda uri: File(uri).get_parse_name() hfolder = self.__editor.home_folder format = lambda filename: filename.replace(hfolder, "~") if filename.startswith(hfolder) else filename def get_data(uri): return get_mime(uri), get_filename(uri), format(get_path(uri)), uri data = [get_data(uri) for uri in uris] self.__manager.emit("update", data) return False def __destroy_cb(self, *args): self.__destroy() return False def __get_uris_cb(self, *args): self.__process() return False scribes-0.4~r910/GenericPlugins/DocumentBrowser/Trigger.py0000644000175000017500000000246511242100540023446 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "show-document-browser", "F9", _("Focus any file window"), _("Window Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "show-document-browser_", "b", _("Focus any file window"), _("Window Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) return def __activate_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return scribes-0.4~r910/GenericPlugins/DocumentBrowser/Manager.py0000644000175000017500000000213211242100540023404 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT class Manager(GObject): __gsignals__ = { "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "update": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "show-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "hide-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "get-uris": (SIGNAL_RUN_LAST, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from Window import Window Window(editor, self) from TreeView import TreeView TreeView(editor, self) from Updater import Updater Updater(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join, split current_folder = split(globals()["__file__"])[0] glade_file = join(current_folder, "DocumentBrowser.glade") from gtk.glade import XML self.__glade = XML(glade_file, "Window", "scribes") return glade = property(lambda self: self.__glade) def show(self): self.emit("get-uris") self.emit("show-window") return def destroy(self): self.emit("destroy") del self return scribes-0.4~r910/GenericPlugins/DocumentBrowser/TreeView.py0000644000175000017500000000740211242100540023571 0ustar andreasandreasfrom gettext import gettext as _ class TreeView(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__manager.connect("update", self.__update_cb) self.__sigid3 = self.__treeview.connect("row-activated", self.__row_activated_cb) self.__sigid4 = self.__treeview.connect("key-press-event", self.__key_press_event_cb) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__treeview = manager.glade.get_widget("TreeView") self.__data = None self.__model = self.__create_model() self.__name_renderer = self.__create_renderer() self.__type_renderer = self.__create_renderer() self.__path_renderer = self.__create_renderer() self.__name_column = self.__create_column(_("_Name"), self.__name_renderer, 0, False, True) self.__type_column = self.__create_column(_("_Type"), self.__type_renderer, 1, False, True) self.__path_column = self.__create_column(_("_Path"), self.__path_renderer, 2, False, True) return def __set_properties(self): self.__treeview.set_property("model", self.__model) self.__treeview.set_property("rules-hint", True) self.__treeview.set_property("search-column", 0) self.__treeview.set_property("headers-clickable", True) self.__treeview.append_column(self.__name_column) self.__treeview.append_column(self.__type_column) self.__treeview.append_column(self.__path_column) self.__name_column.clicked() return def __create_model(self): from gtk import ListStore model = ListStore(str, str, str, str) return model def __create_renderer(self): from gtk import CellRendererText renderer = CellRendererText() return renderer def __create_column(self, title, renderer, text=0, expand=False, indicator=False): from gtk import TREE_VIEW_COLUMN_AUTOSIZE, SORT_DESCENDING from gtk import TreeViewColumn column = TreeViewColumn(title, renderer, text=text) column.set_expand(expand) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.set_sort_indicator(indicator) column.set_sort_order(SORT_DESCENDING) column.set_sort_column_id(text) return column def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__treeview) self.__treeview.destroy() del self return def __update_cb(self, manager, data): if self.__data == data: return False from copy import copy self.__data = copy(data) from gobject import idle_add idle_add(self.__populate_model, data, priority=9999) return False def __populate_model(self, data): self.__treeview.set_property("sensitive", False) self.__treeview.set_model(None) self.__model.clear() for type_, name, path, uri in data: self.__editor.refresh(False) self.__model.append([name, type_, path, uri]) self.__editor.refresh(False) self.__treeview.set_model(self.__model) self.__editor.select_row(self.__treeview) self.__treeview.set_property("sensitive", True) self.__treeview.grab_focus() return def __row_activated_cb(self, treeview, path, column): self.__manager.emit("hide-window") iterator = self.__model.get_iter(path) uri = self.__model.get_value(iterator, 3) self.__editor.focus_file(uri) return False def __key_press_event_cb(self, treeview, event): from gtk import keysyms if event.keyval != keysyms.Delete: return False selection = treeview.get_selection() model, iterator = selection.get_selected() if not iterator: return False uri = model.get_value(iterator, 3) model.remove(iterator) self.__editor.select_row(self.__treeview) self.__editor.close_file(uri) return False scribes-0.4~r910/GenericPlugins/DocumentBrowser/Window.py0000644000175000017500000000424311242100540023306 0ustar andreasandreasfrom gettext import gettext as _ class Window(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__manager.connect("show-window", self.__show_window_cb) self.__sigid3 = self.__manager.connect("hide-window", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.glade.get_widget("Window") return def __set_properties(self): width, height = self.__editor.calculate_resolution_independence(self.__editor.window, 1.6, 2.5) self.__window.set_property("default-width", width) self.__window.set_property("default-height", height) # self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__window.show_all() # self.__editor.busy() self.__editor.set_message(_("Select document"), "open") return def __hide(self): self.__editor.refresh(False) self.__window.hide() self.__editor.refresh(False) # self.__editor.busy(False) self.__editor.unset_message(_("Select document"), "open") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() del self return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/DocumentBrowser/DocumentBrowser.glade0000644000175000017500000000433211242100540025604 0ustar andreasandreas GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 Select and Focus A Document DocumentBrowserWindowRole True center-always True scribes dialog True True static DocumentBrowserWindowID True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic in True False True True True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True scribes-0.4~r910/GenericPlugins/ScrollNavigation/0000755000175000017500000000000011242100540021616 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ScrollNavigation/__init__.py0000644000175000017500000000000011242100540023715 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ScrollNavigation/.__junk0000644000175000017500000001167411242100540023075 0ustar andreasandreas³ò DcFc@s dZdefd„ƒYZdS(s  This module documents a class that creates a trigger to scroll the view up or down or center it. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2007 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tTriggercBsVeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( s6 This class creates triggers for scroll navigation. cCsl|i|ƒ|iƒ|iid|iƒ|_|iid|iƒ|_|i id|i ƒ|_ dS(s Initialize the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. tactivateN( t_Trigger__init_attributest_Trigger__create_triggerst_Trigger__up_triggertconnectt_Trigger__up_cbt_Trigger__signal_id_1t_Trigger__down_triggert_Trigger__down_cbt_Trigger__signal_id_2t_Trigger__middle_triggert_Trigger__middle_cbt_Trigger__signal_id_3(tselfteditor((s#plugins/ScrollNavigation/Trigger.pyt__init__%s  cCsL||_d|_d|_d|_d|_d|_d|_d|_dS(sÏ Initialize the trigger's attributes. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. N( t_Trigger__editortNonet_Trigger__managerRRR R RR (RR((s#plugins/ScrollNavigation/Trigger.pyt__init_attributes5s        cCsƒddkl}|dƒ|_|ii|idƒ|dƒ|_|ii|idƒ|dƒ|_|ii|idƒd S( sl Create the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. iÿÿÿÿ(Rt scroll_ups ctrl - Upt scroll_downs ctrl - Downtcentersalt - mN(tSCRIBES.triggerRRRt add_triggerRR (RR((s#plugins/ScrollNavigation/Trigger.pyt__create_triggersIscCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(tManagerN(RRtAttributeErrorRR(RttriggerR((s#plugins/ScrollNavigation/Trigger.pyt__up_cb^s cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(RN(RRRRR(RRR((s#plugins/ScrollNavigation/Trigger.pyt __down_cbps cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(RN(RRRRR(RRR((s#plugins/ScrollNavigation/Trigger.pyt __middle_cb‚s cCsºddkl}l}||i|iƒ||i|iƒ||i|iƒ|i i |iƒ|i i |iƒ|i i |iƒ|i o|i i ƒn||ƒ~d}dS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR!R"RRR RR R Rtremove_triggerRtdestroyR(RR!R"((s#plugins/ScrollNavigation/Trigger.pyt __destroy”s cCs|iƒdS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. N(t_Trigger__destroy(R((s#plugins/ScrollNavigation/Trigger.pyR%¨s ( t__name__t __module__t__doc__RRRRR R R'R%(((s#plugins/ScrollNavigation/Trigger.pyR s       N(R*tobjectR(((s#plugins/ScrollNavigation/Trigger.pyssscribes-0.4~r910/GenericPlugins/ScrollNavigation/Trigger.py0000644000175000017500000000345411242100540023601 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "scroll-left", "Left", _("Scroll editing area to the left"), _("Navigation Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "scroll-right", "Right", _("Scroll editing area to the right"), _("Navigation Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "center", "m", _("Move cursor line to center"), _("Navigation Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__get_manager() function = { self.__trigger1: self.__manager.scroll_left, self.__trigger2: self.__manager.scroll_right, self.__trigger3: self.__manager.center, } function[trigger]() return scribes-0.4~r910/GenericPlugins/ScrollNavigation/Manager.py0000644000175000017500000000317511242100540023550 0ustar andreasandreasfrom gettext import gettext as _ INCREMENT = 5 class Manager(object): def __init__(self, editor): self.__init_attributes(editor) from gobject import idle_add, PRIORITY_LOW idle_add(self.__compile, priority=PRIORITY_LOW) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview self.__hadjustment = editor.gui.get_widget("ScrolledWindow").get_hadjustment() self.__upper = 0 return def __compile(self): methods = (self.scroll_right, self.scroll_left, self.center) self.__editor.optimize(methods) return False def scroll_right(self): self.__editor.refresh(False) from gtk import WRAP_NONE if self.__editor.textview.get_wrap_mode() != WRAP_NONE: return False new_value = self.__hadjustment.value + INCREMENT if new_value == self.__upper: return False self.__upper = new_value self.__hadjustment.set_value(new_value) self.__hadjustment.value_changed() self.__editor.refresh(False) return def scroll_left(self): self.__editor.refresh(False) from gtk import WRAP_NONE if self.__editor.textview.get_wrap_mode() != WRAP_NONE: return False new_value = self.__hadjustment.get_value() - INCREMENT if new_value < 0: new_value = 0 self.__hadjustment.set_value(new_value) self.__hadjustment.value_changed() self.__editor.refresh(False) return def center(self): self.__editor.refresh(False) iterator = self.__editor.cursor self.__view.scroll_to_iter(iterator, 0.001, use_align=True, xalign=1.0) self.__editor.refresh(False) message = _("Centered current line") self.__editor.update_message(message, "pass") return def destroy(self): del self return scribes-0.4~r910/GenericPlugins/Readonly/0000755000175000017500000000000011242100540020115 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Readonly/__init__.py0000644000175000017500000000000011242100540022214 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Readonly/Trigger.py0000644000175000017500000000166211242100540022077 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "toggle-readonly", "F3", _("Toggle Readonly"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() del self return False def __activate(self): self.__editor.toggle_readonly() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/PluginNewLineInserter.py0000644000175000017500000000120611242100540023145 0ustar andreasandreasname = "NewLineInserter Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = False class_name = "NewLineInserterPlugin" short_description = "Doesn't work well. Detects unix, windows and apple line endings" long_description = "Disabled by default. Doesn't work well. Tries to detect and use platform dependent line endings." class NewLineInserterPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from NewLineInserter.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/BracketSelection/0000755000175000017500000000000011242100540021561 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketSelection/__init__.py0000644000175000017500000000000011242100540023660 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketSelection/Signals.py0000644000175000017500000000122611242100540023534 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL from SCRIBES.SIGNALS import type_register class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "no-pair-character-found": (SSIGNAL, TYPE_NONE, ()), "undo-selection": (SSIGNAL, TYPE_NONE, ()), "find-open-character": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "found-open-character": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "check-pair-range": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "select-offsets": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) type_register(Signal) scribes-0.4~r910/GenericPlugins/BracketSelection/RangeChecker.py0000644000175000017500000000215111242100540024453 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "check-pair-range", self.__check_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __check(self, offsets): from Exceptions import OutOfRange try: end_offset = offsets[1] editor = self.__editor cursor_offset = editor.selection_bounds[1].get_offset() if editor.has_selection else editor.cursor.get_offset() if end_offset < cursor_offset: raise OutOfRange self.__manager.emit("select-offsets", offsets) except OutOfRange: self.__manager.emit("find-open-character", offsets[0]-1) return False def __destroy_cb(self, *args): self.__destroy() return False def __check_cb(self, manager, offsets): from gobject import idle_add idle_add(self.__check, offsets) return False scribes-0.4~r910/GenericPlugins/BracketSelection/Utils.py0000644000175000017500000000220111242100540023226 0ustar andreasandreasfrom re import U, M, L, escape, compile as compile_ DOUBLE_QOUTE_PATTERN = '".*?"' SINGLE_QUOTE_PATTERN = "'.*?'" flags = U|L DOUBLE_QOUTE_RE = compile_(DOUBLE_QOUTE_PATTERN, flags) SINGLE_QUOTE_RE = compile_(SINGLE_QUOTE_PATTERN, flags) PAIR_CHARACTERS = ("(", "{", "[", "<", ")", "}", "]", ">", "\"", "'") OPEN_PAIR_CHARACTERS = ("(", "{", "[", "<", "\"", "'") CLOSE_PAIR_CHARACTERS = (")", "}", "]", ">", "\"", "'") QUOTE_CHARACTERS = ("\"", "'") def get_pair_for(character): if __is_pair(character) is False: return "" if character in OPEN_PAIR_CHARACTERS: return __get_close_pair_for(character) return __get_open_pair_for(character) def is_open_pair(character): if __is_pair(character) is False: return False return character in OPEN_PAIR_CHARACTERS def __is_pair(character): return character in PAIR_CHARACTERS def __get_close_pair_for(open_character): close_pair_for = {"(": ")", "{": "}", "[": "]", "<": ">", "\"": "\"", "'": "'"} return close_pair_for[open_character] def __get_open_pair_for(close_character): open_pair_for = {")": "(", "}": "{", "]": "[", ">": "<", "\"": "\"", "'": "'"} return open_pair_for[close_character] scribes-0.4~r910/GenericPlugins/BracketSelection/UndoManager.py0000644000175000017500000000545311242100540024342 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "select-offsets", self.__select_cb) self.connect(manager, "activate", self.__activate_cb) self.__sigid1 = self.connect(editor, "cursor-moved", self.__moved_cb, True) self.__sigid2 = self.connect(editor.textview, "key-press-event", self.__event_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__blocked = False from collections import deque self.__offsets = deque([]) self.__cursor_offset = 0 self.__can_undo = False return def __destroy(self): self.disconnect() del self return False def __reset(self): self.__block() self.__offsets.clear() self.__can_undo = False return False def __block(self): if self.__blocked: return False self.__editor.handler_block(self.__sigid1) self.__editor.textview.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.handler_unblock(self.__sigid1) self.__editor.textview.handler_unblock(self.__sigid2) self.__blocked = False return False def __previous_selection(self): try: if not self.__offsets: raise ValueError self.__offsets.pop() if not self.__offsets: raise ValueError offsets = self.__offsets[-1] get_iter = self.__editor.textbuffer.get_iter_at_offset start, end = get_iter(offsets[0]), get_iter(offsets[1]) self.__editor.textbuffer.select_range(start, end) except ValueError: self.__reset() iterator = self.__editor.textbuffer.get_iter_at_offset(self.__cursor_offset) self.__editor.textbuffer.place_cursor(iterator) finally: self.__manager.emit("undo-selection") return False def __monitor_selection(self): try: if self.__editor.has_selection is False: raise ValueError start, end = self.__editor.selection_bounds selection = start.get_offset(), end.get_offset() if not (selection in self.__offsets): raise ValueError except ValueError: self.__reset() return False def __destroy_cb(self, *args): self.__destroy() return False def __moved_cb(self, *args): self.__monitor_selection() return False def __select_cb(self, manager, offsets): self.__unblock() self.__offsets.append(offsets) self.__can_undo = True return False def __event_cb(self, view, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__previous_selection() return True def __activate_cb(self, *args): if self.__can_undo: return False self.__cursor_offset = self.__editor.cursor.get_offset() return False scribes-0.4~r910/GenericPlugins/BracketSelection/Exceptions.py0000644000175000017500000000017311242100540024255 0ustar andreasandreasclass NoSelectionFound(Exception): pass class NoPairCharacterFound(Exception): pass class OutOfRange(Exception): pass scribes-0.4~r910/GenericPlugins/BracketSelection/Trigger.py0000644000175000017500000000224411242100540023540 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self, editor) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "bracket-selection", "b", _("Select characters inside brackets and quotes"), _("Selection Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try: self.__manager.activate() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/BracketSelection/Feedback.py0000644000175000017500000000352711242100540023626 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager BRACKET_MESSAGE = _("Bracket selection") UNDO_MESSAGE = _("Removed last selection") QUOTE_MESSAGE = _("Quote selection") FAIL_MESSAGE = _("No brackets found") class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "select-offsets", self.__select_cb, True) self.connect(manager, "no-pair-character-found", self.__no_cb, True) self.connect(manager, "undo-selection", self.__undo_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update_message(self, offset): try: get_iter = self.__editor.textbuffer.get_iter_at_offset character = get_iter(offset-1).get_char() from Utils import QUOTE_CHARACTERS as QC, OPEN_PAIR_CHARACTERS as OC if not (character in QC) and not (character in OC): raise ValueError self.__set_message(character) except ValueError: character = self.__editor.selected_text[0] self.__set_message(character) return False def __set_message(self, character): from Utils import QUOTE_CHARACTERS as QC message = QUOTE_MESSAGE if character in QC else BRACKET_MESSAGE self.__editor.update_message(message, "yes") return False def __destroy_cb(self, *args): self.__destroy() return False def __select_cb(self, manager, offsets): from gobject import idle_add idle_add(self.__update_message, offsets[0]) return False def __no_cb(self, *args): self.__editor.update_message(FAIL_MESSAGE, "no") return False def __undo_cb(self, *args): self.__editor.update_message(UNDO_MESSAGE, "info") return False scribes-0.4~r910/GenericPlugins/BracketSelection/PairCharacterMatcher.py0000644000175000017500000000253711242100540026156 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Matcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "found-open-character", self.__found_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __find_pair_for_character_at(self, open_offset): from Exceptions import NoPairCharacterFound try: iterator = self.__editor.textbuffer.get_iter_at_offset(open_offset) open_character = iterator.get_char() from Utils import QUOTE_CHARACTERS if open_character in QUOTE_CHARACTERS: return False pair_iterator = self.__editor.find_matching_bracket(iterator.copy()) if not pair_iterator: raise NoPairCharacterFound close_offset = pair_iterator.get_offset() self.__manager.emit("check-pair-range", (open_offset+1, close_offset)) except NoPairCharacterFound: self.__manager.emit("find-open-character", open_offset) return False def __destroy_cb(self, *args): self.__destroy() return False def __found_cb(self, manager, offset): from gobject import idle_add idle_add(self.__find_pair_for_character_at, offset) return False scribes-0.4~r910/GenericPlugins/BracketSelection/Manager.py0000644000175000017500000000133711242100540023511 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Feedback import Feedback Feedback(self, editor) from UndoManager import Manager Manager(self, editor) from Selector import Selector Selector(self, editor) from QuoteCharacterMatcher import Matcher Matcher(self, editor) from RangeChecker import Checker Checker(self, editor) from PairCharacterMatcher import Matcher Matcher(self, editor) from OpenCharacterSearcher import Searcher Searcher(self, editor) from SelectionChecker import Checker Checker(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/BracketSelection/QuoteCharacterMatcher.py0000644000175000017500000000350611242100540026355 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Matcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "found-open-character", self.__found_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __find_pair_for_character_at(self, open_offset): from Exceptions import NoPairCharacterFound try: iterator = self.__editor.textbuffer.get_iter_at_offset(open_offset) open_character = iterator.get_char() from Utils import QUOTE_CHARACTERS if not (open_character in QUOTE_CHARACTERS): return False start, end = self.__get_quote_offsets(open_character) self.__manager.emit("select-offsets", (start+1, end-1)) except NoPairCharacterFound: self.__manager.emit("find-open-character", open_offset) return False def __get_quote_offsets(self, character): from Utils import DOUBLE_QOUTE_RE, SINGLE_QUOTE_RE RE = DOUBLE_QOUTE_RE if character == '"' else SINGLE_QUOTE_RE iterator = RE.finditer(self.__editor.text.decode("utf-8")) offsets = [match.span() for match in iterator] offsets = [offset for offset in offsets if self.__cursor_is_inside(offset)] from Exceptions import NoPairCharacterFound if not offsets: raise NoPairCharacterFound return offsets[0] def __cursor_is_inside(self, offsets): start, end = offsets cursor = self.__editor.cursor.get_offset() return start < cursor < end def __destroy(self): self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __found_cb(self, manager, open_offset): from gobject import idle_add idle_add(self.__find_pair_for_character_at, open_offset) return False scribes-0.4~r910/GenericPlugins/BracketSelection/Selector.py0000644000175000017500000000160211242100540023712 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "select-offsets", self.__select_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __select(self, offsets): get_iter = self.__editor.textbuffer.get_iter_at_offset start, end = get_iter(offsets[0]), get_iter(offsets[1]) self.__editor.textbuffer.select_range(start, end) return False def __destroy_cb(self, *args): self.__destroy() return False def __select_cb(self, manager, offsets): from gobject import idle_add idle_add(self.__select, offsets) return False scribes-0.4~r910/GenericPlugins/BracketSelection/OpenCharacterSearcher.py0000644000175000017500000000301211242100540026322 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Searcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "find-open-character", self.__find_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __search_from(self, offset): from Exceptions import NoPairCharacterFound try: search_iterator = self.__editor.textbuffer.get_iter_at_offset(offset) character = self.__get_backward_character(search_iterator) from Utils import is_open_pair, get_pair_for # Search backward for open pair character. while is_open_pair(character) is False: character = self.__get_backward_character(search_iterator) self.__manager.emit("found-open-character", search_iterator.get_offset()) except NoPairCharacterFound: self.__manager.emit("no-pair-character-found") return False def __get_backward_character(self, search_iterator): from Exceptions import NoPairCharacterFound result = search_iterator.backward_char() if result is False: raise NoPairCharacterFound character = search_iterator.get_char() return character def __destroy_cb(self, *args): self.__destroy() return False def __find_cb(self, manager, offset): from gobject import idle_add idle_add(self.__search_from, offset) return False scribes-0.4~r910/GenericPlugins/BracketSelection/SelectionChecker.py0000644000175000017500000000333511242100540025351 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Checker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __check(self): from Exceptions import NoSelectionFound, NoPairCharacterFound try: if self.__editor.has_selection is False: raise NoSelectionFound boundaries = self.__editor.selection_bounds if self.__inside_pair_characters(boundaries) is False: raise NoPairCharacterFound self.__select(boundaries) except (NoSelectionFound, NoPairCharacterFound): self.__manager.emit("find-open-character", self.__editor.cursor.get_offset()) return False def __inside_pair_characters(self, boundaries): start, end = boundaries[0].copy(), boundaries[1].copy() if not start.backward_char(): return False from Utils import get_pair_for close_character = get_pair_for(start.get_char()) if not close_character: return False if close_character != end.get_char(): return False return True def __select(self, boundaries): start, end = boundaries[0].copy(), boundaries[1].copy() start.backward_char() end.forward_char() start_offset, end_offset = start.get_offset(), end.get_offset() self.__manager.emit("select-offsets", (start_offset, end_offset)) return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__check) return False scribes-0.4~r910/GenericPlugins/PluginParagraph.py0000644000175000017500000000102411242100540021773 0ustar andreasandreasname = "Paragraph Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "ParagraphPlugin" short_description = "Paragraph operations for Scribes." long_description = """Paragraph operations for Scribes.""" class ParagraphPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Paragraph.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/SaveDialog/0000755000175000017500000000000011242100540020356 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/__init__.py0000644000175000017500000000000011242100540022455 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/Renamer.py0000644000175000017500000000214311242100540022321 0ustar andreasandreasclass Renamer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("rename", self.__rename_cb) self.__sigid3 = manager.connect("encoding", self.__encoding_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__encoding = "utf-8" self.__chooser = manager.gui.get_object("FileChooser") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __rename(self): self.__editor.rename_file(self.__chooser.get_uri(), self.__encoding) return False def __destroy_cb(self, *args): self.__destroy() return False def __rename_cb(self, *args): from gobject import idle_add idle_add(self.__rename) return False def __encoding_cb(self, manager, encoding): self.__encoding = encoding return False scribes-0.4~r910/GenericPlugins/SaveDialog/Trigger.py0000644000175000017500000000213211242100540022331 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) editor.get_toolbutton("SaveToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-save-dialog", "s", _("Rename the current file"), _("File Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return scribes-0.4~r910/GenericPlugins/SaveDialog/Manager.py0000644000175000017500000000203411242100540022301 0ustar andreasandreasfrom SCRIBES.SIGNALS import SSIGNAL, TYPE_NONE, TYPE_PYOBJECT, GObject class Manager(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "encoding": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "change-folder": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "validate": (SSIGNAL, TYPE_NONE, ()), "rename": (SSIGNAL, TYPE_NONE, ()), "save-button-activate": (SSIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from Renamer import Renamer Renamer(self, editor) from NameValidator import Validator Validator(self, editor) from GUI.Manager import Manager Manager(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def show(self): self.emit("show") return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/0000755000175000017500000000000011242100540021002 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/__init__.py0000644000175000017500000000000011242100540023101 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/SaveButton.py0000644000175000017500000000142011242100540023443 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("SaveButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("save-button-activate") return scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/GUI.glade0000644000175000017500000001214111242100540022423 0ustar andreasandreas False 10 Rename File ScribesSaveFileRole True center-on-parent 640 True scribes dialog True True True static ScribesSaveFileID True False vertical 10 False True save False False True 10 True <b>Character _Encoding:</b> True True ComboBox False False 0 True False False 1 False False 1 True 10 end gtk-cancel True False False False True False False False 0 gtk-save True False False True True True True False False False 1 False False 2 scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/0000755000175000017500000000000011242100540023204 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/URISelector.py0000644000175000017500000000244511242100540025723 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__select() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("show", self.__show_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.gui.get_object("FileChooser") return def __select(self): try: if not self.__editor.uri: raise ValueError from gio import File gfile = File(self.__editor.uri) folder_uri = gfile.get_parent().get_uri() if folder_uri != self.__chooser.get_current_folder_uri(): self.__chooser.set_current_folder_uri(folder_uri) fileinfo = gfile.query_info("standard::display-name") self.__chooser.set_current_name(fileinfo.get_display_name()) except ValueError: self.__chooser.set_current_name(_("Unsaved Document")) self.__chooser.set_current_folder(self.__editor.desktop_folder) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__select() return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/FolderChanger.py0000644000175000017500000000154211242100540026263 0ustar andreasandreasclass Changer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("change-folder", self.__change_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.gui.get_object("FileChooser") return def __change(self, uri): self.__chooser.set_current_folder_uri(uri) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __change_cb(self, manager, uri): from gobject import idle_add idle_add(self.__change, uri) return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/__init__.py0000644000175000017500000000000011242100540025303 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/URILoader.py0000644000175000017500000000224411242100540025346 0ustar andreasandreasclass Loader(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("open-encoding", self.__encoding_cb) self.__sigid3 = manager.connect("load-files", self.__load_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") self.__encoding = "" return def __load_uris(self, uris): encoding = self.__encoding if self.__encoding else "utf8" self.__manager.emit("open-files", uris, encoding) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __load_cb(self, manager, uris): from gobject import idle_add idle_add(self.__load_uris, uris) return False def __encoding_cb(self, manager, encoding): self.__encoding = encoding return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/Initializer.py0000644000175000017500000000144311242100540026043 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.gui.get_object("FileChooser") return def __set_properties(self): self.__chooser.set_property("sensitive", True) self.__add_filters() return False def __add_filters(self): for filter_ in self.__editor.dialog_filters: self.__chooser.add_filter(filter_) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/Manager.py0000644000175000017500000000057611242100540025140 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from FolderChanger import Changer Changer(manager, editor) from URISelector import Selector Selector(manager, editor) # from URILoader import Loader # Loader(manager, editor) from ActivatorHandler import Handler Handler(manager, editor) scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FileChooser/ActivatorHandler.py0000644000175000017500000000220211242100540027004 0ustar andreasandreasclass Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("save-button-activate", self.__activate_cb) self.__sigid3 = self.__chooser.connect("file-activated", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.gui.get_object("FileChooser") return def __emit(self): try: uri = self.__chooser.get_uri() if self.__editor.uri_is_folder(uri): raise ValueError self.__manager.emit("validate") except ValueError: self.__manager.emit("change-folder", uri) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__chooser) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__emit) return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/FeedbackUpdater.py0000644000175000017500000000227011242100540024366 0ustar andreasandreasfrom gettext import gettext as _ MESSAGE = _("Rename Document") class Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("show", self.__show_cb) self.__sigid3 = manager.connect_after("hide", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __show(self): self.__editor.busy() self.__editor.set_message(MESSAGE, "save") return False def __hide(self): self.__editor.busy(False) self.__editor.unset_message(MESSAGE, "save") return False def __destroy_cb(self, *args): self.__destroy() return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/CancelButton.py0000644000175000017500000000141611242100540023737 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_object("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("hide") return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/ComboBox.py0000644000175000017500000000500511242100540023064 0ustar andreasandreasclass ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__quit_cb) self.__sigid2 = editor.connect("combobox-encoding-data", self.__encoding_data_cb) self.__sigid3 = self.__combo.connect("changed", self.__changed_cb) editor.emit_combobox_encodings() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("ComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__combo) del self self = None return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) self.__combo.set_row_separator_func(self.__separator_function) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __separator_function(self, model, iterator): if model.get_value(iterator, 0) == "Separator" : return True return False def __populate_model(self, data): self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() self.__model.append([data[0][0], data[0][1]]) self.__model.append(["Separator", "Separator"]) for alias, encoding in data[1:]: self.__model.append([alias, encoding]) self.__model.append(["Separator", "Separator"]) self.__model.append(["Add or Remove Encoding...", "show_encoding_window"]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) return False def __emit_new_encoding(self): iterator = self.__combo.get_active_iter() encoding = self.__model.get_value(iterator, 1) if encoding == "show_encoding_window": self.__combo.set_active(0) self.__editor.show_supported_encodings_window(self.__manager.open_gui.get_widget("Window")) else: self.__manager.emit("encoding", encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __encoding_data_cb(self, editor, data): self.__populate_model(data) return False def __changed_cb(self, *args): self.__emit_new_encoding() return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Manager.py0000644000175000017500000000066611242100540022736 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from FeedbackUpdater import Updater Updater(manager, editor) from Window.Manager import Manager Manager(manager, editor) from FileChooser.Manager import Manager Manager(manager, editor) from ComboBox import ComboBox ComboBox(manager, editor) from SaveButton import Button Button(manager, editor) from CancelButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/0000755000175000017500000000000011242100540022251 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/Destroyer.py0000644000175000017500000000104211242100540024600 0ustar andreasandreasclass Destroyer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/__init__.py0000644000175000017500000000000011242100540024350 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/Initializer.py0000644000175000017500000000125411242100540025110 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __set_properties(self): self.__window.set_property("sensitive", True) # self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self return def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/.goutputstream-SAXB2U0000644000175000017500000000374411242100540026147 0ustar andreasandreasfrom gettext import gettext as _ class Displayer(object): def __init__(self, manager, editor): editor.response() self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_window_cb) self.__sigid3 = manager.connect("hide", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("rename", self.__hide_window_cb) editor.response() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.open_gui.get_object("Window") return def __show(self): self.__editor.response() self.__window.show_all() self.__editor.busy() self.__editor.set_message(_("Rename Document"), "save") self.__editor.response() return False def __hide(self): self.__editor.response() self.__editor.busy(False) self.__editor.unset_message(_("Open Document"), "open") self.__window.hide() self.__editor.response() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/Manager.py0000644000175000017500000000040111242100540024170 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Destroyer import Destroyer Destroyer(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/GenericPlugins/SaveDialog/GUI/Window/Displayer.py0000644000175000017500000000330111242100540024554 0ustar andreasandreasfrom gettext import gettext as _ class Displayer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_window_cb) self.__sigid3 = manager.connect("hide", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("rename", self.__delete_event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_object("Window") return def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__manager.emit("hide") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/GenericPlugins/SaveDialog/NameValidator.py0000644000175000017500000000212111242100540023452 0ustar andreasandreasclass Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validate", self.__validate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.gui.get_object("FileChooser") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __validate(self): uri = self.__chooser.get_uri() if not uri: return False from gio import File text = File(uri).get_basename() if not text: return False if "/" in text: return False if len(text) > 256: return False if self.__editor.uri_is_folder(uri): return False self.__manager.emit("rename") return False def __destroy_cb(self, *args): self.__destroy() return False def __validate_cb(self, *args): from gobject import idle_add idle_add(self.__validate) return False scribes-0.4~r910/GenericPlugins/PluginCloseReopen.py0000644000175000017500000000101411242100540022303 0ustar andreasandreasname = "CloseReopen Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "CloseReopenPlugin" short_description = "Close current window, reopen new one." long_description = """Close current window, reopen new one.""" class CloseReopenPlugin(object): def __init__(self, editor): self.__editor = editor def load(self): from CloseReopen.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginBracketHighlight.py0000644000175000017500000000115411242100540023275 0ustar andreasandreasname = "Bracket Highlight Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "BracketHighlightPlugin" short_description = "Highlight region between matching pair characters." long_description = """Highlight region between matching pair characters. """ class BracketHighlightPlugin(object): def __init__(self, editor): self.__editor = editor self.__highlighter = None def load(self): from BracketHighlight.Highlighter import Highlighter self.__highlighter = Highlighter(self.__editor) return def unload(self): self.__highlighter.destroy() return scribes-0.4~r910/GenericPlugins/UserGuide/0000755000175000017500000000000011242100540020234 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/UserGuide/__init__.py0000644000175000017500000000000011242100540022333 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/UserGuide/Trigger.py0000644000175000017500000000161011242100540022207 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-user-guide", "F1", _("Show user guide"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): self.__editor.help() return scribes-0.4~r910/GenericPlugins/PluginSelectionSearcher.py0000644000175000017500000000123611242100540023475 0ustar andreasandreasname = "Selection Search Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "SelectionSearcherPlugin" short_description = "Search editing area for selected text." long_description = """Highlights all regions where selected text is found in the editing area. Use g and g for navigating found matches.""" class SelectionSearcherPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from SelectionSearcher.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginTemplates.py0000644000175000017500000000102511242100540022025 0ustar andreasandreasname = "Dynamic Templates Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "TemplatesPlugin" short_description = "Dynamic Templates" long_description = """This plug-in performs templates operations""" class TemplatesPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from Templates.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/WordCompletion/0000755000175000017500000000000011242100540021305 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/MatchMonitor.py0000644000175000017500000000570211242100540024267 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__sigid1 = self.connect(manager, "invalid-string", self.__invalid_cb) self.__sigid2 = self.connect(manager, "valid-string", self.__valid_cb) self.connect(manager, "dictionary", self.__dictionary_cb) self.connect(manager, "enable-word-completion", self.__completion_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__found = False self.__blocked = False self.__dictionary = {} return False def __destroy(self): del self.__dictionary self.disconnect() del self return False def __process(self, string): matches = self.__find_matches(string) self.__emit_matches(matches) if matches else self.__emit_no_matches() return False def __get_match_list(self, word): match_list = [] dictionary = self.__dictionary for items in dictionary.items(): if not (items[0].startswith(word) and (items[0] != word)): continue match_list.append(list(items)) return match_list def __get_matches(self, match_list): matches = [] for items in match_list: matches.append(items[0]) return matches def __find_matches(self, word): dictionary = self.__dictionary if not dictionary: return None match_list = self.__get_match_list(word) if not match_list: return None match_list.sort(self.__sort) return self.__get_matches(match_list) def __sort(self, x, y): if (x[1] < y[1]): return 1 if (x[1] > y[1]): return -1 return 0 def __emit_matches(self, matches): self.__found = True self.__manager.emit("match-found", matches) return False def __emit_no_matches(self): if self.__found is False: return False self.__manager.emit("no-match-found") self.__found = False return False def __block(self): if self.__blocked: return False self.__manager.handler_block(self.__sigid1) self.__manager.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__manager.handler_unblock(self.__sigid1) self.__manager.handler_unblock(self.__sigid2) self.__blocked = False return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __destroy_cb(self, *args): self.__destroy() return False def __invalid_cb(self, *args): self.__emit_no_matches() return False def __valid_cb(self, manager, string): manager.emit("generate", string) self.__process(string) return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False def __completion_cb(self, manager, enable_word_completion): self.__unblock() if enable_word_completion else self.__block() return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/0000755000175000017500000000000011242100540024242 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/DictionaryGenerator.py0000644000175000017500000000237111242100540030573 0ustar andreasandreasclass Generator(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("update", self.__update_cb) def __init_attributes(self, manager): self.__manager = manager self.__dictionary = {} from dbus import Dictionary, String, Int32 try: self.__empty_dict = Dictionary({}, signature="ss") except: self.__empty_dict = Dictionary({}, key_type=String, value_type=Int32) return def __update(self, dictionary): try: from Utils import merge, no_zero_value_dictionary, utf8_dictionary _dictionary = merge(self.__dictionary, dictionary) if self.__dictionary else dictionary __dictionary = no_zero_value_dictionary(_dictionary) if not __dictionary: raise ValueError self.__dictionary = utf8_dictionary(__dictionary) self.__manager.emit("finished", self.__dictionary) except ValueError: self.__manager.emit("finished", self.__empty_dict) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __update_cb(self, manager, dictionary): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__update, dictionary, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/__init__.py0000644000175000017500000000000011242100540026341 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/DiffManager.py0000644000175000017500000000263311242100540026763 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "index", self.__index_cb) def __init_attributes(self, manager): self.__manager = manager self.__old_text = "" from difflib import Differ self.__differ = Differ() return def __index(self, content): text1 = self.__old_text.splitlines(1) text2 = content.splitlines(1) # print "*" * 20 # print text1 # print "*" * 20 # print text2 # print "*" * 20 result = self.__differ.compare(text1, text2) is_delta = lambda line: line.startswith("+") or line.startswith("-") diff_lines = [line for line in result if is_delta(line)] from Utils import index, merge, no_zero_value_dictionary removed_lines = "".join([line for line in diff_lines if line.startswith("-")]) removed_dictionary = index(removed_lines, negative=True) added_lines = "".join([line for line in diff_lines if line.startswith("+")]) added_dictionary = index(added_lines) merged_dictionary = merge(removed_dictionary, added_dictionary) diff_dictionary = no_zero_value_dictionary(merged_dictionary) if diff_dictionary: self.__manager.emit("update", diff_dictionary) else: self.__manager.emit("no-change") self.__old_text = content return def __index_cb(self, manager, content): self.__index(content) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/Utils.py0000644000175000017500000000272611242100540025723 0ustar andreasandreasfrom re import UNICODE, compile word_pattern = compile(r"[^-\w]", UNICODE) def merge(d1, d2, merge=lambda x,y:x+y): """ Merges two dictionaries, non-destructively, combining values on duplicate keys as defined by the optional merge function. The default behavior replaces the values in d1 with corresponding values in d2. (There is no other generally applicable merge strategy, but often you'll have homogeneous types in your dicts, so specifying a merge technique can be valuable.) Examples: >>> d1 {'a': 1, 'c': 3, 'b': 2} >>> merge(d1, d1) {'a': 1, 'c': 3, 'b': 2} >>> merge(d1, d1, lambda x,y: x+y) {'a': 2, 'c': 6, 'b': 4} """ result = dict(d1) for k,v in d2.iteritems(): if k in result: result[k] = merge(result[k], v) else: result[k] = v return result def no_zero_value_dictionary(dictionary): return dict([(k,v) for k,v in dictionary.items() if v != 0]) def utf8_dictionary(dictionary): return dict([(k.decode("utf8"), v) for k,v in dictionary.items()]) def index(string, negative=False): from re import split words = split(word_pattern, string) words = (word for word in words if __is_valid(word)) from collections import defaultdict dictionary = defaultdict(int) for string in words: dictionary[string] = dictionary[string] -1 if negative else dictionary[string] + 1 return dictionary def __is_valid(word): if len(word) < 4: return False if word.startswith("---"): return False if word.startswith("___"): return False return True scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/DBusService.py0000644000175000017500000000156111242100540026775 0ustar andreasandreasfrom dbus.service import Object, method, BusName, signal indexer_dbus_service = "org.sourceforge.ScribesWordCompletionIndexer" indexer_dbus_path = "/org/sourceforge/ScribesWordCompletionIndexer" class DBusService(Object): def __init__(self, manager): from SCRIBES.Globals import session_bus from dbus.exceptions import NameExistsException try: bus_name = BusName(indexer_dbus_service, bus=session_bus, do_not_queue=True) Object.__init__(self, bus_name, indexer_dbus_path) self.__manager = manager manager.connect("finished", self.__finished_cb) except NameExistsException: manager.quit() @method(indexer_dbus_service) def index(self): return self.__manager.index() @signal(indexer_dbus_service, signature="a{sx}") def finished(self, dictionary): return def __finished_cb(self, manager, dictionary): self.finished(dictionary) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/Exceptions.py0000644000175000017500000000004611242100540026735 0ustar andreasandreasclass NoChangeError(Exception): pass scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/IndexerProcessMonitor.py0000644000175000017500000000075611242100540031131 0ustar andreasandreasclass Monitor(object): def __init__(self, manager): self.__init_attributes(manager) from SCRIBES.Globals import session_bus session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0='net.sourceforge.Scribes') def __init_attributes(self, manager): self.__manager = manager return def __name_change_cb(self, *args): self.__manager.quit() return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/ScribesWordCompletionIndexer.py0000644000175000017500000000060511242100540032414 0ustar andreasandreas if __name__ == "__main__": from SCRIBES.Utils import fork_process fork_process() from os import nice nice(19) from sys import argv, path python_path = argv[1] path.insert(0, python_path) from gobject import MainLoop, threads_init threads_init() from signal import signal, SIGINT, SIG_IGN signal(SIGINT, SIG_IGN) from IndexerManager import Manager Manager() MainLoop().run() scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/ClipboardManager.py0000644000175000017500000000100711242100540030004 0ustar andreasandreasclass Manager(object): def __init__(self, manager): from gtk import clipboard_get clipboard = clipboard_get() clipboard.connect("owner-change", self.__change_cb, manager) def __change_cb(self, clipboard, event, manager): clipboard.request_text(self.__text_cb, manager) return False def __text_cb(self, clipboard, text, manager): if not text: return False from string import whitespace text = text.strip(whitespace) if not text: return False manager.emit("clipboard-text", text) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/TextGetter.py0000644000175000017500000000341611242100540026717 0ustar andreasandreasDBUS_SERVICE = "net.sourceforge.Scribes" DBUS_PATH = "/net/sourceforge/Scribes" class Getter(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("index-request", self.__request_cb) manager.connect("clipboard-text", self.__clipboard_cb) def __init_attributes(self, manager): self.__manager = manager self.__process = self.__get_process() self.__clipboard_text = "" return def __get_process(self): from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (DBUS_SERVICE in services): return None process = session_bus.get_object(DBUS_SERVICE, DBUS_PATH) return process def __get_text(self): self.__process.get_text(dbus_interface=DBUS_SERVICE, reply_handler=self.__reply_cb, error_handler=self.__error_cb) return False def __combine(self, texts): clipboard_plus_texts = list(texts) clipboard_plus_texts.append(self.__clipboard_text) from string import whitespace strings = [text.strip(whitespace) for text in clipboard_plus_texts] text = " ".join(strings) self.__manager.emit("index", text.strip(whitespace)) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __request_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__get_text, priority=PRIORITY_LOW) return False def __reply_cb(self, texts): from gobject import idle_add, PRIORITY_LOW idle_add(self.__combine, texts, priority=PRIORITY_LOW) return def __error_cb(self, *args): return False def __clipboard_cb(self, manager, text): self.__clipboard_text = " %s %s " % (self.__clipboard_text, text) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/JobSpooler.py0000644000175000017500000000145611242100540026700 0ustar andreasandreasclass Spooler(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("new-job", self.__new_job_cb) manager.connect_after("finished", self.__finished_cb) manager.connect_after("no-change", self.__finished_cb) def __init_attributes(self, manager): self.__manager = manager self.__busy = False self.__new_job = False return def __check(self): if self.__busy or self.__new_job is False: return False self.__new_job = False self.__busy = True self.__manager.emit("index-request") return False def __new_job_cb(self, manager, data): self.__new_job = True from gobject import idle_add idle_add(self.__check) return False def __finished_cb(self, *args): self.__busy = False from gobject import idle_add idle_add(self.__check) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcess/IndexerManager.py0000644000175000017500000000306611242100540027512 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT from gobject import SIGNAL_NO_RECURSE, SIGNAL_ACTION from gtk import main_iteration, events_pending SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "get-text": (SCRIBES_SIGNAL, TYPE_NONE, ()), "new-job": (SCRIBES_SIGNAL, TYPE_NONE, ()), "no-change": (SCRIBES_SIGNAL, TYPE_NONE, ()), "index-request": (SCRIBES_SIGNAL, TYPE_NONE, ()), "index": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "content": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "finished": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "clipboard-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) from IndexerProcessMonitor import Monitor Monitor(self) from DBusService import DBusService DBusService(self) from DictionaryGenerator import Generator Generator(self) from DiffManager import Manager Manager(self) from TextGetter import Getter Getter(self) from ClipboardManager import Manager Manager(self) from JobSpooler import Spooler Spooler(self) # Keep this process as responsive as possible to events and signals. from gobject import timeout_add timeout_add(1000, self.response) from os import nice nice(19) def quit(self): from os import _exit _exit(0) return def index(self): self.emit("index-request") return False def response(self): while events_pending(): main_iteration(False) return True scribes-0.4~r910/GenericPlugins/WordCompletion/Metadata.py0000644000175000017500000000053011242100540023375 0ustar andreasandreasfrom SCRIBES.Utils import open_storage STORAGE_FILE = "ToggleWordCompletion.dict" KEY = "enable_word_completion" def get_value(): try: value = True storage = open_storage(STORAGE_FILE) value = storage[KEY] except KeyError: pass return value def set_value(value): storage = open_storage(STORAGE_FILE) storage[KEY] = value return scribes-0.4~r910/GenericPlugins/WordCompletion/__init__.py0000644000175000017500000000000111242100540023405 0ustar andreasandreas scribes-0.4~r910/GenericPlugins/WordCompletion/IndexRequester.py0000644000175000017500000000627711242100540024642 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Requester(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__sigid1 = self.connect(editor, "cursor-moved", self.__moved_cb, True) self.__sigid2 = self.connect(self.__view, "key-press-event", self.__event_cb) self.__sigid3 = self.connect(self.__buffer, "changed", self.__changed_cb, True) self.__sigid4 = self.connect(self.__buffer, "insert-text", self.__insert_cb, True) self.connect(manager, "enable-word-completion", self.__completion_cb) self.__block() self.__block1() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__blocked = False self.__blocked1 = False self.__line_number = 0 return def __index(self): self.__manager.emit("index") return False def __index_async(self): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__index, priority=PRIORITY_LOW) if self.__blocked is False: self.__block() return False def __check_line(self): line_number = self.__editor.cursor.get_line() if line_number == self.__line_number: return False self.__line_number = line_number self.__index_async() return False def __block(self): if self.__blocked: return False self.__editor.handler_block(self.__sigid1) self.__view.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.handler_unblock(self.__sigid1) self.__view.handler_unblock(self.__sigid2) self.__blocked = False return False def __block1(self): if self.__blocked1: return False self.__buffer.handler_block(self.__sigid3) self.__buffer.handler_block(self.__sigid4) self.__blocked1 = True return False def __unblock1(self): if self.__blocked1 is False: return False self.__buffer.handler_unblock(self.__sigid3) self.__buffer.handler_unblock(self.__sigid4) self.__blocked1 = False return False def __remove_timer(self, timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[timer]) except AttributeError: pass return False def __insert_cb(self, textbuffer, iterator, text, length): if text.isalnum(): return False self.__index_async() return False def __changed_cb(self, *args): if self.__blocked: self.__unblock() return False def __moved_cb(self, *args): self.__remove_timer(2) from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__check_line, priority=PRIORITY_LOW) return False def __event_cb(self, textview, event): from gtk.keysyms import Left, Right if event.keyval in (Left, Right): self.__index_async() return False def __completion_cb(self, manager, enable_word_completion): self.__unblock1() if enable_word_completion else self.__block1() if enable_word_completion is False: self.__block() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/WordCompletion/Signals.py0000644000175000017500000000163311242100540023262 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "inserting-text": (SSIGNAL, TYPE_NONE, ()), "inserted-text": (SSIGNAL, TYPE_NONE, ()), "database-updated": (SSIGNAL, TYPE_NONE, ()), "index": (SSIGNAL, TYPE_NONE, ()), "enable-word-completion": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update-database": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "dictionary": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "match-found": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "no-match-found": (SSIGNAL, TYPE_NONE, ()), "hide-window": (SSIGNAL, TYPE_NONE, ()), "show-window": (SSIGNAL, TYPE_NONE, ()), "treeview-size": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "insert-text": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "generate": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/0000755000175000017500000000000011242100540024773 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/DictionaryUpdater.py0000644000175000017500000000111211242100540030772 0ustar andreasandreasfrom SCRIBES.Globals import session_bus from SCRIBES.SignalConnectionManager import SignalManager indexer_dbus_service = "org.sourceforge.ScribesWordCompletionIndexer" indexer_dbus_path = "/org/sourceforge/ScribesWordCompletionIndexer" class Updater(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__manager = manager session_bus.add_signal_receiver(self.__finished_cb, signal_name="finished", dbus_interface=indexer_dbus_service) def __finished_cb(self, dictionary): self.__manager.emit("dictionary", dictionary) return False ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootscribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/ScribesWordCompletionSuggestionGenerator.pyscribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/ScribesWordCompletionSuggestionGene0000644000175000017500000000061511242100540034047 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- if __name__ == "__main__": from SCRIBES.Utils import fork_process fork_process() from sys import argv, path python_path = argv[1] path.insert(0, python_path) from gobject import MainLoop, threads_init threads_init() from signal import signal, SIGINT, SIG_IGN signal(SIGINT, SIG_IGN) from Manager import Manager Manager() MainLoop().run() scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/__init__.py0000644000175000017500000000007011242100540027101 0ustar andreasandreas__import__('pkg_resources').declare_namespace(__name__) scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/Signals.py0000644000175000017500000000042011242100540026741 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "string": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "dictionary": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/DBusService.py0000644000175000017500000000125011242100540027521 0ustar andreasandreasfrom dbus.service import Object, method, BusName DBUS_SERVICE = "org.sourceforge.ScribesWordCompletionSuggestionGenerator" DBUS_PATH = "/org/sourceforge/ScribesWordCompletionSuggestionGenerator" class DBusService(Object): def __init__(self, manager): from SCRIBES.Globals import session_bus from dbus.exceptions import NameExistsException try: bus_name = BusName(DBUS_SERVICE, bus=session_bus, do_not_queue=True) Object.__init__(self, bus_name, DBUS_PATH) self.__manager = manager except NameExistsException: manager.quit() @method(DBUS_SERVICE, in_signature="s", out_signature="as") def generate(self, string): return self.__manager.generate(string) scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/SuggestionGenerator.py0000644000175000017500000000217111242100540031344 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Generator(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "string", self.__string_cb) self.connect(manager, "dictionary", self.__dictionary_cb) def __init_attributes(self, manager): self.__manager = manager self.__dictionary = {} self.__triggers = () return False def __get_suggestions_from(self, string): suggestions = self.__find_matches(string) self.__manager.set_data("WordCompletionSuggestions", suggestions) return False def __find_matches(self, word): starts_word = lambda string: (string != word) and string.startswith(word) matches = (items for items in self.__dictionary.items() if starts_word(items[0])) return [items[0] for items in sorted(matches, self.__sort)] def __sort(self, x, y): if (x[1] < y[1]): return 1 if (x[1] > y[1]): return -1 return 0 def __string_cb(self, manager, string): self.__get_suggestions_from(string) return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/Manager.py0000644000175000017500000000142011242100540026714 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self): Signal.__init__(self) from ProcessMonitor import Monitor Monitor(self) from DBusService import DBusService DBusService(self) from SuggestionGenerator import Generator Generator(self) from DictionaryUpdater import Updater Updater(self) self.set_data("WordCompletionSuggestions", []) from gobject import timeout_add timeout_add(1000, self.__response) def generate(self, string): self.emit("string", string) return self.get_data("WordCompletionSuggestions") def quit(self): from os import _exit _exit(0) return False def __response(self): # Keep this process as responsive as possible to events and signals. from SCRIBES.Utils import response response() return True scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcess/ProcessMonitor.py0000644000175000017500000000063311242100540030335 0ustar andreasandreasclass Monitor(object): def __init__(self, manager): self.__manager = manager from SCRIBES.Globals import session_bus session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0='net.sourceforge.Scribes') def __name_change_cb(self, *args): self.__manager.quit() return False scribes-0.4~r910/GenericPlugins/WordCompletion/Utils.py0000644000175000017500000000044611242100540022763 0ustar andreasandreasfrom string import punctuation, whitespace DELIMETER = ("%s%s%s" % (punctuation, whitespace, "\x00")).replace("-", "").replace("_", "") def is_delimeter(character): return character.decode("utf8") in DELIMETER def is_not_delimeter(character): return character.decode("utf8") not in DELIMETER scribes-0.4~r910/GenericPlugins/WordCompletion/DatabaseMonitor.py0000644000175000017500000000243611242100540024740 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.storage_folder, "ToggleWordCompletion.dict") self.__monitor = editor.get_file_monitor(_file) return def __update(self): self.__manager.emit("database-updated") return False def __update_timeout(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__remove_timer() from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(250, self.__update_timeout, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.__monitor.cancel() self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/WordCompletion/Trigger.py0000644000175000017500000000211311242100540023257 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(self.__editor) name, shortcut, description, category = ( "toggle-word-completion", "c", _("Toggle automatic word completion"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/WordCompletion/IndexerProcessManager.py0000644000175000017500000000435311242100540026114 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager indexer_dbus_service = "org.sourceforge.ScribesWordCompletionIndexer" indexer_dbus_path = "/org/sourceforge/ScribesWordCompletionIndexer" class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=indexer_dbus_service) from gobject import timeout_add, PRIORITY_LOW timeout_add(1000, self.__start, priority=PRIORITY_LOW) def __init_attributes(self, manager, editor): from os.path import join from sys import prefix self.__manager = manager self.__editor = editor self.__cwd = self.__editor.get_current_folder(globals()) exec_folder = join(self.__cwd, "IndexerProcess") self.__executable = join(exec_folder, "ScribesWordCompletionIndexer.py") self.__python_executable = join(prefix, "bin", "python") return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=indexer_dbus_service) del self return False def __start(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start_process, priority=PRIORITY_LOW) return False def __start_process(self): if self.__indexer_process_exists(): return False self.__start_indexer_process() return False def __indexer_process_exists(self): services = self.__editor.dbus_iface.ListNames() if indexer_dbus_service in services: return True return False def __start_indexer_process(self): try: from gobject import spawn_async spawn_async([self.__python_executable, self.__executable, self.__editor.python_path], working_directory=self.__cwd) except Exception: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __name_change_cb(self, *args): from gobject import timeout_add, PRIORITY_LOW timeout_add(7000, self.__start, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/WordCompletion/DatabaseReader.py0000644000175000017500000000143611242100540024512 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "database-updated", self.__updated_cb) self.__read() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __read(self): from Metadata import get_value self.__manager.emit("enable-word-completion", get_value()) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __updated_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__read, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/WordCompletion/Manager.py0000644000175000017500000000331311242100540023231 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from TextInserter import Inserter Inserter(self, editor) from ProcessCommunicator import Communicator Communicator(self, editor) from SuggestionProcessCommunicator import Communicator Communicator(self, editor) from TriggerMarker import Marker Marker(self, editor) from TriggerDetector import Detector Detector(self, editor) from IndexerProcessManager import Manager Manager(self, editor) from SuggestionProcessManager import Manager Manager(self, editor) from IndexRequester import Requester Requester(self, editor) from DatabaseWriter import Writer Writer(self, editor) from DatabaseReader import Reader Reader(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join self.__glade = editor.get_glade_object(globals(), join("GUI", "GUI.glade"), "Window") return gui = property(lambda self: self.__glade) def destroy(self): self.emit("destroy") del self return False def activate(self): from Metadata import get_value enable_word_completion = not get_value() self.emit("update-database", enable_word_completion) # This looks very ugly. Fix later. Yeah right. from gettext import gettext as _ ENABLE_MESSAGE = _("Enabled automatic word completion") DISABLE_MESSAGE = _("Disabled automatic word completion") feedback = self.__editor.update_message feedback(ENABLE_MESSAGE, "yes", 7) if enable_word_completion else feedback(DISABLE_MESSAGE, "no") return False scribes-0.4~r910/GenericPlugins/WordCompletion/GUI/0000755000175000017500000000000011242100540021731 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/GUI/__init__.py0000644000175000017500000000000011242100540024030 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/WordCompletion/GUI/WindowPositioner.py0000644000175000017500000000767311242100540025643 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Positioner(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "treeview-size", self.__size_cb) self.connect(manager, "show-window", self.__show_cb) self.connect(manager, "no-match-found", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_widget("Window") self.__scroll = manager.gui.get_widget("ScrolledWindow") self.__is_visible = False return def __destroy(self): self.disconnect() del self return def __set_properties(self): self.__window.set_property("allow-shrink", True) self.__window.set_property("allow-grow", True) self.__window.set_property("resizable", True) return def __set_scroll_policy(self, data): width, height = data from gtk import POLICY_AUTOMATIC, POLICY_NEVER policy = POLICY_AUTOMATIC if height > 200 else POLICY_NEVER self.__scroll.set_policy(POLICY_NEVER, policy) return False def __get_size(self): width, height = self.__window.size_request() height = 200 if height > 200 else height width = 200 if width < 200 else width return width, height def __get_x(self, width, cursor_data, textview_data): if self.__is_visible: return self.__window.get_position()[0] cursor_x, cursor_y, cursor_width, cursor_height = cursor_data textview_x, textview_y, textview_width, textview_height = textview_data # Determine default x coordinate of completion window. position_x = textview_x + cursor_x if (position_x + width) <= (textview_x + textview_width): return position_x # If the completion window extends past the text editor's buffer, # reposition the completion window inside the text editor's buffer area. return (textview_x + textview_width) - width def __get_y(self, height, cursor_data, textview_data): cursor_x, cursor_y, cursor_width, cursor_height = cursor_data textview_x, textview_y, textview_width, textview_height = textview_data # Determine default y coordinate of completion window. position_y = textview_y + cursor_y + cursor_height # If the completion window extends past the text editor's buffer, # reposition the completion window inside the text editor's buffer area. if (position_y + height) <= (textview_y + textview_height): return position_y return (textview_y + cursor_y) - height def __get_cursor_data(self): textview = self.__editor.textview rectangle = textview.get_iter_location(self.__editor.cursor) from gtk import TEXT_WINDOW_TEXT position = textview.buffer_to_window_coords( TEXT_WINDOW_TEXT, rectangle.x, rectangle.y ) return position[0], position[1], rectangle.width, rectangle.height def __get_textview_data(self): from gtk import TEXT_WINDOW_TEXT window = self.__editor.textview.get_window(TEXT_WINDOW_TEXT) x, y = window.get_origin() rectangle = self.__editor.textview.get_visible_rect() return x, y, rectangle.width, rectangle.height def __get_cords(self, width, height): cursor_data = self.__get_cursor_data() textview_data = self.__get_textview_data() position_x = self.__get_x(width, cursor_data, textview_data) position_y = self.__get_y(height, cursor_data, textview_data) return position_x, position_y def __position_window(self): width, height = self.__get_size() xcord, ycord = self.__get_cords(width, height) self.__set_scroll_policy((width, height)) self.__window.resize(width, height) self.__window.move(xcord, ycord) self.__manager.emit("show-window") return False def __destroy_cb(self, *args): self.__destroy() return False def __size_cb(self, manager, data): self.__position_window() return False def __show_cb(self, *args): self.__is_visible = True return False def __hide_cb(self, *args): self.__is_visible = False return False scribes-0.4~r910/GenericPlugins/WordCompletion/GUI/GUI.glade0000644000175000017500000000324211242100540023354 0ustar andreasandreas 1 popup False menu True True False False False False True False never never in True True True True False False True False False scribes-0.4~r910/GenericPlugins/WordCompletion/GUI/Manager.py0000644000175000017500000000120411242100540023652 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) from Window import Window Window(manager, editor) from WindowPositioner import Positioner Positioner(manager, editor) from TreeView import TreeView TreeView(manager, editor) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/WordCompletion/GUI/TreeView.py0000644000175000017500000001050511242100540024036 0ustar andreasandreasclass TreeView(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__view.connect("key-press-event", self.__key_press_event_cb) self.__block_view() self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("match-found", self.__match_found_cb) self.__sigid4 = manager.connect("no-match-found", self.__no_match_found_cb) self.__sigid5 = manager.connect("show-window", self.__map_cb) self.__sigid5 = manager.connect("hide-window", self.__no_match_found_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__blocked = False self.__view = editor.textview self.__model = self.__create_model() self.__column = self.__create_column() self.__treeview = manager.gui.get_widget("TreeView") self.__selection = self.__treeview.get_selection() self.__matches = [] from gtk.keysyms import Up, Down, Return, Escape self.__navigation_dictionary = { Up: self.__select_previous, Down: self.__select_next, Return: self.__activate_selection, Escape: self.__hide, } return def __destroy(self): self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid1, self.__view) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __block_view(self): if self.__blocked: return self.__view.handler_block(self.__sigid1) self.__blocked = True return def __unblock_view(self): if self.__blocked is False: return self.__view.handler_unblock(self.__sigid1) self.__blocked = False return def __create_model(self): from gtk import ListStore model = ListStore(str) return model def __create_column(self): from gtk import TreeViewColumn, CellRendererText column = TreeViewColumn() renderer = CellRendererText() column.pack_start(renderer, False) column.set_attributes(renderer, text=0) column.set_expand(False) return column def __set_properties(self): self.__treeview.append_column(self.__column) return False def __populate_model(self, matches): try: if self.__matches == matches: raise ValueError self.__matches = matches self.__treeview.set_model(None) self.__model.clear() for word in matches: self.__editor.refresh(False) self.__model.append([word]) self.__treeview.set_model(self.__model) self.__column.queue_resize() self.__treeview.queue_resize() self.__treeview.columns_autosize() except ValueError: pass finally: self.__select(self.__model[0]) self.__manager.emit("treeview-size", self.__treeview.size_request()) return False def __select(self, row): self.__selection.select_iter(row.iter) self.__treeview.set_cursor(row.path, self.__column) self.__treeview.scroll_to_cell(row.path, None, True, 0.5, 0.5) return def __select_next(self): model, iterator = self.__selection.get_selected() iterator = model.iter_next(iterator) path = model.get_path(iterator) if iterator else 0 self.__select(model[path]) return False def __select_previous(self): model, iterator = self.__selection.get_selected() path = model.get_path(iterator)[0] - 1 self.__select(model[path]) return False def __activate_selection(self): model, iterator = self.__selection.get_selected() text = model.get_value(iterator, 0) self.__manager.emit("insert-text", text) self.__manager.emit("hide-window") return False def __hide(self): self.__manager.emit("no-match-found") return False def __get_treeview_size(self): width, height = self.__treeview.size_request() if width < 200: width = 210 height = 210 if height > 200 else (height + 6) _width = 210 if width < 200 else width return _width, height def __destroy_cb(self, *args): self.__destroy() return False def __match_found_cb(self, manager, matches): self.__unblock_view() self.__populate_model(matches) return False def __key_press_event_cb(self, textview, event): if not (event.keyval in self.__navigation_dictionary.keys()): return False self.__navigation_dictionary[event.keyval]() return True def __no_match_found_cb(self, *args): self.__block_view() return False def __map_cb(self, *args): self.__treeview.columns_autosize() return False scribes-0.4~r910/GenericPlugins/WordCompletion/GUI/Window.py0000644000175000017500000000312611242100540023554 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor, "hide-completion-window", self.__hide_completion_cb) self.connect(manager, "no-match-found", self.__hide_cb) self.connect(manager, "hide-window", self.__hide_cb) self.connect(manager, "show-window", self.__show_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_widget("Window") from gtk import keysyms self.__keys = [keysyms.Tab, keysyms.Right, keysyms.Left, keysyms.Home, keysyms.End, keysyms.Insert, keysyms.Delete, keysyms.Page_Up, keysyms.Page_Down, keysyms.Escape] self.__visible = False return def __destroy(self): self.disconnect() self.__window.destroy() del self return def __show(self): if self.__visible: return False self.__visible = True self.__window.show_all() self.__editor.emit("completion-window-is-visible", True) return False def __hide(self): if self.__visible is False: return False self.__window.hide() self.__visible = False self.__editor.emit("completion-window-is-visible", False) return False def __destroy_cb(self, *args): self.__destroy() return False def __hide_cb(self, *args): self.__hide() return False def __show_cb(self, *args): self.__show() return False def __hide_completion_cb(self, *args): self.__manager.emit("hide-window") return False scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcessManager.py0000644000175000017500000000360711242100540026646 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager DBUS_SERVICE = "org.sourceforge.ScribesWordCompletionSuggestionGenerator" class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(manager, "destroy", self.__destroy_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) def __init_attributes(self, editor): from os.path import join from sys import prefix self.__editor = editor generator_script = "ScribesWordCompletionSuggestionGenerator.py" self.__cwd = self.__editor.get_current_folder(globals()) self.__executable = join(self.__cwd, "SuggestionProcess", generator_script) self.__python_executable = join(prefix, "bin", "python") return def __start(self): if self.__process_exists(): return False self.__start_process() return False def __process_exists(self): services = self.__editor.dbus_iface.ListNames() if DBUS_SERVICE in services: return True return False def __start_process(self): from gobject import spawn_async, GError try: args = [self.__python_executable, self.__executable, self.__editor.python_path] spawn_async(args, working_directory=self.__cwd) except GError: pass return False def __destroy_cb(self, *args): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) del self return False def __name_change_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/WordCompletion/SuggestionProcessCommunicator.py0000644000175000017500000000423111242100540027726 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager dbus_service = "org.sourceforge.ScribesWordCompletionSuggestionGenerator" dbus_path = "/org/sourceforge/ScribesWordCompletionSuggestionGenerator" class Communicator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "generate", self.__generate_cb, True) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=dbus_service) self.__update_generator() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__generator = None return def __generate(self, string): try: self.__generator.generate( string, dbus_interface=dbus_service, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb ) except AttributeError: self.__update_generator() except Exception: print "ERROR: Cannot send message to word completion suggestion generator" return False def __update_generator(self): self.__generator = None from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (dbus_service in services): return self.__generator = session_bus.get_object(dbus_service, dbus_path) return def __generate_cb(self, manager, string): self.__generate(string) return False def __reply_handler_cb(self, matches): emit = self.__manager.emit emit("match-found", matches) if matches else emit("no-match-found") return False def __error_handler_cb(self, *args): print "ERROR: Failed to communicate with word completion indexer" return False def __name_change_cb(self, *args): self.__update_generator() return False def __destroy_cb(self, *args): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=dbus_service) del self return False scribes-0.4~r910/GenericPlugins/WordCompletion/TriggerDetector.py0000644000175000017500000001154311242100540024760 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from Utils import is_delimeter, is_not_delimeter WORDS_BEFORE_CURSOR = 2 class Detector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "match-found", self.__match_found_cb) self.connect(manager, "no-match-found", self.__no_match_found_cb) self.connect(manager, "inserting-text", self.__inserting_cb) self.connect(manager, "inserted-text", self.__inserted_cb) self.connect(self.__view, "backspace", self.__hide_cb) self.connect(self.__view, "cut-clipboard", self.__hide_cb) self.connect(self.__view, "paste-clipboard", self.__hide_cb) self.connect(self.__view, "delete-from-cursor", self.__hide_cb) self.connect(self.__view, "move-cursor", self.__hide_cb) self.connect(self.__view, "move-viewport", self.__hide_cb) self.connect(self.__view, "page-horizontally", self.__hide_cb) self.connect(self.__view, "populate-popup", self.__hide_cb) self.connect(self.__view, "move-focus", self.__hide_cb) self.connect(self.__view, "button-press-event", self.__hide_cb) self.connect(self.__view, "focus-out-event", self.__hide_cb) self.__sigid1 = self.connect(self.__buffer, "insert-text", self.__insert_text_cb, True) self.__sigid2 = self.connect(self.__buffer, "insert-text", self.__insert_cb) self.connect(self.__buffer, "delete-range", self.__hide_cb, True) self.connect(manager, "enable-word-completion", self.__completion_cb) self.__block() from gobject import idle_add, PRIORITY_LOW idle_add(self.__compile, priority=PRIORITY_LOW) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__is_active = False self.__is_visible = False self.__inserting = False self.__blocked = False self.__lmark, self.__rmark = manager.get_data("InsertionMarks") return def __send(self): string = self.__get_word_before_cursor() self.__manager.emit("generate", string) if string else self.__emit_invalid() return False def __send_idle(self): from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__send, priority=PRIORITY_LOW) return False def __send_timeout(self): from gobject import timeout_add, PRIORITY_LOW self.__timer2 = timeout_add(500, self.__send_idle, priority=PRIORITY_LOW) return False def __get_word_before_cursor(self): start = self.__buffer.get_iter_at_mark(self.__lmark) end = self.__buffer.get_iter_at_mark(self.__rmark) word = self.__buffer.get_text(start, end).strip() if len(word) > WORDS_BEFORE_CURSOR: return word return None def __emit_invalid(self): self.__manager.emit("no-match-found") return False def __block(self): if self.__blocked: return False self.__buffer.handler_block(self.__sigid1) self.__buffer.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__buffer.handler_unblock(self.__sigid1) self.__buffer.handler_unblock(self.__sigid2) self.__blocked = False return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __compile(self): methods = ( self.__insert_cb, self.__insert_text_cb, self.__get_word_before_cursor, ) self.__editor.optimize(methods) return False def __completion_cb(self, manager, enable_word_completion): self.__unblock() if enable_word_completion else self.__block() return False def __insert_cb(self, textbuffer, iterator, text, length): length = len(text.decode("utf8")) self.__remove_all_timers() if length > 1 or is_delimeter(text): self.__manager.emit("no-match-found") return False def __insert_text_cb(self, textbuffer, iterator, text, length): length = len(text.decode("utf8")) if self.__inserting or self.__lmark is None or length > 1: return False if is_delimeter(text) or is_not_delimeter(iterator.get_char()): return False self.__remove_all_timers() self.__send() if self.__is_visible else self.__send_timeout() return False def __destroy_cb(self, *args): self.disconnect() del self return False def __hide_cb(self, *args): self.__emit_invalid() return False def __no_match_found_cb(self, *args): self.__is_visible = False return False def __match_found_cb(self, *args): self.__is_visible = True return False def __inserting_cb(self, *args): self.__inserting = True self.__emit_invalid() return False def __inserted_cb(self, *args): self.__inserting = False self.__emit_invalid() return False scribes-0.4~r910/GenericPlugins/WordCompletion/DatabaseWriter.py0000644000175000017500000000147611242100540024570 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "update-database", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __write(self, enable_word_completion): from Metadata import set_value set_value(enable_word_completion) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __update_cb(self, manager, enable_word_completion): from gobject import idle_add, PRIORITY_LOW idle_add(self.__write, enable_word_completion, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/WordCompletion/TriggerMarker.py0000644000175000017500000000754611242100540024440 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from Utils import is_delimeter, is_not_delimeter class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__sigid1 = self.connect(self.__buffer, "insert-text", self.__insert_cb, True) self.__sigid2 = self.connect(self.__view, "delete-from-cursor", self.__delete_cb, True) self.__sigid3 = self.connect(self.__buffer, "delete-range", self.__delete_cb, True) self.connect(manager, "enable-word-completion", self.__completion_cb) manager.set_data("InsertionMarks", (self.__lmark, self.__rmark)) self.__block() from gobject import idle_add, PRIORITY_LOW idle_add(self.__compile, priority=PRIORITY_LOW) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__lmark = editor.create_left_mark() self.__rmark = editor.create_right_mark() self.__blocked = False return def __move_marks(self, iterator): self.__buffer.move_mark(self.__lmark, iterator) self.__buffer.move_mark(self.__rmark, iterator) return False def __reposition_marks(self): iterator = self.__editor.cursor self.__buffer.move_mark(self.__rmark, iterator) iterator = self.__backward_to_word_begin(iterator.copy()) self.__buffer.move_mark(self.__lmark, iterator) return False def __in_mark_range(self): loffset = self.__buffer.get_iter_at_mark(self.__lmark).get_offset() roffset = self.__buffer.get_iter_at_mark(self.__rmark).get_offset() iterator = self.__editor.cursor ioffset = iterator.get_offset() return loffset <= ioffset <= roffset def __backward_to_word_begin(self, iterator): if iterator.starts_line(): return iterator result = iterator.backward_char() if not result: return iterator while is_not_delimeter(iterator.get_char()): result = iterator.backward_char() if iterator.starts_line() or not result: return iterator iterator.forward_char() return iterator def __block(self): if self.__blocked: return False self.__buffer.handler_block(self.__sigid1) self.__view.handler_block(self.__sigid2) self.__buffer.handler_block(self.__sigid3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__buffer.handler_unblock(self.__sigid1) self.__view.handler_unblock(self.__sigid2) self.__buffer.handler_unblock(self.__sigid3) self.__blocked = False return False def __compile(self): methods = ( self.__insert_cb, self.__backward_to_word_begin, self.__move_marks, self.__in_mark_range, self.__reposition_marks, ) self.__editor.optimize(methods) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __completion_cb(self, manager, enable_word_completion): self.__unblock() if enable_word_completion else self.__block() if enable_word_completion: self.__reposition_marks() return False def __insert_cb(self, textbuffer, iterator, text, length): if is_not_delimeter(iterator.get_char()): return False length = len(text.decode("utf8")) if (length == 1) and is_delimeter(text): self.__move_marks(iterator) else: reposition = (length > 1) or self.__in_mark_range() is False if reposition: self.__reposition_marks() return False def __delete_cb(self, *args): self.__remove_timer() if is_not_delimeter(self.__editor.cursor.get_char()): return False from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__reposition_marks, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() self.__editor.delete_mark(self.__lmark) self.__editor.delete_mark(self.__rmark) del self return False scribes-0.4~r910/GenericPlugins/WordCompletion/TextInserter.py0000644000175000017500000000222411242100540024317 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "generate", self.__valid_cb) self.connect(manager, "insert-text", self.__insert_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__string = "" return def __destroy(self): self.disconnect() del self return False def __insert(self, text): self.__manager.emit("inserting-text") self.__editor.begin_user_action() self.__editor.textbuffer.insert_at_cursor(text[len(self.__string):].encode("utf8")) self.__editor.end_user_action() self.__manager.emit("inserted-text") return False def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, string): self.__string = string return False def __insert_cb(self, manager, text): # from gobject import idle_add, PRIORITY_HIGH # idle_add(self.__insert, text, priority=PRIORITY_HIGH) self.__insert(text) return False scribes-0.4~r910/GenericPlugins/WordCompletion/ProcessCommunicator.py0000644000175000017500000000677711242100540025677 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager indexer_dbus_service = "org.sourceforge.ScribesWordCompletionIndexer" indexer_dbus_path = "/org/sourceforge/ScribesWordCompletionIndexer" class Communicator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "index", self.__index_cb, True) self.connect(editor, "saved-file", self.__saved_cb, True) self.connect(editor, "loaded-file", self.__saved_cb, True) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=indexer_dbus_service) self.__start_index() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__indexer = self.__get_indexer() return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=indexer_dbus_service) del self return False def __start_index(self): if not self.__indexer: return False # Avoid unnecessary calls to the indexer when launching multiple editors. if self.__editor.window_is_active is False: return False from gobject import idle_add, PRIORITY_LOW idle_add(self.__index, priority=PRIORITY_LOW) return False def __get_indexer(self): from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (indexer_dbus_service in services): return None indexer = session_bus.get_object(indexer_dbus_service, indexer_dbus_path) return indexer def __index(self): try: self.__indexer.index(dbus_interface=indexer_dbus_service, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) except AttributeError: # print "ERROR:No word completion indexer process found" self.__indexer = self.__get_indexer() except Exception: print "ERROR: Cannot send message to word completion indexer" return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __name_change_cb(self, *args): self.__indexer = self.__get_indexer() self.__start_index() return False def __reply_handler_cb(self, *args): return False def __error_handler_cb(self, error_message): print "================================================================" print "ERROR:" print "Plugin Package: WordCompletion" print "Module Name: ProcessCommunicator" print "Class Name: Communicator" print "Method Name: __error_handler_cb" print "Error Message: ", error_message print "================================================================" return False def __saved_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__index, priority=PRIORITY_LOW) return False def __index_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__index, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/PluginSaveDialog.py0000644000175000017500000000101711242100540022106 0ustar andreasandreasname = "Save Dialog Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "SaveDialogPlugin" short_description = "Show the save dialog." long_description = """This plug-in shows the save dialog.""" class SaveDialogPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from SaveDialog.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginReadonly.py0000644000175000017500000000075011242100540021650 0ustar andreasandreasname = "Readonly Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "ReadonlyPlugin" short_description = "Toggle Readonly" long_description = "Toggle readonly" class ReadonlyPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Readonly.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginBracketIndentation.py0000644000175000017500000000113411242100540023640 0ustar andreasandreasname = "Bracket Indentation Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "BracketIndentationPlugin" short_description = "Automatically format and indent brackets" long_description = "Automatically format an indent brackets when enter key is pressed" class BracketIndentationPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from BracketIndentation.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/PluginShortcutWindow.py0000644000175000017500000000104511242100540023074 0ustar andreasandreasname = "Shortcut Window Plugin" authors = ["Kuba"] version = 0.3 autoload = True class_name = "ShortcutWindowPlugin" short_description = "Shows all shortcuts" long_description = """This plugin creates a handy window listing all shortcuts available in Scribes.""" class ShortcutWindowPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from ShortcutWindow.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginIndent.py0000644000175000017500000000116411242100540021314 0ustar andreasandreasname = "Indentation Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "IndentPlugin" short_description = "Indent or unindent lines in Scribes." long_description = """This plug-in indents or unindents a line or \ selected lines in Scribes. Press ctrl+t or ctrl+shift+t \ to indent or unindent lines.""" class IndentPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Indent.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginDocumentBrowser.py0000644000175000017500000000103311242100540023210 0ustar andreasandreasname = "Document Browser" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "DocumentBrowserPlugin" short_description = "Show the document browser." long_description = """\ Show the document browser. """ class DocumentBrowserPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from DocumentBrowser.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Indent/0000755000175000017500000000000011242100540017561 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Indent/__init__.py0000644000175000017500000000000011242100540021660 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Indent/TextExtractor.py0000644000175000017500000000160111242100540022751 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Extractor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "marks", self.__marks_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return def __send_text(self, marks): start = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) text = self.__editor.textbuffer.get_text(start, end) self.__manager.emit("extracted-text", text) return False def __destroy_cb(self, *args): self.__destroy() return False def __marks_cb(self, manager, marks): self.__send_text(marks) return False scribes-0.4~r910/GenericPlugins/Indent/OffsetExtractor.py0000644000175000017500000000225611242100540023262 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Extractor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "indent", self.__process_cb) self.connect(manager, "unindent", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return def __send_offsets(self): if self.__editor.selection_range == 0: iterator = self.__editor.cursor line = iterator.get_line() offset = iterator.get_line_offset() data = line, offset offsets = (data,) else: start, end = self.__editor.selection_bounds line = start.get_line() offset = start.get_line_offset() data1 = line, offset line = end.get_line() offset = end.get_line_offset() data2 = line, offset offsets = (data1, data2) self.__manager.emit("offsets", offsets) return def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, *args): self.__send_offsets() return False scribes-0.4~r910/GenericPlugins/Indent/SelectionProcessor.py0000644000175000017500000000240611242100540023762 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager NEWLINE = "\n" class Processor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "extracted-text", self.__extract_cb) self.connect(manager, "iprocessed-text", self.__processed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__text = None return def __destroy(self): self.disconnect() del self return def __send_indent(self, text): plines = text.split(NEWLINE) olines = self.__text.split(NEWLINE) if not plines or not olines: return False if len(plines) > 1: bindentation = len(plines[0]) - len(olines[0]) eindentation = len(plines[-1]) - len(olines[-1]) self.__manager.emit("indentation", (bindentation, eindentation)) else: bindentation = len(plines[0]) - len(olines[0]) self.__manager.emit("indentation", (bindentation, )) return False def __destroy_cb(self, *args): self.__destroy() return False def __extract_cb(self, manager, text): self.__text = text return False def __processed_cb(self, manager, text): self.__send_indent(text) return False scribes-0.4~r910/GenericPlugins/Indent/PopupMenuItem.py0000644000175000017500000000327511242100540022711 0ustar andreasandreasfrom gtk import ImageMenuItem from gettext import gettext as _ class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("In_dentation")) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = self.__menuitem1.connect("activate", self.__activate_cb) self.__sigid2 = self.__menuitem2.connect("activate", self.__activate_cb) self.__sigid3 = self.__textview.connect("focus-in-event", self.__focus_cb) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_INDENT, STOCK_UNINDENT, Image, Menu self.__image = Image() self.__menu = Menu() self.__textview = editor.textview self.__menuitem1 = editor.create_menuitem(_("Shift _Right (ctrl + t)"), STOCK_INDENT) self.__menuitem2 = editor.create_menuitem(_("Shift _Left (ctrl + shift + t)"), STOCK_UNINDENT) return def __set_properties(self): self.set_property("name", "Indentation Popup MenuItem") from gtk import STOCK_JUSTIFY_CENTER self.__image.set_property("stock", STOCK_JUSTIFY_CENTER) self.set_image(self.__image) self.set_submenu(self.__menu) self.__menu.append(self.__menuitem1) self.__menu.append(self.__menuitem2) if self.__editor.readonly: self.set_property("sensitive", False) return def __activate_cb(self, menuitem): if menuitem == self.__menuitem1: self.__editor.trigger("indent") else: self.__editor.trigger("unindent") return True def __focus_cb(self, *args): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid2, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid3, self.__textview) self.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Indent/Trigger.py0000644000175000017500000000322711242100540021542 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "indent", "Right", _("Indent line or selected lines"), _("Line Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "unindent", "Left", _("Unindent line or selected lines"), _("Line Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __create_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if self.__manager is None: self.__manager = self.__create_manager() dictionary = { "indent": self.__manager.indent, "unindent": self.__manager.unindent, } dictionary[trigger.name]() return False def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/Indent/Marker.py0000644000175000017500000000340111242100540021352 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "offsets", self.__process_cb) self.connect(manager, "complete", self.__complete_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = None return def __destroy(self): self.__clear() self.disconnect() del self return def __clear(self): if not self.__marks: return self.__editor.delete_mark(self.__marks[0]) self.__editor.delete_mark(self.__marks[1]) self.__marks = None return False def __iter_from_selection(self, offsets): get_iter = self.__editor.textbuffer.get_iter_at_line_offset start = get_iter(offsets[0][0], offsets[0][1]) end = get_iter(offsets[1][0], offsets[1][1]) start = self.__editor.backward_to_line_begin(start.copy()) end = self.__editor.forward_to_line_end(end.copy()) return start, end def __iter_from_cursor(self): start = self.__editor.backward_to_line_begin() end = self.__editor.forward_to_line_end(start.copy()) return start, end def __send_marks(self, offsets): start, end = self.__iter_from_selection(offsets) if len(offsets) > 1 else self.__iter_from_cursor() bmark = self.__editor.create_left_mark(start) emark = self.__editor.create_right_mark(end) self.__marks = bmark, emark self.__manager.emit("marks", (bmark, emark)) return False def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, offsets): self.__send_marks(offsets) return False def __complete_cb(self, *args): self.__clear() return False scribes-0.4~r910/GenericPlugins/Indent/Manager.py0000644000175000017500000000326711242100540021515 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, SIGNAL_NO_RECURSE from gobject import SIGNAL_ACTION, TYPE_NONE, TYPE_PYOBJECT, TYPE_STRING SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "indent": (SCRIBES_SIGNAL, TYPE_NONE, ()), "unindent": (SCRIBES_SIGNAL, TYPE_NONE, ()), "marks": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "offsets": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "indentation": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "complete": (SCRIBES_SIGNAL, TYPE_NONE, ()), "extracted-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "processed-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "iprocessed-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "inserted-text": (SCRIBES_SIGNAL, TYPE_NONE, ()), "character": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), } def __init__(self, editor): GObject.__init__(self) from Selector import Selector Selector(self, editor) from TextInserter import Inserter Inserter(self, editor) from SelectionProcessor import Processor Processor(self, editor) from IndentationProcessor import Processor Processor(self, editor) from IndentationCharacter import Character Character(self, editor) from TextExtractor import Extractor Extractor(self, editor) from Marker import Marker Marker(self, editor) from OffsetExtractor import Extractor Extractor(self, editor) from Refresher import Refresher Refresher(self, editor) def indent(self): self.emit("indent") return def unindent(self): self.emit("unindent") return def destroy(self): self.emit("destroy") del self return scribes-0.4~r910/GenericPlugins/Indent/IndentationCharacter.py0000644000175000017500000000167711242100540024237 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Character(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "indent", self.__process_cb) self.connect(manager, "unindent", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __send_character(self): use_spaces = self.__editor.textview.get_insert_spaces_instead_of_tabs() if use_spaces: width = self.__editor.textview.get_tab_width() self.__manager.emit("character", (" " * width)) else: self.__manager.emit("character", "\t") return def __destroy(self): self.disconnect() del self return def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, *args): self.__send_character() return False scribes-0.4~r910/GenericPlugins/Indent/Selector.py0000644000175000017500000000430211242100540021712 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "inserted-text", self.__insert_cb, True) self.connect(manager, "offsets", self.__offsets_cb) self.connect(manager, "indentation", self.__indentation_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__offsets = None self.__indentation = None return def __destroy(self): self.disconnect() del self return def __select(self): if self.__offsets is None or self.__indentation is None: return False get_iter = self.__editor.textbuffer.get_iter_at_line_offset if len(self.__offsets) == 1: indentation = self.__indentation[0] offset = self.__offsets[0][1] line = self.__offsets[0][0] noffset = offset + (indentation) if noffset < 0: noffset = 0 iterator = get_iter(line, noffset) self.__buffer.place_cursor(iterator) else: bindent, eindent = self.__indentation if len(self.__indentation) > 1 else (self.__indentation[0], self.__indentation[0]) boffset = self.__offsets[0][1] + (bindent) eoffset = self.__offsets[1][1] + (eindent) if boffset < 0: boffset = 0 if eoffset < 0: eoffset = 0 start = get_iter(self.__offsets[0][0], boffset) end = get_iter(self.__offsets[1][0], eoffset) self.__buffer.place_cursor(start) self.__buffer.select_range(start, end) self.__indentation = None self.__offsets = None self.__manager.emit("complete") return False def __destroy_cb(self, *args): self.__destroy() return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __insert_cb(self, *args): self.__remove_timer() from gobject import idle_add self.__timer = idle_add(self.__select) return False def __offsets_cb(self, manager, offsets): self.__offsets = offsets return False def __indentation_cb(self, manager, indentation): self.__indentation = indentation return False scribes-0.4~r910/GenericPlugins/Indent/IndentationProcessor.py0000644000175000017500000000634011242100540024312 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from gettext import gettext as _ class Processor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "extracted-text", self.__text_cb, True) self.connect(manager, "indent", self.__indent_cb) self.connect(manager, "unindent", self.__unindent_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__textview = editor.textview self.__function = None return def __destroy(self): self.disconnect() del self return def __send_indented_text(self, text): text = self.__process_text(text) self.__manager.emit("iprocessed-text", text) self.__manager.emit("processed-text", text) self.__function = None return False def __process_text(self, text): try: lines = text.split("\n") # Properly indent empty lines at the end of a selection. if len(lines) < self.__editor.selection_range: lines.append("") use_tabs = not self.__textview.get_insert_spaces_instead_of_tabs() indentation_width = self.__textview.get_tab_width() if not lines: raise ValueError lines = [self.__process_line(line, use_tabs, indentation_width) for line in lines] except ValueError: if self.__function == self.__indent: return "\t" if use_tabs else " " * indentation_width return "" return "\n".join(lines) def __process_line(self, line, use_tabs, indentation_width): characters = self.__get_indent_characters(line) characters = self.__get_new_indentation(characters, indentation_width) if use_tabs: characters = "\t" * (len(characters)/indentation_width) return characters + line.lstrip(" \t") def __get_indent_characters(self, line): characters = "" indentation_characters = (" ", "\t") for character in line: if not (character in indentation_characters): break characters += character return characters def __get_new_indentation(self, characters, indentation_width): characters = characters.replace("\t", (" " * indentation_width)) number_of_characters = len(characters) remainder = number_of_characters if number_of_characters == 0 else (number_of_characters % indentation_width) return self.__function(number_of_characters, indentation_width, remainder) def __indent(self, number_of_characters, indentation_width, remainder): message = _("Indented line(s)") self.__editor.update_message(message, "pass") if number_of_characters == 0: return " " * indentation_width return " " * (number_of_characters + (indentation_width - remainder)) def __dedent(self, number_of_characters, indentation_width, remainder): message = _("Dedented line(s)") self.__editor.update_message(message, "pass") if number_of_characters < 1: return "" dedent = remainder if remainder else indentation_width return " " * (number_of_characters - dedent) def __destroy_cb(self, *args): self.__destroy() return False def __text_cb(self, manager, text): self.__send_indented_text(text) return False def __indent_cb(self, *args): self.__function = self.__indent return False def __unindent_cb(self, *args): self.__function = self.__dedent return False scribes-0.4~r910/GenericPlugins/Indent/Refresher.py0000644000175000017500000000136511242100540022065 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Refresher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "indent", self.__freeze_cb) self.connect(manager, "unindent", self.__freeze_cb) self.connect(manager, "complete", self.__thaw_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy_cb(self, *args): self.disconnect() del self return False def __freeze_cb(self, *args): self.__editor.freeze() return False def __thaw_cb(self, *args): self.__editor.thaw() return False scribes-0.4~r910/GenericPlugins/Indent/TextInserter.py0000644000175000017500000000230511242100540022573 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "processed-text", self.__text_cb) self.connect(manager, "marks", self.__marks_cb) self.connect(manager, "complete", self.__complete_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = None return def __destroy(self): self.disconnect() del self return def __insert(self, text): start = self.__editor.textbuffer.get_iter_at_mark(self.__marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(self.__marks[1]) self.__editor.textbuffer.delete(start, end) self.__editor.textbuffer.insert_at_cursor(text) self.__manager.emit("inserted-text") return False def __destroy_cb(self, *args): self.__destroy() return False def __text_cb(self, manager, text): self.__insert(text) return False def __marks_cb(self, manager, marks): self.__marks = marks return False def __complete_cb(self, *args): self.__marks = None return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/0000755000175000017500000000000011242100540022425 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/FilterThroughCommand/NewWindowHandler.py0000644000175000017500000000156011242100540026220 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "result", self.__result_cb) self.connect(manager, "output-mode", self.__output_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__output_mode = "replace" return def __destroy_cb(self, *args): self.disconnect() del self return False def __result_cb(self, manager, result): if self.__output_mode == "replace": return False self.__manager.emit("win") self.__manager.emit("hide") self.__editor.new(text=result) return False def __output_cb(self, manager, output): self.__output_mode = output return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/Metadata.py0000644000175000017500000000070311242100540024517 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "FilterThroughCommandOutputMode.gdb") def get_value(): try: value = "replace" database = open_database(basepath, "r") value = database["output"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["output"] = value finally: database.close() return scribes-0.4~r910/GenericPlugins/FilterThroughCommand/__init__.py0000644000175000017500000000000011242100540024524 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/FilterThroughCommand/Signals.py0000644000175000017500000000151211242100540024376 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "win": (SSIGNAL, TYPE_NONE, ()), "fail": (SSIGNAL, TYPE_NONE, ()), "execute": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "mapped": (SSIGNAL, TYPE_NONE, ()), "restored-cursor-position": (SSIGNAL, TYPE_NONE, ()), "database-updated": (SSIGNAL, TYPE_NONE, ()), "result": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "bounds": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "command": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "output-mode": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update-database": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/FilterThroughCommand/Utils.py0000644000175000017500000000015711242100540024102 0ustar andreasandreasdef get_iter(marks, textbuffer): _iter = textbuffer.get_iter_at_mark return _iter(marks[0]), _iter(marks[1]) scribes-0.4~r910/GenericPlugins/FilterThroughCommand/DatabaseMonitor.py0000644000175000017500000000236211242100540026056 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.metadata_folder, "PluginPreferences", "FilterThroughCommandOutputMode.gdb") self.__monitor = editor.get_file_monitor(_file) return def __update(self): self.__manager.emit("database-updated") return False def __update_timeout(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.__monitor.cancel() self.disconnect() del self return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False try: from gobject import timeout_add, source_remove, PRIORITY_LOW source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__update_timeout, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/CursorReseter.py0000644000175000017500000000423311242100540025610 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reseter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "execute", self.__execute_cb) self.connect(manager, "bounds", self.__bounds_cb) self.connect(manager, "win", self.__win_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__bounds = None self.__cursor_line = 0 self.__cursor_index = 0 return def __mark_cursor_position(self): self.__cursor_line = self.__editor.cursor.get_line() self.__cursor_index = self.__editor.cursor.get_line_index() return False def __get_iterator_from_line(self, selection_iterator, is_start): line = self.__cursor_line if is_start else selection_iterator.get_line() number_of_lines = self.__buffer.get_line_count() if line > number_of_lines: return self.__buffer.get_bounds()[-1] return self.__buffer.get_iter_at_line(line) def __get_cursor_index(self, iterator, selection_iterator, is_start): index = self.__cursor_index if is_start else selection_iterator.get_line_index() line_index = iterator.get_bytes_in_line() return line_index if index > line_index else index def __restore(self): from Utils import get_iter selection_iterator = get_iter(self.__bounds, self.__buffer)[0] is_start = selection_iterator.is_start() iterator = self.__get_iterator_from_line(selection_iterator, is_start) index = self.__get_cursor_index(iterator, selection_iterator, is_start) iterator.set_line_index(index) self.__buffer.place_cursor(iterator) if is_start: self.__editor.move_view_to_cursor(True) self.__manager.emit("restored-cursor-position") return False def __execute_cb(self, *args): self.__mark_cursor_position() return False def __win_cb(self, *args): from gobject import idle_add idle_add(self.__restore) return False def __bounds_cb(self, manager, bounds): self.__bounds = bounds return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/Trigger.py0000644000175000017500000000230711242100540024404 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "filter-through-command", "x", _("Text transformation via command line tools"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/DatabaseReader.py0000644000175000017500000000142311242100540025626 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "database-updated", self.__updated_cb) self.__read() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __read(self): from Metadata import get_value self.__manager.emit("output-mode", get_value()) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __updated_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__read, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/Feedback.py0000644000175000017500000000224611242100540024467 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "execute", self.__execute_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "win", self.__win_cb, True) self.connect(manager, "fail", self.__fail_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __fail_cb(self, *args): message = _("ERROR: command failed to execute") self.__editor.update_message(message, "no", 10) return False def __win_cb(self, *args): message = _("command executed successfully") self.__editor.update_message(message, "yes", 5) return False def __execute_cb(self, *args): # message = _("please wait...") # self.__editor.update_message(message, "run", 600) return False def __hide_cb(self, *args): self.__editor.hide_message() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/Manager.py0000644000175000017500000000214711242100540024355 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from Feedback import Feedback Feedback(self, editor) from CursorReseter import Reseter Reseter(self, editor) from ViewUpdater import Updater Updater(self, editor) from TextInserter import Inserter Inserter(self, editor) from CommandExecutor import Executor Executor(self, editor) from BoundsExtractor import Extractor Extractor(self, editor) from NewWindowHandler import Handler Handler(self, editor) from GUI.Manager import Manager Manager(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) from DatabaseWriter import Writer Writer(self, editor) from DatabaseReader import Reader Reader(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/0000755000175000017500000000000011242100540023051 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/Entry.py0000644000175000017500000000306011242100540024523 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Entry(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "mapped", self.__show_cb, True) self.connect(manager, "fail", self.__sensitive_cb) self.connect(manager, "restored-cursor-position", self.__sensitive_cb, True) self.connect(manager, "update-database", self.__insensitive_cb) self.connect(manager, "output-mode", self.__sensitive_cb) self.connect(self.__entry, "changed", self.__changed_cb) self.connect(self.__entry, "activate", self.__activate_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_object("Entry") return def __destroy_cb(self, *args): self.disconnect() del self return False def __show_cb(self, *args): self.__entry.grab_focus() return False def __changed_cb(self, *args): command = self.__entry.get_text().strip() self.__manager.emit("command", command) return False def __activate_cb(self, *args): self.__manager.emit("execute") self.__entry.set_property("sensitive", False) return False def __sensitive_cb(self, *args): self.__entry.set_property("sensitive", True) self.__entry.grab_focus() return False def __insensitive_cb(self, *args): self.__entry.set_property("sensitive", False) return False def __hide_cb(self, *args): self.__entry.set_property("sensitive", True) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/__init__.py0000644000175000017500000000000011242100540025150 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/GUI.glade0000644000175000017500000000700011242100540024470 0ustar andreasandreas True popup True dock True True False False False False True True 5 5 10 10 True True 10 True <b>_Command:</b> True True Entry True False False 0 True True 1 True <b>_Output:</b> True True ComboBox False False 2 True False False 3 scribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/ComboBox.py0000644000175000017500000000422111242100540025132 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager data = ((_("Replace Content"), "replace"), (_("New Window"), "new")) class ComboBox(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "output-mode", self.__output_cb) self.__sigid1 = self.connect(self.__combo, "changed", self.__changed_cb) self.__populate_model(data) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_object("ComboBox") self.__model = self.__create_model() return False def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __populate_model(self, data): self.__combo.handler_block(self.__sigid1) self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() for output, alias in data: self.__editor.refresh(False) self.__model.append([output, alias]) self.__editor.refresh(False) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) self.__combo.handler_unblock(self.__sigid1) return False def __update_combo(self, output): self.__combo.handler_block(self.__sigid1) dictionary = {"replace": 0, "new": 1} self.__combo.set_active(dictionary[output]) self.__combo.handler_unblock(self.__sigid1) return def __changed_cb(self, *args): iterator = self.__combo.get_active_iter() output = self.__model.get_value(iterator, 1) self.__manager.emit("update-database", output) return False def __output_cb(self, manager, output): self.__update_combo(output) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/Manager.py0000644000175000017500000000035411242100540024777 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from ComboBox import ComboBox ComboBox(manager, editor) from Entry import Entry Entry(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/GenericPlugins/FilterThroughCommand/GUI/Displayer.py0000644000175000017500000000424511242100540025364 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__show_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "destroy", self.__quit_cb) self.__sig1 = self.connect(self.__view, "focus-in-event", self.__hide_cb) self.__sig2 = self.connect(self.__view, "button-press-event", self.__hide_cb) self.__sig3 = self.connect(self.__window, "key-press-event", self.__key_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__window = editor.window self.__container = manager.gui.get_object("Alignment") self.__visible = False self.__blocked = False return def __show(self): if self.__visible: return False self.__unblock() self.__editor.add_bar_object(self.__container) self.__visible = True self.__manager.emit("mapped") return False def __hide(self): if self.__visible is False: return False self.__block() self.__view.grab_focus() self.__editor.remove_bar_object(self.__container) self.__visible = False return False def __block(self): if self.__blocked: return False self.__view.handler_block(self.__sig1) self.__view.handler_block(self.__sig2) self.__window.handler_block(self.__sig3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__view.handler_unblock(self.__sig1) self.__view.handler_unblock(self.__sig2) self.__window.handler_unblock(self.__sig3) self.__blocked = False return False def __quit_cb(self, *args): self.disconnect() del self return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/GenericPlugins/FilterThroughCommand/DatabaseWriter.py0000644000175000017500000000137611242100540025707 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "update-database", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __write(self, output): from Metadata import set_value set_value(output) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __update_cb(self, manager, output): from gobject import idle_add, PRIORITY_LOW idle_add(self.__write, output, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/TextInserter.py0000644000175000017500000000241011242100540025434 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "bounds", self.__bounds_cb) self.connect(manager, "result", self.__result_cb) self.connect(manager, "output-mode", self.__output_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bounds = None self.__output_mode = "replace" return def __insert(self, text): _buffer = self.__editor.textbuffer _buffer.begin_user_action() from Utils import get_iter _buffer.delete(*get_iter(self.__bounds, _buffer)) _buffer.insert_at_cursor(text) _buffer.end_user_action() self.__manager.emit("win") return False def __destroy_cb(self, *args): self.disconnect() del self return False def __bounds_cb(self, manager, bounds): self.__bounds = bounds return False def __result_cb(self, manager, text): if self.__output_mode != "replace": return False from gobject import idle_add idle_add(self.__insert, text) return False def __output_cb(self, manager, output): self.__output_mode = output return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/CommandExecutor.py0000644000175000017500000000351411242100540026077 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Executor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "command", self.__command_cb) self.connect(manager, "bounds", self.__bounds_cb) self.connect(manager, "execute", self.__execute_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__input = "" self.__command = "" return def __make_input_file(self): from tempfile import NamedTemporaryFile fd = NamedTemporaryFile(delete=False) fd.write(self.__input) fd.close() return fd def __run(self, standard_input_fd): # from shlex import split # command = split(self.__command) command = self.__command from subprocess import Popen, PIPE process = Popen(command, shell=True, stdin=open(standard_input_fd.name), stdout=PIPE, stderr=PIPE) result = process.communicate() retcode = process.wait() return retcode, result def __execute(self): standard_input_fd = self.__make_input_file() retcode, result = self.__run(standard_input_fd) from os import unlink unlink(standard_input_fd.name) self.__manager.emit("fail") if retcode else self.__manager.emit("result", result[0]) if retcode: print result[-1] return False def __destroy_cb(self, *args): self.disconnect() del self return False def __execute_cb(self, *args): from gobject import idle_add idle_add(self.__execute) return False def __bounds_cb(self, manager, boundaries): from Utils import get_iter _buffer = self.__editor.textbuffer self.__input = _buffer.get_text(*get_iter(boundaries, _buffer)) return False def __command_cb(self, manager, command): self.__command = command return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/BoundsExtractor.py0000644000175000017500000000314511242100540026130 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Extractor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "bounds", self.__bounds_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "win", self.__win_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bounds = None return def __get_selected_bounds(self): start, end = self.__editor.selection_bounds start = self.__editor.backward_to_line_begin(start.copy()) end = self.__editor.forward_to_line_end(end.copy()) end.forward_char() return start, end def __extract(self): has_selection = self.__editor.has_selection bounds = self.__get_selected_bounds() if has_selection else self.__editor.textbuffer.get_bounds() self.__manager.emit("bounds", self.__mark(bounds)) return def __mark(self, bounds): ml = self.__editor.create_left_mark mr = self.__editor.create_right_mark return ml(bounds[0]), mr(bounds[1]) def __destroy_cb(self, *args): self.disconnect() del self return False def __activate_cb(self, *args): self.__extract() return False def __bounds_cb(self, manager, bounds): self.__bounds = bounds return False def __hide_cb(self, *args): [self.__editor.delete_mark(mark) for mark in self.__bounds] return False def __win_cb(self, *args): self.__manager.emit("bounds", self.__bounds) return False scribes-0.4~r910/GenericPlugins/FilterThroughCommand/ViewUpdater.py0000644000175000017500000000262011242100540025236 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "execute", self.__freeze_cb) self.connect(manager, "restored-cursor-position", self.__thaw_cb, True) self.connect(manager, "output-mode", self.__output_cb, True) self.connect(manager, "win", self.__win_cb, True) self.connect(manager, "fail", self.__thaw_cb, True) self.connect(manager, "hide", self.__thaw_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__frozen = False self.__output_mode = "replace" return def __destroy_cb(self, *args): self.disconnect() del self return False def __freeze(self): if self.__frozen: return False self.__editor.freeze() self.__frozen = True return False def __thaw(self): if self.__frozen is False: return False self.__editor.thaw() self.__frozen = False return False def __freeze_cb(self, *args): self.__freeze() return False def __thaw_cb(self, *args): self.__thaw() return False def __win_cb(self, *args): if self.__output_mode == "replace": return False self.__thaw() return False def __output_cb(self, manager, output): self.__output_mode = output return False scribes-0.4~r910/GenericPlugins/SmartSpace/0000755000175000017500000000000011242100540020402 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SmartSpace/__init__.py0000644000175000017500000000000011242100540022501 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SmartSpace/ConfigurationManager.py0000644000175000017500000000217511242100540025063 0ustar andreasandreasclass Manager(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__changed_cb) self.__send_activate_signal() def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager from os.path import join preference_folder = join(editor.metadata_folder, "Preferences") database_path = join(preference_folder, "UseTabs.gdb") self.__monitor = editor.get_file_monitor(database_path) return def __send_activate_signal(self): use_spaces = self.__editor.textview.get_insert_spaces_instead_of_tabs() self.__manager.emit("activate", use_spaces) return False def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __changed_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False from gobject import timeout_add timeout_add(250, self.__send_activate_signal) return False scribes-0.4~r910/GenericPlugins/SmartSpace/SmartSpace.py0000644000175000017500000000515111242100540023020 0ustar andreasandreasclass SmartSpace(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = self.__textview.connect('key-press-event', self.__key_press_event_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("activate", self.__activate_cb) from gobject import idle_add idle_add(self.__precompile_method, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__textview = editor.textview self.__buffer = editor.textbuffer self.__activate = False self.__blocked = False return def __block_event_after_signal(self): if self.__blocked: return self.__textview.handler_block(self.__sigid1) self.__blocked = True return def __unblock_event_after_signal(self): if self.__blocked is False: return self.__textview.handler_unblock(self.__sigid1) self.__blocked = False return def __check_event_signal(self): if self.__activate: self.__unblock_event_after_signal() else: self.__block_event_after_signal() return def __precompile_method(self): methods = (self.__key_press_event_cb,) self.__editor.optimize(methods) return False def __key_press_event_cb(self, textview, event): if self.__activate is False: return False from gtk.keysyms import BackSpace if event.keyval != BackSpace: return False if self.__buffer.get_has_selection(): return False iterator = self.__editor.cursor if iterator.starts_line(): return False start = iterator.copy() while True: start.backward_char() if start.get_char() != " ": break start.forward_char() start = self.__get_start_position(start, iterator.get_line_offset()) break self.__buffer.begin_user_action() self.__buffer.delete(start, iterator) self.__buffer.end_user_action() return True def __get_start_position(self, start, cursor_offset): indentation = self.__textview.get_tab_width() moves = cursor_offset % indentation if moves == 0 : moves = indentation for value in xrange(moves): if start.starts_line(): return start start.backward_char() if start.get_char() == " ": continue start.forward_char() break return start def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, manager, use_spaces): self.__activate = use_spaces self.__check_event_signal() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__textview) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return scribes-0.4~r910/GenericPlugins/SmartSpace/Manager.py0000644000175000017500000000131011242100540022321 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import TYPE_PYOBJECT, SIGNAL_NO_RECURSE, SIGNAL_ACTION SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "activate": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from SmartSpace import SmartSpace SmartSpace(editor, self) from ConfigurationManager import Manager Manager(editor, self) def __init_attributes(self, editor): self.__editor = editor return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/PluginLineEndings.py0000644000175000017500000000110411242100540022264 0ustar andreasandreasname = "Line Endings Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "LineEndingsPlugin" short_description = "Line ending operations." long_description = """This plugin performs operations that changes line endings to unix, mac or windows.""" class LineEndingsPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from LineEndings.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginTemplateEditor.py0000644000175000017500000000121111242100540023006 0ustar andreasandreasname = "Template Editor Plugin" authors = ["Lateef Alabi-Oki "] version = 0.3 autoload = True class_name = "TemplateEditorPlugin" short_description = "This plugin shows the template editor." long_description = """\ This plugin shows the template editor. The template editor allows users to add, edit, remove, import or export templates. """ class TemplateEditorPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from TemplateEditor.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginEscapeQuotes.py0000644000175000017500000000110411242100540022466 0ustar andreasandreasname = "Escape Quotes Generic Plugin" authors = ["Ib Lundgren e", _("Escape quotes"), _("Text Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "unescape-quotes", "e", _("Unescape quotes"), _("Text Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, trigger): function = { self.__trigger1: self.__manager.escape, self.__trigger2: self.__manager.unescape, } function[trigger]() return False scribes-0.4~r910/GenericPlugins/EscapeQuotes/Manager.py0000644000175000017500000000103111242100540022660 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE class Manager(GObject): __gsignals__ = { "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "escape": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "unescape": (SIGNAL_RUN_LAST, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from Escaper import Escaper Escaper(self, editor) def escape(self): self.emit("escape") return def unescape(self): self.emit("unescape") return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/PluginSpaces.py0000644000175000017500000000103011242100540021301 0ustar andreasandreasname = "Spaces to tabs Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "SpacesPlugin" short_description = "Spaces operations." long_description = """This plug-in performs all sorts of spaces \ operations. """ class SpacesPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Spaces.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Spaces/0000755000175000017500000000000011242100540017556 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Spaces/__init__.py0000644000175000017500000000000011242100540021655 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Spaces/TextExtractor.py0000644000175000017500000000206111242100540022747 0ustar andreasandreasclass Extractor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("tabs-to-spaces", self.__process_cb) self.__sigid3 = manager.connect("spaces-to-tabs", self.__process_cb) self.__sigid4 = manager.connect("remove-trailing-spaces", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) del self self = None return def __send_extracted_text(self): self.__manager.emit("extracted-text", self.__editor.text) return False def __process_cb(self, *args): self.__send_extracted_text() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Spaces/SpaceProcessor.py0000644000175000017500000000570511242100540023072 0ustar andreasandreasfrom gettext import gettext as _ class Processor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("tabs-to-spaces", self.__tabs_to_spaces_cb) self.__sigid3 = manager.connect("spaces-to-tabs", self.__spaces_to_tabs_cb) self.__sigid4 = manager.connect("remove-trailing-spaces", self.__remove_trailing_spaces_cb) self.__sigid5 = manager.connect("extracted-text", self.__extracted_text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__use_tabs = None self.__function = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __send_processed_text(self, text): lines = text.splitlines() lines = [self.__function(line) for line in lines] text = "\n".join(lines) + "\n" self.__manager.emit("processed-text", text) self.__use_tabs = None self.__function = None return False def __convert(self, line): indentation_width = self.__editor.textview.get_tab_width() characters = self.__get_indent_characters(line) characters = self.__get_new_indentation(characters, indentation_width) if self.__use_tabs: characters = "\t" * (len(characters)/indentation_width) message = _("Converted spaces to tabs") if self.__use_tabs else _("Converted tabs to spaces") self.__editor.update_message(message, "pass") return characters + line.lstrip(" \t") def __get_indent_characters(self, line): characters = "" indentation_characters = (" ", "\t") for character in line: if not (character in indentation_characters): break characters += character return characters def __get_new_indentation(self, characters, indentation_width): characters = characters.replace("\t", (" " * indentation_width)) number_of_characters = len(characters) if not number_of_characters: return "" remainder = number_of_characters % indentation_width return " " * (number_of_characters - remainder) def __remove(self, line): line = line.rstrip(" \t") message = _("Removed trailing spaces") self.__editor.update_message(message, "pass") return line def __destroy_cb(self, *args): self.__destroy() return False def __spaces_to_tabs_cb(self, *args): self.__use_tabs = True self.__function = self.__convert return False def __tabs_to_spaces_cb(self, *args): self.__use_tabs = False self.__function = self.__convert return False def __remove_trailing_spaces_cb(self, *args): self.__function = self.__remove return False def __extracted_text_cb(self, manager, text): self.__send_processed_text(text) return False scribes-0.4~r910/GenericPlugins/Spaces/PopupMenuItem.py0000644000175000017500000000361611242100540022705 0ustar andreasandreasfrom gettext import gettext as _ from gtk import ImageMenuItem class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("S_paces")) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = self.__menuitem1.connect("activate", self.__activate_cb) self.__sigid2 = self.__menuitem2.connect("activate", self.__activate_cb) self.__sigid3 = self.__menuitem3.connect("activate", self.__activate_cb) self.__sigid4 = self.__view.connect("focus-in-event", self.__destroy_cb) def __init_attributes(self, editor): self.__view = editor.textview self.__editor = editor from gtk import Menu, Image self.__menu = Menu() self.__image = Image() self.__menuitem1 = self.__editor.create_menuitem(_("_Tabs to Spaces (alt+shift+t)")) self.__menuitem2 = self.__editor.create_menuitem(_("_Spaces to Tabs (alt+t)")) self.__menuitem3 = self.__editor.create_menuitem(_("_Remove Trailing Spaces (alt+r)")) return def __set_properties(self): self.set_property("name", "Spaces Popup Menuitem") self.set_image(self.__image) self.set_submenu(self.__menu) self.__menu.append(self.__menuitem1) self.__menu.append(self.__menuitem2) self.__menu.append(self.__menuitem3) if self.__editor.readonly: self.set_property("sensitive", False) return def __activate_cb(self, menuitem): if menuitem == self.__menuitem1: self.__editor.trigger("tabs-to-spaces") elif menuitem == self.__menuitem2: self.__editor.trigger("spaces-to-tabs") else: self.__editor.trigger("remove-trailing-spaces") return True def __destroy_cb(self, *args): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid2, self.__menuitem2) self.__editor.disconnect_signal(self.__sigid3, self.__menuitem3) self.__editor.disconnect_signal(self.__sigid4, self.__view) self.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Spaces/Trigger.py0000644000175000017500000000375411242100540021544 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "spaces-to-tabs", "t", _("Convert spaces to tabs"), _("Text Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "tabs-to-spaces", "t", _("Convert tabs to spaces"), _("Text Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "remove-trailing-spaces", "r", _("Remove trailing spaces"), _("Text Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__get_manager() function = { self.__trigger1: self.__manager.spaces_to_tabs, self.__trigger2: self.__manager.tabs_to_spaces, self.__trigger3: self.__manager.remove_trailing_spaces, } function[trigger]() return def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/Spaces/OffsetGetter.py0000644000175000017500000000171011242100540022530 0ustar andreasandreasclass Getter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("position", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __send_line_offset(self): iterator = self.__editor.cursor adjustment_value = self.__editor.gui.get_widget("ScrolledWindow").get_vadjustment().get_value() data = iterator.get_line(), iterator.get_line_offset(), adjustment_value self.__manager.emit("line-offset", data) return False def __process_cb(self, *args): self.__send_line_offset() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Spaces/Manager.py0000644000175000017500000000274411242100540021511 0ustar andreasandreasfrom gobject import GObject, TYPE_NONE, TYPE_STRING, TYPE_PYOBJECT from gobject import SIGNAL_RUN_LAST, SIGNAL_ACTION, SIGNAL_NO_RECURSE SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy":(SCRIBES_SIGNAL, TYPE_NONE, ()), "processed-text":(SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "extracted-text":(SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "spaces-to-tabs":(SCRIBES_SIGNAL, TYPE_NONE, ()), "tabs-to-spaces":(SCRIBES_SIGNAL, TYPE_NONE, ()), "remove-trailing-spaces":(SCRIBES_SIGNAL, TYPE_NONE, ()), "inserted-text":(SCRIBES_SIGNAL, TYPE_NONE, ()), "position":(SCRIBES_SIGNAL, TYPE_NONE, ()), "line-offset":(SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) from CursorPositioner import Positioner Positioner(self, editor) from TextInserter import Inserter Inserter(self, editor) from SpaceProcessor import Processor Processor(self, editor) from TextExtractor import Extractor Extractor(self, editor) from OffsetGetter import Getter Getter(self, editor) def spaces_to_tabs(self): self.emit("position") self.emit("spaces-to-tabs") return False def tabs_to_spaces(self): self.emit("position") self.emit("tabs-to-spaces") return False def remove_trailing_spaces(self): self.emit("position") self.emit("remove-trailing-spaces") return False def destroy(self): self.emit("destroy") del self self = None return False scribes-0.4~r910/GenericPlugins/Spaces/CursorPositioner.py0000644000175000017500000000405011242100540023460 0ustar andreasandreasclass Positioner(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("line-offset", self.__offset_cb) self.__sigid3 = manager.connect("inserted-text", self.__inserted_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__data = None self.__old_text = None return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __get_text_on_line(self, line): iterator = self.__editor.textbuffer.get_iter_at_line(line) start = self.__editor.backward_to_line_begin(iterator.copy()) end = self.__editor.forward_to_line_end(start.copy()) text = self.__editor.textbuffer.get_text(start, end) return text def __position(self): line, offset, adjustment_value = self.__data new_text = self.__get_text_on_line(line) new_offset = offset + (len(new_text) - len(self.__old_text)) if new_offset < 0: new_offset = 0 get_iter = self.__editor.textbuffer.get_iter_at_line_offset iterator = get_iter(line, new_offset) self.__editor.textbuffer.place_cursor(iterator) from gobject import idle_add idle_add(self.__move_to_cursor, adjustment_value, priority=9999) self.__data = None self.__old_text = None # self.__editor.refresh(True) return False def __move_to_cursor(self, adjustment_value): vadjustment = self.__editor.gui.get_widget("ScrolledWindow").get_vadjustment() vadjustment.set_value(adjustment_value) self.__editor.textview.window.thaw_updates() # self.__editor.refresh(True) return False def __destroy_cb(self, *args): self.__destroy() return False def __offset_cb(self, manager, data): self.__data = data self.__old_text = self.__get_text_on_line(data[0]) return False def __inserted_cb(self, *args): self.__position() return False scribes-0.4~r910/GenericPlugins/Spaces/TextInserter.py0000644000175000017500000000210311242100540022564 0ustar andreasandreasclass Inserter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("processed-text", self.__processed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __insert(self, text): self.__editor.busy() self.__editor.textview.window.freeze_updates() self.__editor.textbuffer.begin_user_action() # self.__editor.textbuffer.set_text(text) self.__editor.refresh(True) self.__editor.set_text(text) self.__editor.refresh(True) self.__editor.textbuffer.end_user_action() self.__editor.busy(False) self.__manager.emit("inserted-text") return False def __destroy_cb(self, *args): self.__destroy() return False def __processed_cb(self, manager, text): self.__insert(text) return False scribes-0.4~r910/GenericPlugins/LineJumper/0000755000175000017500000000000011242100540020412 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineJumper/__init__.py0000644000175000017500000000000011242100540022511 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineJumper/Signals.py0000644000175000017500000000051411242100540022364 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "line-number": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/LineJumper/LineJumper.py0000644000175000017500000000201411242100540023033 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Jumper(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "line-number", self.__line_number_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __jump_to(self, line): iterator = self.__editor.textbuffer.get_iter_at_line(line-1) self.__editor.move_view_to_cursor(True, iterator) self.__editor.textbuffer.place_cursor(iterator) message = _("Moved cursor to line %d") % (line) self.__editor.update_message(message, "pass") return False def __destroy_cb(self, *args): self.__destroy() return False def __line_number_cb(self, manager, line): from gobject import idle_add idle_add(self.__jump_to, int(line)) return False scribes-0.4~r910/GenericPlugins/LineJumper/Trigger.py0000644000175000017500000000213411242100540022367 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) self.__editor.get_toolbutton("GotoToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-gotobar", "i", _("Jump to a specific line"), _("Navigation Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return scribes-0.4~r910/GenericPlugins/LineJumper/Manager.py0000644000175000017500000000105211242100540022334 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from LineJumper import Jumper Jumper(self, editor) from GUI.Manager import Manager Manager(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return def show(self): self.emit("show") return scribes-0.4~r910/GenericPlugins/LineJumper/GUI/0000755000175000017500000000000011242100540021036 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineJumper/GUI/__init__.py0000644000175000017500000000000011242100540023135 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/LineJumper/GUI/LineLabel.py0000644000175000017500000000150211242100540023235 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Label(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show", self.__show_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_object("LineLabel") return def __destroy(self): self.disconnect() del self return def __update(self): message = _("of %d") % self.__editor.textbuffer.get_line_count() self.__label.set_label(message) return False def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__update() return False scribes-0.4~r910/GenericPlugins/LineJumper/GUI/GUI.glade0000644000175000017500000001152511242100540022464 0ustar andreasandreas True popup True dock True True False False False False True 5 5 10 10 True 10 True <b>Line _Number:</b> True True True False False False 0 True 5 True True True True True True True True 1 False Adjustment 1 True True True if-valid False False 0 True of <b>1</b> True True False False False 1 False False 1 1 1 100 -1 -10 scribes-0.4~r910/GenericPlugins/LineJumper/GUI/Manager.py0000644000175000017500000000036611242100540022767 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from LineLabel import Label Label(manager, editor) from SpinButton import SpinButton SpinButton(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/GenericPlugins/LineJumper/GUI/SpinButton.py0000644000175000017500000000255511242100540023524 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class SpinButton(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show", self.__show_cb, True) self.connect(self.__button, "activate", self.__activate_cb) self.__sigid1 = self.connect(self.__button, "value-changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_object("SpinButton") return def __destroy(self): self.disconnect() del self return def __set_value(self): self.__button.handler_block(self.__sigid1) self.__button.set_range(1, self.__editor.textbuffer.get_line_count()) line = self.__editor.cursor.get_line() + 1 self.__button.set_value(line) self.__button.handler_unblock(self.__sigid1) self.__button.props.sensitive = True self.__button.grab_focus() return def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__set_value) return False def __activate_cb(self, *args): self.__manager.emit("hide") return False def __changed_cb(self, *args): self.__manager.emit("line-number", self.__button.get_value()) return False scribes-0.4~r910/GenericPlugins/LineJumper/GUI/Displayer.py0000644000175000017500000000425111242100540023346 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "destroy", self.__quit_cb) self.__sig1 = self.connect(self.__view, "focus-in-event", self.__hide_cb) self.__sig2 = self.connect(self.__view, "button-press-event", self.__hide_cb) self.__sig3 = self.connect(self.__window, "key-press-event", self.__key_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__window = editor.window self.__container = manager.gui.get_object("Alignment") self.__visible = False self.__blocked = False return def __destroy(self): self.disconnect() del self return False def __show(self): if self.__visible: return False self.__unblock() self.__editor.add_bar_object(self.__container) self.__visible = True return False def __hide(self): if self.__visible is False: return False self.__block() self.__view.grab_focus() self.__editor.remove_bar_object(self.__container) self.__editor.hide_message() self.__visible = False return False def __block(self): if self.__blocked: return False self.__view.handler_block(self.__sig1) self.__view.handler_block(self.__sig2) self.__window.handler_block(self.__sig3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__view.handler_unblock(self.__sig1) self.__view.handler_unblock(self.__sig2) self.__window.handler_unblock(self.__sig3) self.__blocked = False return False def __quit_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True scribes-0.4~r910/GenericPlugins/Templates/0000755000175000017500000000000011242100540020276 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Templates/Metadata.py0000644000175000017500000000070611242100540022373 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "Templates.gdb") def get_value(): try: dictionary = {} database = open_database(basepath, "r") dictionary = database["templates"] except: pass finally: database.close() return dictionary def set_value(dictionary): try: database = open_database(basepath, "w") database["templates"] = dictionary finally: database.close() return scribes-0.4~r910/GenericPlugins/Templates/__init__.py0000644000175000017500000000000011242100540022375 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Templates/TriggerMonitor.py0000644000175000017500000001070311242100540023624 0ustar andreasandreasclass Monitor(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = editor.connect("cursor-moved", self.__cursor_moved_cb) self.__sigid3 = self.__view.connect("key-press-event", self.__key_press_event_cb) self.__sigid4 = manager.connect("loaded-language-templates", self.__loaded_language_templates_cb) self.__sigid5 = manager.connect("loaded-general-templates", self.__loaded_general_templates_cb) self.__sigid6 = manager.connect("activate-template-mode", self.__activate_template_mode_cb) self.__sigid7 = manager.connect("deactivate-template-mode", self.__deactivate_template_mode_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__trigger_found = False self.__template_mode = 0 from collections import deque self.__language_triggers = deque([]) self.__general_triggers = deque([]) self.__view = editor.textview return def __precompile_methods(self): methods = (self.__is_trigger, self.__emit_no_trigger_found_signal, self.__emit_trigger_found_signal, self.__cursor_moved_cb, self.__key_press_event_cb, self.__activate_template_mode_cb, self.__deactivate_template_mode_cb) self.__editor.optimize(methods) return def __destroy(self): self.__language_triggers.clear() self.__general_triggers.clear() self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__view) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) del self return def __is_trigger(self, word): if not word: return False if word in self.__language_triggers: return True if word in self.__general_triggers: return True return False def __check_trigger(self): from utils import get_template_word word = get_template_word(self.__editor.cursor, self.__editor.textbuffer) if self.__is_trigger(word): self.__emit_trigger_found_signal(word) else: self.__emit_no_trigger_found_signal() return False def __emit_trigger_found_signal(self, word): self.__trigger_found = True self.__manager.emit("trigger-found", word) return def __emit_no_trigger_found_signal(self): if self.__trigger_found is False: return self.__manager.emit("no-trigger-found") self.__trigger_found = False return def __destroy_cb(self, *args): self.__destroy() return def __loaded_language_templates_cb(self, manager, dictionary): try: language = self.__editor.language get_trigger = lambda key: key[len(language):] keys = [get_trigger(key) for key in dictionary.keys()] from collections import deque self.__language_triggers = deque(keys) except AttributeError: pass return def __loaded_general_templates_cb(self, manager, dictionary): get_trigger = lambda key: key[len("General"):] keys = [get_trigger(key) for key in dictionary.keys()] from collections import deque self.__general_triggers = deque(keys) return def __deactivate_template_mode_cb(self, *args): self.__template_mode -= 1 return False def __activate_template_mode_cb(self, *args): self.__template_mode += 1 return False def __check_idleadd(self): from gobject import idle_add, PRIORITY_LOW self.__cursor_id = idle_add(self.__check_trigger, priority=PRIORITY_LOW) return False def __cursor_moved_cb(self, *args): try: from gobject import timeout_add, source_remove, PRIORITY_LOW source_remove(self.__cursor_id) except AttributeError: pass finally: self.__cursor_id = timeout_add(125, self.__check_idleadd, priority=PRIORITY_LOW) return False def __key_press_event_cb(self, view, event): from gtk.keysyms import Tab, ISO_Left_Tab if not (event.keyval in (Tab, ISO_Left_Tab)): return False result = False if event.keyval == Tab and self.__trigger_found: self.__manager.emit("expand-trigger") result = True elif event.keyval == Tab and self.__template_mode: self.__manager.emit("next-placeholder") result = True elif event.keyval == ISO_Left_Tab and self.__template_mode: self.__manager.emit("previous-placeholder") result = True return result scribes-0.4~r910/GenericPlugins/Templates/PlaceholderNavigator.py0000644000175000017500000001715211242100540024753 0ustar andreasandreasclass Navigator(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("previous-placeholder", self.__previous_placeholder_cb) self.__sigid3 = manager.connect("next-placeholder", self.__next_placeholder_cb) self.__sigid4 = manager.connect("template-boundaries", self.__template_boundaries_cb) self.__sigid5 = manager.connect("placeholders", self.__placeholders_cb) self.__sigid6 = manager.connect("deactivate-template-mode", self.__deactivate_template_mode_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__placeholder_dictionary = {} self.__boundaries_dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self return def __precompile_methods(self): methods = (self.__select_placeholder, self.__next_placeholder, self.__next_placeholder_cb, self.__previous_placeholder_cb, self.__previous_placeholder, self.__placeholders_cb, self.__template_boundaries_cb, self.__deactivate_template_mode_cb, self.__rearrange_placeholders, self.__generate_navigation_dictionary, self.__update_navigation_dictionary, self.__update_mirrors, self.__update_boundaries_dictionary, self.__update_placeholders_dictionary, self.__get_current_placeholders, self.__get_cursor_placeholder, self.__replace_text, self.__extract_placeholders, self.__get_text, self.__update_mirrors) self.__editor.optimize(methods) return False def __select_placeholder(self, placeholder, end=False): if end and (len(placeholder) > 2): key = len(self.__boundaries_dictionary) emark = self.__boundaries_dictionary[key][1] iterator = self.__editor.textbuffer.get_iter_at_mark(emark) self.__editor.textbuffer.place_cursor(iterator) elif len(placeholder) > 1: mstart, mend = placeholder[:2] start = self.__editor.textbuffer.get_iter_at_mark(mstart) end = self.__editor.textbuffer.get_iter_at_mark(mend) self.__editor.textbuffer.select_range(start, end) else: iterator = self.__editor.textbuffer.get_iter_at_mark(placeholder[0]) self.__editor.textbuffer.place_cursor(iterator) self.__manager.emit("selected-placeholder", placeholder) return def __next_placeholder(self): placeholders = self.__get_current_placeholders() placeholder = placeholders.popleft() if len(placeholder) > 2: self.__update_mirrors(self.__get_text((placeholder[0], placeholder[1])), placeholder[2:]) placeholders.append(placeholder) key = len(self.__placeholder_dictionary) self.__placeholder_dictionary[key] = placeholders placeholder = placeholders[0] if placeholder: return self.__select_placeholder(placeholder) placeholder = (placeholders[-1][-1],) self.__select_placeholder(placeholder, True) self.__manager.emit("deactivate-template-mode") return def __previous_placeholder(self): placeholders = self.__get_current_placeholders() placeholder = placeholders.pop() placeholders.appendleft(placeholder) key = len(self.__placeholder_dictionary) self.__placeholder_dictionary[key] = placeholders placeholder = placeholders[0] if placeholder is None: return self.__previous_placeholder() self.__select_placeholder(placeholder) return def __update_mirrors(self, text, placeholders): if not placeholders: return if len(placeholders) < 2: return self.__replace_text(text, placeholders[0], placeholders[1]) self.__update_mirrors(text, placeholders[2:]) return def __replace_text(self, text, bmark, emark): begin = self.__editor.textbuffer.get_iter_at_mark(bmark) end = self.__editor.textbuffer.get_iter_at_mark(emark) self.__editor.textbuffer.place_cursor(begin) self.__editor.textbuffer.delete(begin, end) self.__editor.textbuffer.insert_at_cursor(text) return def __get_current_placeholders(self): key = len(self.__placeholder_dictionary) placeholders = self.__placeholder_dictionary[key] return placeholders def __get_cursor_placeholder(self, placeholders): for placeholder in placeholders: if len(placeholder) == 1: return placeholder return None def __rearrange_placeholders(self, placeholders): dictionary = self.__generate_navigation_dictionary(placeholders) placeholders = self.__extract_placeholders(dictionary) self.__manager.emit("last-placeholder", placeholders[-1]) placeholders.append(None) from collections import deque return deque(placeholders) def __extract_placeholders(self, dictionary): values = dictionary.values() values.sort() extract_placeholders = lambda x: tuple(x[1]) placeholders = [extract_placeholders(placeholder) for placeholder in values] return placeholders def __generate_navigation_dictionary(self, placeholders): dictionary = {} count = 0 for placeholder in placeholders: count += 1 dictionary = self.__update_navigation_dictionary(placeholder, dictionary, count) return dictionary def __update_navigation_dictionary(self, placeholder, dictionary, count): text = self.__get_text(placeholder) if text == "cursor": count = 9999 if dictionary.has_key(text): data = dictionary[text] count = data[0] placeholder_ = data[1] placeholder_.extend(placeholder) dictionary[text] = count, placeholder_ else: dictionary[text] = count, list(placeholder) return dictionary def __get_text(self, placeholder): if len(placeholder) < 2: return "cursor" begin = self.__editor.textbuffer.get_iter_at_mark(placeholder[0]) end = self.__editor.textbuffer.get_iter_at_mark(placeholder[1]) return self.__editor.textbuffer.get_text(begin, end) def __update_boundaries_dictionary(self, boundaries): key = len(self.__boundaries_dictionary) + 1 self.__boundaries_dictionary[key] = boundaries return False def __update_placeholders_dictionary(self, placeholders): placeholders = self.__rearrange_placeholders(placeholders) key = len(self.__placeholder_dictionary) + 1 self.__placeholder_dictionary[key] = placeholders self.__select_placeholder(placeholders[0]) return False def __remove_recent_placeholders(self): key = len(self.__placeholder_dictionary) values = self.__placeholder_dictionary[key] values.remove(None) for marks in values: for mark in marks: self.__editor.delete_mark(mark) del mark del self.__placeholder_dictionary[key] return False def __remove_recent_boundaries(self): key = len(self.__boundaries_dictionary) # marks = self.__boundaries_dictionary[key] del self.__boundaries_dictionary[key] return False def __destroy_cb(self, *args): self.__destroy() return False def __previous_placeholder_cb(self, *args): self.__editor.hide_completion_window() self.__previous_placeholder() return def __next_placeholder_cb(self, *args): self.__editor.hide_completion_window() self.__next_placeholder() return def __template_boundaries_cb(self, manager, boundaries): self.__update_boundaries_dictionary(boundaries) return def __placeholders_cb(self, manager, placeholders): self.__update_placeholders_dictionary(placeholders) return def __deactivate_template_mode_cb(self, *args): self.__editor.hide_completion_window() self.__remove_recent_placeholders() self.__remove_recent_boundaries() # self.__editor.response() return scribes-0.4~r910/GenericPlugins/Templates/TemplateInserter.py0000644000175000017500000002035311242100540024142 0ustar andreasandreasclass Inserter(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("loaded-language-templates", self.__loaded_language_templates_cb) self.__sigid3 = manager.connect("loaded-general-templates", self.__loaded_general_templates_cb) self.__sigid4 = manager.connect("expand-trigger", self.__expand_trigger_cb) self.__sigid5 = manager.connect("trigger-found", self.__trigger_found) self.__sigid6 = manager.connect("no-trigger-found", self.__no_trigger_found_cb) self.__sigid7 = manager.connect("reformat-template", self.__reformat_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__general_dictionary = {} self.__language_dictionary = {} self.__trigger = None self.__reformat = True return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) del self return def __precompile_methods(self): methods = (self.__trigger_found, self.__no_trigger_found_cb, self.__expand_trigger_cb) self.__editor.optimize(methods) return False def __insert_template(self, template): from utils import insert_string template = self.__format(template) if self.__reformat else template insert_string(self.__editor.textbuffer, template) return def __format(self, template): view = self.__editor.textview tab_width = view.get_property("tab-width") # Convert tabs to spaces template = template.expandtabs(tab_width) use_spaces = view.get_property("insert-spaces-instead-of-tabs") if use_spaces: return template # Convert spaces to tabs return self.__convert_indentation_to_tabs(template, tab_width) def __convert_indentation_to_tabs(self, template, tab_width): tab_indented_lines = [self.__spaces_to_tabs(line, tab_width) for line in template.splitlines(True)] return "".join(tab_indented_lines) def __spaces_to_tabs(self, line, tab_width): if line[0] != " ": return line indentation_width = self.__get_indentation_width(line) if indentation_width < tab_width: return line indentation = ("\t" * (indentation_width/tab_width)) + (" " * (indentation_width%tab_width)) return indentation + line[indentation_width:] def __get_indentation_width(self, line): from itertools import takewhile is_space = lambda character: character == " " return len([space for space in takewhile(is_space, line)]) def __remove_trigger(self): iterator = self.__editor.cursor from utils import remove_trailing_spaces_on_line remove_trailing_spaces_on_line(self.__editor.textview, iterator.get_line()) iterator = self.__editor.cursor temp_iter = iterator.copy() for character in xrange(len(self.__trigger)): temp_iter.backward_char() self.__editor.textbuffer.delete(iterator, temp_iter) return def __place_template_in_buffer(self): from gtk import clipboard_get, gdk self.__clipboards = {'SELECTION': clipboard_get(gdk.SELECTION_PRIMARY)} self.__clipboards['SELECTION'].request_text(self.__selection_text_received) return def __selection_text_received(self, clipboard, text, data): from gtk import clipboard_get self.__clipboards['SELECTION'].text_clip = text self.__clipboards['CLIPBOARD'] = clipboard_get() self.__clipboards['CLIPBOARD'].request_text(self.__clipboard_text_received) return def __clipboard_text_received(self, clipboard, text, data): self.__clipboards['CLIPBOARD'].text_clip = text self.__place_template_in_buffer_callback() return def __place_template_in_buffer_callback(self): self.__editor.textview.set_editable(False) self.__editor.textview.window.freeze_updates() template = self.__get_template() self.__remove_trigger() start = self.__editor.create_left_mark() end = self.__editor.create_right_mark() self.__insert_template(template) self.__editor.textview.scroll_mark_onscreen(end) self.__expand_special_placeholders(template, start, end) self.__mark_placeholders(template, start, end) self.__editor.textview.set_editable(True) self.__editor.textview.window.thaw_updates() return False def __expand_special_placeholders(self, template, mstart, end): from utils import get_special_placeholders placeholders = get_special_placeholders(template) if not placeholders: return from gtk import TEXT_SEARCH_VISIBLE_ONLY from utils import replace_special_placeholder buffer_ = self.__editor.textbuffer mark = self.__editor.create_right_mark() start = buffer_.get_iter_at_mark(mstart) for placeholder in placeholders: epos = buffer_.get_iter_at_mark(end) begin, end_ = start.forward_search(placeholder, TEXT_SEARCH_VISIBLE_ONLY, epos) buffer_.place_cursor(begin) buffer_.delete(begin, end_) nplaceholder = replace_special_placeholder(placeholder, self.__editor.uri, self.__clipboards) cursor_position = self.__editor.cursor buffer_.move_mark(mark, cursor_position) buffer_.insert_at_cursor(nplaceholder) start = buffer_.get_iter_at_mark(mark) self.__editor.delete_mark(mark) return def __mark_placeholders(self, template, mstart, mend): from utils import get_placeholders placeholders = get_placeholders(template) if not placeholders: return from gtk import TEXT_SEARCH_VISIBLE_ONLY # from utils import replace_special_placeholder buffer_ = self.__editor.textbuffer mark = self.__editor.create_right_mark() start = buffer_.get_iter_at_mark(mstart) from collections import deque placeholder_marks = deque([]) for placeholder in placeholders: self.__editor.refresh(False) epos = buffer_.get_iter_at_mark(mend) begin, end_ = start.forward_search(placeholder, TEXT_SEARCH_VISIBLE_ONLY, epos) buffer_.place_cursor(begin) nplaceholder = placeholder.strip("${}") if nplaceholder == "cursor": nplaceholder = "" buffer_.delete(begin, end_) emark = self.__editor.create_right_mark() emark.set_visible(True) pmark = (emark,) else: if not nplaceholder: nplaceholder = " " bmark = self.__editor.create_left_mark(begin) emark = self.__editor.create_right_mark(end_) pmark = bmark, emark buffer_.place_cursor(begin) buffer_.delete(begin, end_) placeholder_marks.append(pmark) cursor_position = self.__editor.cursor buffer_.move_mark(mark, cursor_position) buffer_.insert_at_cursor(nplaceholder) self.__manager.emit("tag-placeholder", pmark) start = buffer_.get_iter_at_mark(mark) self.__editor.refresh(False) self.__editor.delete_mark(mark) self.__manager.emit("activate-template-mode") self.__manager.emit("template-boundaries", (mstart, mend)) self.__manager.emit("placeholders", placeholder_marks) placeholder_marks.clear() del placeholder_marks return def __get_template(self): if self.__trigger is None: return None general = "General" + self.__trigger language = None if self.__editor.language: language = self.__editor.language + self.__trigger if language and self.__language_dictionary.has_key(language): return self.__language_dictionary[language] if self.__general_dictionary.has_key(general): return self.__general_dictionary[general] return None def __loaded_general_templates_cb(self, manager, dictionary): self.__general_dictionary.clear() self.__general_dictionary.update(dictionary) return def __loaded_language_templates_cb(self, manager, dictionary): self.__language_dictionary.clear() self.__language_dictionary.update(dictionary) return def __destroy_cb(self, *args): self.__destroy() return def __expand_trigger_cb(self, *args): self.__editor.hide_completion_window() self.__place_template_in_buffer() return def __trigger_found(self, manager, trigger): self.__trigger = trigger return False def __no_trigger_found_cb(self, *args): self.__trigger = None return False def __reformat_cb(self, manager, reformat): self.__reformat = reformat return False scribes-0.4~r910/GenericPlugins/Templates/TriggerColorer.py0000644000175000017500000000730511242100540023606 0ustar andreasandreas#FIXME: REWRITE THIS HACK. STATUS FEEDBACK IS BORKED! message = "Template trigger highlighted" class Colorer(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("trigger-found", self.__trigger_found_cb) self.__sigid3 = manager.connect("no-trigger-found", self.__no_trigger_found_cb) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__is_highlighted = False self.__highlight_tag = self.__create_highlight_tag() self.__sigid1 = self.__sigid2 = None self.__status_id = None self.__lmark = self.__editor.create_left_mark() self.__rmark = self.__editor.create_right_mark() self.__feedback_counter = 0 return def __destroy(self): self.__editor.delete_mark(self.__lmark) self.__editor.delete_mark(self.__rmark) self.__buffer.get_tag_table().remove(self.__highlight_tag) self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return def __create_highlight_tag(self): from gtk import TextTag tag = TextTag("template-trigger") self.__editor.textbuffer.get_tag_table().add(tag) tag.set_property("background", "black") tag.set_property("foreground", "orange") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag ################################################################################ # # Processing Methods # ################################################################################ def __process(self, trigger): position = self.__get_trigger_position(len(trigger)) self.__color_trigger(position) self.__mark_trigger_position(position) return False def __get_trigger_position(self, trigger_length): cursor = self.__editor.cursor begin = cursor.copy() for count in xrange(trigger_length): begin.backward_char() return begin, cursor def __mark_trigger_position(self, position): self.__buffer.move_mark(self.__lmark, position[0]) self.__buffer.move_mark(self.__rmark, position[1]) return def __color_trigger(self, position): self.__uncolor_trigger(False) self.__buffer.apply_tag(self.__highlight_tag, position[0], position[1]) self.__is_highlighted = True self.__set_message() return False def __uncolor_trigger(self, message=True): start = self.__buffer.get_iter_at_mark(self.__lmark) end = self.__buffer.get_iter_at_mark(self.__rmark) self.__buffer.remove_tag(self.__highlight_tag, start, end) self.__is_highlighted = False self.__unset_message() return False def __set_message(self): if self.__feedback_counter: return False self.__feedback_counter += 1 self.__editor.set_message(message, "info") return False def __unset_message(self): if not self.__feedback_counter: return False self.__editor.hide_message() self.__feedback_counter -= 1 self.__editor.unset_message(message, "info") return False def __remove_timer(self, timer=1): try: from gobject import source_remove timer_id = self.__tid if timer == 1 else self.__textid source_remove(timer_id) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return def __trigger_found_cb(self, manager, trigger): self.__remove_timer() from gobject import idle_add self.__tid = idle_add(self.__process, trigger) return def __no_trigger_found_cb(self, *args): if self.__is_highlighted is False: return self.__remove_timer(2) from gobject import idle_add self.__textid = idle_add(self.__uncolor_trigger) return scribes-0.4~r910/GenericPlugins/Templates/DatabaseMonitor.py0000644000175000017500000000157511242100540023734 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from os.path import join folder = join(editor.metadata_folder, "PluginPreferences") filepath = join(folder, "Templates.gdb") self.__monitor = editor.get_file_monitor(filepath) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__manager.emit("database-update") return False scribes-0.4~r910/GenericPlugins/Templates/Loader.py0000644000175000017500000000425411242100540022063 0ustar andreasandreasclass Loader(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__signal_id_1 = manager.connect("destroy", self.__destroy_cb) self.__signal_id_2 = editor.connect("loaded-file", self.__loaded_document_cb) self.__signal_id_3 = editor.connect("renamed-file", self.__loaded_document_cb) self.__signal_id_4 = manager.connect("database-update", self.__changed_cb) self.__load_templates() def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__dictionary = {} return def __get_dictionary(self): from Metadata import get_value return get_value() def __update_dictionary(self): self.__dictionary = self.__get_dictionary() return False def __load_general_templates(self): general = {} for element in self.__dictionary.keys(): if not element.startswith("General|"): continue nelement = "General" + element[len("General|"):] general[nelement] = self.__dictionary[element][1] self.__manager.emit("loaded-general-templates", general) return def __load_language_templates(self): self.__manager.emit("loaded-language-templates", {}) if self.__editor.uri is None: return language = self.__editor.language if not language: return language_id = language string = language_id + "|" language = {} for element in self.__dictionary.keys(): if not element.startswith(string): continue nelement = language_id + element[len(string):] language[nelement] = self.__dictionary[element][1] self.__manager.emit("loaded-language-templates", language) return def __load_templates(self): self.__update_dictionary() self.__load_general_templates() self.__load_language_templates() return def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__signal_id_1, manager) self.__editor.disconnect_signal(self.__signal_id_2, self.__editor) self.__editor.disconnect_signal(self.__signal_id_3, self.__editor) self.__editor.disconnect_signal(self.__signal_id_4, manager) del self self = None return def __loaded_document_cb(self, *args): self.__load_language_templates() return def __changed_cb(self, *args): self.__load_templates() return scribes-0.4~r910/GenericPlugins/Templates/TemplateIndentationDatabaseListener.py0000644000175000017500000000215411242100540027755 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) self.__update() def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__monitor = editor.get_file_monitor(self.__get_path()) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__monitor.cancel() del self self = None return False def __get_path(self): from os.path import join folder = join(self.__editor.metadata_folder, "PluginPreferences") return join(folder, "TemplateIndentation.gdb") def __update(self): from TemplateIndentationMetadata import get_value self.__manager.emit("reformat-template", get_value()) return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False from gobject import idle_add idle_add(self.__update, priority=9999) return False scribes-0.4~r910/GenericPlugins/Templates/TemplateIndentationMetadata.py0000644000175000017500000000072211242100540026262 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TemplateIndentation.gdb") def get_value(): try: value = True database = open_database(basepath, "r") value = database["indentation"] except KeyError: pass finally: database.close() return value def set_value(indentation): try: database = open_database(basepath, "w") database["indentation"] = indentation finally: database.close() return scribes-0.4~r910/GenericPlugins/Templates/PlaceholderColorer.py0000644000175000017500000001617011242100540024425 0ustar andreasandreasclass Colorer(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("tag-placeholder", self.__tag_placeholder_cb) self.__sigid3 = manager.connect("selected-placeholder", self.__selected_placeholder_cb) self.__sigid4 = manager.connect("template-boundaries", self.__template_boundaries_cb) self.__sigid5 = manager.connect("deactivate-template-mode", self.__deactivate_template_mode_cb) self.__sigid6 = editor.connect("cursor-moved", self.__cursor_moved_cb) self.__block_signal() from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__old_placeholder = None self.__current_placeholder = None self.__boundaries_dictionary = {} self.__pre_tag = self.__create_pre_modification_tag() self.__pos_tag = self.__create_post_modification_tag() self.__mod_tag = self.__create_modification_tag() self.__enable = False self.__block = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__editor) del self return def __precompile_methods(self): methods = (self.__tag, self.__tag_placeholder_cb, self.__tag_with_mod, self.__tag_with_pre, self.__tag_with_pos, self.__cursor_moved_cb, self.__check_boundary, self.__is_inside_range, self.__selected_placeholder_cb, self.__deactivate_template_mode_cb, self.__change_placeholder, self.__update_boundaries_dictionary, self.__remove_recent_boundaries, self.__remove_tags, self.__unblock_signal, self.__block_signal, self.__iter_at_marks) self.__editor.optimize(methods) return False def __unblock_signal(self): if self.__block is False: return self.__editor.handler_unblock(self.__sigid6) self.__block = False return def __block_signal(self): if self.__block: return self.__editor.handler_block(self.__sigid6) self.__block = True return def __create_pre_modification_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "yellow") tag.set_property("foreground", "blue") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag def __create_post_modification_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "white") tag.set_property("foreground", "blue") from pango import WEIGHT_HEAVY, STYLE_ITALIC tag.set_property("weight", WEIGHT_HEAVY) tag.set_property("style", STYLE_ITALIC) return tag def __create_modification_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "#ADD8E6") tag.set_property("foreground", "#CB5A30") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag def __create_special_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("foreground", "pink") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag def __change_placeholder(self, placeholder): from copy import copy self.__old_placeholder = copy(self.__current_placeholder) self.__current_placeholder = placeholder self.__remove_tag(self.__old_placeholder, self.__mod_tag) self.__remove_tag(self.__old_placeholder, self.__pre_tag) self.__tag_with_pos(self.__old_placeholder) return False def __remove_tag(self, placeholder, tag): if not placeholder: return if len(placeholder) < 2: return start, end = self.__iter_at_marks(placeholder) self.__editor.textbuffer.remove_tag(tag, start, end) return def __iter_at_marks(self, marks): if not marks: return None if len(marks) < 2: return None begin = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) return begin, end def __tag(self, placeholder, tag): start, end = self.__iter_at_marks(placeholder) self.__editor.textbuffer.apply_tag(tag, start, end) return def __tag_with_pre(self, placeholder): if len(placeholder) != 2: return False self.__tag(placeholder, self.__pre_tag) return False def __tag_with_mod(self, placeholder): if not placeholder: return False if len(placeholder) < 2: return False self.__tag(placeholder, self.__mod_tag) return False def __tag_with_pos(self, placeholder): if not placeholder: return False if len(placeholder) < 2: return False if len(placeholder) > 2: self.__tag(placeholder[:2], self.__pos_tag) self.__tag_with_pos(placeholder[2:]) else: self.__tag(placeholder, self.__pos_tag) return False def __remove_tags(self): key = len(self.__boundaries_dictionary) boundary = self.__boundaries_dictionary[key] start, end = self.__iter_at_marks(boundary) self.__editor.textbuffer.remove_tag(self.__pre_tag, start, end) self.__editor.textbuffer.remove_tag(self.__mod_tag, start, end) self.__editor.textbuffer.remove_tag(self.__pos_tag, start, end) return def __update_boundaries_dictionary(self, boundaries): key = len(self.__boundaries_dictionary) + 1 self.__boundaries_dictionary[key] = boundaries return False def __remove_recent_boundaries(self): key = len(self.__boundaries_dictionary) marks = self.__boundaries_dictionary[key] for mark in marks: self.__editor.delete_mark(mark) del mark del self.__boundaries_dictionary[key] return False def __is_inside_range(self, boundary): if boundary is None: return False if len(boundary) < 2: return False start, end = self.__iter_at_marks(boundary) if self.__editor.cursor.equal(start): return True if self.__editor.cursor.equal(end): return True if self.__editor.cursor.in_range(start, end): return True return False def __check_boundary(self): if not len(self.__boundaries_dictionary): return False boundary = self.__current_placeholder if not boundary: return False if self.__is_inside_range(boundary): self.__tag_with_mod(boundary) else: if not self.__is_inside_range(self.__old_placeholder): return False self.__tag_with_pos(self.__old_placeholder) return False def __destroy_cb(self, *args): self.__destroy() return False def __tag_placeholder_cb(self, manager, placeholder): self.__tag_with_pre(placeholder) return False def __selected_placeholder_cb(self, manager, placeholder): self.__change_placeholder(placeholder) return False def __deactivate_template_mode_cb(self, *args): self.__remove_tags() self.__remove_recent_boundaries() self.__current_placeholder = self.__old_placeholder = None if len(self.__boundaries_dictionary): return False self.__block_signal() return False def __template_boundaries_cb(self, manager, boundaries): self.__enable = True self.__update_boundaries_dictionary(boundaries) self.__unblock_signal() return False def __cursor_moved_cb(self, *args): self.__check_boundary() return False scribes-0.4~r910/GenericPlugins/Templates/Manager.py0000644000175000017500000000424611242100540022230 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT from gobject import TYPE_BOOLEAN class Manager(GObject): __gsignals__ = { "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "loaded-language-templates": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "loaded-general-templates": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "trigger-found": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "no-trigger-found": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "trigger-activated": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "template-destroyed": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "template-boundaries": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "next-placeholder": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "previous-placeholder": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "expand-trigger": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "deactivate-template-mode": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "activate-template-mode": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "destroy-template": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "last-placeholder": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "placeholders": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "tag-placeholder": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-placeholder": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "database-update": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "reformat-template": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_BOOLEAN,)), } def __init__(self, editor): GObject.__init__(self) from TriggerColorer import Colorer Colorer(editor, self) from TemplateDeactivator import Deactivator Deactivator(editor, self) from PlaceholderColorer import Colorer Colorer(editor, self) from PlaceholderNavigator import Navigator Navigator(editor, self) from TriggerMonitor import Monitor Monitor(editor, self) from TemplateInserter import Inserter Inserter(editor, self) from Loader import Loader Loader(editor, self) from DatabaseMonitor import Monitor Monitor(self, editor) from TemplateIndentationDatabaseListener import Listener Listener(self, editor) def __destroy(self): self.emit("destroy") del self self = None return def destroy(self): self.__destroy() return scribes-0.4~r910/GenericPlugins/Templates/utils.py0000644000175000017500000001353711242100540022021 0ustar andreasandreas# Match any strings enclosed in ${} with the exception of ${}. from re import UNICODE, compile as compile_ placeholder_pattern = compile_("\$\{[^${}]*\}", UNICODE) #special_placeholders = ("${time}", "${timestring}", "${timestamp}", # "${date}", "${day}", "${month}", "${year}", # "${author}", "${rfc2822}") # Generated by [skqr] special_placeholders = ( "${time}", "${timestring}", "${timestamp}", "${date}", "${day}", "${month}", "${year}", "${author}", "${rfc2822}", "${fileuri}", "${filepath}", "${filename}", "${clipboard}", "${selection}" ) # Generated by [skqr] clipboard_text = None #def replace_special_placeholder(placeholder): def replace_special_placeholder(placeholder, uri="", clipboards=None): from time import localtime if placeholder == "${day}": thetime = localtime() return pad_zero(thetime[2]) if placeholder == "${month}": thetime = localtime() return pad_zero(thetime[1]) if placeholder == "${year}": thetime = localtime() return pad_zero(thetime[0]) if placeholder == "${date}": thetime = localtime() return "%s:%s:%s" % (pad_zero(thetime[0]), pad_zero(thetime[1]), pad_zero(thetime[2])) if placeholder == "${time}": thetime = localtime() return "%s:%s:%s" % (pad_zero(thetime[3]), pad_zero(thetime[4]), pad_zero(thetime[5])) if placeholder == "${timestring}": from time import ctime return ctime() # utils.py if placeholder == "${timestamp}": thetime = localtime() return "[%s-%s-%s] %s:%s:%s" % (thetime[0], pad_zero(thetime[1]), pad_zero(thetime[2]), pad_zero(thetime[3]), pad_zero(thetime[4]), pad_zero(thetime[5])) if placeholder == "${rfc2822}": from email.utils import formatdate return formatdate(localtime=1) if placeholder == "${author}": return get_author_name() if placeholder == "${fileuri}": return uri if uri else '' from gio import File if placeholder == "${filepath}": return File(uri).get_path() if uri else '' if placeholder == "${filename}": return File(uri).get_basename() if uri else "" if placeholder == "${clipboard}": return clipboards['CLIPBOARD'].text_clip if clipboards and clipboards['CLIPBOARD'] and clipboards['CLIPBOARD'].text_clip else '' if placeholder == "${selection}": return clipboards['SELECTION'].text_clip if clipboards and clipboards['SELECTION'] and clipboards['SELECTION'].text_clip else '' def remove_trailing_spaces_on_line(sourceview, line_number): sourcebuffer = sourceview.get_property("buffer") begin_position = sourcebuffer.get_iter_at_line(line_number) transition_position = begin_position.copy() end_position = begin_position.copy() end_position.forward_to_line_end() transition_position.forward_to_line_end() if transition_position.equal(begin_position): return while True: transition_position.backward_char() if transition_position.get_char() in (" ", "\t"): continue transition_position.forward_char() break if transition_position.equal(end_position): return sourcebuffer.delete(transition_position, end_position) return def word_to_cursor(textbuffer, iterator): if iterator.starts_line(): return None iterator.backward_char() if iterator.get_char() in (" ", "\t", "\n", "\r", "\r\n"): return None iterator.forward_char() from SCRIBES.Utils import backward_to_line_begin start = backward_to_line_begin(iterator.copy()) text = textbuffer.get_text(start, iterator) words = text.split()[-1].split("`") text = "`" + words[-1] if len(words) > 1 else words[-1] return text def get_placeholders(string): if not has_placeholders(string): return [] is_not_special = lambda placeholder: not (placeholder in special_placeholders) # Return all strings enclosed in ${} with the exception of ${}. from re import findall placeholders = findall(placeholder_pattern, string) return filter(is_not_special, placeholders) def has_placeholders(string): from re import search # Match any strings enclosed in ${} with the exception of ${}. if search(placeholder_pattern, string): return True return False def get_special_placeholders(string): from re import findall placeholders = findall(placeholder_pattern, string) has_special_placeholder = lambda placeholder: placeholder in special_placeholders return filter(has_special_placeholder, placeholders) def get_beginning_spaces(textbuffer): iterator = textbuffer.get_iter_at_mark(textbuffer.get_insert()) from SCRIBES.Utils import backward_to_line_begin, forward_to_line_end begin_position, end_position = backward_to_line_begin(iterator.copy()), forward_to_line_end(iterator.copy()) if begin_position.get_char() in ["\n", "\x00"]: return None spaces = [] transition_position = begin_position.copy() while transition_position.get_char() in [" ", "\t"]: spaces.append(transition_position.get_char()) transition_position.forward_char() return spaces def insert_string(textbuffer, string): spaces = get_beginning_spaces(textbuffer) if spaces: string = __indent_string(string, "".join(spaces)) textbuffer.insert_at_cursor(string) return def __indent_string(string, indentation): lines = string.split("\n") if len(lines) == 1: return string indent = lambda line: indentation + line indented_lines = [indent(line) for line in lines[1:]] indented_lines.insert(0, lines[0]) return "\n".join(indented_lines) def pad_zero(num): if num < 10: return "0" + str(num) return str(num) def get_author_name(): import pwd,posix user = pwd.getpwuid(posix.getuid()) name = user[4].split(',')[0] if name is None or name == '': name = user[0] return name def get_template_word(iterator, buffer_): if iterator.starts_line(): return None chars = (" ", "\t", "(", "{", "<", "[", "=", ")", "}", ">", "]", "|") begin = iterator.copy() while True: if begin.starts_line(): return buffer_.get_text(begin, iterator) success = begin.backward_char() if success is False: return buffer_.get_text(begin, iterator) if not (begin.get_char() in chars): continue begin.forward_char() break return buffer_.get_text(begin, iterator) scribes-0.4~r910/GenericPlugins/Templates/TemplateDeactivator.py0000644000175000017500000001323111242100540024611 0ustar andreasandreasclass Deactivator(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("template-boundaries", self.__template_boundaries_cb) self.__sigid3 = manager.connect("deactivate-template-mode", self.__deactivate_template_mode_cb) self.__sigid4 = editor.connect("cursor-moved", self.__cursor_moved_cb) self.__sigid5 = manager.connect("last-placeholder", self.__last_placeholder_cb) self.__sigid6 = editor.textbuffer.connect("insert-text", self.__insert_text_cb) self.__block_signal() from gobject import idle_add idle_add(self.__precompile_methods, priority=5000) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__boundaries_dictionary = {} self.__placeholder_dictionary = {} self.__enable = False self.__block = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__editor.textbuffer) del self self = None return def __precompile_methods(self): methods = (self.__cursor_moved_cb, self.__insert_text_cb, self.__is_within_range, self.__is_inside_range, self.__check_boundary, self.__check_placeholder_boundary, self.__deactivate_template_mode_cb, self.__block_signal, self.__unblock_signal) self.__editor.optimize(methods) return False def __iter_at_marks(self, marks): start = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) return start, end def __is_within_range(self, boundary): start, end = self.__iter_at_marks(boundary) if self.__editor.cursor.compare(start) == -1: return False if self.__editor.cursor.compare(end) == 1: return False return True def __is_inside_range(self, boundary): if len(boundary) == 2: start, end = self.__iter_at_marks(boundary) if self.__editor.cursor.in_range(start, end): return True if self.__editor.cursor.equal(start): return True if self.__editor.cursor.equal(end): return True else: start = self.__editor.textbuffer.get_iter_at_mark(boundary[0]) if self.__editor.cursor.equal(start): return True return False def __check_boundary(self): if not len(self.__boundaries_dictionary): return False boundary = self.__get_current_boundary() if not boundary: return False if self.__is_within_range(boundary): return False self.__manager.emit("deactivate-template-mode") return False def __check_placeholder_boundary(self): if not len(self.__placeholder_dictionary): return False boundary = self.__get_placeholder_boundary() if not boundary: return False if len(boundary) > 2: return False if not self.__is_inside_range(boundary): return False self.__manager.emit("deactivate-template-mode") return False def __get_current_boundary(self): key = len(self.__boundaries_dictionary) boundary = self.__boundaries_dictionary[key] return boundary def __get_placeholder_boundary(self): key = len(self.__placeholder_dictionary) boundary = self.__placeholder_dictionary[key] return boundary def __remove_recent_boundary(self): boundary = self.__get_current_boundary() key = len(self.__boundaries_dictionary) del self.__boundaries_dictionary[key] return False def __remove_placeholder_boundary(self): boundary = self.__get_placeholder_boundary() key = len(self.__placeholder_dictionary) del self.__placeholder_dictionary[key] return False def __update_boundaries_dictionary(self, boundary): key = len(self.__boundaries_dictionary) + 1 self.__boundaries_dictionary[key] = boundary return False def __update_placeholder_dictionary(self, boundary): key = len(self.__placeholder_dictionary) + 1 self.__placeholder_dictionary[key] = boundary return False def __block_signal(self): if self.__block: return self.__editor.handler_block(self.__sigid4) self.__editor.textbuffer.handler_block(self.__sigid6) self.__block = True return def __unblock_signal(self): if self.__block is False: return self.__editor.handler_unblock(self.__sigid4) self.__editor.textbuffer.handler_unblock(self.__sigid6) self.__block = False return def __destroy_cb(self, *args): self.__destroy() return False def __template_boundaries_cb(self, manager, boundary): self.__update_boundaries_dictionary(boundary) self.__enable = True self.__unblock_signal() return False def __last_placeholder_cb(self, manager, boundary): self.__update_placeholder_dictionary(boundary) return False def __deactivate_template_mode_cb(self, *args): self.__remove_recent_boundary() self.__remove_placeholder_boundary() self.__check_boundary() if len(self.__boundaries_dictionary): return False self.__block_signal() return False def __cursor_moved_cb(self, *args): if self.__enable is False: return False # try: # from gobject import idle_add, source_remove # source_remove(self.__cursorid) # except AttributeError: # pass # self.__cursorid = idle_add(self.__check_boundary, priority=9999) self.__check_boundary() return False def __insert_text_cb(self, *args): if self.__enable is False: return False # try: # from gobject import idle_add, source_remove # source_remove(self.__insertid) # except AttributeError: # pass # self.__insertid = idle_add(self.__check_placeholder_boundary, priority=9999) self.__check_placeholder_boundary() return False scribes-0.4~r910/GenericPlugins/PluginDrawWhitespace.py0000644000175000017500000000102411242100540023000 0ustar andreasandreasname = "Draw White Spaces" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "WhitespacePlugin" short_description = "Show the about dialog." long_description = """This plug-in shows the about dialog.""" class WhitespacePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from DrawWhitespace.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/LastSessionLoader/0000755000175000017500000000000011242100540021736 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/LastSessionLoader/__init__.py0000644000175000017500000000000011242100540024035 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/LastSessionLoader/Trigger.py0000644000175000017500000000226111242100540023714 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "load-last-session", "q", _("Load last session"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__editor.load_last_session() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/AutoReplace/0000755000175000017500000000000011242100540020544 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/AutoReplace/Metadata.py0000644000175000017500000000064111242100540022637 0ustar andreasandreasfrom SCRIBES.Utils import open_database basepath = "abbreviations.gdb" def get_value(): try: dictionary = {} database = open_database(basepath, "r") dictionary = database["dictionary"] except KeyError: pass finally: database.close() return dictionary def set_value(dictionary): try: database = open_database(basepath, "w") database["dictionary"] = dictionary finally: database.close() return scribes-0.4~r910/GenericPlugins/AutoReplace/__init__.py0000644000175000017500000000000011242100540022643 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/AutoReplace/DatabaseMonitor.py0000644000175000017500000000172211242100540024174 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from os.path import join path_ = join(editor.metadata_folder, "abbreviations.gdb") from gio import File, FILE_MONITOR_NONE self.__monitor = File(path_).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __update(self, *args): self.__manager.emit("database-update") return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False self.__update() return False scribes-0.4~r910/GenericPlugins/AutoReplace/BufferMonitor.py0000644000175000017500000000346011242100540023702 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = editor.connect("cursor-moved", self.__insert_cb) self.__sigid3 = manager.connect("dictionary", self.__dictionary_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__list = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor.textbuffer) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __get_word(self): if not (self.__editor.cursor.get_char() in (" ", "\t", "\n", "\x00")): return None start = self.__editor.backward_to_line_begin() text = self.__editor.textbuffer.get_text(start, self.__editor.cursor) if not text: return None if text[-1] in (" ", "\t"): return None return text.split()[-1] def __check(self): try: found = lambda word: self.__manager.emit("match-found", word) nofound = lambda: self.__manager.emit("no-match-found") word = self.__get_word() if word is None: raise ValueError found(word) if word in self.__list else nofound() except ValueError: nofound() return False def __precompile_methods(self): methods = (self.__insert_cb, self.__check, self.__get_word) self.__editor.optimize(methods) return False def __destroy_cb(self, *args): self.__destroy() return False def __insert_cb(self, *args): self.__check() return False def __dictionary_cb(self, manager, dictionary): self.__list = dictionary.keys() return False scribes-0.4~r910/GenericPlugins/AutoReplace/Monitor.py0000644000175000017500000000465511242100540022557 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT class AutoReplaceMonitor(GObject): __gsignals__ = { "abbreviation-found": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, manager, editor): GObject.__init__(self) self.__init_attributes(manager, editor) self.__signal_id_1 = self.__manager.connect("abbreviations-updated", self.__manager_abbreviations_updated_cb) self.__signal_id_2 = self.__manager.connect("destroy", self.__monitor_destroy_cb) self.__signal_id_3 = self.__editor.textview.connect("key-press-event", self.__monitor_key_press_event_cb) if self.__can_monitor is False: self.__editor.textview.handle_block(self.__signal_id_3) def __init_attributes(self, manager, editor): # Reference to the AutoReplaceManager. self.__manager = manager # Reference to the editor. self.__editor = editor # A list of strings (abbreviations) to monitor. self.__abbreviation_list = [] # Identifier for the "abbreviations-updated" signal. self.__signal_id_1 = None # Identifier for the "destroy" signal. self.__signal_id_2 = None # Identifier for the "key-press-event" signal. self.__signal_id_3 = None self.__can_monitor = True return ######################################################################## # # Event and Signal Handlers # ######################################################################## def __manager_abbreviations_updated_cb(self, manager, abbreviation_dictionary): self.__abbreviation_list = abbreviation_dictionary.keys() return def __monitor_destroy_cb(self, manager): self.__editor.disconnect_signal(self.__signal_id_1, self.__manager) self.__editor.disconnect_signal(self.__signal_id_2, self.__manager) self.__editor.disconnect_signal(self.__signal_id_3, self.__editor.textview) del self self = None return def __monitor_key_press_event_cb(self, textview, event): from gtk import keysyms if event.keyval in [keysyms.Return, keysyms.space]: if self.__found_abreviation(event.keyval): return True return False def __found_abreviation(self, keyval): self.__editor.block_response() word = self.__editor.word_to_cursor() self.__editor.unblock_response() if word is None: return False if word in self.__abbreviation_list: from gtk import keysyms if keyval == keysyms.space: self.emit("abbreviation-found", word + " ") else: self.emit("abbreviation-found", word + "\n") return True return False scribes-0.4~r910/GenericPlugins/AutoReplace/Trigger.py0000644000175000017500000000153211242100540022522 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__show_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(editor) from MenuItem import MenuItem self.__menuitem = MenuItem(editor) self.__trigger = self.create_trigger("show-autoreplace-dialog") return def __show_cb(self, *args): self.__manager.show() return def destroy(self): self.disconnect() self.remove_triggers() self.__menuitem.destroy() self.__manager.destroy() del self return scribes-0.4~r910/GenericPlugins/AutoReplace/MenuItem.py0000644000175000017500000000147311242100540022646 0ustar andreasandreasfrom gettext import gettext as _ message = _("Autoreplace Editor") class MenuItem(object): def __init__(self, editor): self.__init_attributes(editor) self.__menuitem.props.name = "Autoreplace Editor MenuItem" self.__sigid1 = self.__menuitem.connect("activate", self.__activate_cb, editor) editor.add_to_pref_menu(self.__menuitem) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_PROPERTIES self.__menuitem = editor.create_menuitem(message, STOCK_PROPERTIES) return def destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem) self.__editor.remove_from_pref_menu(self.__menuitem) self.__menuitem.destroy() del self self = None return def __activate_cb(self, menuitem, editor): editor.trigger("show-autoreplace-dialog") return False scribes-0.4~r910/GenericPlugins/AutoReplace/Manager.py0000644000175000017500000000363611242100540022500 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_STRING from gobject import SIGNAL_NO_RECURSE, SIGNAL_ACTION, TYPE_PYOBJECT from gobject import TYPE_BOOLEAN SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "match-found": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "no-match-found": (SCRIBES_SIGNAL, TYPE_NONE, ()), "dictionary": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update-dictionary": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "database-update": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "edit-row": (SCRIBES_SIGNAL, TYPE_NONE, ()), "add-row": (SCRIBES_SIGNAL, TYPE_NONE, ()), "delete-row": (SCRIBES_SIGNAL, TYPE_NONE, ()), "sensitive": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "add-button-sensitivity": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "error": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from TextInserter import Inserter Inserter(self, editor) from TextColorer import Colorer Colorer(self, editor) from BufferMonitor import Monitor Monitor(self, editor) from DictionaryManager import Manager Manager(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join self.__glade = editor.get_glade_object(globals(), join("GUI", "Window.glade"), "Window") return def __destroy(self): self.emit("destroy") del self self = None return False gui = property(lambda self: self.__glade) def show(self): self.emit("show-window") return False def destroy(self): self.__destroy() return False scribes-0.4~r910/GenericPlugins/AutoReplace/TextColorer.py0000644000175000017500000000447311242100540023400 0ustar andreasandreasfrom gettext import gettext as _ message = _("Abbreviation highlighted") class Colorer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("match-found", self.__found_cb) self.__sigid3 = manager.connect("no-match-found", self.__nofound_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tag = self.__create_tag() self.__is_colored = False self.__message_flag = False return def __set_message(self): self.__editor.set_message(message) self.__message_flag = True return False def __unset_message(self): if self.__message_flag is False: return False self.__editor.unset_message(message) self.__message_flag = False return False def __destroy(self): self.__uncolor() self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __precompile_methods(self): methods = (self.__found_cb, self.__nofound_cb, self.__color, self.__uncolor) self.__editor.optimize(methods) return False def __create_tag(self): tag = self.__editor.textbuffer.create_tag() tag.set_property("background", "black") tag.set_property("foreground", "green") from pango import WEIGHT_HEAVY tag.set_property("weight", WEIGHT_HEAVY) return tag def __color(self, word): self.__uncolor() start = self.__editor.cursor.copy() for value in xrange(len(word)): start.backward_char() self.__editor.textbuffer.apply_tag(self.__tag, start, self.__editor.cursor) self.__is_colored = True return False def __uncolor(self): if self.__is_colored is False: return False begin, end = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__tag, begin, end) self.__is_colored = False return False def __destroy_cb(self, *args): self.__destroy() return False def __found_cb(self, manager, word): self.__color(word) self.__set_message() return False def __nofound_cb(self, *args): self.__uncolor() self.__unset_message() return False scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/0000755000175000017500000000000011242100540021170 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/AutoReplace/GUI/__init__.py0000644000175000017500000000000011242100540023267 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/AutoReplace/GUI/Exceptions.py0000644000175000017500000000024211242100540023661 0ustar andreasandreasclass DeleteError(Exception): pass class NoSelectionFoundError(Exception): pass class DoNothingError(Exception): pass class EmptyKeyError(Exception): pass scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/ErrorLabel.py0000644000175000017500000000233311242100540023574 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("error", self.__error_cb) self.__label.hide() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_widget("ErrorLabel") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __show_error(self, error): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__show(error) self.__timer = timeout_add(10000, self.__hide, priority=9999) return False def __show(self, error): message = "%s" % error self.__label.set_label(message) self.__label.show() return False def __hide(self): self.__label.hide() return False def __destroy_cb(self, *args): self.__destroy() return False def __error_cb(self, manager, error): self.__show_error(error) return False scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/AddButton.py0000644000175000017500000000207611242100540023433 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__sigid3 = self.__manager.connect("add-button-sensitivity", self.__sensitive_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("AddButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__button.destroy() del self self = None return False def __destroy_cb(self, manager): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("add-row") return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/Manager.py0000644000175000017500000000062711242100540023121 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from EditButton import Button Button(manager, editor) from RemoveButton import Button Button(manager, editor) from TreeView import TreeView TreeView(manager, editor) from AddButton import Button Button(manager, editor) from ErrorLabel import Label Label(manager, editor) scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/RemoveButton.py0000644000175000017500000000242611242100540024177 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("add-button-sensitivity", self.__add_sensitivity_cb) self.__sigid3 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid4 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_widget("RemoveButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__button) self.__button.destroy() del self self = None return def __clicked_cb(self, *args): self.__manager.emit("delete-row") return False def __destroy_cb(self, *args): self.__destroy() return def __add_sensitivity_cb(self, manager, sensitive): if sensitive is False: self.__button.set_property("sensitive", False) return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/TreeView.py0000644000175000017500000002470411242100540023303 0ustar andreasandreasclass TreeView(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("dictionary", self.__dictionary_cb) self.__sigid3 = self.__abvrenderer.connect("edited", self.__abvedited_cb) self.__sigid4 = self.__rplrenderer.connect("edited", self.__rpledited_cb) self.__sigid5 = self.__model.connect("row-changed", self.__row_changed_cb) self.__sigid6 = manager.connect("show-window", self.__show_cb) self.__sigid7 = manager.connect("hide-window", self.__hide_cb) self.__sigid8 = self.__treeview.connect("key-press-event", self.__event_cb) self.__sigid9 = manager.connect("add-row", self.__add_row_cb) self.__sigid10 = manager.connect("edit-row", self.__edit_row_cb) self.__sigid11 = manager.connect("delete-row", self.__delete_row_cb) self.__sigid12 = self.__treeview.connect("button-press-event", self.__button_press_event_cb) self.__sigid13 = self.__abvrenderer.connect("editing-started", self.__editing_started_cb) self.__sigid14 = self.__rplrenderer.connect("editing-started", self.__editing_started_cb) self.__sigid15 = self.__abvrenderer.connect("editing-canceled", self.__editing_canceled_cb) self.__block_row_changed_signal() def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__model = self.__create_model() self.__treeview = manager.gui.get_widget("TreeView") self.__abvrenderer = self.__create_renderer() self.__rplrenderer = self.__create_renderer() self.__abvcolumn = self.__create_abbreviation_column() self.__rplcolumn = self.__create_replacement_column() self.__update = True return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__abvrenderer) self.__editor.disconnect_signal(self.__sigid4, self.__rplrenderer) self.__editor.disconnect_signal(self.__sigid5, self.__model) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__treeview) self.__editor.disconnect_signal(self.__sigid9, self.__manager) self.__editor.disconnect_signal(self.__sigid10, self.__manager) self.__editor.disconnect_signal(self.__sigid11, self.__manager) self.__editor.disconnect_signal(self.__sigid12, self.__treeview) self.__editor.disconnect_signal(self.__sigid13, self.__abvrenderer) self.__editor.disconnect_signal(self.__sigid14, self.__rplrenderer) self.__editor.disconnect_signal(self.__sigid15, self.__abvrenderer) self.__treeview.destroy() del self self = None return def __get_string(self, path, column): iterator = self.__model.get_iter(path) return self.__model.get_value(iterator, column) def __exists(self, text): for row in self.__model: if text == self.__model.get_value(row.iter, 0): return True return False def __validate(self, text): message = None from gettext import gettext as _ if (" " in text) or ("\t" in text): message = _("Error: Abbreviation must not contain whitespace") if self.__exists(text): message = _("Error: '%s' already exists") % text if message is None: return False self.__manager.emit("error", message) raise ValueError return False def __block_row_changed_signal(self): self.__model.handler_block(self.__sigid5) return False def __unblock_row_changed_signal(self): self.__model.handler_unblock(self.__sigid5) return False def __process_abvrenderer(self, path, text): try: from Exceptions import DeleteError, DoNothingError if not text: raise DeleteError string = self.__get_string(path, 0) if string == text: raise DoNothingError self.__validate(text) self.__model[path][0] = text self.__edit(path, 1) except ValueError: self.__edit(path, 0) except DeleteError: self.__delete() except DoNothingError: self.__manager.emit("add-button-sensitivity", True) self.__check_sensitivity() return False def __process_rplrenderer(self, path, text): self.__model[path][1] = text return False def __process_row(self, path, iterator): try: model = self.__model get_value = lambda column: model.get_value(iterator, column) key, value = get_value(0), get_value(1) from Exceptions import EmptyKeyError if not key: raise EmptyKeyError self.__manager.emit("update-dictionary", (key, value, True)) self.__update = False except EmptyKeyError: self.__delete(path) finally: self.__manager.emit("add-button-sensitivity", True) self.__check_sensitivity() return False def __select_row_at_mouse(self, event): try: x, y = self.__treeview.widget_to_tree_coords(int(event.x), int(event.y)) path = self.__treeview.get_path_at_pos(x, y)[0] selection = self.__treeview.get_selection() selection.select_iter(self.__model.get_iter(path)) self.__treeview.set_cursor(path, self.__abvcolumn) self.__treeview.grab_focus() except TypeError: pass return False def __get_path(self): try: selection = self.__treeview.get_selection() model, iterator = selection.get_selected() except TypeError: raise ValueError return model.get_path(iterator) def __add(self): self.__manager.emit("add-button-sensitivity", False) self.__sensitive(True) iterator = self.__model.append() path = self.__model.get_path(iterator) self.__edit(path, 0) return False def __edit(self, path=None, column=0): try: self.__manager.emit("add-button-sensitivity", False) path = path if path else self.__get_path() column = self.__treeview.get_column(column) self.__treeview.set_cursor(path, column, start_editing=True) except ValueError: print "No selection found" return False def __get_last_iterator(self): if not len(self.__model): raise ValueError return self.__model[-1].iter def __get_selected_iterator(self): try: selection = self.__treeview.get_selection() model, iterator = selection.get_selected() except TypeError: iterator = None return iterator def __delete(self, path=None): try: from Exceptions import NoSelectionFoundError model = self.__model iterator = model.get_iter(path) if path else self.__get_selected_iterator() if not iterator: raise NoSelectionFoundError key = model.get_value(iterator, 0) value = model.get_value(iterator, 1) is_valid = model.remove(iterator) if key: self.__update = False if key: self.__manager.emit("update-dictionary", (key, value, False)) if is_valid is False: iterator = self.__get_last_iterator() self.__treeview.get_selection().select_iter(iterator) path = self.__model.get_path(iterator) self.__treeview.set_cursor(path, self.__abvcolumn) self.__treeview.grab_focus() except NoSelectionFoundError: from gettext import gettext as _ print _("No selection found") except ValueError: self.__check_sensitivity() finally: self.__manager.emit("add-button-sensitivity", True) return False def __check_sensitivity(self): sensitive = True if len(self.__model) else False self.__sensitive(sensitive) if sensitive: self.__treeview.grab_focus() return False def __sensitive(self, sensitive=True): self.__treeview.set_property("sensitive", sensitive) self.__manager.emit("sensitive", sensitive) return False def __set_properties(self): self.__treeview.set_property("model", self.__model) self.__treeview.append_column(self.__abvcolumn) self.__treeview.append_column(self.__rplcolumn) return def __populate_model(self, dictionary): self.__sensitive(False) self.__treeview.set_model(None) self.__model.clear() for abbreviation, text in dictionary.items(): self.__model.append([abbreviation, text]) self.__treeview.set_model(self.__model) if len(self.__model): self.__editor.select_row(self.__treeview) self.__check_sensitivity() return def __create_model(self): from gtk import ListStore model = ListStore(str, str) return model def __create_renderer(self): from gtk import CellRendererText renderer = CellRendererText() renderer.set_property("editable", True) return renderer def __create_abbreviation_column(self): from gtk import TreeViewColumn, TREE_VIEW_COLUMN_GROW_ONLY from gtk import SORT_ASCENDING from gettext import gettext as _ column = TreeViewColumn(_("Abbreviation"), self.__abvrenderer, text=0) column.set_property("expand", False) column.set_property("sizing", TREE_VIEW_COLUMN_GROW_ONLY) column.set_property("clickable", True) column.set_sort_column_id(0) column.set_property("sort-indicator", True) column.set_property("sort-order", SORT_ASCENDING) return column def __create_replacement_column(self): from gtk import TreeViewColumn, TREE_VIEW_COLUMN_GROW_ONLY from gtk import SORT_ASCENDING from gettext import gettext as _ message = _("Expanded Text") column = TreeViewColumn(message, self.__rplrenderer, text=1) column.set_property("expand", True) column.set_property("sizing", TREE_VIEW_COLUMN_GROW_ONLY) return column def __destroy_cb(self, *args): self.__destroy() return False def __dictionary_cb(self, manager, dictionary): if self.__update: self.__populate_model(dictionary) self.__update = True return False def __abvedited_cb(self, renderer, path, text, *args): self.__process_abvrenderer(path, text) return False def __rpledited_cb(self, renderer, path, text, *args): self.__process_rplrenderer(path, text) return False def __row_changed_cb(self, model, path, iterator, *args): self.__process_row(path, iterator) return False def __show_cb(self, *args): self.__unblock_row_changed_signal() self.__treeview.grab_focus() return False def __hide_cb(self, *args): self.__block_row_changed_signal() self.__treeview.grab_focus() return False def __event_cb(self, treeview, event): from gtk import keysyms if event.keyval != keysyms.Delete: return False self.__delete() return True def __edit_row_cb(self, *args): self.__edit() return False def __add_row_cb(self, *args): self.__add() return False def __delete_row_cb(self, *args): self.__delete() return False def __button_press_event_cb(self, treeview, event, *args): self.__select_row_at_mouse(event) return True def __editing_started_cb(self, *args): self.__manager.emit("add-button-sensitivity", False) return False def __editing_canceled_cb(self, *args): self.__process_row(self.__get_path(), self.__get_selected_iterator()) return False scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/Window.glade0000644000175000017500000001325611242100540023444 0ustar andreasandreas False 10 Automatic Replacement True center-on-parent 480 320 True scribes dialog True True True True 10 True 5 True False automatic automatic in True False False True False 0 False True 0 True 0 True True True False False 1 0 True 10 gtk-add True False False False True False False 0 gtk-edit True False False False True False False 1 gtk-remove True False False False True False False 2 False False 1 scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/Window.py0000644000175000017500000000361211242100540023013 0ustar andreasandreasfrom gettext import gettext as _ message = _("Add, editor or remove abbreviations") class Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-window", self.__show_cb) self.__sigid3 = manager.connect("hide-window", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__editor.busy() self.__window.show_all() self.__editor.set_message(message) return def __hide(self): self.__editor.busy(False) self.__window.hide() self.__editor.unset_message(message) return def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, manager) self.__editor.disconnect_signal(self.__sigid2, manager) self.__editor.disconnect_signal(self.__sigid3, manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() self = None del self return def __show_cb(self, *args): self.__show() return def __hide_cb(self, *args): self.__hide() return def __delete_event_cb(self, *args): self.__manager.emit("hide-window") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval == keysyms.Tab: return True if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-window") return True scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/i18n.py0000644000175000017500000000044411242100540022323 0ustar andreasandreasfrom gettext import gettext as _ msg0001 = _("Auto Replace Editor") msg0002 = _("_Abbreviations") msg0003 = _("_Replacements") msg0004 = _("Error: '%s' is already in use. Please use another abbreviation.") msg0005 = _("Automatic Replacement") msg0006 = _("Modify words for auto-replacement") scribes-0.4~r910/GenericPlugins/AutoReplace/GUI/EditButton.py0000644000175000017500000000242211242100540023623 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("add-button-sensitivity", self.__add_sensitivity_cb) self.__sigid3 = manager.connect("sensitive", self.__sensitive_cb) self.__sigid4 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_widget("EditButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__button) self.__button.destroy() del self self = None return def __clicked_cb(self, *args): self.__manager.emit("edit-row") return False def __destroy_cb(self, *args): self.__destroy() return def __add_sensitivity_cb(self, manager, sensitive): if sensitive is False: self.__button.set_property("sensitive", False) return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False scribes-0.4~r910/GenericPlugins/AutoReplace/Expander.py0000644000175000017500000000421711242100540022670 0ustar andreasandreasclass AutoReplaceExpander(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__signal_id_1 = self.__manager.connect("abbreviations-updated", self.__expander_abbreviations_updated_cb) self.__signal_id_2 = self.__manager.connect("destroy", self.__expander_destroy_cb) self.__signal_id_3 = self.__manager.connect("abbreviation-found", self.__expander_abbreviation_found_cb) def __init_attributes(self, manager, editor): # Reference to the AutoReplaceManager. self.__manager = manager # Reference to the editor. self.__editor = editor # A dictionary of abbreviations. self.__abbreviation_dictionary = {} # Identifier for the "abbreviations-updated" signal. self.__signal_id_1 = None # Identifier for the "destroy" signal. self.__signal_id_2 = None self.__signal_id_3 = None return ######################################################################## # # Event and Signal Handlers # ######################################################################## def __expander_abbreviations_updated_cb(self, manager, abbreviation_dictionary): self.__abbreviation_dictionary = abbreviation_dictionary return def __expander_destroy_cb(self, manager): self.__abbreviation_dictionary.clear() self.__editor.disconnect_signal(self.__signal_id_1, self.__manager) self.__editor.disconnect_signal(self.__signal_id_2, self.__manager) self.__editor.disconnect_signal(self.__signal_id_3, self.__manager) del self self = None return def __expander_abbreviation_found_cb(self, manager, abbreviation): try: expanded_word = self.__abbreviation_dictionary[abbreviation[:-1]] except KeyError: return delimeter_character = abbreviation[-1] iterator = self.__editor.get_cursor_iterator() tmp_iterator = iterator.copy() for value in range(len(abbreviation[:-1])): tmp_iterator.backward_char() self.__editor.textbuffer.delete(tmp_iterator, iterator) self.__editor.textbuffer.insert_at_cursor(expanded_word + delimeter_character) from i18n import msg0001 message = msg0001 % (abbreviation[:-1], expanded_word) self.__editor.feedback.update_status_message(message, "succeed") return scribes-0.4~r910/GenericPlugins/AutoReplace/DictionaryManager.py0000644000175000017500000000262011242100540024516 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("database-update", self.__dupdate_cb) self.__sigid3 = manager.connect("update-dictionary", self.__dicupdate_cb) self.__update() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __add(self, key, value): from Metadata import set_value, get_value dictionary = get_value() dictionary[key] = value set_value(dictionary) return False def __remove(self, key): from Metadata import set_value, get_value dictionary = get_value() del dictionary[key] set_value(dictionary) return False def __update(self): from Metadata import get_value self.__manager.emit("dictionary", get_value()) return False def __destroy_cb(self, *args): self.__destroy() return False def __dupdate_cb(self, *args): self.__update() return False def __dicupdate_cb(self, manager, data): key, value, add = data self.__add(key, value) if add else self.__remove(key) return False scribes-0.4~r910/GenericPlugins/AutoReplace/i18n.py0000644000175000017500000000011011242100540021665 0ustar andreasandreasfrom gettext import gettext as _ msg0001 = _("Replaced '%s' with '%s'") scribes-0.4~r910/GenericPlugins/AutoReplace/TextInserter.py0000644000175000017500000000544211242100540023563 0ustar andreasandreasfrom gettext import gettext as _ message = _("Expanded abbreviation") class Inserter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("dictionary", self.__dictionary_cb) self.__sigid3 = manager.connect("match-found", self.__found_cb) self.__sigid4 = manager.connect("no-match-found", self.__nofound_cb) self.__sigid5 = editor.textview.connect("key-press-event", self.__event_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__dictionary = {} self.__word = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__editor.textview) del self self = None return def __insert(self, delimeter): if delimeter == "\n": indentation = self.__indent() end = self.__editor.cursor.copy() start = self.__editor.cursor.copy() for item in xrange(len(self.__word)): start.backward_char() from copy import copy word = copy(self.__word) self.__editor.textbuffer.delete(start, end) text = self.__dictionary[word] + delimeter self.__editor.textbuffer.insert_at_cursor(text) if delimeter == "\n": self.__editor.textbuffer.insert_at_cursor(indentation) self.__editor.move_view_to_cursor() self.__editor.update_message(message, "pass") return False def __indent(self): start = self.__editor.backward_to_line_begin() text = self.__editor.textbuffer.get_text(start.copy(), self.__editor.cursor.copy()) if not text: return "" if not (text[0] in (" ", "\t")): return "" indentation = "" for character in text: if not (character in (" ", "\t")): break indentation += character return indentation def __precompile_methods(self): methods = (self.__event_cb, self.__insert, self.__indent) self.__editor.optimize(methods) return False def __found_cb(self, manager, word): self.__word = word return False def __nofound_cb(self, *args): self.__word = None return False def __event_cb(self, textview, event): if self.__word is None: return False from gtk import keysyms if not (event.keyval in (keysyms.Return, keysyms.space)): return False delimeter = " " if event.keyval == keysyms.space else "\n" self.__insert(delimeter) return True def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/MultiEdit/0000755000175000017500000000000011242100540020240 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/MultiEdit/__init__.py0000644000175000017500000000000011242100540022337 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/MultiEdit/Signals.py0000644000175000017500000000175411242100540022221 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "deactivate": (SSIGNAL, TYPE_NONE, ()), "toggle-edit-point": (SSIGNAL, TYPE_NONE, ()), "add-edit-point": (SSIGNAL, TYPE_NONE, ()), "remove-edit-point": (SSIGNAL, TYPE_NONE, ()), "no-edit-point-error": (SSIGNAL, TYPE_NONE, ()), "backspace": (SSIGNAL, TYPE_NONE, ()), "delete": (SSIGNAL, TYPE_NONE, ()), "clear": (SSIGNAL, TYPE_NONE, ()), "column-mode-reset": (SSIGNAL, TYPE_NONE, ()), "edit-points": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "column-edit-point": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "inserted-text": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "add-mark": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove-mark": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "smart-column-edit-point": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/MultiEdit/TextInsertionHandler.py0000644000175000017500000000463011242100540024732 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "deactivate", self.__deactivate_cb) self.connect(manager, "edit-points", self.__points_cb) self.connect(manager, "clear", self.__clear_cb) self.__sigid1 = self.connect(editor.textbuffer, "insert-text", self.__insert_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__blocked = False self.__buffer = editor.textbuffer self.__marks = [] self.__inserted_text = False return def __destroy(self): self.disconnect() del self return False def __insert_text_at(self, mark, text): iterator = self.__buffer.get_iter_at_mark(mark) self.__editor.refresh(False) self.__buffer.insert(iterator, text) self.__editor.refresh(False) return False def __insert(self, text): try: if not self.__marks: raise ValueError self.__editor.freeze() self.__block() self.__buffer.begin_user_action() [self.__insert_text_at(mark, text) for mark in self.__marks] self.__buffer.end_user_action() self.__unblock() self.__editor.thaw() except ValueError: self.__manager.emit("no-edit-point-error") return False def __block(self): if self.__blocked: return False self.__buffer.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__buffer.handler_unblock(self.__sigid1) self.__blocked = False return False def __emit(self, inserted): self.__manager.emit("inserted-text", inserted) self.__inserted_text = inserted return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__unblock() return False def __deactivate_cb(self, *args): self.__block() self.__emit(False) return False def __insert_cb(self, textbuffer, iterator, text, length): if self.__inserted_text is False: self.__emit(True) self.__buffer.emit_stop_by_name("insert-text") self.__insert(text) return True def __points_cb(self, manager, marks): self.__marks = marks return False def __clear_cb(self, *args): self.__emit(False) return False scribes-0.4~r910/GenericPlugins/MultiEdit/Utils.py0000644000175000017500000000042011242100540021706 0ustar andreasandreasfrom SCRIBES.Utils import response MARK_NAME = "ScribesMultiEditMark" def delete_mark(textbuffer, mark): response() mark.set_visible(False) response() if mark.get_deleted(): return response() textbuffer.delete_mark(mark) response() del mark mark = None return scribes-0.4~r910/GenericPlugins/MultiEdit/MarkUpdater.py0000644000175000017500000000320411242100540023030 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "deactivate", self.__clear_cb) self.connect(manager, "clear", self.__clear_cb) self.connect(manager, "add-mark", self.__add_cb) self.connect(manager, "remove-mark", self.__remove_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = [] self.__buffer = editor.textbuffer return def __destroy(self): self.disconnect() del self return False def __add(self, mark): self.__marks.append(mark) self.__manager.emit("edit-points", self.__marks) return False def __remove(self, mark): if mark in self.__marks: self.__marks.remove(mark) self.__manager.emit("edit-points", self.__marks) return False def __delete_marks(self): self.__manager.emit("edit-points", []) from copy import copy self.__editor.textview.window.freeze_updates() from Utils import delete_mark self.__editor.refresh(False) [delete_mark(self.__buffer, mark) for mark in copy(self.__marks)] self.__editor.refresh(False) self.__marks = [] self.__editor.textview.window.thaw_updates() return False def __destroy_cb(self, *args): self.__destroy() return False def __add_cb(self, manager, mark): self.__add(mark) return False def __remove_cb(self, manager, marks): [self.__remove(mark) for mark in marks] return False def __clear_cb(self, *args): self.__delete_marks() return False scribes-0.4~r910/GenericPlugins/MultiEdit/Trigger.py0000644000175000017500000000222211242100540022213 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self, editor) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "enable-multi-edit-mode", "i", _("Enable multi edit mode"), _("Text Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try : self.__manager.activate() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return scribes-0.4~r910/GenericPlugins/MultiEdit/ColumnEditPointNavigator.py0000644000175000017500000000460011242100540025542 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Navigator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "column-edit-point", self.__point_cb) self.connect(manager, "deactivate", self.__clear_cb) self.connect(manager, "activate", self.__clear_cb) self.connect(manager, "inserted-text", self.__clear_cb) self.connect(manager, "clear", self.__clear_cb) self.connect(manager, "column-mode-reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__cursor_offset = None self.__direction = None self.__start_line = None return def __destroy(self): self.disconnect() del self return False def __toggle_edit_point(self, direction): if self.__direction is None: self.__direction = direction if self.__direction != direction: self.__update_direction(direction) cursor = self.__editor.cursor cursor_offset = cursor.get_line_offset() if self.__start_line is None: self.__start_line = cursor.get_line() if self.__cursor_offset is None: self.__update_offset(cursor_offset) result = cursor.forward_line() if direction == "down" else cursor.backward_line() if result is False: return False iterator = self.__editor.forward_to_line_end(cursor) offset = iterator.get_line_offset() offset = offset if self.__cursor_offset > offset else self.__cursor_offset iterator.set_line_offset(offset) self.__buffer.place_cursor(iterator) self.__view.scroll_mark_onscreen(self.__buffer.get_insert()) if iterator.get_line() == self.__start_line: return False self.__manager.emit("toggle-edit-point") return False def __update_offset(self, cursor_offset): self.__cursor_offset = cursor_offset self.__manager.emit("add-edit-point") return False def __update_direction(self, direction): self.__direction = direction self.__manager.emit("toggle-edit-point") return False def __destroy_cb(self, *args): self.__destroy() return False def __point_cb(self, manager, direction): self.__toggle_edit_point(direction) return False def __clear_cb(self, *args): self.__cursor_offset = None self.__direction = None self.__start_line = None return False scribes-0.4~r910/GenericPlugins/MultiEdit/Manager.py0000644000175000017500000000133711242100540022170 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from FeedbackManager import Manager Manager(self, editor) from ModeQuiter import Quiter Quiter(self, editor) from EventHandler import Handler Handler(self, editor) from EditPointHandler import Handler Handler(self, editor) from MarkUpdater import Updater Updater(self, editor) from TextInsertionHandler import Handler Handler(self, editor) from TextDeletionHandler import Handler Handler(self, editor) from ColumnEditPointNavigator import Navigator Navigator(self, editor) def destroy(self): self.emit("destroy") del self return def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/MultiEdit/FeedbackManager.py0000644000175000017500000000302611242100540023572 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager DEFAULT_MESSAGE = _("Multi Editing Mode") class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "deactivate", self.__deactivate_cb) self.connect(manager, "add-edit-point", self.__add_cb) self.connect(manager, "remove-edit-point", self.__remove_cb) self.connect(manager, "no-edit-point-error", self.__error_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__editor.set_message(DEFAULT_MESSAGE) return False def __deactivate_cb(self, *args): message = _("Disabled multi editing mode") self.__editor.update_message(message, "yes") self.__editor.unset_message(DEFAULT_MESSAGE) return False def __add_cb(self, *args): message = _("New edit point") self.__editor.update_message(message, "yes") return False def __remove_cb(self, *args): message = _("Removed edit point") self.__editor.update_message(message, "cut") return False def __error_cb(self, *args): message = _("ERROR: No edit points found") self.__editor.update_message(message, "no") return False scribes-0.4~r910/GenericPlugins/MultiEdit/TextDeletionHandler.py0000644000175000017500000000521711242100540024525 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "deactivate", self.__deactivate_cb) self.connect(manager, "edit-points", self.__points_cb) self.connect(manager, "inserted-text", self.__inserted_cb) self.__sigid1 = self.connect(manager, "backspace", self.__backspace_cb) self.__sigid2 = self.connect(manager, "delete", self.__delete_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__blocked = False self.__buffer = editor.textbuffer self.__marks = [] self.__inserted_text = False return def __destroy(self): self.disconnect() del self return False def __delete_with(self, method, mark): end = self.__buffer.get_iter_at_mark(mark) start = end.copy() result = start.backward_char() if method == "backspace" else start.forward_char() if result is False: return False self.__editor.refresh(False) self.__buffer.delete(start, end) self.__editor.refresh(False) return False def __remove_with(self, method): try: if not self.__marks: raise ValueError self.__editor.freeze() self.__buffer.begin_user_action() [self.__delete_with(method, mark) for mark in self.__marks] self.__buffer.end_user_action() self.__editor.thaw() except ValueError: self.__manager.emit("no-edit-point-error") return False def __block(self): if self.__blocked: return False self.__manager.handler_block(self.__sigid1) self.__manager.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__manager.handler_unblock(self.__sigid1) self.__manager.handler_unblock(self.__sigid2) self.__blocked = False return False def __handle(self, method): if self.__inserted_text is False: self.__manager.emit("inserted-text", True) self.__remove_with(method) return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__unblock() return False def __deactivate_cb(self, *args): self.__block() return False def __backspace_cb(self, *args): self.__handle("backspace") return True def __delete_cb(self, *args): self.__handle("delete") return False def __points_cb(self, manager, marks): self.__marks = marks return False def __inserted_cb(self, manager, inserted): self.__inserted_text = inserted return False scribes-0.4~r910/GenericPlugins/MultiEdit/EventHandler.py0000644000175000017500000001175211242100540023177 0ustar andreasandreasfrom gtk.keysyms import Shift_L, Shift_R, Caps_Lock, BackSpace, Return from gtk.keysyms import Tab, Delete, Up, Down, Left, Right, Escape from gtk.keysyms import Alt_L, Alt_R, Control_R, Control_L, U, A, B, C from gtk.keysyms import D, E, F, i, Num_Lock from gtk.gdk import CONTROL_MASK, SHIFT_MASK, SUPER_MASK, META_MASK, HYPER_MASK from gtk.gdk import BUTTON_PRESS, MOD1_MASK from gtk.gdk import keyval_to_unicode from SCRIBES.SignalConnectionManager import SignalManager ALL_MASK = MOD1_MASK | SHIFT_MASK | CONTROL_MASK | SUPER_MASK | META_MASK | HYPER_MASK SAFE_KEYS = ( Shift_L, Shift_R, Alt_L, Alt_R, Control_L, Control_R, Caps_Lock, Return, Tab, Num_Lock, ) ARROW_KEYS = (Up, Down, Left, Right,) UNICODE_KEYS = (U, A, B, C, D, E, F, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "deactivate", self.__deactivate_cb) self.connect(manager, "inserted-text", self.__inserted_cb) self.__sigid1 = self.connect(self.__window, "key-press-event", self.__key_event_cb) self.__sigid2 = self.connect(editor.textview, "event", self.__button_event_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = editor.window from gtk.gdk import keymap_get_default self.__keymap = keymap_get_default() self.__blocked = False self.__inserted_text = False return False def __destroy(self): self.disconnect() del self return False def __block(self): if self.__blocked: return False self.__window.handler_block(self.__sigid1) self.__editor.textview.handler_block(self.__sigid2) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__window.handler_unblock(self.__sigid1) self.__editor.textview.handler_unblock(self.__sigid2) self.__blocked = False return False def __handle_arrow_keys(self): self.__manager.emit("column-mode-reset") if self.__inserted_text: self.__manager.emit("clear") return False def __handle_ctrl_i(self): self.__manager.emit("column-mode-reset") if self.__inserted_text: self.__manager.emit("clear") self.__manager.emit("toggle-edit-point") return True def __handle_deletion(self, method): self.__manager.emit(method) return True def __toggle_column_edit_point(self, direction): if self.__inserted_text: self.__manager.emit("clear") self.__manager.emit("column-edit-point", direction) return True def __keyboard_handler(self, event): # Modifier checks # from gtk import accelerator_get_default_mod_mask # modifier_mask = accelerator_get_default_mod_mask() translate = self.__keymap.translate_keyboard_state data = translate(event.hardware_keycode, event.state, event.group) keyval, egroup, level, consumed = data active_mask = any_on = event.state & ~consumed & ALL_MASK ctrl_on = active_mask == CONTROL_MASK shift_on = active_mask == SHIFT_MASK # Handle backspace key press event. if not any_on and event.keyval == BackSpace: return self.__handle_deletion("backspace") # Handle delete key press event. if not any_on and event.keyval == Delete: return self.__handle_deletion("delete") # Allow insertion of regular characters into the editing area. if not any_on and event.string and keyval_to_unicode(event.keyval): return False # Adds column edit points. if ctrl_on and event.keyval == Down: return self.__toggle_column_edit_point("down") if ctrl_on and event.keyval == Up: return self.__toggle_column_edit_point("up") # Allow cursor navigation with arrow keys. if event.keyval in ARROW_KEYS: return self.__handle_arrow_keys() if event.keyval in SAFE_KEYS: return False # Allow insertion of special unicode characters. if ctrl_on and shift_on and event.keyval in UNICODE_KEYS: return False # Escape exits multi edit mode if not any_on and (event.keyval == Escape): return False # i adds or removes edit points. if ctrl_on and (event.keyval == i): return self.__handle_ctrl_i() return True def __mouse_handler(self, event): view = self.__editor.textview window_type = view.get_window_type(event.window) position = view.window_to_buffer_coords(window_type, int(event.x), int(event.y)) iterator = view.get_iter_at_location(*position) self.__editor.textbuffer.place_cursor(iterator) self.__handle_ctrl_i() return True def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__unblock() return False def __deactivate_cb(self, *args): self.__block() return False def __key_event_cb(self, window, event): return self.__keyboard_handler(event) def __button_event_cb(self, textview, event): if event.type == BUTTON_PRESS: return self.__mouse_handler(event) return False def __inserted_cb(self, manager, inserted): self.__inserted_text = inserted return False scribes-0.4~r910/GenericPlugins/MultiEdit/ModeQuiter.py0000644000175000017500000000245411242100540022675 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Quiter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.__sigid1 = self.connect(self.__window, "key-press-event", self.__event_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = editor.window self.__blocked = False return def __destroy(self): self.disconnect() del self return False def __deactivate(self): self.__block() self.__manager.emit("deactivate") return False def __block(self): if self.__blocked: return False self.__window.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__window.handler_unblock(self.__sigid1) self.__blocked = False return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.__unblock() return False def __event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__deactivate() return True scribes-0.4~r910/GenericPlugins/MultiEdit/EditPointHandler.py0000644000175000017500000000422111242100540024006 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from Utils import MARK_NAME class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "toggle-edit-point", self.__toggle_cb) self.connect(manager, "add-edit-point", self.__add_cb) self.connect(manager, "remove-edit-point", self.__remove_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.disconnect() del self return False def __is_valid(self, mark): if mark.get_name() is None: return False if mark.get_name().startswith(MARK_NAME): return True return False def __edit_point_exists(self): marks = self.__editor.cursor.get_marks() if not marks: return False edit_point_exists = lambda mark: 1 if self.__is_valid(mark) else 0 results = [edit_point_exists(mark) for mark in marks] if 1 in results: return True return False def __toggle(self): emit = self.__manager.emit emit("remove-edit-point") if self.__edit_point_exists() else emit("add-edit-point") return False def __add(self): if self.__edit_point_exists(): return False from time import time name = MARK_NAME + str(time()) self.__editor.refresh(False) mark = self.__buffer.create_mark(name, self.__editor.cursor) self.__editor.refresh(False) mark.set_visible(True) self.__editor.refresh(False) self.__manager.emit("add-mark", mark) return False def __remove(self): marks = self.__editor.cursor.get_marks() edit_points = [mark for mark in marks if self.__is_valid(mark)] self.__manager.emit("remove-mark", edit_points) from Utils import delete_mark from copy import copy [delete_mark(self.__buffer, mark) for mark in copy(edit_points)] return False def __destroy_cb(self, *args): self.__destroy() return False def __toggle_cb(self, *args): self.__toggle() return False def __add_cb(self, *args): self.__add() return False def __remove_cb(self, *args): self.__remove() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/0000755000175000017500000000000011242100540021262 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Metadata.py0000644000175000017500000000070611242100540023357 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "Templates.gdb") def get_value(): try: dictionary = {} database = open_database(basepath, "r") dictionary = database["templates"] except: pass finally: database.close() return dictionary def set_value(dictionary): try: database = open_database(basepath, "w") database["templates"] = dictionary finally: database.close() return scribes-0.4~r910/GenericPlugins/TemplateEditor/__init__.py0000644000175000017500000000000011242100540023361 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/0000755000175000017500000000000011242100540022543 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/TemplateDataGenerator.py0000644000175000017500000000240211242100540027327 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("selected-templates-dictionary-keys", self.__keys_cb) self.__sigid3 = manager.connect("templates-dictionary", self.__dictionary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __get_data(self, key): language, trigger = key.split("|") description, template = self.__dictionary[key] return language, trigger, description, template def __generate(self, keys): data = [self.__get_data(key) for key in keys] self.__manager.emit("export-template-data", data) return False def __destroy_cb(self, *args): self.__destroy() return False def __keys_cb(self, manager, keys): self.__generate(keys) return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/__init__.py0000644000175000017500000000000011242100540024642 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/TemplateFileCreator.py0000644000175000017500000000150111242100540027005 0ustar andreasandreasclass Creator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("create-export-template-filename", self.__create_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __create(self, filename): open(filename, "w").close() self.__manager.emit("created-template-file") return False def __destroy_cb(self, *args): self.__destroy() return False def __create_cb(self, manager, filename): self.__create(filename) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/XMLTemplateWriter.py0000644000175000017500000000313611242100540026451 0ustar andreasandreasclass Writer(object): def __init__(self, manager, editor): self.__init_attribute(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("export-template-data", self.__process_cb) self.__sigid3 = manager.connect("create-export-template-filename", self.__filename_cb) def __init_attribute(self, manager, editor): self.__manager = manager self.__editor = editor self.__filename = None return def __add(self, snippet, data, SubElement): entry = SubElement(snippet, "entry") SubElement(entry, "trigger", id=data[0]).text = data[1] SubElement(entry, "description").text = data[2] SubElement(entry, "template").text = data[3] return def __create_xml_template_file(self, template_data): from xml.etree.ElementTree import Element, SubElement, ElementTree root = Element("scribes", version="0.1") snippet = SubElement(root, "snippet") [self.__add(snippet, data, SubElement) for data in template_data] ElementTree(root).write(self.__filename, "UTF-8") self.__manager.emit("created-xml-template-file") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, template_data): self.__create_xml_template_file(template_data) return False def __filename_cb(self, manager, filename): self.__filename = filename return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/python-templates.xml0000644000175000017500000000125711242100540026607 0ustar andreasandreas bcmtBlock Commentcmtpython CommentdelInstance Destructorscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/Manager.py0000644000175000017500000000062511242100540024472 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from GUI.Manager import Manager Manager(manager, editor) from XMLTemplateWriter import Writer Writer(manager, editor) from TemplateDataGenerator import Generator Generator(manager, editor) from TemplateFileCreator import Creator Creator(manager, editor) from TemplateFileNameCreator import Creator Creator(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/0000755000175000017500000000000011242100540023167 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/__init__.py0000644000175000017500000000000011242100540025266 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/ExportButton.py0000644000175000017500000000145411242100540026222 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.export_gui.get_widget("ExportButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("export-button-clicked") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/GUI.glade0000644000175000017500000000714411242100540024617 0ustar andreasandreas False 10 Export Templates ScribesExportTemplatesID ScribesExportTemplatesRole True GTK_WIN_POS_CENTER_ON_PARENT True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True 10 True False GTK_FILE_CHOOSER_ACTION_SAVE False False True 10 GTK_BUTTONBOX_END True False gtk-cancel True False 0 False False True False True True True E_xport True False 0 False False 1 False False 1 scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/CancelButton.py0000644000175000017500000000145111242100540026123 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.export_gui.get_widget("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("hide-export-window") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/FilenameValidator.py0000644000175000017500000000232711242100540027133 0ustar andreasandreasclass Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validate-export-template-path", self.__validate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __validate(self, filename): try: from os.path import split folder, name = split(filename) if not name: raise ValueError if not name.endswith(".xml"): raise ValueError if not name[:-4]: raise ValueError if " " in name: raise ValueError from os import access, W_OK if not access(folder, W_OK): raise ValueError self.__manager.emit("hide-export-window") self.__manager.emit("create-export-template-filename", filename) except ValueError: print "Validation error" return False def __destroy_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, filename): self.__validate(filename) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/Manager.py0000644000175000017500000000057011242100540025115 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from ExportButton import Button Button(manager, editor) from FilenameValidator import Validator Validator(manager, editor) from FileChooser import FileChooser FileChooser(manager, editor) from CancelButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/Window.py0000644000175000017500000000343411242100540025014 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-export-window", self.__show_cb) self.__sigid3 = manager.connect("hide-export-window", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.export_gui.get_widget("Window") return def __set_properties(self): window = self.__manager.gui.get_widget("Window") self.__window.set_transient_for(window) return def __show(self): self.__window.show_all() return def __hide(self): self.__window.hide() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() self = None del self return def __show_cb(self, *args): self.__show() return def __hide_cb(self, *args): self.__hide() return def __delete_event_cb(self, *args): self.__manager.emit("hide-export-window") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-export-window") return True def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/GUI/FileChooser.py0000644000175000017500000000354511242100540025752 0ustar andreasandreasclass FileChooser(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("export-template-filename", self.__export_template_filename_cb) self.__sigid3 = manager.connect("export-button-clicked", self.__export_button_clicked_cb) self.__set_folder() self.__chooser.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.export_gui.get_widget("FileChooser") self.__can_import = True return def __set_properties(self): from gtk import FileFilter filter_ = FileFilter() filter_.set_name(_("Template Files")) filter_.add_mime_type("text/xml") self.__chooser.add_filter(filter_) self.__set_folder() return def __set_folder(self): set_folder = self.__chooser.set_current_folder desktop = self.__editor.desktop_folder home = self.__editor.home_folder from os.path import exists set_folder(desktop) if exists(desktop) else set_folder(home) self.__chooser.grab_focus() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__chooser.destroy() del self self = None return def __emit_template_path_signal(self): filename = self.__chooser.get_filename() self.__manager.emit("validate-export-template-path", filename) return False def __destroy_cb(self, *args): self.__destroy() return def __export_template_filename_cb(self, manager, filename): self.__chooser.set_current_name(filename) return False def __export_button_clicked_cb(self, *args): self.__emit_template_path_signal() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Export/TemplateFileNameCreator.py0000644000175000017500000000157211242100540027616 0ustar andreasandreasclass Creator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("selected-language-id", self.__language_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __emit_filename_signal(self, language_id): filename = language_id + "-templates.xml" self.__manager.emit("export-template-filename", filename) return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, manager, language_id): self.__emit_filename_signal(language_id) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/0000755000175000017500000000000011242100540022513 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/__init__.py0000644000175000017500000000000011242100540024612 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeViewSelector.py0000644000175000017500000000211711242100540030525 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("new-template-data", self.__data_cb) self.__sigid3 = manager.connect("populated-description-treeview", self.__populated_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__key = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __emit_description_treeview_selection(self): self.__manager.emit("select-description-treeview", self.__key) self.__key = "" return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): self.__key = data[1] return False def __populated_cb(self, *args): self.__emit_description_treeview_selection() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/ExportButton.py0000644000175000017500000000274511242100540025552 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("description-treeview-sensitivity", self.__sensitive_cb) self.__sigid3 = manager.connect("description-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = manager.connect("selected-templates-dictionary-key", self.__key_cb) self.__sigid5 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("ExportButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__button) del self return False def __destroy_cb(self, *args): self.__destroy() return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__manager.emit("show-export-window") return False def __changed_cb(self, *args): self.__button.set_property("sensitive", False) return False def __key_cb(self, *args): self.__button.set_property("sensitive", True) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/ImportButton.py0000644000175000017500000000237511242100540025542 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("selected-language-id", self.__language_cb) self.__sigid3 = manager.connect("language-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("ImportButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__button) self.__button.destroy() del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, *args): self.__button.set_property("sensitive", True) return False def __changed_cb(self, *args): self.__button.set_property("sensitive", False) return False def __clicked_cb(self, *args): self.__manager.emit("show-import-window") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeView.py0000644000175000017500000002103211242100540027021 0ustar andreasandreasfrom gettext import gettext as _ class TreeView(): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-window", self.__show_cb) self.__sigid3 = self.__treeview.connect("cursor-changed", self.__cursor_changed_cb) self.__sigid4 = manager.connect("description-treeview-data", self.__populate_cb) self.__sigid5 = manager.connect("language-treeview-cursor-changed", self.__clear_cb) self.__sigid6 = manager.connect("select-description-treeview", self.__select_cb) self.__sigid7 = manager.connect("remove-selected-templates", self.__remove_selected_templates_cb) self.__sigid8 = self.__treeview.connect("key-press-event", self.__key_press_event_cb) self.__sigid9 = self.__treeview.connect("row-activated", self.__row_activated_cb) self.__sigid10 = manager.connect("new-template-data", self.__new_template_data_cb) self.__sigid11 = manager.connect("created-template-file", self.__created_file_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.gui.get_widget("DescriptionTreeView") self.__model = self.__create_model() self.__column1 = self.__create_name_column() self.__column2 = self.__create_description_column() self.__selection = self.__treeview.get_selection() self.__populate = True from gtk.keysyms import Delete, Return self.__navigation_dictionary = { Delete: self.__remove, Return: self.__show_edit, } return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__treeview) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__treeview) self.__editor.disconnect_signal(self.__sigid9, self.__treeview) self.__editor.disconnect_signal(self.__sigid10, self.__manager) self.__editor.disconnect_signal(self.__sigid11, self.__manager) self.__treeview.destroy() del self self=None return False def __populate_model(self, data): try: if self.__populate is False: raise ValueError self.__treeview.handler_block(self.__sigid3) self.__sensitive(False) self.__treeview.set_model(None) self.__model.clear() for name, description, key in data: self.__model.append([name, description, key]) self.__treeview.set_model(self.__model) self.__update_sensitivity() self.__treeview.handler_unblock(self.__sigid3) self.__manager.emit("populated-description-treeview") except ValueError: self.__treeview.grab_focus() finally: self.__populate = True return False def __select(self, row, focus=False): self.__selection.select_iter(row.iter) self.__treeview.set_cursor(row.path, self.__column1) self.__treeview.scroll_to_cell(row.path, None, True, 0.5, 0.5) if focus: self.__treeview.grab_focus() return def __select_key(self, key): for row_ in self.__model: if row_[-1] != key: continue path = self.__model.get_path(row_.iter) row = self.__model[path] self.__select(row, True) return self.__select(self.__model[0]) return False def __clear(self): if not len(self.__model): return False self.__treeview.set_model(None) self.__model.clear() self.__sensitive(False) return False def __update_sensitivity(self): sensitive = True if len(self.__model) else False self.__sensitive(sensitive) return False def __sensitive(self, sensitive): self.__treeview.set_property("sensitive", sensitive) self.__manager.emit("description-treeview-sensitivity", sensitive) return False def __emit_template_dictionary_key_async(self): try: self.__manager.emit("description-treeview-cursor-changed") from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__emit_template_dictionary_async, priority=9999) return False def __emit_template_dictionary_async(self): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__emit_key, priority=9999) return False def __emit_key(self): try: model, paths = self.__selection.get_selected_rows() iterator = model.get_iter(paths[-1]) key = model.get_value(iterator, 2) self.__manager.emit("selected-templates-dictionary-key", key) except AttributeError: pass return False def __emit_selected_keys(self): model, paths = self.__selection.get_selected_rows() get_key = lambda path: model.get_value(model.get_iter(path), 2) keys = [get_key(path) for path in paths] self.__manager.emit("selected-templates-dictionary-keys", keys) return False def __remove(self): try: self.__populate = False self.__sensitive(False) model, paths = self.__selection.get_selected_rows() keys = self.__get_keys(paths) self.__manager.emit("remove-template-data", keys) self.__remove_keys(keys) finally: self.__update_sensitivity() return False def __remove_key(self, key, select): for row in self.__model: if row[-1] != key: continue iterator = row.iter success = self.__model.remove(iterator) if not select: return False if not len(self.__model): return False path = self.__model.get_path(iterator) if success else self.__model[-1].path row = self.__model[path] self.__select(row, True) return False def __remove_keys(self, keys): key = keys[0] select = True if len(keys) == 1 else False self.__remove_key(key, select) keys.remove(key) if not keys: return return self.__remove_keys(keys) def __get_keys(self, paths): keys = [] for path in paths: iterator = self.__model.get_iter(path) key = self.__model.get_value(iterator, 2) keys.append(key) return keys def __set_properties(self): from gtk import SELECTION_MULTIPLE self.__selection.set_mode(SELECTION_MULTIPLE) from gtk.gdk import BUTTON1_MASK, ACTION_COPY, ACTION_DEFAULT targets = [("text/plain", 0, 123), ("STRING", 0, 123)] self.__treeview.enable_model_drag_source(BUTTON1_MASK, targets, ACTION_COPY|ACTION_DEFAULT) self.__treeview.set_property("model", self.__model) self.__treeview.append_column(self.__column1) self.__treeview.append_column(self.__column2) self.__column1.clicked() return def __create_model(self): from gtk import ListStore model = ListStore(str, str, str) return model def __create_column(self, name, column): from gtk import TreeViewColumn, TREE_VIEW_COLUMN_GROW_ONLY from gtk import CellRendererText column = TreeViewColumn(name, CellRendererText(), text=column) column.set_property("sizing", TREE_VIEW_COLUMN_GROW_ONLY) return column def __create_name_column(self): column = self.__create_column(_("_Name"), 0) column.set_property("expand", False) column.set_property("clickable", True) column.set_sort_column_id(0) column.set_property("sort-indicator", True) from gtk import SORT_ASCENDING column.set_property("sort-order", SORT_ASCENDING) return column def __create_description_column(self): column = self.__create_column(_("_Description"), 1) column.set_property("expand", True) return column def __show_edit(self): self.__manager.emit("show-edit-template-editor") return False def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): if len(self.__model): self.__select(self.__model[0], True) return False def __cursor_changed_cb(self, *args): self.__emit_template_dictionary_key_async() return False def __populate_cb(self, manager, data): self.__populate_model(data) return False def __clear_cb(self, *args): self.__clear() return False def __select_cb(self, manager, key): if len(self.__model): self.__select_key(key) return False def __remove_selected_templates_cb(self, *args): self.__remove() return False def __key_press_event_cb(self, treeview, event): if not (event.keyval in self.__navigation_dictionary.keys()): return False self.__navigation_dictionary[event.keyval]() return True def __row_activated_cb(self, *args): self.__show_edit() return False def __created_file_cb(self, *args): self.__emit_selected_keys() return False def __new_template_data_cb(self, *args): self.__sensitive(False) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/GUI.glade0000644000175000017500000003121611242100540024140 0ustar andreasandreas 10 Template Editor ScribesTemplateEditorID ScribesTemplateEditorRole GTK_WIN_POS_CENTER_ON_PARENT 640 480 True scribes True 10 True True GTK_POLICY_NEVER GTK_POLICY_AUTOMATIC GTK_SHADOW_IN True False True True 0 False False False True 10 True 10 True True GTK_POLICY_NEVER GTK_POLICY_AUTOMATIC GTK_SHADOW_IN 300 True False True True 0 False True 5 True False Add a new template gtk-add True False 0 False False True False Edit selected template gtk-edit True False 0 False False 1 True False Remove selected templates gtk-remove True False 0 False False 2 True False Import templates from a valid template file I_mport True False 0 False False 3 True False Export templates to a file. E_xport True False 0 False False 4 True False Read more about templates in user guide _Help True False 0 False False 5 False False 1 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN 1 True 5 True gtk-harddisk False False True Download Templates from False False 1 True False True True True here GTK_RELIEF_NONE 0 http://scribes.sourceforge.net/templatesV2.tar.bz2 False False 2 False False 2 1 scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/SourceView.py0000644000175000017500000000532711242100540025167 0ustar andreasandreasfrom gtksourceview2 import View, Buffer class SourceView(View): def __init__(self, manager, editor): View.__init__(self, Buffer()) self.__init_attributes(manager, editor) self.__set_properties() self.__add_view_to_scrolled_window() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("description-treeview-sensitivity", self.__sensitive_cb) self.__sigid3 = manager.connect("description-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = manager.connect("selected-templates-dictionary-key", self.__key_cb) self.__sigid5 = manager.connect("templates-dictionary", self.__dictionary_cb) self.__sigid6 = self.connect("button-press-event", self.__button_press_event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = self.get_buffer() self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self) del self self = None return False def __add_view_to_scrolled_window(self): self.__clear() scrolled_window = self.__manager.gui.get_widget("ScrolledWindow") scrolled_window.add(self) return False def __set_properties(self): self.set_property("editable", False) self.set_property("cursor-visible", False) self.set_property("can-focus", False) self.set_property("can-default", False) self.set_property("has-default", False) self.set_property("has-focus", False) self.set_property("is-focus", False) self.set_property("receives-default", False) return False def __update_properties(self): return False def __show_template(self, key): template = self.__dictionary[key][1] self.__buffer.set_text(template) self.set_property("sensitive", True) return False def __clear(self): self.set_property("sensitive", False) self.__buffer.set_text("") return False def __destroy_cb(self, *args): self.__destroy() return False def __sensitive_cb(self, manager, sensitive): self.set_property("sensitive", sensitive) if sensitive else self.__clear() return False def __changed_cb(self, *args): self.__clear() return False def __key_cb(self, manager, key): self.__show_template(key) return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False def __button_press_event_cb(self, *args): self.__manager.emit("show-edit-template-editor") return True scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/HelpButton.py0000644000175000017500000000133411242100540025152 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("HelpButton") return def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__button.destroy() del self self = None return def __clicked_cb(self, button): self.__editor.help() return scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/AddButton.py0000644000175000017500000000240011242100540024745 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("selected-language-id", self.__language_cb) self.__sigid3 = manager.connect("language-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("AddButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__button) self.__button.destroy() del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, *args): self.__button.set_property("sensitive", True) return False def __changed_cb(self, *args): self.__button.set_property("sensitive", False) return False def __clicked_cb(self, *args): self.__manager.emit("show-add-template-editor") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/LanguageTreeViewModelGenerator.py0000644000175000017500000000137111242100540031115 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__emit_model_data() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __emit_model_data(self): language_list = self.__editor.language_objects data = [(name.get_name(), name.get_id()) for name in language_list] data.insert(0, ("General", "General")) self.__manager.emit("language-treeview-data", data) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/Manager.py0000644000175000017500000000172111242100540024440 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from SourceView import SourceView SourceView(manager, editor) from HelpButton import Button Button(manager, editor) from LinkButton import Button Button(manager, editor) from ImportButton import Button Button(manager, editor) from RemoveButton import Button Button(manager, editor) from ExportButton import Button Button(manager, editor) from EditButton import Button Button(manager, editor) from DescriptionTreeView import TreeView TreeView(manager, editor) from DescriptionTreeViewSelector import Selector Selector(manager, editor) from DescriptionTreeViewGenerator import Generator Generator(manager, editor) from AddButton import Button Button(manager, editor) from LanguageTreeView import TreeView TreeView(manager, editor) from LanguageTreeViewModelGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/RemoveButton.py0000644000175000017500000000301411242100540025514 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("description-treeview-sensitivity", self.__sensitive_cb) self.__sigid3 = manager.connect_after("description-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = manager.connect_after("selected-templates-dictionary-key", self.__key_cb) self.__sigid5 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("RemoveButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__manager.emit("remove-selected-templates") return False def __changed_cb(self, *args): self.__button.set_property("sensitive", False) return False def __key_cb(self, *args): self.__button.set_property("sensitive", True) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/LinkButton.py0000644000175000017500000000161711242100540025163 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("clicked", self.__clicked_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__button = manager.gui.get_widget("LinkButton") return def __show(self): uri = self.__button.get_uri() from gtk import show_uri, get_current_event_time show_uri(self.__editor.window.get_screen(), uri, get_current_event_time()) return False def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, manager) del self self = None return def __clicked_cb(self, button): from gobject import idle_add idle_add(self.__show) return True scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/Window.py0000644000175000017500000000330711242100540024337 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-window", self.__show_cb) self.__sigid3 = manager.connect("hide-window", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.gui.get_widget("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() del self self = None return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return False def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy_cb(self, *args): self.__destroy() return False def __hide_cb(self, *args): self.__hide() return False def __show_cb(self, *args): self.__show() return False def __delete_event_cb(self, *args): self.__manager.emit("hide-window") return True def __key_press_event_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide-window") return True scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/LanguageTreeView.py0000644000175000017500000001023111242100540026260 0ustar andreasandreasclass TreeView(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__treeview.connect("cursor-changed", self.__cursor_changed_cb) self.__sigid3 = manager.connect("language-treeview-data", self.__populate_cb) self.__sigid4 = manager.connect_after("select-language-treeview-id", self.__select_langauge_treeview_id_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.gui.get_widget("LanguageTreeView") self.__model = self.__create_model() self.__column = self.__create_column() self.__selection = self.__treeview.get_selection() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__treeview) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) del self self = None return False def __populate_model(self, data): self.__treeview.handler_block(self.__sigid2) self.__treeview.set_property("sensitive", False) self.__treeview.set_model(None) self.__model.clear() for language_name, language_id in data: self.__model.append([language_name, language_id]) self.__treeview.set_model(self.__model) self.__treeview.set_property("sensitive", True) self.__treeview.handler_unblock(self.__sigid2) self.__select(self.__get_language_id()) return False def __get_language_id(self): if self.__editor.language_object is None: return "General" return self.__editor.language_object.get_id() def __select(self, language_id): row = None for _row in self.__model: if _row[1] != language_id: continue row = _row break self.__select_row(row) return False def __select_row(self, row): self.__selection.select_iter(row.iter) self.__treeview.set_cursor(row.path, self.__column) self.__treeview.scroll_to_cell(row.path, None, True, 0.5, 0.5) return def __emit_language_id_async(self): try: self.__manager.emit("language-treeview-cursor-changed") from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__emit_language_async, priority=9999) return False def __emit_language_async(self): try: from gobject import idle_add, source_remove source_remove(self.__timer2) except AttributeError: pass finally: self.__timer2 = idle_add(self.__emit_language, priority=9999) return False def __emit_language(self): model, iterator = self.__selection.get_selected() language_id = model.get_value(iterator, 1) self.__manager.emit("selected-language-id", language_id) return False def __set_properties(self): from gtk.gdk import ACTION_DEFAULT, BUTTON1_MASK from gtk import TARGET_SAME_APP self.__treeview.enable_model_drag_source(BUTTON1_MASK, [("STRING", 0, 123)], ACTION_DEFAULT) self.__treeview.enable_model_drag_dest([("STRING", TARGET_SAME_APP, 124)], ACTION_DEFAULT) self.__treeview.append_column(self.__column) self.__treeview.set_model(self.__model) self.__column.clicked() return def __create_model(self): from gtk import ListStore model = ListStore(str, str) return model def __create_column(self): from gtk import TreeViewColumn, TREE_VIEW_COLUMN_GROW_ONLY from gtk import SORT_ASCENDING, CellRendererText column = TreeViewColumn(_("Language"), CellRendererText(), text=0) column.set_property("expand", False) column.set_property("sizing", TREE_VIEW_COLUMN_GROW_ONLY) column.set_property("clickable", True) column.set_sort_column_id(0) column.set_property("sort-indicator", True) column.set_property("sort-order", SORT_ASCENDING) return column def __destroy_cb(self, *args): self.__destroy() return False def __cursor_changed_cb(self, *args): self.__emit_language_id_async() return False def __populate_cb(self, manager, data): self.__populate_model(data) return False def __select_langauge_treeview_id_cb(self, manager, language_id): self.__select(language_id) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeViewGenerator.py0000644000175000017500000000324111242100540030672 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("selected-language-id", self.__language_cb) self.__sigid3 = manager.connect("templates-dictionary", self.__dictionary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__language = None self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __send_treeview_data(self): data = self.__get_data() self.__manager.emit("description-treeview-data", data) return def __get_data(self): if not self.__language: return [] if not self.__dictionary: return [] language =self.__language + "|" data = [] for key in self.__dictionary.keys(): if not (key.startswith(language)): continue description = self.__dictionary[key][0] trigger = key[len(language):] data.append((trigger, description, key)) return data def __precompile_methods(self): methods = (self.__send_treeview_data, self.__get_data) self.__editor.optimize(methods) return False def __destroy_cb(self, *args): self.__destroy() return False def __language_cb(self, manager, language): self.__language = language self.__send_treeview_data() return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary self.__send_treeview_data() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/MainGUI/EditButton.py0000644000175000017500000000277011242100540025154 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("description-treeview-sensitivity", self.__sensitive_cb) self.__sigid3 = manager.connect("description-treeview-cursor-changed", self.__changed_cb) self.__sigid4 = manager.connect("selected-templates-dictionary-key", self.__key_cb) self.__sigid5 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("EditButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __sensitive_cb(self, manager, sensitive): self.__button.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__manager.emit("show-edit-template-editor") return False def __changed_cb(self, *args): self.__button.set_property("sensitive", False) return False def __key_cb(self, *args): self.__button.set_property("sensitive", True) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/DatabaseMonitor.py0000644000175000017500000000157511242100540024720 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from os.path import join folder = join(editor.metadata_folder, "PluginPreferences") filepath = join(folder, "Templates.gdb") self.__monitor = editor.get_file_monitor(filepath) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__manager.emit("database-update") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Trigger.py0000644000175000017500000000215711242100540023244 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-template-editor", "F12", _("Manage dynamic templates or snippets"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None from MenuItem import MenuItem self.__menuitem = MenuItem(editor) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return scribes-0.4~r910/GenericPlugins/TemplateEditor/MenuItem.py0000644000175000017500000000147011242100540023361 0ustar andreasandreasfrom gettext import gettext as _ class MenuItem(object): def __init__(self, editor): self.__init_attributes(editor) self.__menuitem.set_property("name", "Template Editor MenuItem") self.__sigid1 = self.__menuitem.connect("activate", self.__activate_cb) editor.add_to_pref_menu(self.__menuitem) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_SELECT_COLOR message = _("Template Editor") self.__menuitem = editor.create_menuitem(message, STOCK_SELECT_COLOR) return def destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem) self.__editor.remove_from_pref_menu(self.__menuitem) self.__menuitem.destroy() del self self = None return def __activate_cb(self, menuitem): self.__editor.trigger("show-template-editor") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Manager.py0000644000175000017500000001140311242100540023205 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT from gobject import SIGNAL_NO_RECURSE, SIGNAL_ACTION, TYPE_STRING from gobject import TYPE_BOOLEAN SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-import-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-import-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-export-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-export-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "selected-language-id": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "language-treeview-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "language-treeview-cursor-changed": (SCRIBES_SIGNAL, TYPE_NONE, ()), "description-treeview-cursor-changed": (SCRIBES_SIGNAL, TYPE_NONE, ()), "description-treeview-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "description-treeview-sensitivity": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "templates-dictionary": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "template-triggers": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "gui-template-editor-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove-template-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-template-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "process-imported-files": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "valid-template-files": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "imported-templates-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "validate-imported-templates": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-imported-templates": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-templates-dictionary-key": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "selected-templates-dictionary-keys": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "select-description-treeview": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "show-add-template-editor": (SCRIBES_SIGNAL, TYPE_NONE, ()), "remove-selected-templates": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-edit-template-editor": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-template-editor": (SCRIBES_SIGNAL, TYPE_NONE, ()), "ready": (SCRIBES_SIGNAL, TYPE_NONE, ()), "validator-is-ready": (SCRIBES_SIGNAL, TYPE_NONE, ()), "updating-database": (SCRIBES_SIGNAL, TYPE_NONE, ()), "database-update": (SCRIBES_SIGNAL, TYPE_NONE, ()), "import-button-clicked": (SCRIBES_SIGNAL, TYPE_NONE, ()), "export-button-clicked": (SCRIBES_SIGNAL, TYPE_NONE, ()), "populated-description-treeview": (SCRIBES_SIGNAL, TYPE_NONE, ()), "created-template-file": (SCRIBES_SIGNAL, TYPE_NONE, ()), "created-xml-template-file": (SCRIBES_SIGNAL, TYPE_NONE, ()), "name-entry-string": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "error": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "valid-trigger": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "can-import-selected-file": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "select-language-treeview-id": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "export-template-filename": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "export-template-data": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "validate-export-template-path": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "create-export-template-filename": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from Import.Manager import Manager Manager(self, editor) from Export.Manager import Manager Manager(self, editor) from EditorGUI.Manager import Manager Manager(self, editor) from MainGUI.Manager import Manager Manager(self, editor) from DatabaseUpdater import Updater Updater(self, editor) # This Monitor object should be initialized last. from DatabaseMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join self.__glade = editor.get_glade_object(globals(), join("MainGUI", "GUI.glade"), "Window") self.__eglade = editor.get_glade_object(globals(), join("EditorGUI", "GUI.glade"), "Window") self.__iglade = editor.get_glade_object(globals(), join("Import", "GUI", "GUI.glade"), "Window") self.__exglade = editor.get_glade_object(globals(), join("Export", "GUI", "GUI.glade"), "Window") return gui = property(lambda self: self.__glade) editor_gui = property(lambda self: self.__eglade) import_gui = property(lambda self: self.__iglade) export_gui = property(lambda self: self.__exglade) def destroy(self): self.emit("destroy") del self self = None return False def show(self): self.emit("show-window") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/DatabaseUpdater.py0000644000175000017500000000417711242100540024676 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("new-template-data", self.__data_cb) self.__sigid3 = manager.connect("database-update", self.__updated_cb) self.__sigid4 = manager.connect("remove-template-data", self.__remove_data_cb) self.__sigid5 = manager.connect("new-imported-templates", self.__imported_cb) self.__emit_new_dictionary_signal() def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __emit_new_dictionary_signal(self): from Metadata import get_value self.__dictionary = get_value() self.__manager.emit("templates-dictionary", self.__dictionary) return False def __add_template_to_database(self, template_data): old_key, new_key, description, template = template_data if old_key: del self.__dictionary[old_key] self.__dictionary[new_key] = description, template from Metadata import set_value set_value(self.__dictionary) return False def __add_new_templates(self, templates_data): for data in templates_data: self.__dictionary[data[0]] = data[1], data[2] from Metadata import set_value set_value(self.__dictionary) return False def __remove(self, data): for key in data: del self.__dictionary[key] from Metadata import set_value set_value(self.__dictionary) return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, template_data): self.__add_template_to_database(template_data) return False def __updated_cb(self, *args): self.__emit_new_dictionary_signal() return False def __remove_data_cb(self, manager, data): self.__remove(data) return False def __imported_cb(self, manager, data): self.__add_new_templates(data) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/0000755000175000017500000000000011242100540022534 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Import/__init__.py0000644000175000017500000000000011242100540024633 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Import/XMLTemplateImporter.py0000644000175000017500000000300311242100540026760 0ustar andreasandreasclass Importer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("valid-template-files", self.__process_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __get_data(self, entry): try: nodes = entry.getchildren() id_ = nodes[0].attrib.values()[0] trigger = nodes[0].text description = nodes[1].text template = nodes[2].text key = id_ + "|" + trigger data = key, description, template except: return None return data def __get_entries(self, file_): from xml.etree.ElementTree import parse xmlobj = parse(file_) node = xmlobj.getroot() nodes = node.getchildren() entries = nodes[0].getchildren() return entries def __get_template_data(self, file_): entries = self.__get_entries(file_) data = [self.__get_data(entry) for entry in entries] return data def __send_template_data(self, files): import_data = [self.__get_template_data(_file) for _file in files] self.__manager.emit("imported-templates-data", import_data) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, files): self.__send_template_data(files) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/PostImportSelector.py0000644000175000017500000000241411242100540026730 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("new-imported-templates", self.__new_imported_templates_cb) self.__sigid3 = manager.connect_after("templates-dictionary", self.__templates_dictionary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__queue = deque() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __select_language(self): if not self.__queue: return False language_key = self.__queue.pop()# language_id = language_key.split("|")[0] self.__manager.emit("select-language-treeview-id", language_id) return False def __destroy_cb(self, *args): self.__destroy() return False def __new_imported_templates_cb(self, manager, templates_data): self.__queue.append(templates_data[-1][0]) return False def __templates_dictionary_cb(self, *args): self.__select_language() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/ImportedTemplateDataProcessor.py0000644000175000017500000000334111242100540031060 0ustar andreasandreasclass Processor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("templates-dictionary", self.__dictionary_cb) self.__sigid3 = manager.connect("imported-templates-data", self.__imported_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __modify_template_key(self, data): if data[-1] == self.__dictionary[data[0]][-1]: return data key = data[0] new_key = data[0] count = 0 keys = self.__dictionary.keys() while new_key in keys: count += 1 new_key = key + "-" + str(count) data = new_key, data[1], data[2] return data def __create_new_data(self, templates_data): keys = self.__dictionary.keys() templates_data = reduce(lambda x,y: x+y, templates_data) new_templates_data = [data for data in templates_data if not (data[0] in keys)] duplicate_templates_data = [self.__modify_template_key(data) for data in templates_data if (data[0] in keys)] templates_data = new_templates_data + duplicate_templates_data self.__manager.emit("validate-imported-templates", templates_data) return False def __destroy_cb(self, *args): self.__destroy() return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return def __imported_cb(self, manager, data): self.__create_new_data(data) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/XMLTemplateValidator.py0000644000175000017500000000350111242100540027107 0ustar andreasandreasfrom gettext import gettext as _ ERROR_MESSAGE = _("ERROR: No valid template files found") class Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("process-imported-files", self.__process_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __is_xml(self, file_): xml_mime_types = ("application/xml", "text/xml") return self.__editor.get_mimetype(file_) in xml_mime_types def __get_xml_root_node(self, file_): try: from xml.parsers.expat import ExpatError from xml.etree.ElementTree import parse xmlobj = parse(file_) node = xmlobj.getroot() except ExpatError: return None return node def __is_valid(self, _file): if not self.__is_xml(_file): return False root_node = self.__get_xml_root_node(_file) if root_node.tag != "scribes": return False attribute_names = root_node.keys() if not ("version" in attribute_names): return False nodes = root_node.getchildren() if len(nodes) != 1: return False if nodes[0].tag != "snippet": return False if not nodes[0].getchildren(): return False return True def __validate(self, files): valid_files = [_file for _file in files if self.__is_valid(_file)] if valid_files: self.__manager.emit("valid-template-files", valid_files) if not valid_files: self.__manager.emit("error", ERROR_MESSAGE) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, files): self.__validate(files) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/Manager.py0000644000175000017500000000076011242100540024463 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from GUI.Manager import Manager Manager(manager, editor) from PostImportSelector import Selector Selector(manager, editor) from TemplateDataValidator import Validator Validator(manager, editor) from ImportedTemplateDataProcessor import Processor Processor(manager, editor) from XMLTemplateImporter import Importer Importer(manager, editor) from XMLTemplateValidator import Validator Validator(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/0000755000175000017500000000000011242100540023160 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/__init__.py0000644000175000017500000000000011242100540025257 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/ImportButton.py0000644000175000017500000000176411242100540026210 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("can-import-selected-file", self.__valid_cb) self.__sigid3 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.import_gui.get_widget("ImportButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, valid): self.__button.set_property("sensitive", valid) return False def __clicked_cb(self, *args): self.__manager.emit("import-button-clicked") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/GUI.glade0000644000175000017500000001150511242100540024604 0ustar andreasandreas 10 Import Templates ScribesImportTemplatesID ScribesImportTemplatesRole True GTK_WIN_POS_CENTER_ON_PARENT 640 480 True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True 10 True False True False False True 10 GTK_BUTTONBOX_END True False gtk-cancel True False 0 False False True False True True True False 0 True 2 True gtk-redo False False True 0 I_mport True True 1 False False 1 False False 1 scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/CancelButton.py0000644000175000017500000000145111242100540026114 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.import_gui.get_widget("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("hide-import-window") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/Manager.py0000644000175000017500000000046111242100540025105 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from ImportButton import Button Button(manager, editor) from FileChooser import FileChooser FileChooser(manager, editor) from CancelButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/Window.py0000644000175000017500000000343411242100540025005 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-import-window", self.__show_cb) self.__sigid3 = manager.connect("hide-import-window", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.import_gui.get_widget("Window") return def __set_properties(self): window = self.__manager.gui.get_widget("Window") self.__window.set_transient_for(window) return def __show(self): self.__window.show_all() return def __hide(self): self.__window.hide() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() self = None del self return def __show_cb(self, *args): self.__show() return def __hide_cb(self, *args): self.__hide() return def __delete_event_cb(self, *args): self.__manager.emit("hide-import-window") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-import-window") return True def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/GUI/FileChooser.py0000644000175000017500000000427311242100540025742 0ustar andreasandreasfrom gettext import gettext as _ class FileChooser(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__chooser.connect("file-activated", self.__activated_cb) self.__sigid3 = self.__chooser.connect("selection-changed", self.__changed_cb) self.__sigid4 = manager.connect("import-button-clicked", self.__activated_cb) self.__chooser.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.import_gui.get_widget("FileChooser") self.__can_import = True return def __set_properties(self): from gtk import FileFilter filter_ = FileFilter() filter_.set_name(_("Template Files")) filter_.add_mime_type("text/xml") self.__chooser.add_filter(filter_) self.__set_folder() return def __set_folder(self): from os.path import exists if exists(self.__editor.desktop_folder): self.__chooser.set_current_folder(self.__editor.desktop_folder) else: self.__chooser.set_current_folder(self.__editor.home_folder) self.__chooser.grab_focus() return def __import_templates(self): filenames = self.__chooser.get_filenames() self.__manager.emit("hide-import-window") self.__manager.emit("process-imported-files", filenames) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__chooser) self.__editor.disconnect_signal(self.__sigid3, self.__chooser) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__chooser.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __activated_cb(self, *args): self.__import_templates() return True def __changed_cb(self, *args): uris = self.__chooser.get_uris() if not uris: return False is_a_folder = lambda _file: self.__editor.uri_is_folder(_file) folders = filter(is_a_folder, uris) self.__can_import = False if folders else True self.__manager.emit("can-import-selected-file", self.__can_import) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/Import/TemplateDataValidator.py0000644000175000017500000000241011242100540027316 0ustar andreasandreasfrom gettext import gettext as _ ERROR_MESSAGE = _("ERROR: No valid templates found") class Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validate-imported-templates", self.__validate_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __is_valid(self, string): string = string.strip() if not string: return False chars = (" ", "\t", "(", "{", "<", "[", "=", ")", "}", ">", "]") for char in string: if char in chars: return False return True def __validate(self, data): templates_data = [_data for _data in data if self.__is_valid(_data[0])] if templates_data: self.__manager.emit("new-imported-templates", templates_data) if not templates_data: self.__manager.emit("error", ERROR_MESSAGE) return False def __destroy_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, data): self.__validate(data) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/0000755000175000017500000000000011242100540023055 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/TemplateDataGenerator.py0000644000175000017500000000377011242100540027652 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-add-template-editor", self.__add_cb) self.__sigid3 = manager.connect("show-edit-template-editor", self.__edit_cb) self.__sigid4 = manager.connect("selected-language-id", self.__language_id_cb) self.__sigid5 = manager.connect("selected-templates-dictionary-key", self.__dictionary_key_cb) self.__sigid6 = manager.connect("gui-template-editor-data", self.__data_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__language = None self.__key = None self.__should_remove_old_key = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __generate_template(self, data): trigger, description, template = data new_key = self.__language + "|" + trigger old_key = self.__key if self.__should_remove_old_key else None template_data = old_key, new_key, description, template self.__manager.emit("new-template-data", template_data) return False def __destroy_cb(self, *args): self.__destroy() return False def __add_cb(self, *args): self.__should_remove_old_key = False return False def __edit_cb(self, *args): self.__should_remove_old_key = True return False def __language_id_cb(self, manager, language): self.__language = language return False def __dictionary_key_cb(self, manager, key): self.__key = key return False def __data_cb(self, manager, data): self.__generate_template(data) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/DescriptionEntry.py0000644000175000017500000000141311242100540026733 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("valid-trigger", self.__valid_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.editor_gui.get_widget("DescriptionEntry") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, valid): self.__entry.set_property("sensitive", valid) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/__init__.py0000644000175000017500000000000011242100540025154 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/ValidatorTriggerListGenerator.py0000644000175000017500000000414011242100540031402 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-add-template-editor", self.__add_cb) self.__sigid3 = manager.connect("show-edit-template-editor", self.__edit_cb) self.__sigid4 = manager.connect("selected-language-id", self.__language_id_cb) self.__sigid5 = manager.connect("selected-templates-dictionary-key", self.__dictionary_key_cb) self.__sigid6 = manager.connect("templates-dictionary", self.__templates_dictionary_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__language = None self.__key = None self.__dictionary = {} return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __send_triggers(self, edit=False): try: if not self.__dictionary: raise ValueError language = self.__language + "|" triggers = [key[len(language):] for key in self.__dictionary.keys() if key.startswith(language)] if edit: triggers.remove(self.__key[len(language):]) self.__manager.emit("template-triggers", triggers) except ValueError: self.__manager.emit("template-triggers", []) return False def __add_cb(self, *args): self.__send_triggers() return False def __edit_cb(self, *args): self.__send_triggers(True) return False def __language_id_cb(self, manager, language): self.__language = language return False def __dictionary_key_cb(self, manager, key): self.__key = key return False def __templates_dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/TriggerEntry.py0000644000175000017500000000000011242100540026042 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/TriggerValidator.py0000644000175000017500000000306311242100540026702 0ustar andreasandreasclass Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("name-entry-string", self.__string_cb) self.__sigid3 = manager.connect("template-triggers", self.__template_triggers_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__triggers = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __is_valid(self, string): string = string.strip() if not string: return False chars = (" ", "\t", "(", "{", "<", "[", "=", ")", "}", ">", "]", "|") for char in string: if char in chars: return False return True def __is_duplicate(self, string): return string in self.__triggers def __validate(self, string): try: if self.__is_duplicate(string): raise ValueError if self.__is_valid(string) is False: raise ValueError self.__manager.emit("valid-trigger", True) except ValueError: self.__manager.emit("valid-trigger", False) return True def __destroy_cb(self, *args): self.__destroy() return False def __string_cb(self, manager, string): self.__validate(string) return False def __template_triggers_cb(self, manager, triggers): self.__triggers = triggers self.__manager.emit("validator-is-ready") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/SaveButton.py0000644000175000017500000000174511242100540025530 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("valid-trigger", self.__valid_cb) self.__sigid3 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.editor_gui.get_widget("SaveButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, valid): self.__button.set_property("sensitive", valid) return False def __clicked_cb(self, *args): self.__manager.emit("updating-database") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/GUI.glade0000644000175000017500000001731311242100540024504 0ustar andreasandreas 10 True GTK_WIN_POS_CENTER_ON_PARENT 480 True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True 10 10 True 3 2 10 10 True False 3 GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN 1 2 2 3 GTK_EXPAND | GTK_SHRINK | GTK_FILL GTK_EXPAND | GTK_SHRINK | GTK_FILL True False 1 2 1 2 GTK_SHRINK True 1 2 GTK_SHRINK True 1 0 <b>_Template:</b> True True ScrolledWindow 2 3 GTK_SHRINK | GTK_FILL GTK_SHRINK | GTK_FILL True 1 <b>_Description:</b> True True DescriptionEntry True 1 2 GTK_SHRINK | GTK_FILL GTK_SHRINK True 1 <b>_Name:</b> True True NameEntry True GTK_SHRINK | GTK_FILL GTK_SHRINK True 10 True GTK_BUTTONBOX_END True gtk-cancel True False 0 True False True True True gtk-save True False 0 1 False False 1 scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/SourceView.py0000644000175000017500000000177011242100540025527 0ustar andreasandreasfrom gtksourceview2 import View, Buffer class SourceView(View): def __init__(self, manager, editor): View.__init__(self, Buffer()) self.__init_attributes(manager, editor) self.__add_view_to_scrolled_window() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("valid-trigger", self.__valid_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __add_view_to_scrolled_window(self): self.set_property("sensitive", False) scrolled_window = self.__manager.editor_gui.get_widget("ScrolledWindow") scrolled_window.add(self) return False def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, valid): self.set_property("sensitive", valid) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/CancelButton.py0000644000175000017500000000137311242100540026014 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.editor_gui.get_widget("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("hide-template-editor") return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/GUIDataExtractor.py0000644000175000017500000000226111242100540026542 0ustar andreasandreasclass Extractor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("updating-database", self.__updating_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__name_entry = manager.editor_gui.get_widget("NameEntry") self.__description_entry = manager.editor_gui.get_widget("DescriptionEntry") self.__buffer = manager.editor_gui.get_widget("ScrolledWindow").get_child().get_buffer() return def __send_data(self): trigger = self.__name_entry.get_text() description = self.__description_entry.get_text() template = self.__buffer.get_text(*self.__buffer.get_bounds()) self.__manager.emit("gui-template-editor-data", (trigger, description, template)) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __updating_cb(self, *args): self.__send_data() return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/Manager.py0000644000175000017500000000142711242100540025005 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from CancelButton import Button Button(manager, editor) from SaveButton import Button Button(manager, editor) from SourceView import SourceView SourceView(manager, editor) from DescriptionEntry import Entry Entry(manager, editor) from NameEntry import Entry Entry(manager, editor) from TemplateDataGenerator import Generator Generator(manager, editor) from GUIDataInitializer import Initializer Initializer(manager, editor) from GUIDataExtractor import Extractor Extractor(manager, editor) from TriggerValidator import Validator Validator(manager, editor) from ValidatorTriggerListGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/GUIDataInitializer.py0000644000175000017500000000467211242100540027062 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-add-template-editor", self.__add_cb) self.__sigid3 = manager.connect("show-edit-template-editor", self.__edit_cb) self.__sigid4 = manager.connect_after("validator-is-ready", self.__is_ready_cb) self.__sigid5 = manager.connect("templates-dictionary", self.__dictionary_cb) self.__sigid6 = manager.connect("selected-templates-dictionary-key", self.__key_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__name_entry = manager.editor_gui.get_widget("NameEntry") self.__description_entry = manager.editor_gui.get_widget("DescriptionEntry") self.__buffer = manager.editor_gui.get_widget("ScrolledWindow").get_child().get_buffer() self.__show = None self.__dictionary = {} self.__key = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return False def __initialize_widgets_for_adding(self): self.__set_widget() return False def __initialize_widgets_for_editing(self): description, template = self.__dictionary[self.__key] trigger = self.__key.split("|")[-1] self.__set_widget(trigger, description, template) return False def __set_widget(self, trigger="", description="", template=""): self.__name_entry.set_text(trigger) self.__description_entry.set_text(description) self.__buffer.set_text(template) self.__name_entry.grab_focus() self.__manager.emit("ready") return False def __destroy_cb(self, *args): self.__destroy() return False def __add_cb(self, *args): self.__show = self.__initialize_widgets_for_adding return False def __edit_cb(self, *args): self.__show = self.__initialize_widgets_for_editing return False def __is_ready_cb(self, *args): self.__show() return False def __dictionary_cb(self, manager, dictionary): self.__dictionary = dictionary return False def __key_cb(self, manager, key): self.__key = key return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/Window.py0000644000175000017500000000461411242100540024703 0ustar andreasandreasfrom gettext import gettext as _ class Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-add-template-editor", self.__add_cb) self.__sigid3 = manager.connect("hide-template-editor", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("show-edit-template-editor", self.__edit_cb) self.__sigid7 = manager.connect("ready", self.__show_cb) self.__sigid8 = manager.connect("updating-database", self.__delete_event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.editor_gui.get_widget("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) self.__window.destroy() del self self = None return False def __set_properties(self): window = self.__manager.gui.get_widget("Window") self.__window.set_transient_for(window) return False def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy_cb(self, *args): self.__destroy() return False def __hide_cb(self, *args): self.__hide() return False def __show_cb(self, *args): self.__show() return False def __delete_event_cb(self, *args): self.__manager.emit("hide-template-editor") return True def __key_press_event_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide-template-editor") return True def __add_cb(self, *args): self.__window.set_title(_("Add Template")) return False def __edit_cb(self, *args): self.__window.set_title(_("Edit Template")) return False scribes-0.4~r910/GenericPlugins/TemplateEditor/EditorGUI/NameEntry.py0000644000175000017500000000244411242100540025335 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__entry.connect("changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.editor_gui.get_widget("NameEntry") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__entry) del self self = None return False def __send_text_async(self): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(150, self.__send_async, priority=9999) return False def __send_async(self): try: from gobject import idle_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = idle_add(self.__send, priority=9999) return False def __send(self): self.__manager.emit("name-entry-string", self.__entry.get_text()) return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): self.__send_text_async() return False scribes-0.4~r910/GenericPlugins/PluginSelection.py0000644000175000017500000000107111242100540022015 0ustar andreasandreasname = "Selection Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "SelectionPlugin" short_description = "Selection operations." long_description = """This plug-in performs operations to select \ a words, sentence, line or paragraph.""" class SelectionPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Selection.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Selection/0000755000175000017500000000000011242100540020265 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Selection/__init__.py0000644000175000017500000000000011242100540022364 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Selection/PopupMenuItem.py0000644000175000017500000001076211242100540023414 0ustar andreasandreasfrom gtk import ImageMenuItem from gettext import gettext as _ class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("Selection")) self.__init_attributes(editor) self.__creates_widgets() self.__set_properties() self.__signal_id_1 = self.select_word_menuitem.connect("activate", self.__popup_activate_cb) self.__signal_id_2 = self.select_line_menuitem.connect("activate", self.__popup_activate_cb) self.__signal_id_3 = self.select_sentence_menuitem.connect("activate", self.__popup_activate_cb) self.__signal_id_4 = self.paragraph_item.connect("activate", self.__popup_activate_cb) self.__signal_id_5 = self.select_word_menuitem.connect("map-event", self.__popup_word_map_event_cb) self.__signal_id_6 = self.select_line_menuitem.connect("map-event", self.__popup_line_map_event_cb) self.__signal_id_7 = self.select_sentence_menuitem.connect("map-event", self.__popup_sentence_map_event_cb) self.__signal_id_9 = self.scribesview.connect("focus-in-event", self.__focus_in_event_cb) def __init_attributes(self, editor): self.scribesview = editor.textview self.editor = editor self.menu = None self.image = None self.select_word_menuitem = None self.select_line_menuitem = None self.select_sentence_menuitem = None return def __creates_widgets(self): from gtk import Image, STOCK_BOLD, Menu self.image = Image() self.image.set_property("stock", STOCK_BOLD) self.menu = Menu() self.select_word_menuitem = self.editor.create_menuitem(_("Select word (alt + w)")) self.select_line_menuitem = self.editor.create_menuitem(_("Select line (alt + l)")) self.select_sentence_menuitem = self.editor.create_menuitem(_("Select sentence (alt + s)")) self.paragraph_item = self.editor.create_menuitem(_("Select paragraph (alt + p)")) return def __set_properties(self): self.set_image(self.image) self.set_submenu(self.menu) self.menu.append(self.select_line_menuitem) self.menu.append(self.select_word_menuitem) self.menu.append(self.select_sentence_menuitem) self.menu.append(self.paragraph_item) if self.editor.readonly: self.set_property("sensitive", False) return def __popup_activate_cb(self, menuitem): if menuitem == self.select_word_menuitem: self.editor.trigger("select-word") elif menuitem == self.select_line_menuitem: self.editor.trigger("select-line") elif menuitem == self.select_sentence_menuitem: self.editor.trigger("select-sentence") elif menuitem == self.paragraph_item: self.editor.trigger("select-paragraph") return True def __popup_word_map_event_cb(self, menuitem, event): menuitem.set_property("sensitive", False) from word import inside_word, starts_word, ends_word cursor_position = self.editor.get_cursor_iterator() if inside_word(cursor_position) or starts_word(cursor_position) or ends_word(cursor_position): menuitem.set_property("sensitive", True) return True def __popup_line_map_event_cb(self, menuitem, event): menuitem.set_property("sensitive", False) from lines import get_line_bounds begin_position, end_position = get_line_bounds(self.editor.textbuffer) if not begin_position.get_char() in ["\n", "\x00"]: menuitem.set_property("sensitive", True) return True def __popup_sentence_map_event_cb(self, menuitem, event): menuitem.set_property("sensitive", False) cursor_position = self.editor.get_cursor_iterator() if cursor_position.starts_sentence() or cursor_position.ends_sentence() or cursor_position.inside_sentence(): menuitem.set_property("sensitive", True) return True def __focus_in_event_cb(self, event, textview): self.editor.disconnect_signal(self.__signal_id_1, self.select_word_menuitem) self.editor.disconnect_signal(self.__signal_id_2, self.select_line_menuitem) self.editor.disconnect_signal(self.__signal_id_3, self.select_sentence_menuitem) self.editor.disconnect_signal(self.__signal_id_4, self.select_sentence_menuitem) self.editor.disconnect_signal(self.__signal_id_5, self.select_word_menuitem) self.editor.disconnect_signal(self.__signal_id_6, self.select_line_menuitem) self.editor.disconnect_signal(self.__signal_id_7, self.select_sentence_menuitem) self.editor.disconnect_signal(self.__signal_id_9, self.scribesview) if self.select_word_menuitem: self.select_word_menuitem.destroy() if self.select_sentence_menuitem: self.select_sentence_menuitem.destroy() if self.select_line_menuitem: self.select_line_menuitem.destroy() if self.image: self.image.destroy() if self.menu: self.menu.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Selection/Trigger.py0000644000175000017500000000446411242100540022252 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(self.__trigger4, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "select-word", "w", _("Select current word"), _("Selection Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-sentence", "s", _("Select current statement"), _("Selection Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-line", "l", _("Select current line"), _("Selection Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "select-paragraph", "p", _("Select current paragraph"), _("Selection Operations") ) self.__trigger4 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__get_manager() function = { self.__trigger1: self.__manager.select_word, self.__trigger2: self.__manager.select_statement, self.__trigger3: self.__manager.select_line, self.__trigger4: self.__manager.select_paragraph, } function[trigger]() return False def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/Selection/Manager.py0000644000175000017500000000151511242100540022213 0ustar andreasandreasfrom gobject import SIGNAL_RUN_LAST, TYPE_NONE, GObject class Manager(GObject): __gsignals__ = { "select-word": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "select-line": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "select-statement": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "select-paragraph": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from Selector import Selector Selector(self, editor) def select_word(self): self.emit("select-word") return False def select_statement(self): self.emit("select-statement") return False def select_line(self): self.emit("select-line") return False def select_paragraph(self): self.emit("select-paragraph") return False def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/Selection/Selector.py0000644000175000017500000000740611242100540022426 0ustar andreasandreasfrom gettext import gettext as _ class Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("select-word", self.__select_word_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("select-line", self.__select_line_cb) self.__sigid4 = manager.connect("select-statement", self.__select_statement_cb) self.__sigid5 = manager.connect("select-paragraph", self.__select_paragraph_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self self = None return def __select_word(self): try: if self.__editor.inside_word() is False: raise ValueError start, end = self.__editor.get_word_boundary() self.__editor.textbuffer.select_range(start, end) line = start.get_line() + 1 message = _("Selected word on line %d") % line self.__editor.update_message(message, "pass") except ValueError: self.__editor.update_message(_("No word to select"), "fail") return False def __select_statement(self): try: start = self.__editor.backward_to_line_begin() if start.ends_line(): raise ValueError cursor = self.__editor.cursor.copy() expression = cursor.starts_sentence() or cursor.ends_sentence() or cursor.inside_sentence() if not expression: raise ValueError start = self.__editor.cursor.copy() while start.starts_sentence() is False: start.backward_char() end = self.__editor.cursor.copy() while end.ends_sentence() is False: end.forward_char() self.__editor.textbuffer.select_range(start, end) line = start.get_line() + 1 message = _("Selected statement on line %d") % line self.__editor.update_message(message, "pass") except ValueError: message = _("No text to select") self.__editor.update_message(message, "fail") return False def __select_line(self): try: start = self.__editor.backward_to_line_begin() if start.ends_line(): raise ValueError end = self.__editor.forward_to_line_end() self.__editor.textbuffer.select_range(start, end) line = start.get_line() + 1 message = _("Selected line %d") % line self.__editor.update_message(message, "pass") except ValueError: message = _("No text to select") self.__editor.update_message(message, "fail") return False def __select_paragraph(self): try: if self.__editor.is_empty_line(): raise ValueError start = self.__editor.cursor.copy() while True: if self.__editor.is_empty_line(start): break success = start.backward_line() if success is False: break if self.__editor.is_empty_line(start): start.forward_line() end = self.__editor.cursor.copy() while True: if self.__editor.is_empty_line(end): break success = end.forward_line() if success is False: break self.__editor.textbuffer.select_range(start, end) message = _("Selected paragraph") self.__editor.update_message(message, "pass") except ValueError: message = _("No text to select") self.__editor.update_message(message, "fail") return False def __select_word_cb(self, *args): self.__select_word() return False def __select_statement_cb(self, *args): self.__select_statement() return False def __select_line_cb(self, *args): self.__select_line() return False def __select_paragraph_cb(self, *args): self.__select_paragraph() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PluginMatchingBracket.py0000644000175000017500000000117711242100540023125 0ustar andreasandreasname = "Matching Bracket Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "MatchingBracketPlugin" short_description = "Find matching brackets." long_description = """This plug-in the plug-in finds matching brackets \ in the editing area. Press (alt - shift - b) to find matching brackets. \ """ class MatchingBracketPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from MatchingBracket.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginDocumentInformation.py0000644000175000017500000000110311242100540024050 0ustar andreasandreasname = "Document Information Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "DocumentInformationPlugin" short_description = "Shows document information window." long_description = """Shows the document information window.""" class DocumentInformationPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from DocumentInformation.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginAutoReplace.py0000644000175000017500000000151011242100540022272 0ustar andreasandreasname = "Automatic Word Replacement" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "AutoReplacePlugin" short_description = "Expand abbreviations in the buffer" long_description = """\ The plug-in allows users to expand abbreviations in the editing area. buffer. Via a graphic user interface, a user can map the letter "u" to the word "you". Thus, anytime the user types "u" followed by the "space" or "Enter" key, "u" is expanded to "you". This plug-in implements the algorithm to perform such expansions. """ class AutoReplacePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from AutoReplace.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginNewWindow.py0000644000175000017500000000102511242100540022010 0ustar andreasandreasname = "New Window Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "NewWindowPlugin" short_description = "Open a new editor window." long_description = """Press ctrl+n to open a new editor window.""" class NewWindowPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from NewWindow.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginSmartSpace.py0000644000175000017500000000077511242100540022144 0ustar andreasandreasname = "Smart Space Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "SmartSpacePlugin" short_description = "Smart space plugin." long_description = """Smart space plugin.""" class SmartSpacePlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from SmartSpace.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/BracketCompletion/0000755000175000017500000000000011242100540021745 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketCompletion/__init__.py0000644000175000017500000000000011242100540024044 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketCompletion/Manager.py0000644000175000017500000002400511242100540023672 0ustar andreasandreasfrom gettext import gettext as _ from gtk import keysyms KEYSYMS = { keysyms.quotedbl : keysyms.quotedbl, keysyms.braceleft : keysyms.braceright, keysyms.bracketleft : keysyms.bracketright, keysyms.parenleft : keysyms.parenright, keysyms.leftdoublequotemark : keysyms.rightdoublequotemark, keysyms.guillemotleft : keysyms.guillemotright, keysyms.guillemotright : keysyms.guillemotleft, keysyms.leftsinglequotemark : keysyms.rightsinglequotemark, keysyms.leftmiddlecurlybrace : keysyms.rightmiddlecurlybrace, keysyms.lowleftcorner : keysyms.lowrightcorner, keysyms.topleftparens : keysyms.toprightparens, keysyms.topleftsqbracket : keysyms.toprightsqbracket, keysyms.upleftcorner : keysyms.uprightcorner, keysyms.botleftparens : keysyms.botrightparens, keysyms.botleftsqbracket : keysyms.botrightsqbracket, keysyms.less : keysyms.greater, keysyms.dollar : keysyms.dollar, keysyms.apostrophe : keysyms.apostrophe, keysyms.singlelowquotemark : keysyms.leftsinglequotemark, keysyms.doublelowquotemark : keysyms.leftdoublequotemark, } class BracketManager(object): def __init__(self, editor): self.__init_attributes(editor) self.__check_mimetype() self.__sigid1 = editor.textview.connect("key-press-event", self.__key_press_event_cb) self.__sigid2 = editor.connect("cursor-moved", self.__cursor_moved_cb) self.__sigid3 = editor.connect("loaded-file", self.__loaded_document_cb) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor): self.__editor = editor self.__match = editor.find_matching_bracket self.__monitor_list = [] self.__escape_character = "\\" self.__open_pair_characters = [ keysyms.quotedbl, keysyms.braceleft, keysyms.bracketleft, keysyms.parenleft, keysyms.leftdoublequotemark, keysyms.guillemotleft, keysyms.guillemotright, keysyms.leftsinglequotemark, keysyms.leftmiddlecurlybrace, keysyms.lowleftcorner, keysyms.topleftparens, keysyms.topleftsqbracket, keysyms.upleftcorner, keysyms.botleftparens, keysyms.botleftsqbracket, keysyms.apostrophe, keysyms.singlelowquotemark, keysyms.doublelowquotemark ] self.__open_pair_characters_for_enclosement = self.__open_pair_characters + [keysyms.less, keysyms.apostrophe] return def __precompile_methods(self): methods = (self.__key_press_event_cb, self.__cursor_moved_cb, self.__insert_closing_pair_character) self.__editor.optimize(methods) return False ######################################################################## # # Public Methods # ######################################################################## def destroy(self): self.__destroy() return ######################################################################## # # Helper Methods # ######################################################################## def __insert_closing_pair_character(self, keyval): self.__editor.begin_user_action() if keyval == keysyms.apostrophe: if self.__can_insert_apostrophe(): self.__insert_pair_characters(keyval, keysyms.apostrophe) else: self.__insert_apostrophe() else: self.__insert_pair_characters(keyval, KEYSYMS[keyval]) self.__editor.end_user_action() return def __enclose_selection(self, keyval): self.__editor.begin_user_action() self.__insert_enclosed_selection(keyval, KEYSYMS[keyval]) self.__editor.end_user_action() return def __insert_pair_characters(self, open_keyval, close_keyval): textbuffer = self.__editor.textbuffer from gtk.gdk import keyval_to_unicode utf8_open_character = unichr(keyval_to_unicode(open_keyval)).encode("utf-8") utf8_closing_character = unichr(keyval_to_unicode(close_keyval)).encode("utf-8") cursor_position = self.__editor.cursor begin_mark = textbuffer.create_mark(None, cursor_position, True) textbuffer.begin_user_action() textbuffer.insert_at_cursor(utf8_open_character+utf8_closing_character) textbuffer.end_user_action() cursor_position = self.__editor.cursor end_mark = textbuffer.create_mark(None, cursor_position, False) cursor_position.backward_char() textbuffer.place_cursor(cursor_position) self.__monitor_list.append((close_keyval, (begin_mark, end_mark))) return def __insert_enclosed_selection(self, open_keyval, close_keyval): textbuffer = self.__editor.textbuffer from gtk.gdk import keyval_to_unicode utf8_open_character = unichr(keyval_to_unicode(open_keyval)).encode("utf-8") utf8_closing_character = unichr(keyval_to_unicode(close_keyval)).encode("utf-8") selection = textbuffer.get_selection_bounds() string = textbuffer.get_text(selection[0], selection[1]) text = utf8_open_character + string + utf8_closing_character textbuffer.delete(selection[0], selection[1]) textbuffer.insert_at_cursor(text) message = _("Enclosed selected text") self.__editor.update_message(message, "pass") return def __move_cursor_out_of_bracket_region(self): self.__editor.hide_completion_window() textbuffer = self.__editor.textbuffer end_mark = self.__monitor_list[-1][1][1] iterator = textbuffer.get_iter_at_mark(end_mark) textbuffer.place_cursor(iterator) self.__editor.move_view_to_cursor() return def __stop_monitoring(self): begin_mark = self.__monitor_list[-1][1][0] end_mark = self.__monitor_list[-1][1][1] self.__editor.delete_mark(begin_mark) self.__editor.delete_mark(end_mark) del self.__monitor_list[-1] return def __remove_closing_pair_character(self): textbuffer = self.__editor.textbuffer begin_mark = self.__monitor_list[-1][1][0] end_mark = self.__monitor_list[-1][1][1] begin = textbuffer.get_iter_at_mark(begin_mark) end = textbuffer.get_iter_at_mark(end_mark) if (len(textbuffer.get_text(begin, end)) != 2): return False begin.forward_char() from gtk.gdk import keyval_to_unicode close_keyval = self.__monitor_list[-1][0] character = unichr(keyval_to_unicode(close_keyval)).encode("utf-8") if (begin.get_char() != character): return False self.__editor.begin_user_action() begin.backward_char() textbuffer.begin_user_action() textbuffer.delete(begin, end) textbuffer.end_user_action() message = _("Removed pair character") self.__editor.update_message(message, "pass") self.__editor.end_user_action() return True def __has_escape_character(self): end_iterator = self.__editor.cursor start_iterator = end_iterator.copy() start_iterator.backward_char() if (start_iterator.get_char() == self.__escape_character): return True return False def __remove_escape_character(self): end_iterator = self.__editor.cursor start_iterator = end_iterator.copy() start_iterator.backward_char() self.__editor.textbuffer.delete(start_iterator, end_iterator) return def __can_insert_apostrophe(self): iterator = self.__editor.cursor if (iterator.starts_line()): return True iterator.backward_char() character = iterator.get_char() if (character.isalpha()): return False return True def __insert_apostrophe(self): from gtk.gdk import keyval_to_unicode utf8_apostrophe_character = unichr(keyval_to_unicode(keysyms.apostrophe)).encode("utf-8") self.__editor.textbuffer.insert_at_cursor(utf8_apostrophe_character) return def __check_mimetype(self): markup_mimetype = ["text/html", "application/xml", "text/xml", "application/docbook+xml"] if not (self.__editor.uri): return try: mimetype = self.__editor.mimetype except RuntimeError: return if (mimetype == "text/x-tex"): self.__open_pair_characters.append(keysyms.dollar) self.__open_pair_characters_for_enclosement.append(keysyms.dollar) elif mimetype in markup_mimetype: self.__open_pair_characters.append(keysyms.less) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor.textview) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self = None del self return ######################################################################## # # Signal and Event Handlers # ######################################################################## def __key_press_event_cb(self, textview, event): if self.__editor.has_selection and (event.keyval in self.__open_pair_characters_for_enclosement): self.__editor.hide_completion_window() self.__enclose_selection(event.keyval) return True if (self.__monitor_list): if (event.keyval == keysyms.BackSpace): self.__editor.hide_completion_window() result = self.__remove_closing_pair_character() return result if (keysyms.Escape == event.keyval): self.__editor.hide_completion_window() self.__move_cursor_out_of_bracket_region() return True if (self.__monitor_list[-1][0] == event.keyval): self.__editor.hide_completion_window() if event.keyval in (keysyms.quotedbl, keysyms.apostrophe): if (self.__has_escape_character()): self.__remove_escape_character() self.__insert_closing_pair_character(event.keyval) return True self.__move_cursor_out_of_bracket_region() return True if event.keyval in self.__open_pair_characters: self.__editor.hide_completion_window() self.__insert_closing_pair_character(event.keyval) return True return False def __cursor_moved_cb(self, editor): from gobject import idle_add idle_add(self.__monitor_pair_characters, priority=9999) return def __monitor_pair_characters(self): if not (self.__monitor_list): return False textbuffer = self.__editor.textbuffer begin_mark = self.__monitor_list[-1][1][0] end_mark = self.__monitor_list[-1][1][1] begin = textbuffer.get_iter_at_mark(begin_mark) end = textbuffer.get_iter_at_mark(end_mark) cursor_position = self.__editor.cursor if (cursor_position.equal(begin)) or (cursor_position.equal(end)): self.__stop_monitoring() elif not (cursor_position.in_range(begin, end)): self.__stop_monitoring() return False def __loaded_document_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__check_mimetype, priority=PRIORITY_LOW) return scribes-0.4~r910/GenericPlugins/PluginSyntaxColorSwitcher.py0000644000175000017500000000120211242100540024062 0ustar andreasandreasname = "Syntax Color Switcher Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = False class_name = "SyntaxColorSwitcherPlugin" short_description = "Switch syntax colors" long_description = """This plugin enables users to set syntax colors \ for documents for a specific language via the popup menu. """ class SyntaxColorSwitcherPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from SyntaxColorSwitcher.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.emit("destroy") return scribes-0.4~r910/GenericPlugins/QuickOpen/0000755000175000017500000000000011242100540020236 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/URIOpener.py0000644000175000017500000000111211242100540022413 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Opener(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "selected-paths", self.__uris_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy_cb(self, *args): self.disconnect() del self return False def __uris_cb(self, manager, uris): self.__editor.open_files(uris) return False scribes-0.4~r910/GenericPlugins/QuickOpen/__init__.py0000644000175000017500000000000011242100540022335 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/FileFormatter.py0000644000175000017500000000267211242100540023362 0ustar andreasandreasclass Formatter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("current-path", self.__path_cb) self.__sigid3 = manager.connect("files", self.__files_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__path = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __replace(self, _file): from gio import File __file = File(_file).get_path() return __file.replace(self.__path, "").lstrip("/"), File(_file).get_uri() def __format(self, files): paths = [self.__replace(_file) for _file in files] self.__manager.emit("formatted-files", paths) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __files_cb(self, manager, files): self.__remove_timer() from gobject import idle_add self.__timer = idle_add(self.__format, files) return False def __path_cb(self, manager, path): from gio import File self.__path = File(path).get_path() return False scribes-0.4~r910/GenericPlugins/QuickOpen/Trigger.py0000644000175000017500000000224211242100540022213 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-quick-open-window", "o", _("Open files quickly"), _("File Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().show() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return scribes-0.4~r910/GenericPlugins/QuickOpen/Feedback.py0000644000175000017500000001027711242100540022303 0ustar andreasandreasfrom gettext import gettext as _ STATUS_MESSAGE = _("Open files quickly") class Feedback(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("pattern", self.__pattern_cb) self.__sigid3 = manager.connect("filtered-files", self.__files_cb) self.__sigid4 = manager.connect("entry-changed", self.__changed_cb) self.__sigid5 = manager.connect("current-path", self.__path_cb) self.__sigid6 = manager.connect("formatted-files", self.__formatted_cb) self.__sigid7 = manager.connect("show", self.__show_cb) self.__sigid8 = manager.connect("hide", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__path = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) del self return False def __clear(self, pattern): if pattern: return False self.__manager.emit("clear-message") return False def __search(self): message = _("searching please wait...") self.__manager.emit("message", message) return False def __message(self, files): try: from gobject import timeout_add if not files: raise ValueError message = _("%s matches found") % len(files) self.__manager.emit("message", message) self.__timer1 = timeout_add(5000, self.__clear, "") except ValueError: message = _("No match found") self.__manager.emit("message", message) self.__timer2 = timeout_add(7000, self.__clear, "") return False def __current_path(self, uri): self.__path = uri message = _("updating search path please wait...") self.__manager.emit("message", message) return False def __path_message(self): from gio import File path = File(self.__path).get_path() message = _("%s is the current search path") % path self.__manager.emit("message", message) from gobject import timeout_add self.__timer3 = timeout_add(5000, self.__clear, "") return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, 3: self.__timer3, 4: self.__timer4, 5: self.__timer5, 6: self.__timer6, 7: self.__timer7, 8: self.__timer8, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 9)] return False def __destroy_cb(self, *args): self.__destroy() return False def __pattern_cb(self, manager, pattern): self.__remove_all_timers() from gobject import idle_add self.__timer4 = idle_add(self.__clear, pattern, priority=9999) return False def __files_cb(self, manager, files): self.__remove_all_timers() from gobject import idle_add self.__timer5 = idle_add(self.__message, files, priority=9999) return False def __changed_cb(self, *args): self.__remove_all_timers() from gobject import idle_add self.__timer6 = idle_add(self.__search, priority=9999) return False def __path_cb(self, manager, uri): self.__remove_all_timers() from gobject import idle_add self.__timer7 = idle_add(self.__current_path, uri, priority=9999) return False def __formatted_cb(self, *args): self.__remove_all_timers() from gobject import idle_add self.__timer8 = idle_add(self.__path_message, priority=9999) return False def __show_cb(self, *args): self.__editor.set_message(STATUS_MESSAGE) return False def __hide_cb(self, *args): self.__editor.unset_message(STATUS_MESSAGE) return False scribes-0.4~r910/GenericPlugins/QuickOpen/Cancellable.py0000644000175000017500000000154011242100540022775 0ustar andreasandreasfrom gio import Cancellable class GCancellable(Cancellable): def __init__(self, manager, editor): Cancellable.__init__(self) self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("enumeration-error", self.__error_cb) self.__sigid3 = manager.connect("hide", self.__error_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __destroy_cb(self, *args): self.__destroy() return False def __error_cb(self, *args): self.cancel() self.reset() return False scribes-0.4~r910/GenericPlugins/QuickOpen/Manager.py0000644000175000017500000000445111242100540022166 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE, TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "pattern": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "current-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "parent-path": (SSIGNAL, TYPE_NONE, ()), "get-fileinfos": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "folder-and-fileinfos": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "filtered-files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "formatted-files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "model-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-paths": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "uris": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "row-activated": (SSIGNAL, TYPE_NONE, ()), "updated-model": (SSIGNAL, TYPE_NONE, ()), "up-key-press": (SSIGNAL, TYPE_NONE, ()), "focus-entry": (SSIGNAL, TYPE_NONE, ()), "message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "clear-message": (SSIGNAL, TYPE_NONE, ()), "entry-changed": (SSIGNAL, TYPE_NONE, ()), "enumeration-error": (SSIGNAL, TYPE_NONE, ()), "filter-fileinfos": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from Feedback import Feedback Feedback(self, editor) from URIOpener import Opener Opener(self, editor) from MatchFilterer import Filterer Filterer(self, editor) from FileFormatter import Formatter Formatter(self, editor) from FileinfoFilterer import Filterer Filterer(self, editor) from Enumerator import Enumerator Enumerator(self, editor) from FilesAggregator import Aggregator Aggregator(self, editor) from FolderPathUpdater import Updater Updater(self, editor) from GUI.Manager import Manager Manager(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def show(self): self.emit("show") return False def destroy(self): self.emit("destroy") del self return False scribes-0.4~r910/GenericPlugins/QuickOpen/MatchFilterer.py0000644000175000017500000000332311242100540023342 0ustar andreasandreasclass Filterer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("formatted-files", self.__files_cb) self.__sigid3 = manager.connect("pattern", self.__pattern_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__files = [] self.__pattern = "" return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __is_a_match(self, pattern, _file): self.__editor.refresh(False) if self.__pattern != pattern: raise AssertionError return pattern.lower() in _file.lower() def __filter(self, pattern): try: self.__editor.refresh(False) if not pattern: raise ValueError filtered_files = [(_file, uri) for _file, uri in self.__files if self.__is_a_match(pattern, _file)] self.__manager.emit("filtered-files", filtered_files) except ValueError: self.__manager.emit("filtered-files", []) except AssertionError: return False return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __files_cb(self, manager, files): self.__files = files return False def __pattern_cb(self, manager, pattern): self.__pattern = pattern self.__remove_timer() from gobject import idle_add self.__timer = idle_add(self.__filter, pattern) return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/0000755000175000017500000000000011242100540020662 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/GUI/Entry.py0000644000175000017500000000503511242100540022340 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_cb) # self.__sigid3 = manager.connect("hide", self.__hide_cb) self.__sigid4 = self.__entry.connect("changed", self.__changed_cb) self.__sigid5 = self.__entry.connect("activate", self.__activate_cb) self.__sigid6 = manager.connect("focus-entry", self.__focus_cb) self.__sigid7 = manager.connect_after("formatted-files", self.__files_cb) self.__entry.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.gui.get_object("TextEntry") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) # self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__entry) self.__editor.disconnect_signal(self.__sigid5, self.__entry) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) del self return False def __send(self): self.__manager.emit("pattern", self.__entry.get_text().strip()) return False def __timeout_send(self): try: from gobject import timeout_add, source_remove source_remove(self.__timer1) except AttributeError: pass finally: self.__timer1 = timeout_add(250, self.__send, priority=9999) return False def __clear(self): self.__entry.set_text("") self.__entry.grab_focus() return False def __show_cb(self, *args): # from gobject import idle_add # idle_add(self.__clear) self.__entry.grab_focus() return False def __hide_cb(self, *args): # from gobject import idle_add # idle_add(self.__clear) return False def __activate_cb(self, *args): self.__manager.emit("row-activated") return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): try: self.__manager.emit("entry-changed") from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__timeout_send) return False def __focus_cb(self, *args): self.__entry.grab_focus() return False def __files_cb(self, *args): self.__entry.grab_focus() if not self.__entry.get_text().strip(): return False self.__timeout_send() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/__init__.py0000644000175000017500000000000011242100540022761 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/0000755000175000017500000000000011242100540022414 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/__init__.py0000644000175000017500000000000011242100540024513 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/Disabler.py0000644000175000017500000000157711242100540024525 0ustar andreasandreasclass Disabler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("filtered-files", self.__files_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __sensitive(self, files): value = True if files else False self.__view.set_property("sensitive", value) return False def __files_cb(self, manager, files): from gobject import idle_add idle_add(self.__sensitive, files) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/UpKeyHandler.py0000644000175000017500000000231411242100540025321 0ustar andreasandreasclass Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("up-key-press", self.__press_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() self.__column = self.__view.get_column(0) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __up(self): try: model, paths = self.__selection.get_selected_rows() if not paths: raise ValueError row = paths[0][0] if not row: raise ValueError previous_row = row - 1 self.__selection.select_path(previous_row) self.__view.set_cursor(previous_row, self.__column) self.__view.scroll_to_cell(previous_row, None, True, 0.5, 0.5) except ValueError: self.__manager.emit("focus-entry") return False def __destroy_cb(self, *args): self.__destroy() return False def __press_cb(self, *args): self.__up() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/RowActivationHandler.py0000644000175000017500000000220711242100540027056 0ustar andreasandreasclass Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("row-activated", self.__activated_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __send(self): try: model, paths = self.__selection.get_selected_rows() if not paths: raise ValueError get_path = lambda path: model[path][-1] filepaths = [get_path(path) for path in paths] self.__manager.emit("selected-paths", filepaths) self.__manager.emit("hide") except ValueError: print "no selection to open" return False def __destroy_cb(self, *args): self.__destroy() return False def __activated_cb(self, *args): from gobject import idle_add idle_add(self.__send) return True scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/Initializer.py0000644000175000017500000000323011242100540025247 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self return False def __set_properties(self): from gtk import TreeViewColumn from gtk import TREE_VIEW_COLUMN_AUTOSIZE, CellRendererText from gtk import SELECTION_MULTIPLE view = self.__view view.get_selection().set_mode(SELECTION_MULTIPLE) # Create a column for selecting encodings. column = TreeViewColumn() view.append_column(column) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.set_spacing(12) renderer = CellRendererText() column.pack_start(renderer, True) column.set_attributes(renderer, text=0) column.set_resizable(True) # Create a column for character encoding. column = TreeViewColumn() view.append_column(column) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) renderer = CellRendererText() # Create the renderer for the Language column column.pack_start(renderer, True) column.set_attributes(renderer, text=1) column.set_resizable(True) column.set_spacing(12) # Set treeview properties view.columns_autosize() view.set_model(self.__create_model()) #view.set_enable_search(True) return def __create_model(self): from gtk import ListStore model = ListStore(str, str, str) return model def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/ModelUpdater.py0000644000175000017500000000351711242100540025361 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("model-data", self.__data_cb) self.__sigid3 = manager.connect("filtered-files", self.__files_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__model = self.__view.get_model() self.__column1 = self.__view.get_column(0) self.__column2 = self.__view.get_column(1) self.__data = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __populate(self, data): if self.__data == data: return False from copy import copy self.__data = copy(data) self.__view.window.freeze_updates() self.__view.set_model(None) self.__model.clear() for name, path, uri in data: self.__editor.refresh(False) self.__model.append([name, path, uri]) self.__editor.refresh(False) self.__column1.queue_resize() self.__column2.queue_resize() self.__view.set_model(self.__model) self.__manager.emit("updated-model") return False def __clear(self): self.__view.set_model(None) self.__model.clear() self.__view.set_model(self.__model) return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__populate, data) return False def __files_cb(self, manager, files): if not files: self.__clear() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/ModelDataGenerator.py0000644000175000017500000000216311242100540026471 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("filtered-files", self.__files_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __generate(self, files): self.__editor.refresh(False) data = [self.__split(file_data) for file_data in files] self.__editor.refresh(False) self.__manager.emit("model-data", data) self.__editor.refresh(False) return False def __split(self, file_data): _file, uri = file_data self.__editor.refresh(False) from os.path import split self.__editor.refresh(False) return split(_file)[-1], _file, uri def __destroy_cb(self, *args): self.__destroy() return False def __files_cb(self, manager, files): from gobject import idle_add idle_add(self.__generate, files) return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/KeyboardHandler.py0000644000175000017500000000250511242100540026026 0ustar andreasandreasclass Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__view.connect("key-press-event", self.__event_cb) self.__sigid3 = self.__view.connect("button-press-event", self.__button_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") from gtk.keysyms import Up, Return, Escape self.__dictionary = { Up: "up-key-press", Return: "row-activated", Escape: "hide", } return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__view) self.__editor.disconnect_signal(self.__sigid3, self.__view) del self return False def __emit(self, signal): self.__manager.emit(signal) return False def __destroy_cb(self, *args): self.__destroy() return False def __event_cb(self, treeview, event): if not (event.keyval in self.__dictionary.keys()): return False self.__emit(self.__dictionary[event.keyval]) return True def __button_cb(self, treeview, event): from gtk.gdk import _2BUTTON_PRESS if event.type != _2BUTTON_PRESS: return False self.__manager.emit("row-activated") return True scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/Manager.py0000644000175000017500000000111111242100540024332 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Disabler import Disabler Disabler(manager, editor) from RowSelector import Selector Selector(manager, editor) from UpKeyHandler import Handler Handler(manager, editor) from KeyboardHandler import Handler Handler(manager, editor) from RowActivationHandler import Handler Handler(manager, editor) from ModelUpdater import Updater Updater(manager, editor) from ModelDataGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/TreeView/RowSelector.py0000644000175000017500000000243111242100540025236 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("updated-model", self.__updated_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() self.__column = self.__view.get_column(0) self.__model = self.__view.get_model() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __select(self): try: if not len(self.__model): raise ValueError self.__selection.select_path(0) self.__view.set_cursor(0, self.__column) self.__view.scroll_to_cell(0, None, True, 0.5, 0.5) except ValueError: pass finally: self.__view.window.thaw_updates() return False def __destroy_cb(self, *args): self.__destroy() return False def __updated_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__select) return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/GUI.glade0000644000175000017500000001171511242100540022311 0ustar andreasandreas 10 Open Files QuickOpenWindowRole True center-always 640 320 True scribes dialog True True True static QuickOpenWindowID True 10 True 10 True 1 <b>_Search for: </b> True True TextEntry True False False 0 True False True True True True True True True False 1 False False 0 True False automatic automatic in True False False False True False False vertical 1 True 0 <b>Feedback goes here...</b> True True False False 2 scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/Label.py0000644000175000017500000000220711242100540022254 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("message", self.__message_cb) self.__sigid3 = manager.connect("clear-message", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_object("FeedbackLabel") self.__message = "" return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __set(self, message): if self.__message == message: return False self.__label.set_markup(message) self.__label.show() self.__message = message return False def __destroy_cb(self, *args): self.__destroy() return False def __message_cb(self, manager, message): from gobject import idle_add idle_add(self.__set, message) return False def __clear_cb(self, *args): self.__label.hide() return False scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/Manager.py0000644000175000017500000000043411242100540022607 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from TreeView.Manager import Manager Manager(manager, editor) from Label import Label Label(manager, editor) from Entry import Entry Entry(manager, editor) from Window import Window Window(manager, editor) scribes-0.4~r910/GenericPlugins/QuickOpen/GUI/Window.py0000644000175000017500000000455311242100540022512 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show", self.__show_cb) self.__sigid3 = manager.connect("hide", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("current-path", self.__path_cb) self.__sigid7 = manager.connect("files", self.__files_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_object("Window") return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__window.destroy() del self return False def __hide(self): self.__window.hide() return False def __show(self): self.__window.show_all() return False def __change_path(self): self.__manager.emit("parent-path") return True def __delete_event_cb(self, *args): self.__manager.emit("hide") return False def __key_press_event_cb(self, window, event): from gtk.gdk import MOD1_MASK from gtk.keysyms import Up, Escape if event.state & MOD1_MASK and event.keyval == Up: return self.__change_path() if event.keyval != Escape: return False self.__manager.emit("hide") return True def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __destroy_cb(self, *args): self.__destroy() return False def __files_cb(self, *args): self.__window.set_property("sensitive", True) return False def __path_cb(self, *args): self.__window.set_property("sensitive", False) return False scribes-0.4~r910/GenericPlugins/QuickOpen/FileinfoFilterer.py0000644000175000017500000000416711242100540024050 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Filterer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "filter-fileinfos", self.__filter_cb) from gobject import idle_add idle_add(self.__optimize, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__extensions = ( "bmp", "tif", "tiff", "ps", "png", "mng", "ico", "jpg", "jpeg", "gif", "xcf", "pdf", "aac", "flac", "mp3", "ogg", "ra", "ram", "snd", "wav", "wma", "asf", "asx", "avi", "divx", "flv", "mov", "mp4", "mpeg", "mpg", "qt", "wmv", "xvid", "gdb", "dll", "ods", "pps", "ppsx", "ppt", "xls", "xlsx", "otf", "ttf", "cab", "la", "so", "lo", "o", "exe", "bat", "7z", "bz", "bz2", "bzip", "deb", "gz", "gzip", "rar", "zip", "tar", "tbz", "tbz2", "iso", "msi", "part", "torrent", "doc", "pyo", "pyc", "nfo", "m4v", "rtf", "in", "gmo", "toc", "odt", "dat", "svg" ) return def __destroy(self): self.disconnect() del self return False def __valid(self, fileinfo): self.__editor.refresh(False) from gio import FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR if fileinfo.get_file_type() not in (FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR): return False if fileinfo.get_is_hidden(): return False if fileinfo.get_is_symlink(): return False if fileinfo.get_is_backup(): return False extension = fileinfo.get_display_name().split(".")[-1] if extension.lower() in self.__extensions: return False return True def __filter(self, data): folder, fileinfos = data fileinfos = [fileinfo for fileinfo in fileinfos if self.__valid(fileinfo)] self.__manager.emit("folder-and-fileinfos", (folder, fileinfos)) return False def __optimize(self): self.__editor.optimize((self.__filter, self.__valid)) return False def __destroy_cb(self, *args): self.__destroy() return False def __filter_cb(self, manager, data): from gobject import idle_add idle_add(self.__filter, data, priority=9999) return False scribes-0.4~r910/GenericPlugins/QuickOpen/Enumerator.py0000644000175000017500000000352711242100540022740 0ustar andreasandreasclass Enumerator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("get-fileinfos", self.__fileinfos_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from Cancellable import GCancellable self.__cancellable = GCancellable(manager, editor) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __send(self, folder): attributes = "standard::*" from gio import File File(folder).enumerate_children_async( attributes, self.__children_async_cb, cancellable=self.__cancellable, user_data=folder ) return False def __children_async_cb(self, gfile, result, folder): try: from gio import Error enumerator = gfile.enumerate_children_finish(result) from gobject import idle_add idle_add(self.__get_fileinfos, (enumerator, folder)) except Error: print "Enumration Error Exception in Emumerator.py of QuickOpen plugin in __children_async_cb" self.__manager.emit("enumeration-error") return False def __get_fileinfos(self, data): enumerator, folder = data enumerator.next_files_async(999999, self.__next_async_cb, cancellable=self.__cancellable, user_data=folder) return False def __next_async_cb(self, enumerator, result, folder): fileinfos = enumerator.next_files_finish(result) self.__manager.emit("filter-fileinfos", (folder, fileinfos)) enumerator.close(self.__cancellable) return False def __destroy_cb(self, *args): self.__destroy() return False def __fileinfos_cb(self, manager, folder): from gobject import idle_add idle_add(self.__send, folder) return False scribes-0.4~r910/GenericPlugins/QuickOpen/FilesAggregator.py0000644000175000017500000000601211242100540023654 0ustar andreasandreasclass Aggregator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("current-path", self.__path_cb) self.__sigid3 = manager.connect("folder-and-fileinfos", self.__fileinfos_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__folders = deque() self.__files = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __get_uri(self, folder, fileinfo): from gio import File from os.path import join self.__editor.refresh(False) path = join(File(folder).get_path(), fileinfo.get_name()) self.__editor.refresh(False) return File(path).get_uri() def __update_afiles(self, afiles, folder, fileinfos): self.__editor.refresh(False) uris = (self.__get_uri(folder, fileinfo) for fileinfo in fileinfos) self.__editor.refresh(False) [afiles.append(_file) for _file in uris] self.__editor.refresh(False) return False def __aggregate(self): self.__editor.refresh(False) afiles = [] [self.__update_afiles(afiles, folder, fileinfos) for folder, fileinfos in self.__files] self.__manager.emit("files", afiles) return False def __update_folder_and_files(self, fileinfo, _folders, _files): self.__editor.refresh(False) _files.append(fileinfo) if fileinfo.get_file_type() == 1 else _folders.append(fileinfo) self.__editor.refresh(False) return False def __update_files(self, data): folder, fileinfos = data _folders = [] _files = [] [self.__update_folder_and_files(fileinfo, _folders, _files) for fileinfo in fileinfos] self.__files.append((folder, _files)) [self.__send_to_fileinfo_processor(self.__get_uri(folder, fileinfo)) for fileinfo in _folders] if folder in self.__folders: self.__folders.remove(folder) if not self.__folders: self.__aggregate() return False def __get_children_files_and_folders(self, folder): self.__editor.refresh(False) self.__folders.clear() self.__files = [] self.__send_to_fileinfo_processor(folder) return False def __send_to_fileinfo_processor(self, folder): self.__editor.refresh(False) self.__folders.append(folder) self.__manager.emit("get-fileinfos", folder) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __path_cb(self, manager, folder): self.__remove_timer() from gobject import idle_add self.__timer = idle_add(self.__get_children_files_and_folders, folder) return False def __fileinfos_cb(self, manager, data): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update_files, data, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/QuickOpen/FolderPathUpdater.py0000644000175000017500000000265411242100540024174 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "parent-path", self.__parent_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "enumeration-error", self.__error_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__path = "" return def __destroy(self): self.disconnect() del self return False def __update(self, parent=False): try: pwduri = self.__path if self.__path else self.__editor.pwd_uri from gio import File self.__path = File(pwduri).get_parent().get_uri() if parent else pwduri self.__manager.emit("current-path", self.__path) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __parent_cb(self, *args): from gobject import idle_add idle_add(self.__update, True) return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__update) return False def __hide_cb(self, *args): self.__path = "" return False def __error_cb(self, *args): self.__path = "" from gobject import timeout_add timeout_add(1000, self.__update) return False scribes-0.4~r910/GenericPlugins/QuickOpen/.goutputstream-C18XZU0000644000175000017500000000210111242100540024114 0ustar andreasandreasclass Trigger(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = self.__trigger.connect("activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__trigger = self.__create_trigger() self.__manager = None return def __destroy(self): if self.__manager: self.__manager.destroy() self.__editor.remove_trigger(self.__trigger) self.__editor.disconnect_signal(self.__sigid1, self.__trigger) del self self = None return False def __activate(self): try : self.__manager.show() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() finally: self.__editor.response() return False def __create_trigger(self): trigger = self.__editor.create_trigger("show-quick-open-window", "o") self.__editor.add_trigger(trigger) return trigger def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate, priority=9999) return def destroy(self): self.__destroy() return scribes-0.4~r910/GenericPlugins/SelectionSearcher/0000755000175000017500000000000011242100540021742 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SelectionSearcher/RegexCreator.py0000644000175000017500000000231311242100540024705 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager IGNORE_CASE = False class Creator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "search-pattern", self.__pattern_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return def __regex_object(self, pattern): from re import I, U, M, L, compile as compile_ flags = I|M|U|L if IGNORE_CASE else U|M|L regex_object = compile_(pattern, flags) self.__manager.emit("regex-object", regex_object) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __pattern_cb(self, manager, pattern): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__regex_object, pattern, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/Reseter.py0000644000175000017500000000465411242100540023736 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reseter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "found-matches", self.__matches_cb) self.__sig1 = self.connect(self.__buffer, "changed", self.__changed_cb) self.__sig2 = self.connect(self.__window, "key-press-event", self.__key_cb) self.__sig3 = self.connect(self.__view, "focus-out-event", self.__changed_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__window = editor.window self.__view = editor.textview self.__can_reset = False self.__blocked = False return def __destroy(self): self.__reset() self.disconnect() del self return def __reset(self): if self.__can_reset is False: return self.__block() self.__manager.emit("reset") return False def __block(self): if self.__blocked: return False self.__buffer.handler_block(self.__sig1) self.__window.handler_block(self.__sig2) self.__view.handler_block(self.__sig3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__buffer.handler_unblock(self.__sig1) self.__window.handler_unblock(self.__sig2) self.__view.handler_unblock(self.__sig3) self.__blocked = False return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __matches_cb(self, manager, matches): self.__can_reset = True if matches else False if matches: self.__unblock() return False def __changed_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__reset, priority=PRIORITY_LOW) return False def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__reset, priority=PRIORITY_LOW) return True scribes-0.4~r910/GenericPlugins/SelectionSearcher/__init__.py0000644000175000017500000000000011242100540024041 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SelectionSearcher/Signals.py0000644000175000017500000000141111242100540023711 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "reset": (SSIGNAL, TYPE_NONE, ()), "research": (SSIGNAL, TYPE_NONE, ()), "select-next-match": (SSIGNAL, TYPE_NONE, ()), "found-selection": (SSIGNAL, TYPE_NONE, ()), "select-previous-match": (SSIGNAL, TYPE_NONE, ()), "search-pattern": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "regex-object": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "found-matches": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "marked-matches": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "current-match": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/SelectionSearcher/Utils.py0000644000175000017500000000054711242100540023422 0ustar andreasandreasdef valid_selection(start, end): from string import punctuation, whitespace punctuation = punctuation.replace("_", "") valid_characters = punctuation + whitespace if not (end.get_char() in valid_characters): return False if start.starts_line(): return True start.backward_char() if not (start.get_char() in valid_characters): return False return True scribes-0.4~r910/GenericPlugins/SelectionSearcher/MatchIndexer.py0000644000175000017500000000422711242100540024674 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from gettext import gettext as _ class Indexer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "marked-matches", self.__marked_matches_cb) self.connect(manager, "current-match", self.__current_match_cb) self.connect(manager, "reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__matches = deque() return def __destroy(self): self.disconnect() del self return def __get_count(self, match): count = 0 for match_ in self.__matches: if match == match_: break count += 1 return count + 1 def __send_index(self, match): if not self.__matches or len(self.__matches) == 1: return count = self.__get_count(match) index = count, len(self.__matches) message = _("Match %d of %d") % (index[0], index[1]) self.__editor.update_message(message, "yes", 10) return def __reset(self): self.__matches.clear() # message = _("Removed selection highlights") # if len(self.__matches) > 1: self.__editor.update_message(message, "yes", 3) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __marked_matches_cb(self, manager, matches): from collections import deque self.__matches = deque(matches) return False def __current_match_cb(self, manager, match): self.__remove_all_timers() from gobject import idle_add self.__timer1 = idle_add(self.__send_index, match) return False def __reset_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__reset, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/Trigger.py0000644000175000017500000000277311242100540023730 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(editor) name, shortcut, description, category = ( "select-next-highlighted-match", "g", _("Navigate to next highlighted match"), _("Navigation Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) self.__trigger1.action = "select-next-match" name, shortcut, description, category = ( "select-previous-highlighted-match", "g", _("Navigation to previous highlighted match"), _("Navigation Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.action = "select-previous-match" return def destroy(self): self.disconnect() self.remove_triggers() self.__manager.destroy() del self return False def __activate(self, action): self.__manager.activate(action) return False def __activate_cb(self, trigger): from gobject import idle_add idle_add(self.__activate, trigger.action) return scribes-0.4~r910/GenericPlugins/SelectionSearcher/Marker.py0000644000175000017500000000416011242100540023536 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "found-matches", self.__matches_cb) self.connect(manager, "reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = [] self.__old_marks = [] return def __destroy(self): self.disconnect() del_ = self.__editor.delete_mark remove_marks = lambda start, end: (del_(start), del_(end)) [remove_marks(*mark) for mark in self.__old_marks] del self return def __clear(self): if not self.__marks: return self.__old_marks += self.__marks self.__marks = [] return False def __mark(self, matches): if not matches: return False self.__clear() mr = self.__editor.create_right_mark ml = self.__editor.create_left_mark iao = self.__editor.textbuffer.get_iter_at_offset iaos = lambda start, end: (iao(start), iao(end)) mark_ = lambda start, end: (ml(start), mr(end)) mark_from_offsets = lambda start, end: mark_(*(iaos(start, end))) marks = [mark_from_offsets(*offset) for offset in matches] self.__marks = marks self.__manager.emit("marked-matches", marks) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __clear_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__clear, priority=PRIORITY_LOW) return False def __matches_cb(self, manager, matches): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__mark, matches, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/MatchSelector.py0000644000175000017500000000225711242100540025057 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "current-match", self.__match_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return def __select(self, mark): giam = self.__editor.textbuffer.get_iter_at_mark start = giam(mark[0]) end = giam(mark[1]) self.__editor.textbuffer.select_range(start, end) self.__editor.textview.scroll_mark_onscreen(mark[1]) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __match_cb(self, manager, mark): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__select, mark, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/Searcher.py0000644000175000017500000000225011242100540024047 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Searcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "regex-object", self.__regex_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return def __find_matches(self, regex_object): iterator = regex_object.finditer(self.__editor.text.decode("utf-8")) matches = [match.span() for match in iterator] self.__manager.emit("found-matches", matches) return def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __regex_cb(self, manager, regex_object): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__find_matches, regex_object, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/Manager.py0000644000175000017500000000150111242100540023663 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from MatchIndexer import Indexer Indexer(self, editor) from MatchSelector import Selector Selector(self, editor) from MatchNavigator import Navigator Navigator(self, editor) from Reseter import Reseter Reseter(self, editor) from MatchColorer import Colorer Colorer(self, editor) from Marker import Marker Marker(self, editor) from Searcher import Searcher Searcher(self, editor) from RegexCreator import Creator Creator(self, editor) from PatternCreator import Creator Creator(self, editor) from SelectionDetector import Detector Detector(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self, action): self.emit(action) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/PatternCreator.py0000644000175000017500000000411511242100540025252 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager MATCH_WORD = True class Creator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "search", self.__search_cb) self.connect(manager, "research", self.__research_cb) self.connect(manager, "reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__string = "" self.__search_mode = False return def __destroy(self): self.disconnect() del self return def __create_pattern(self, string): try: if not string: raise ValueError if self.__string == string and self.__search_mode: return False self.__search_mode = True self.__string = string from re import escape string = escape(string) pattern = r"\b%s\b" % string if MATCH_WORD else r"%s" % string self.__manager.emit("search-pattern", pattern) except ValueError: from gettext import gettext as _ message = _("ERROR: Search string not found") self.__editor.update_message(message, "fail", 10) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __search_cb(self, manager, string): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__create_pattern, string.decode("utf-8"), priority=PRIORITY_LOW) return False def __reset_cb(self, *args): self.__search_mode = False return False def __research_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW as LOW self.__timer2 = idle_add(self.__create_pattern, self.__string.decode("utf-8"), priority=LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/SelectionDetector.py0000644000175000017500000000340411242100540025734 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Detector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor, "cursor-moved", self.__moved_cb, True) self.connect(editor.textview, "focus-in-event", self.__moved_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __emit(self): try: if self.__editor.has_selection is False: return False if self.__editor.selection_range > 1: return False from Utils import valid_selection if not valid_selection(*self.__editor.selection_bounds): return False self.__manager.emit("search", self.__editor.selected_text) except AttributeError: # Prevent harmless error messages from appearing in stderr. # Usually happens when editor object is being destroyed. pass return False def __emit_tcb(self): from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__emit, priority=PRIORITY_LOW) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __moved_cb(self, *args): self.__remove_all_timers() from gobject import timeout_add, PRIORITY_LOW self.__timer2 = timeout_add(1000, self.__emit_tcb, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/MatchNavigator.py0000644000175000017500000001133511242100540025226 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from gettext import gettext as _ get_offset_at_mark = lambda _buffer, mark: _buffer.get_iter_at_mark(mark).get_offset() class Navigator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "marked-matches", self.__matches_cb) self.connect(manager, "select-next-match", self.__next_cb) self.connect(manager, "select-previous-match", self.__previous_cb) self.connect(manager, "reset", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer from collections import deque self.__next_queue = deque([]) self.__prev_queue = deque([]) self.__current_match = None self.__marks = deque() return def __clear(self): self.__current_match = None self.__next_queue.clear() self.__prev_queue.clear() return def __navigate(self, function): try: if not self.__current_match: raise ValueError if len(self.__marks) == 1: raise AssertionError # function is either __process_next or __process_previous function() except ValueError: self.__manager.emit("research") except AssertionError: message = _("No other matches found") self.__editor.update_message(message, "fail", 10) return False def __calculate_match(self, cursor_offset, direction="next"): self.__next_queue.clear() self.__prev_queue.clear() pappend = lambda mark: self.__prev_queue.appendleft(mark) nappend = lambda mark: self.__next_queue.append(mark) for marks in self.__marks: mark = marks[1] pappend(marks) if cursor_offset > get_offset_at_mark(self.__buffer, mark) else nappend(marks) if direction == "next": match = self.__next_queue.popleft() if self.__next_queue else self.__prev_queue.popleft() else: match = self.__prev_queue.popleft() if self.__prev_queue else self.__next_queue.popleft() return match def __swap(self): from collections import deque if not self.__next_queue: self.__next_queue = deque(reversed(self.__prev_queue)) self.__prev_queue = deque() else: self.__prev_queue = deque(reversed(self.__next_queue)) self.__next_queue = deque() return def __process_next(self): if not self.__next_queue: self.__swap() if self.__current_match: self.__prev_queue.appendleft(self.__current_match) match = self.__next_queue.popleft() cursor_offset = self.__editor.cursor.get_offset() match = match if cursor_offset == get_offset_at_mark(self.__buffer, self.__current_match[0]) else self.__calculate_match(cursor_offset) self.__current_match = match self.__manager.emit("current-match", match) return False def __process_previous(self): if not self.__prev_queue: self.__swap() if self.__current_match: self.__next_queue.appendleft(self.__current_match) match = self.__prev_queue.popleft() cursor_offset = self.__editor.cursor.get_offset() match = match if cursor_offset == get_offset_at_mark(self.__buffer, self.__current_match[0]) else self.__calculate_match(cursor_offset, "previous") self.__current_match = match self.__manager.emit("current-match", match) return def __process(self, matches): self.__clear() self.__marks = matches match = self.__calculate_match(self.__editor.cursor.get_offset()) self.__current_match = match self.__manager.emit("current-match", match) return False def __destroy(self): self.disconnect() del self return def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, 3: self.__timer3, 4: self.__timer4, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 5)] return False def __destroy_cb(self, *args): self.__destroy() return False def __matches_cb(self, manager, matches): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__process, matches, priority=PRIORITY_LOW) return False def __next_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__navigate, self.__process_next, priority=PRIORITY_LOW) return False def __previous_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer3 = idle_add(self.__navigate, self.__process_previous, priority=PRIORITY_LOW) return False def __reset_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer4 = idle_add(self.__clear, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/SelectionSearcher/MatchColorer.py0000644000175000017500000000446511242100540024707 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Colorer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "marked-matches", self.__matches_cb) self.connect(manager, "reset", self.__clear_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tag = self.__create_tag() self.__colored = False return def __destroy(self): self.disconnect() self.__clear() del self return def __create_tag(self): from gtk import TextTag tag = TextTag("selection_find_tag") self.__editor.textbuffer.get_tag_table().add(tag) tag.set_property("background", "yellow") tag.set_property("foreground", "brown") from pango import WEIGHT_ULTRABOLD tag.set_property("weight", WEIGHT_ULTRABOLD) return tag def __clear(self): if self.__colored is False: return False self.__editor.freeze() bounds = self.__editor.textbuffer.get_bounds() self.__editor.textbuffer.remove_tag(self.__tag, *bounds) self.__colored = False self.__editor.thaw() return False def __color(self, marks): self.__clear() if len(marks) < 2: return False apply_tag = self.__editor.textbuffer.apply_tag giam = self.__editor.textbuffer.get_iter_at_mark iam = lambda start, end: (giam(start), giam(end)) tag = lambda start, end: apply_tag(self.__tag, *(iam(start, end))) [tag(*mark) for mark in marks] self.__colored = True return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __destroy_cb(self, *args): self.__destroy() return False def __matches_cb(self, manager, marks): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__color, marks, priority=PRIORITY_LOW) return False def __clear_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__clear, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/PluginBookmark.py0000644000175000017500000000123011242100540021632 0ustar andreasandreasname = "Bookmark Plugin" authors = ["Lateef Alabi-Oki "] version = 0.4 autoload = True class_name = "BookmarkPlugin" short_description = "Manage bookmarked lines in a file." long_description = """Add or remove bookmarks to lines. Navigate to bookmarked lines via a browser. Press ctrl+b to add or remove bookmarks. Press ctrl+d to navigate to bookmarked lines.""" class BookmarkPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Bookmark.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginLines.py0000644000175000017500000000101311242100540021136 0ustar andreasandreasname = "Line Operations" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "LinesPlugin" short_description = "Plug-in to perform line operations." long_description = """Plug-in to perform line operations.""" class LinesPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Lines.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Printing/0000755000175000017500000000000011242100540020132 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Printing/__init__.py0000644000175000017500000000000011242100540022231 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Printing/Signals.py0000644000175000017500000000051711242100540022107 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "cancel": (SSIGNAL, TYPE_NONE, ()), "feedback": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/Printing/Utils.py0000644000175000017500000000205111242100540021602 0ustar andreasandreasdef default_page_setup(): from gtk import PageSetup, UNIT_INCH, PaperSize from gtk import paper_size_get_default, PAGE_ORIENTATION_LANDSCAPE setup = PageSetup() setup.set_paper_size_and_default_margins(PaperSize(paper_size_get_default())) return setup def get_compositor(editor): view = editor.textview font_name = view.get_pango_context().get_font_description().to_string() from gtksourceview2 import PrintCompositor compositor = PrintCompositor(view.get_buffer()) compositor.set_body_font_name(font_name) compositor.set_footer_font_name(font_name) compositor.set_print_footer(True) compositor.set_footer_format(True, "", editor.filename, "%N of %Q") compositor.set_header_font_name(font_name) compositor.set_print_header(True) compositor.set_header_format(True, editor.name, "%b %d, %Y", "%N") compositor.set_highlight_syntax(True) compositor.set_line_numbers_font_name(font_name) # compositor.set_print_line_numbers(1) compositor.set_tab_width(view.get_property("tab-width")) compositor.set_wrap_mode(view.get_wrap_mode()) return compositorscribes-0.4~r910/GenericPlugins/Printing/Trigger.py0000644000175000017500000000230011242100540022102 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) editor.get_toolbutton("PrintToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-print-window", "p", _("Print the current file"), _("File Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try : self.__manager.activate() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return scribes-0.4~r910/GenericPlugins/Printing/Feedback.py0000644000175000017500000000442411242100540022174 0ustar andreasandreasfrom gettext import gettext as _ from gtk import PRINT_STATUS_INITIAL, PRINT_STATUS_PREPARING from gtk import PRINT_STATUS_GENERATING_DATA, PRINT_STATUS_SENDING_DATA from gtk import PRINT_STATUS_FINISHED, PRINT_STATUS_FINISHED_ABORTED from SCRIBES.SignalConnectionManager import SignalManager CANCEL_MESSAGE = _("Cancelled print operation") INITIAL_MESSAGE = _("Print file") PRINTING = { PRINT_STATUS_INITIAL: ("set_func", (_("Initializing print operation"), "printer")), PRINT_STATUS_PREPARING: ("set_func", (_("Preparing data for printing"), "printer")), PRINT_STATUS_GENERATING_DATA: ("set_func", (_("Generating data for printing"), "printer")), PRINT_STATUS_SENDING_DATA: ("set_func", (_("Sending file to printing"), "printer")), PRINT_STATUS_FINISHED: ("update_func", (_("Finished printing file"), "yes", 10)), PRINT_STATUS_FINISHED_ABORTED: ("update_func", (_("Aborted print operation"), "no", 10)), } class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "feedback", self.__feedback_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "cancel", self.__cancel_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__stack = deque() return def __destroy(self): self.disconnect() del self return False def __update(self, status): previous_status_message = self.__stack.pop() function, args = PRINTING[status] self.__stack.append(args[0]) self.__editor.unset_message(previous_status_message, "printer") update = self.__editor.set_message if function == "set_func" else self.__editor.update_message update(*args) return False def __feedback_cb(self, manager, status): self.__update(status) return False def __cancel_cb(self, *args): self.__editor.update_message(CANCEL_MESSAGE, "no") self.__editor.unset_message(INITIAL_MESSAGE, "printer") self.__stack.pop() return False def __activate_cb(self, *args): self.__editor.set_message(INITIAL_MESSAGE, "printer") self.__stack.append(INITIAL_MESSAGE) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Printing/Manager.py0000644000175000017500000000054111242100540022056 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Feedback import Feedback Feedback(self, editor) from Displayer import Displayer Displayer(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/Printing/Printer.py0000644000175000017500000000617211242100540022135 0ustar andreasandreasfrom gtk import PRINT_OPERATION_RESULT_ERROR from gtk import PRINT_OPERATION_RESULT_APPLY from gtk import PRINT_OPERATION_RESULT_CANCEL from SCRIBES.SignalConnectionManager import SignalManager class Printer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__set_properties() self.connect(self.__operation, "draw-page", self.__draw_page_cb) self.connect(self.__operation, "done", self.__done_cb) self.connect(self.__operation, "paginate", self.__paginate_cb) self.connect(self.__operation, "status-changed", self.__status_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from Utils import get_compositor self.__compositor = get_compositor(editor) from gtk import PrintOperation self.__operation = PrintOperation() self.__print_settings = self.__print_settings_from_file() self.__result_handler = { PRINT_OPERATION_RESULT_ERROR: self.__error, PRINT_OPERATION_RESULT_APPLY: self.__apply, PRINT_OPERATION_RESULT_CANCEL: self.__cancel, } return def __set_properties(self): from Utils import default_page_setup self.__operation.set_default_page_setup(default_page_setup()) self.__operation.set_allow_async(True) self.__operation.set_use_full_page(False) if not self.__print_settings: return False self.__operation.set_print_settings(self.__print_settings) return False def show(self): if self.__print_settings: self.__print_settings.load_file(self.__editor.print_settings_filename) from gtk import PRINT_OPERATION_ACTION_PRINT_DIALOG self.__operation.run(PRINT_OPERATION_ACTION_PRINT_DIALOG, self.__editor.window) return False def __print_settings_to_file(self): try: self.__print_settings = self.__operation.get_print_settings() from os.path import exists if not exists(self.__editor.print_settings_filename): raise AssertionError except AssertionError: from gio import File File(self.__editor.print_settings_filename).replace_contents("") finally: self.__print_settings.to_file(self.__editor.print_settings_filename) return False def __print_settings_from_file(self): from os.path import exists if not exists(self.__editor.print_settings_filename): return None from gtk import PrintSettings settings = PrintSettings() if settings.load_file(self.__editor.print_settings_filename): return settings return None def __error(self): error_message = self.__operation.get_error() return False def __apply(self): self.__print_settings_to_file() return False def __cancel(self): self.__manager.emit("cancel") return False def __draw_page_cb(self, operation, context, page_nr): self.__compositor.draw_page(context, page_nr) return False def __paginate_cb(self, operation, context): if not self.__compositor.paginate(context): return False n_pages = self.__compositor.get_n_pages() operation.set_n_pages(n_pages) return True def __done_cb(self, operation, result): self.__result_handler[result]() return False def __status_cb(self, operation, *args): self.__manager.emit("feedback", operation.get_status()) return False scribes-0.4~r910/GenericPlugins/Printing/Displayer.py0000644000175000017500000000145411242100540022444 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(self.__manager, "destroy", self.__destroy_cb) self.connect(self.__manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __activate(self): from Printer import Printer Printer(self.__manager, self.__editor).show() return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate, priority=9999) return False scribes-0.4~r910/GenericPlugins/PluginFocusLastDocument.py0000644000175000017500000000104011242100540023466 0ustar andreasandreasname = "FocusLastDocument Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "FocusLastDocumentPlugin" short_description = "Switch to previous window" long_description = "Switch to previous window" class FocusLastDocumentPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from FocusLastDocument.Manager import Manager self.__manager = Manager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/Case/0000755000175000017500000000000011242100540017213 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Case/__init__.py0000644000175000017500000000000011242100540021312 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Case/TextExtractor.py0000644000175000017500000000167611242100540022417 0ustar andreasandreasclass Extractor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marks", self.__marks_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __send_string(self, marks): start = self.__editor.textbuffer.get_iter_at_mark(marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(marks[1]) string = self.__editor.textbuffer.get_text(start, end) self.__manager.emit("extracted-text", string) return False def __destroy_cb(self, *args): self.__destroy() return False def __marks_cb(self, manager, marks): self.__send_string(marks) return False scribes-0.4~r910/GenericPlugins/Case/PopupMenuItem.py0000644000175000017500000000470411242100540022341 0ustar andreasandreasfrom gettext import gettext as _ from gtk import ImageMenuItem class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("_Case")) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = self.__menuitem1.connect("activate", self.__activate_cb) self.__sigid2 = self.__menuitem2.connect("activate", self.__activate_cb) self.__sigid3 = self.__menuitem3.connect("activate", self.__activate_cb) self.__sigid4 = self.__menuitem1.connect("map-event", self.__map_event_cb) self.__sigid5 = self.__menuitem2.connect("map-event", self.__map_event_cb) self.__sigid6 = self.__menuitem3.connect("map-event", self.__map_event_cb) self.__sigid7 = self.__editor.textview.connect("focus-in-event", self.__focus_cb) def __init_attributes(self, editor): from gtk import Menu, Image, STOCK_SORT_DESCENDING self.__image = Image() self.__image.set_property("stock", STOCK_SORT_DESCENDING) self.__editor = editor self.__menu = Menu() self.__menuitem1 = editor.create_menuitem(_("_Togglecase (alt + u)")) self.__menuitem2 = editor.create_menuitem(_("_Titlecase (alt + shift + u)")) self.__menuitem3 = editor.create_menuitem(_("_Swapcase (alt + shift + l)")) return def __set_properties(self): self.set_property("name", "Case Popup MenuItem") self.set_image(self.__image) self.set_submenu(self.__menu) self.__menu.append(self.__menuitem1) self.__menu.append(self.__menuitem2) self.__menu.append(self.__menuitem3) if self.__editor.readonly: self.set_property("sensitive", False) return def __activate_cb(self, menuitem): if menuitem == self.__menuitem1: self.__editor.trigger("togglecase") elif menuitem == self.__menuitem2: self.__editor.trigger("titlecase") else: self.__editor.trigger("swapcase") return True def __map_event_cb(self, menuitem, event): return False def __focus_cb(self, textview, event): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid2, self.__menuitem2) self.__editor.disconnect_signal(self.__sigid3, self.__menuitem3) self.__editor.disconnect_signal(self.__sigid4, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid5, self.__menuitem2) self.__editor.disconnect_signal(self.__sigid6, self.__menuitem3) self.__editor.disconnect_signal(self.__sigid7, self.__editor.textview) self.__menu.destroy() self.__image.destroy() self.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Case/Exceptions.py0000644000175000017500000000013111242100540021701 0ustar andreasandreasclass NoSelectionFoundError(Exception): pass class NoTextFoundError(Exception): pass scribes-0.4~r910/GenericPlugins/Case/Trigger.py0000644000175000017500000000372311242100540021175 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "togglecase", "u", _("Convert the case of text"), _("Case Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "titlecase", "u", _("Convert text to title case"), _("Case Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "swapcase", "l", _("Swap the case of text"), _("Case Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) return def __destroy(self): self.disconnect() self.remove_triggers() del self return False def __create_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if self.__manager is None: self.__manager = self.__create_manager() triggers = {"togglecase": self.__manager.toggle, "titlecase": self.__manager.title, "swapcase": self.__manager.swap} triggers[trigger.name]() return False def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False def destroy(self): self.__destroy() return scribes-0.4~r910/GenericPlugins/Case/Marker.py0000644000175000017500000000514211242100540021010 0ustar andreasandreasclass Marker(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("case", self.__case_cb) self.__sigid3 = manager.connect("complete", self.__complete_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = [] self.__pattern = self.__editor.word_pattern return def __destroy(self): self.__clear() self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __get_bounds(self, cursor): forward = False end = cursor.copy() while self.__pattern.match(end.get_char()): end.forward_char() start = end.copy() start.backward_char() while self.__pattern.match(start.get_char()): forward = False if start.starts_line(): break if not start.backward_char(): break forward = True if forward: start.forward_char() return start, end def __get_word_bounds(self): try: bound = None cursor = self.__editor.cursor from Exceptions import NoTextFoundError if self.__pattern.match(cursor.get_char()): raise ValueError if cursor.starts_line(): raise NoTextFoundError if not cursor.backward_char(): raise NoTextFoundError if self.__pattern.match(cursor.get_char()): raise ValueError raise NoTextFoundError except ValueError: bound = self.__get_bounds(cursor) return bound def __send_word_bounds(self): try: from Exceptions import NoTextFoundError bound = self.__get_word_bounds() self.__send(bound) except NoTextFoundError: message = _("No text found") self.__editor.update_message(message, "fail", 10) return False def __send_marks(self): try: from Exceptions import NoSelectionFoundError if not self.__editor.selection_range: raise NoSelectionFoundError bound = self.__editor.selection_bounds self.__send(bound) except NoSelectionFoundError: self.__send_word_bounds() return False def __send(self, bound): lmark=self.__editor.create_left_mark(bound[0]) rmark=self.__editor.create_right_mark(bound[1]) self.__marks.append(lmark) self.__marks.append(rmark) self.__manager.emit("marks", (lmark, rmark)) return False def __clear(self): for mark in self.__marks: self.__editor.delete_mark(mark) self.__marks = [] return False def __destroy_cb(self, *args): self.__destroy() return False def __case_cb(self, *args): self.__send_marks() return False def __complete_cb(self, *args): self.__clear() return False scribes-0.4~r910/GenericPlugins/Case/CaseProcessor.py0000644000175000017500000000323711242100540022345 0ustar andreasandreasfrom gettext import gettext as _ class Processor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("extracted-text", self.__extract_cb) self.__sigid3 = manager.connect("case", self.__case_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__case_type = None return def __send_string(self, string): if self.__case_type == "toggle": self.__case_type = "lower" if string.isupper() else "upper" umessage = _("Converted '%s' to upper case") % string lmessage = _("Converted '%s' to lower case") % string tmessage = _("Converted '%s' to title case") % string smessage = _("Converted '%s' to swap case") % string dictionary = { "upper": (string.upper, umessage), "lower": (string.lower, lmessage), "title": (string.title, tmessage), "swap": (string.swapcase, smessage), } self.__manager.emit("processed-text", dictionary[self.__case_type][0]()) message = dictionary[self.__case_type][1] self.__editor.update_message(message, "pass") self.__case_type = None return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __extract_cb(self, manager, string): self.__send_string(string) return False def __case_cb(self, manager, case): self.__case_type = case return False scribes-0.4~r910/GenericPlugins/Case/Manager.py0000644000175000017500000000235611242100540021145 0ustar andreasandreasfrom gobject import SIGNAL_RUN_LAST, SIGNAL_NO_RECURSE, SIGNAL_ACTION from gobject import TYPE_PYOBJECT, TYPE_NONE, TYPE_STRING, GObject SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "marks": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "extracted-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "processed-text": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), "text-inserted": (SCRIBES_SIGNAL, TYPE_NONE, ()), "complete": (SCRIBES_SIGNAL, TYPE_NONE, ()), "case": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_STRING,)), } def __init__(self, editor): GObject.__init__(self) from Selector import Selector Selector(self, editor) from TextInserter import Inserter Inserter(self, editor) from CaseProcessor import Processor Processor(self, editor) from TextExtractor import Extractor Extractor(self, editor) from Marker import Marker Marker(self, editor) def destroy(self): self.emit("destroy") del self self = None return False def toggle(self): self.emit("case", "toggle") return False def title(self): self.emit("case", "title") return False def swap(self): self.emit("case", "swap") return False scribes-0.4~r910/GenericPlugins/Case/Selector.py0000644000175000017500000000223211242100540021344 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marks", self.__marks_cb) self.__sigid3 = manager.connect("text-inserted", self.__inserted_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __select(self): start = self.__editor.textbuffer.get_iter_at_mark(self.__marks[0]) end = self.__editor.textbuffer.get_iter_at_mark(self.__marks[1]) self.__editor.textbuffer.select_range(start, end) self.__manager.emit("complete") self.__marks = None return False def __destroy_cb(self, *args): self.__destroy() return False def __marks_cb(self, manager, marks): self.__marks = marks return False def __inserted_cb(self, *args): self.__select() return False scribes-0.4~r910/GenericPlugins/Case/TextInserter.py0000644000175000017500000000243211242100540022226 0ustar andreasandreasclass Inserter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("marks", self.__marks_cb) self.__sigid3 = manager.connect("processed-text", self.__text_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__marks = None self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return def __insert(self, string): start = self.__buffer.get_iter_at_mark(self.__marks[0]) end = self.__buffer.get_iter_at_mark(self.__marks[1]) self.__buffer.delete(start, end) self.__buffer.begin_user_action() self.__buffer.insert_at_cursor(string) self.__buffer.end_user_action() self.__manager.emit("text-inserted") self.__marks = None return False def __destroy_cb(self, *args): self.__destroy() return False def __marks_cb(self, manager, marks): self.__marks = marks return False def __text_cb(self, manager, string): self.__insert(string) return False scribes-0.4~r910/GenericPlugins/PluginUndoRedo.py0000644000175000017500000000101011242100540021600 0ustar andreasandreasname = "Undo/Redo Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "UndoRedoPlugin" short_description = "Undo or redo text operations." long_description = """Undo or redo text operations""" class UndoRedoPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from UndoRedo.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/DocumentSwitcher/0000755000175000017500000000000011242100540021627 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentSwitcher/__init__.py0000644000175000017500000000000011242100540023726 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentSwitcher/Signals.py0000644000175000017500000000042611242100540023603 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "next-window": (SSIGNAL, TYPE_NONE, ()), "previous-window": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/DocumentSwitcher/Trigger.py0000644000175000017500000000306711242100540023612 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "focus-next-window", "Page_Up", _("Focus next window"), _("Window Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) self.__trigger1.command = "next-window" name, shortcut, description, category = ( "focus-previous-window", "Page_Down", _("Focus previous window"), _("Window Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.command = "previous-window" return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __init_manager(self): from Manager import Manager self.__manager = Manager(self.__editor) return def __activate(self, command): if not self.__manager: self.__init_manager() self.__manager.activate(command) return False def __activate_cb(self, trigger): from gobject import idle_add idle_add(self.__activate, trigger.command) return scribes-0.4~r910/GenericPlugins/DocumentSwitcher/Manager.py0000644000175000017500000000044011242100540023551 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Switcher import Switcher Switcher(self, editor) def destroy(self): self.emit("destroy") del self return def activate(self, command): self.emit(command) return scribes-0.4~r910/GenericPlugins/DocumentSwitcher/Switcher.py0000644000175000017500000000252011242100540023770 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Switcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "next-window", self.__next_cb) self.connect(manager, "previous-window", self.__previous_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __switch(self, direction="forward"): try: ids = [object_.id_ for object_ in self.__editor.objects] ids.sort() index = ids.index(self.__editor.id_) rotation = 1 if direction == "forward" else -1 id_ = ids[index+rotation] self.__editor.focus_by_id(id_) except IndexError: index = 0 if direction == "forward" else len(ids) -1 self.__editor.focus_by_id(ids[index]) return False def __next(self): self.__switch("forward") return def __previous(self): self.__switch("backward") return False def __destroy_cb(self, *args): self.__destroy() return False def __next_cb(self, *args): from gobject import idle_add idle_add(self.__next) return False def __previous_cb(self, *args): from gobject import idle_add idle_add(self.__previous) return False scribes-0.4~r910/GenericPlugins/About/0000755000175000017500000000000011242100540017412 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/About/__init__.py0000644000175000017500000000000011242100540021511 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/About/AboutDialog.glade0000644000175000017500000000431111242100540022601 0ustar andreasandreas 5 About Scribes AboutScribesRole AboutScribesID False True GTK_WIN_POS_CENTER_ON_PARENT True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True False Scribes 0.4-dev-build Scribes is an extensible text editor for GNOME that combines simplicity with power. http://scribes.sf.net/ Scribes Website scribes True True 2 True GTK_BUTTONBOX_END False GTK_PACK_END scribes-0.4~r910/GenericPlugins/About/PopupMenuItem.py0000644000175000017500000000073611242100540022541 0ustar andreasandreasfrom gtk import ImageMenuItem class PopupMenuItem(ImageMenuItem): def __init__(self, editor): from gtk import STOCK_ABOUT ImageMenuItem.__init__(self, STOCK_ABOUT) self.__init_attributes(editor) self.set_property("name", "AboutMenuitem") self.__sigid1 = self.connect("activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor return def __activate_cb(self, *args): self.__editor.trigger("show-about-dialog") return True scribes-0.4~r910/GenericPlugins/About/Trigger.py0000644000175000017500000000207611242100540021374 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__show_cb) self.connect(self.__editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor self.__about_dialog = None self.__trigger = self.create_trigger("show-about-dialog") return def destroy(self): self.disconnect() self.remove_triggers() if self.__about_dialog: self.__about_dialog.destroy() del self return def __show_cb(self, *args): try: self.__about_dialog.show() except AttributeError: from AboutDialog import Dialog self.__about_dialog = Dialog(self.__editor) self.__about_dialog.show() return def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/About/AboutDialog.py0000644000175000017500000000257711242100540022171 0ustar andreasandreasfrom gettext import gettext as _ message = _("Information about Scribes") class Dialog(object): def __init__(self, editor): self.__init_attributes(editor) self.__set_properties() def __init_attributes(self, editor): self.__editor = editor gui = editor.get_glade_object(globals(), "AboutDialog.glade", "AboutDialog") self.__dialog = gui.get_widget("AboutDialog") return def __destroy(self): self.__dialog.destroy() del self self = None return def __set_properties(self): # Set dialog properties. self.__dialog.set_artists(self.__editor.artists) self.__dialog.set_authors(self.__editor.author) self.__dialog.set_documenters(self.__editor.documenters) self.__dialog.set_transient_for(self.__editor.window) self.__dialog.set_property("copyright", self.__editor.copyrights) self.__dialog.set_property("license", self.__editor.license.strip()) self.__dialog.set_property("translator-credits", self.__editor.translators) self.__dialog.set_property("version", self.__editor.version) self.__dialog.set_property("icon-name", "stock_about") return def show(self): self.__editor.busy() self.__editor.set_message(message) response = self.__dialog.run() if response: self.hide() return def hide(self): self.__editor.busy(False) self.__editor.unset_message(message) self.__dialog.hide() return def destroy(self): self.__destroy() return False scribes-0.4~r910/GenericPlugins/PluginLineJumper.py0000644000175000017500000000104611242100540022144 0ustar andreasandreasname = "Line Jumper Plugin" authors = ["Lateef Alabi-Oki "] version = 0.3 autoload = True class_name = "LineJumperPlugin" short_description = "Move cursor to a specific line" long_description = """Press Ctrl+i to move the cursor to specific line.""" class LineJumperPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from LineJumper.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/SaveFile/0000755000175000017500000000000011242100540020036 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveFile/__init__.py0000644000175000017500000000000011242100540022135 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SaveFile/Trigger.py0000644000175000017500000000223111242100540022011 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "save-file", "s", _("Save current file"), _("File Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __save(self): try: if self.__editor.generate_filename: raise ValueError self.__editor.save_file(self.__editor.uri, self.__editor.encoding) except ValueError: self.__editor.trigger("show-save-dialog") return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__save, priority=9999) return scribes-0.4~r910/GenericPlugins/NewWindow/0000755000175000017500000000000011242100540020261 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/NewWindow/__init__.py0000644000175000017500000000000011242100540022360 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/NewWindow/Trigger.py0000644000175000017500000000175111242100540022242 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "new-window", "n", _("Open a new window"), _("Window Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __new(self): self.__editor.new() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__new, priority=9999) return scribes-0.4~r910/GenericPlugins/PluginBracketSelection.py0000644000175000017500000000113711242100540023314 0ustar andreasandreasname = "Bracket Selection Plugin" authors = ["Lateef Alabi-Oki "] version = 0.4 autoload = True class_name = "BracketSelectionPlugin" short_description = "Bracket selection operations." long_description = """Selects characters within brackets and quotes. Is capable of incremental selection.""" class BracketSelectionPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from BracketSelection.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Lines/0000755000175000017500000000000011242100540017412 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Lines/__init__.py0000644000175000017500000000000011242100540021511 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Lines/PopupMenuItem.py0000644000175000017500000000660611242100540022543 0ustar andreasandreasfrom gtk import ImageMenuItem from gettext import gettext as _ class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("_Lines")) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = self.__menuitem1.connect("activate", self.__activate_cb) self.__sigid2 = self.__menuitem2.connect("activate", self.__activate_cb) self.__sigid3 = self.__menuitem3.connect("activate", self.__activate_cb) self.__sigid4 = self.__menuitem4.connect("activate", self.__activate_cb) self.__sigid5 = self.__menuitem5.connect("activate", self.__activate_cb) self.__sigid6 = self.__menuitem6.connect("activate", self.__activate_cb) self.__sigid7 = self.__menuitem7.connect("activate", self.__activate_cb) self.__sigid8 = self.__view.connect("focus-in-event", self.__destroy_cb) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview from gtk import Menu, Image self.__menu = Menu() self.__image = Image() self.__menuitem1 = self.__editor.create_menuitem(_("_Join Line (alt + j)")) self.__menuitem2 = self.__editor.create_menuitem(_("D_uplicate Line (ctrl + u)")) self.__menuitem3 = self.__editor.create_menuitem(_("_Delete Line (alt + d)")) self.__menuitem4 = self.__editor.create_menuitem(_("Free Line _Below (alt + o)")) self.__menuitem5 = self.__editor.create_menuitem(_("Free Line _Above (alt + shift + o)")) self.__menuitem6 = self.__editor.create_menuitem(_("Delete Cursor to Line _End (alt + End)")) self.__menuitem7 = self.__editor.create_menuitem(_("Delete _Cursor to Line Begin (alt + Home)")) return def __set_properties(self): self.set_property("name", "Line Operation Menuitem") from gtk import STOCK_JUSTIFY_CENTER self.__image.set_property("stock", STOCK_JUSTIFY_CENTER) self.set_image(self.__image) self.set_submenu(self.__menu) self.__menu.append(self.__menuitem1) self.__menu.append(self.__menuitem2) self.__menu.append(self.__menuitem3) self.__menu.append(self.__menuitem4) self.__menu.append(self.__menuitem5) self.__menu.append(self.__menuitem6) self.__menu.append(self.__menuitem7) if self.__editor.readonly: self.set_property("sensitive", False) return def __activate_cb(self, menuitem): if menuitem == self.__menuitem1: self.__editor.trigger("join-line") elif menuitem == self.__menuitem2: self.__editor.trigger("duplicate-line") elif menuitem == self.__menuitem3: self.__editor.trigger("delete-line") elif menuitem == self.__menuitem4: self.__editor.trigger("free-line-below") elif menuitem == self.__menuitem5: self.__editor.trigger("free-line-above") elif menuitem == self.__menuitem6: self.__editor.trigger("delete-cursor-to-end") elif menuitem == self.__menuitem7: self.__editor.trigger("delete-cursor-to-start") return True def __destroy_cb(self, *args): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem1) self.__editor.disconnect_signal(self.__sigid2, self.__menuitem2) self.__editor.disconnect_signal(self.__sigid3, self.__menuitem3) self.__editor.disconnect_signal(self.__sigid4, self.__menuitem4) self.__editor.disconnect_signal(self.__sigid5, self.__menuitem5) self.__editor.disconnect_signal(self.__sigid6, self.__menuitem6) self.__editor.disconnect_signal(self.__sigid7, self.__menuitem7) self.__editor.disconnect_signal(self.__sigid8, self.__view) self.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Lines/Exceptions.py0000644000175000017500000000004311242100540022102 0ustar andreasandreasclass StartError(Exception): pass scribes-0.4~r910/GenericPlugins/Lines/Trigger.py0000644000175000017500000000737011242100540021376 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(self.__trigger4, "activate", self.__activate_cb) self.connect(self.__trigger5, "activate", self.__activate_cb) self.connect(self.__trigger6, "activate", self.__activate_cb) self.connect(self.__trigger7, "activate", self.__activate_cb) self.connect(self.__trigger8, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "delete-line", "d", _("Delete line or selected lines"), _("Line Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "join-line", "j", _("Join current and next line(s)"), _("Line Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "free-line-above", "o", _("Free current line"), _("Line Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "free-line-below", "o", _("Free next line"), _("Line Operations") ) self.__trigger4 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "delete-cursor-to-end", "End", _("Delete text from cursor to end of line"), _("Line Operations") ) self.__trigger5 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "delete-cursor-to-start", "Home", _("Delete text from cursor to start of line"), _("Line Operations") ) self.__trigger6 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "duplicate-line", "u", _("Duplicate line or selected lines"), _("Line Operations") ) self.__trigger7 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "backward-word-deletion", "BackSpace", _("Duplicate line or selected lines"), _("Line Operations") ) self.__trigger8 = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __create_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if self.__manager is None: self.__manager = self.__create_manager() dictionary = { "delete-line": self.__manager.delete_line, "join-line": self.__manager.join_line, "free-line-above": self.__manager.free_line_above, "free-line-below": self.__manager.free_line_below, "delete-cursor-to-start": self.__manager.delete_cursor_to_start, "delete-cursor-to-end": self.__manager.delete_cursor_to_end, "duplicate-line": self.__manager.duplicate_line, "backward-word-deletion": self.__manager.backward_word_deletion, } dictionary[trigger.name]() return False def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/Lines/Manager.py0000644000175000017500000000265511242100540021346 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import SIGNAL_NO_RECURSE, SIGNAL_ACTION SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "delete-line": (SCRIBES_SIGNAL, TYPE_NONE, ()), "join-line": (SCRIBES_SIGNAL, TYPE_NONE, ()), "duplicate-line": (SCRIBES_SIGNAL, TYPE_NONE, ()), "delete-cursor-to-end": (SCRIBES_SIGNAL, TYPE_NONE, ()), "delete-cursor-to-start": (SCRIBES_SIGNAL, TYPE_NONE, ()), "free-line-below": (SCRIBES_SIGNAL, TYPE_NONE, ()), "free-line-above": (SCRIBES_SIGNAL, TYPE_NONE, ()), "backward-word-deletion": (SCRIBES_SIGNAL, TYPE_NONE, ()), "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from LineOperator import Operator Operator(self, editor) def destroy(self): self.emit("destroy") del self return def delete_line(self): self.emit("delete-line") return def join_line(self): self.emit("join-line") return def duplicate_line(self): self.emit("duplicate-line") return def delete_cursor_to_end(self): self.emit("delete-cursor-to-end") return def delete_cursor_to_start(self): self.emit("delete-cursor-to-start") return def free_line_above(self): self.emit ("free-line-above") return def free_line_below(self): self.emit("free-line-below") return def backward_word_deletion(self): self.emit("backward-word-deletion") return False scribes-0.4~r910/GenericPlugins/Lines/LineOperator.py0000644000175000017500000002564511242100540022403 0ustar andreasandreasfrom gettext import gettext as _ class Operator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("delete-line", self.__delete_line_cb) self.__sigid3 = manager.connect("duplicate-line", self.__duplicate_line_cb) self.__sigid4 = manager.connect("join-line", self.__join_line_cb) self.__sigid5 = manager.connect("delete-cursor-to-end", self.__delete_cursor_to_end_cb) self.__sigid6 = manager.connect("delete-cursor-to-start", self.__delete_cursor_to_start_cb) self.__sigid7 = manager.connect("free-line-below", self.__line_below_cb) self.__sigid8 = manager.connect("free-line-above", self.__line_above_cb) self.__sigid9 = manager.connect("backward-word-deletion", self.__backward_word_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview from gtk import clipboard_get self.__clipboard = clipboard_get() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) del self return def __join(self, start, end): text = self.__editor.textbuffer.get_text(start, end) lines = text.splitlines() if len(lines) in (0, 1): raise TypeError newlines = [line.strip("\t ") for line in lines[1:]] newlines.insert(0, lines[0].rstrip("\t ")) text = " ".join(newlines) self.__editor.textbuffer.delete(start, end) self.__editor.textbuffer.insert_at_cursor(text) return False def __join_current_and_next_line(self): try: textbuffer = self.__editor.textbuffer offset = self.__editor.cursor.get_line_offset() start = self.__editor.backward_to_line_begin() end = self.__editor.forward_to_line_end(start.copy()) end.forward_line() end = self.__editor.forward_to_line_end(end.copy()) self.__join(start, end) self.__editor.cursor.set_line_offset(offset) textbuffer.place_cursor(textbuffer.get_iter_at_line_offset(self.__editor.cursor.get_line(), offset)) self.__editor.update_message(_("Joined current and next lines"), "pass") except ValueError: self.__editor.update_message(_("Cannot join lines"), "fail") except TypeError: self.__editor.update_message(_("No lines to join"), "fail") finally: self.__editor.move_view_to_cursor() return def __join_selections(self): try: start, end = self.__editor.textbuffer.get_selection_bounds() start = self.__editor.backward_to_line_begin(start) end = self.__editor.forward_to_line_end(end) self.__join(start, end) self.__editor.update_message(_("Join selected lines"), "pass") except TypeError: self.__editor.update_message(_("No lines to join"), "fail") finally: self.__editor.move_view_to_cursor() return def __join_line(self): if self.__editor.selection_range in (0, 1): return self.__join_current_and_next_line() return self.__join_selections() def __duplicate_line(self): textbuffer = self.__editor.textbuffer iterator = self.__editor.cursor.copy() cursor_offset = iterator.get_line_offset() if textbuffer.props.has_selection: start, end = textbuffer.get_selection_bounds() else: start = self.__editor.cursor.copy() end = start.copy() start = self.__editor.backward_to_line_begin(start) end = self.__editor.forward_to_line_end(end) end_offset = end.get_offset() text = "\n" + textbuffer.get_text(start, end) textbuffer.insert(end, text) iterator = textbuffer.get_iter_at_offset(end_offset) iterator.forward_line() iterator.set_line_offset(cursor_offset) textbuffer.place_cursor(iterator) self.__editor.update_message(_("Duplicated line"), "pass") self.__editor.move_view_to_cursor() return def __line_below(self): start = self.__editor.backward_to_line_begin() end = self.__editor.forward_to_line_end() textbuffer = self.__editor.textbuffer textbuffer.place_cursor(start) indentation = self.__editor.line_indentation text = self.__editor.line_text text = "%s%s%s" % (text, self.__editor.newline_character, indentation) textbuffer.delete(start, end) textbuffer.insert_at_cursor(text) message = _("Freed line %d") % (self.__editor.cursor.get_line() + 1) self.__editor.update_message(message, "pass") self.__editor.move_view_to_cursor() return False def __line_above(self): indentation = self.__editor.line_indentation text = self.__editor.line_text start = self.__editor.backward_to_line_begin() end = self.__editor.forward_to_line_end() textbuffer = self.__editor.textbuffer textbuffer.place_cursor(start) textbuffer.delete(start, end) text = "%s%s%s" % (indentation, self.__editor.newline_character, text) textbuffer.insert_at_cursor(text) iterator = self.__editor.cursor.copy() iterator.backward_line() iterator = self.__editor.forward_to_line_end(iterator) textbuffer.place_cursor(iterator) message = _("Freed line %d") % (self.__editor.cursor.get_line() + 1) self.__editor.update_message(message, "pass") self.__editor.move_view_to_cursor() return False def __find_word_begin(self, iterator): result = iterator.backward_char() if not result: return iterator if iterator.starts_line() or iterator.ends_line(): return iterator result = iterator.backward_char() if not result: return iterator if iterator.starts_line() or iterator.ends_line(): return iterator delimeter = ( "-", "_", ".", " ", "\t", ",", "(", "{", "[", "'", '"', ) while iterator.get_char() not in delimeter: if iterator.starts_line() or iterator.ends_line(): return iterator result = iterator.backward_char() if not result: return iterator iterator.forward_char() if iterator.get_char() in (" ", "\t"): return self.__find_whitespace_begin(iterator) return iterator def __find_whitespace_begin(self, iterator): while iterator.get_char() in (" ", "\t"): if iterator.starts_line() or iterator.ends_line(): return iterator result = iterator.backward_char() if not result: return iterator iterator.forward_char() return iterator def __backspace_delete(self): cursor = self.__editor.cursor if cursor.is_start(): return False end = cursor.copy() start = self.__find_word_begin(end.copy()) self.__del(start, end) return False def __copy(self, textbuffer, start, end): from string import whitespace text = textbuffer.get_text(start, end) if not text.strip(whitespace): return end = end.copy() if text[-1] in ("\n", "\r"): end.backward_char() if text.endswith("\r\n"): end.backward_char() textbuffer.select_range(start, end) textbuffer.copy_clipboard(self.__clipboard) return def __del(self, start, end): textbuffer = self.__editor.textbuffer self.__copy(textbuffer, start, end) textbuffer.delete(start, end) return False def __delete_to_end(self): start = self.__editor.cursor.copy() end = self.__editor.forward_to_line_end(start.copy()) self.__del(start, end) self.__editor.update_message(_("Deleted text to end of line"), "pass") self.__editor.move_view_to_cursor() return False def __delete_to_start(self): end = self.__editor.cursor.copy() start = self.__editor.backward_to_line_begin(end.copy()) self.__del(start, end) self.__editor.update_message(_("Deleted text to start of line"), "pass") self.__editor.move_view_to_cursor() return False def __delete_single_line(self): start = self.__editor.backward_to_line_begin(self.__editor.cursor.copy()) end = self.__editor.forward_to_line_end(self.__editor.cursor.copy()) end.forward_char() self.__del(start, end) return def __delete_line(self): try: self.__delete_single_line() message = _("Deleted line %d") % (self.__editor.cursor.get_line() + 1) self.__editor.update_message(message, "pass") finally: self.__editor.move_view_to_cursor() return def __delete_lines(self): start, end = self.__editor.textbuffer.get_selection_bounds() start = self.__editor.backward_to_line_begin(start) end = self.__editor.forward_to_line_end(end) end.forward_char() self.__del(start, end) message = _("Deleted selected lines") self.__editor.update_message(message, "pass") self.__editor.move_view_to_cursor() return def __delete_selection(self): start, end = self.__editor.textbuffer.get_selection_bounds() self.__del(start, end) message = _("Deleted selection on line %d") % (start.get_line() + 1) self.__editor.update_message(message, "pass") self.__editor.move_view_to_cursor() return def __delete_last_line(self): try: self.__delete_single_line() iterator = self.__editor.cursor.copy() iterator.backward_line() end = self.__editor.forward_to_line_end(iterator.copy()) end.forward_char() start = self.__editor.forward_to_line_end(iterator.copy()) self.__editor.textbuffer.delete(start, end) self.__editor.update_message(_("Deleted last line"), "pass") finally: self.__editor.move_view_to_cursor() return def __delete(self): if self.__is_last_line() and not self.__editor.selection_range: return self.__delete_last_line() if not self.__editor.selection_range: return self.__delete_line() if self.__editor.selection_range == 1: return self.__delete_selection() return self.__delete_lines() def __is_last_line(self): if self.__editor.cursor.get_line() == self.__editor.textbuffer.get_line_count() -1: return True return False def __destroy_cb(self, *args): self.__destroy() return False def __delete_line_cb(self, *args): self.__editor.begin_user_action() self.__delete() self.__editor.end_user_action() return False def __delete_cursor_to_start_cb(self, *args): self.__editor.begin_user_action() self.__delete_to_start() self.__editor.end_user_action() return False def __delete_cursor_to_end_cb(self, *args): self.__editor.begin_user_action() self.__delete_to_end() self.__editor.end_user_action() return False def __duplicate_line_cb(self, *args): self.__editor.begin_user_action() self.__duplicate_line() self.__editor.end_user_action() return False def __line_below_cb(self, *args): self.__editor.begin_user_action() self.__line_below() self.__editor.end_user_action() return False def __line_above_cb(self, *args): self.__editor.begin_user_action() self.__line_above() self.__editor.end_user_action() return False def __join_line_cb(self, *args): self.__editor.begin_user_action() self.__join_line() self.__editor.end_user_action() return False def __backward_word_cb(self, *args): self.__editor.begin_user_action() self.__backspace_delete() self.__editor.end_user_action() message = _("Backspace delete") self.__editor.update_message(message, "yes") return False scribes-0.4~r910/GenericPlugins/DocumentInformation/0000755000175000017500000000000011242100540022324 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentInformation/__init__.py0000644000175000017500000000000011242100540024423 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/DocumentInformation/LinesLabel.py0000644000175000017500000000166011242100540024713 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("LineLabel") return def __set_label(self, fileinfo): self.__label.set_text(str(self.__editor.textbuffer.get_line_count())) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/MIMELabel.py0000644000175000017500000000174211242100540024371 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("MIMELabel") return def __set_label(self, fileinfo): try: self.__label.set_text(fileinfo.get_content_type()) except AttributeError: self.__label.set_text("Unknown") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/LocationLabel.py0000644000175000017500000000224011242100540025404 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("LocationLabel") return def __set_label(self, fileinfo): try: if not self.__editor.uri: raise AssertionError from gio import File path = File(self.__editor.uri).get_parent().get_parse_name() folder = path.replace(self.__editor.home_folder.rstrip("/"), "~") self.__label.set_text(folder) except AssertionError: self.__label.set_text("Unknown") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/Trigger.py0000644000175000017500000000205611242100540024304 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-document-statistics", "Return", _("Show document statistics"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return False scribes-0.4~r910/GenericPlugins/DocumentInformation/AccessedLabel.py0000644000175000017500000000213111242100540025345 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("AccessedLabel") return def __set_label(self, fileinfo): try: from time import localtime, strftime format = "%a %d %b %Y %I:%M:%S %p %Z" self.__label.set_text(strftime(format, localtime(fileinfo.get_modification_time()))) except AttributeError: self.__label.set_text("Unknown") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/TypeLabel.py0000644000175000017500000000204011242100540024553 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("TypeLabel") return def __set_label(self, fileinfo): try: from gio import content_type_get_description as get_desc self.__label.set_text(get_desc(self.__editor.mimetype)) except: self.__label.set_text("plain text document") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return False scribes-0.4~r910/GenericPlugins/DocumentInformation/WordsLabel.py0000644000175000017500000000214411242100540024735 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("WordsLabel") from re import UNICODE, compile self.__pattern = compile(r"[^-\w]", UNICODE) return def __set_label(self, fileinfo): from re import split words = split(self.__pattern, self.__editor.text) is_word = lambda word: not (word in ("", " ")) words = [word for word in words if is_word(word)] self.__label.set_text(str(len(words))) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): self.__set_label(fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/Manager.py0000644000175000017500000000306011242100540024247 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_PYOBJECT from gobject import SIGNAL_ACTION, SIGNAL_NO_RECURSE SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "show-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "hide-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "process-fileinfo": (SCRIBES_SIGNAL, TYPE_NONE, ()), "fileinfo": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from FileInfo import FileInfo FileInfo(self, editor) from Window import Window Window(self, editor) from NameLabel import Label Label(self, editor) from TypeLabel import Label Label(self, editor) from SizeLabel import Label Label(self, editor) from LocationLabel import Label Label(self, editor) from MIMELabel import Label Label(self, editor) from LinesLabel import Label Label(self, editor) from WordsLabel import Label Label(self, editor) from CharactersLabel import Label Label(self, editor) from ModifiedLabel import Label Label(self, editor) from AccessedLabel import Label Label(self, editor) def __init_attributes(self, editor): self.__glade = editor.get_glade_object(globals(), "DocumentStatistics.glade", "Window") return glade = property(lambda self: self.__glade) def show(self): self.emit("process-fileinfo") self.emit("show-window") return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/DocumentInformation/NameLabel.py0000644000175000017500000000201311242100540024512 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("NameLabel") return def __set_label(self, fileinfo): try: self.__label.set_text(fileinfo.get_display_name()) except AttributeError: self.__label.set_text(self.__editor.window.get_title().lstrip("*")) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return False scribes-0.4~r910/GenericPlugins/DocumentInformation/ModifiedLabel.py0000644000175000017500000000212311242100540025354 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("ModifiedLabel") return def __set_label(self, fileinfo): try: from time import localtime, strftime format = "%a %d %b %Y %I:%M:%S %p %Z" self.__label.set_text(strftime(format, localtime(fileinfo.get_modification_time()))) except AttributeError: self.__label.set_text("Unknown") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/SizeLabel.py0000644000175000017500000000202111242100540024543 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("SizeLabel") return def __set_label(self, fileinfo): try: from gettext import gettext as _ self.__label.set_text(str(fileinfo.get_size()) + _(" bytes")) except AttributeError: self.__label.set_text("Unknown") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return False scribes-0.4~r910/GenericPlugins/DocumentInformation/CharactersLabel.py0000644000175000017500000000166611242100540025726 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("fileinfo", self.__fileinfo_cb) self.__label.set_text("") def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.glade.get_widget("CharactersLabel") return def __set_label(self, fileinfo): self.__label.set_text(str(self.__editor.textbuffer.get_char_count())) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__label.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __fileinfo_cb(self, manager, fileinfo): from gobject import idle_add idle_add(self.__set_label, fileinfo) return scribes-0.4~r910/GenericPlugins/DocumentInformation/Window.py0000644000175000017500000000363011242100540024147 0ustar andreasandreasfrom gettext import gettext as _ message = _("Document Statistics") class Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-window", self.__show_cb) self.__sigid3 = manager.connect("hide-window", self.__hide_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.glade.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show_window(self): self.__editor.busy(True) self.__window.show_all() self.__window.present() self.__editor.set_message(message, "info") return def __hide_window(self): self.__editor.busy(False) self.__window.hide() self.__editor.unset_message(message, "info") return def __destroy_cb(self, manager): self.__editor.disconnect_signal(self.__sigid1, manager) self.__editor.disconnect_signal(self.__sigid2, manager) self.__editor.disconnect_signal(self.__sigid3, manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() self = None del self return def __show_cb(self, *args): self.__show_window() return def __hide_cb(self, *args): self.__hide_window() return def __delete_event_cb(self, *args): self.__manager.emit("hide-window") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-window") return True scribes-0.4~r910/GenericPlugins/DocumentInformation/FileInfo.py0000644000175000017500000000150711242100540024374 0ustar andreasandreasclass FileInfo(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("process-fileinfo", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __send_fileinfo(self): try: fileinfo = self.__editor.fileinfo except: fileinfo = None finally: self.__manager.emit("fileinfo", fileinfo) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __process_cb(self, *args): self.__send_fileinfo() return scribes-0.4~r910/GenericPlugins/DocumentInformation/DocumentStatistics.glade0000644000175000017500000002754111242100540027164 0ustar andreasandreas 10 Document Information ScribesDocumentStatisticsRole True center-on-parent True scribes dialog True True True static ScribesDocumentStatisticsID True 10 2 10 10 True 1 <b>Characters:</b> True 7 8 True 1 <b>Words:</b> True 6 7 True 1 <b>Lines:</b> True 5 6 True 1 <b>Accessed:</b> True 9 10 True 1 <b>Modified:</b> True 8 9 True 1 <b>MIME type:</b> True 4 5 True 1 <b>Location:</b> True 3 4 True 1 <b>Size:</b> True 2 3 True 1 <b>Type:</b> True 1 2 True 1 <b>Name:</b> True True 0 statistics.py True 1 2 True 0 Python script True 1 2 1 2 True 0 1.1 KB (1084 bytes) True 1 2 2 3 True 0 /home/goldenmyst/Desktop True end 1 2 3 4 True 0 text/x-python True 1 2 4 5 True 0 113 True 1 2 5 6 True 0 568 True 1 2 6 7 True 0 1256 True 1 2 7 8 True 0 Thu 24 Jul 2008 06:50:22 PM EDT True 1 2 8 9 True 0 Thu 24 Jul 2008 06:50:14 PM EDT True 1 2 9 10 scribes-0.4~r910/GenericPlugins/Paragraph/0000755000175000017500000000000011242100540020245 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Paragraph/__init__.py0000644000175000017500000000000011242100540022344 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Paragraph/.__junk0000644000175000017500000001474411242100540021525 0ustar andreasandreas³ò ;cFc@s dZdefd„ƒYZdS(s This module documents a class that creates a trigger to perform paragraph operations. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2007 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tTriggercBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( s¶ This class creates triggers for paragraph operations. Operations: - select paragraph - move cursor to next paragraph - move cursor to previous paragraph - paragraph fill cCs¢|i|ƒ|iƒ|iid|iƒ|_|iid|iƒ|_|i id|i ƒ|_ |i id|i ƒ|_|iid|iƒ|_dS(s Initialize the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. tactivatespopulate-popupN(t_Trigger__init_attributest_Trigger__create_triggerst"_Trigger__select_paragraph_triggertconnectt_Trigger__select_cbt_Trigger__signal_id_1t _Trigger__next_paragraph_triggert_Trigger__next_cbt_Trigger__signal_id_2t$_Trigger__previous_paragraph_triggert_Trigger__previous_cbt_Trigger__signal_id_3t"_Trigger__reflow_paragraph_triggert_Trigger__reflow_cbt_Trigger__signal_id_4ttextviewt connect_aftert_Trigger__popup_cbt_Trigger__signal_id_5(tselfteditor((splugins/Paragraph/Trigger.pyt__init__*s  cCsg||_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ dS(sÏ Initialize the trigger's attributes. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param editor: Reference to the text editor. @type editor: An Editor object. N( t_Trigger__editortNonet_Trigger__managerRRR RR RR RR(RR((splugins/Paragraph/Trigger.pyt__init_attributes<s           cCs¨ddkl}|dƒ|_|ii|idƒ|dƒ|_|ii|idƒ|dƒ|_|ii|idƒ|d ƒ|_|ii|id ƒd S( sl Create the trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. iÿÿÿÿ(Rtselect_paragraphsalt - ptnext_paragraphs alt - Downtprevious_paragraphsalt - Uptreflow_paragraphsalt - qN(tSCRIBES.triggerRRRt add_triggerRR R(RR((splugins/Paragraph/Trigger.pyt__create_triggersSscCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(tManagerN(RRtAttributeErrorR#R(RttriggerR#((splugins/Paragraph/Trigger.pyt __select_cbls cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __previous_cb~s cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __next_cbs cCsZy|iiƒWnBtj o6ddkl}||iƒ|_|iiƒnXdS(sî Handles callback when the "activate" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. @param trigger: An object to show the document browser. @type trigger: A Trigger object. iÿÿÿÿ(R#N(RRR$R#R(RR%R#((splugins/Paragraph/Trigger.pyt __reflow_cb¢s cCsddkl}l}|i|i|i|ig}||i|iƒ||i|iƒ||i |iƒ||i |iƒ||i |i i ƒ|i i|iƒ|i i|iƒ|i i|iƒ|i i|iƒ|io|iiƒn||ƒ~d}dS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR*R+RR RRRR R RRRRtremove_triggerRtdestroyR(RR*R+ttriggers((splugins/Paragraph/Trigger.pyt __destroy´s"  cCs|iƒdS(si Destroy trigger. @param self: Reference to the Trigger instance. @type self: A Trigger object. N(t_Trigger__destroy(R((splugins/Paragraph/Trigger.pyR.Ís cCs4ddkl}|i||iƒƒ|iƒtS(s– Handles callback when the "populate-popup" signal is emitted. @param self: Reference to the Trigger instance. @type self: A Trigger object. iÿÿÿÿ(t PopupMenuItem(R2tprependRtshow_alltFalse(RRtmenuR2((splugins/Paragraph/Trigger.pyt __popup_cb×s ( t__name__t __module__t__doc__RRRRR R RR1R.R(((splugins/Paragraph/Trigger.pyR s         N(R:tobjectR(((splugins/Paragraph/Trigger.pyssscribes-0.4~r910/GenericPlugins/Paragraph/PopupMenuItem.py0000644000175000017500000000472311242100540023374 0ustar andreasandreasfrom gtk import ImageMenuItem from gettext import gettext as _ class PopupMenuItem(ImageMenuItem): def __init__(self, editor): ImageMenuItem.__init__(self, _("Paragraph")) self.__init_attributes(editor) self.__set_properties() self.__sig_id_1 = self.__next_item.connect("activate", self.__activate_cb) self.__sig_id_2 = self.__previous_item.connect("activate", self.__activate_cb) self.__sig_id_3 = self.__reflow_item.connect("activate", self.__activate_cb) self.__sig_id_4 = editor.textview.connect("focus-in-event", self.__destroy_cb) self.__sig_id_5 = self.__select_item.connect("activate", self.__activate_cb) def __init_attributes(self, editor): from gtk import Menu, Image self.__editor = editor self.__menu = Menu() self.__image = Image() self.__previous_item = editor.create_menuitem(_("Previous Paragraph (alt + Right)")) self.__next_item = editor.create_menuitem(_("Next Paragraph (alt + Left)")) self.__reflow_item = editor.create_menuitem(_("Reflow Paragraph (alt + q)")) self.__select_item = editor.create_menuitem(_("Select Paragraph (alt + p)")) return def __set_properties(self): from gtk import STOCK_JUMP_TO self.__image.set_property("stock", STOCK_JUMP_TO) self.set_image(self.__image) self.set_submenu(self.__menu) self.__menu.append(self.__previous_item) self.__menu.append(self.__next_item) self.__menu.append(self.__reflow_item) self.__menu.append(self.__select_item) if self.__editor.readonly: self.__reflow_item.set_property("sensitive", False) return def __activate_cb(self, menuitem): if menuitem == self.__previous_item: self.__editor.trigger("previous-paragraph") elif menuitem == self.__next_item: self.__editor.trigger("next-paragraph") elif menuitem == self.__select_item: self.__editor.trigger("select-paragraph") else: self.__editor.trigger("reflow-paragraph") return False def __destroy_cb(self, *args): self.__editor.disconnect_signal(self.__sig_id_1, self.__next_item) self.__editor.disconnect_signal(self.__sig_id_2, self.__previous_item) self.__editor.disconnect_signal(self.__sig_id_3, self.__reflow_item) self.__editor.disconnect_signal(self.__sig_id_4, self.__editor.textview) self.__editor.disconnect_signal(self.__sig_id_5, self.__select_item) self.__next_item.destroy() self.__select_item.destroy() self.__previous_item.destroy() self.__reflow_item.destroy() self.__menu.destroy() self.__image.destroy() self.destroy() del self self = None return False scribes-0.4~r910/GenericPlugins/Paragraph/Trigger.py0000644000175000017500000000400711242100540022223 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) self.connect(editor.textview, "populate-popup", self.__popup_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "next-paragraph", "Down", _("Move cursor to next paragraph"), _("Navigation Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "previous-paragraph", "Up", _("Move cursor to previous paragraph"), _("Navigation Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "reflow-paragraph", "q", _("Reflow a paragraph"), _("Text Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if not self.__manager: self.__manager = self.__get_manager() function = { self.__trigger1: self.__manager.next_paragraph, self.__trigger2: self.__manager.previous_paragraph, self.__trigger3: self.__manager.reflow_paragraph, } function[trigger]() return False def __popup_cb(self, *args): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False scribes-0.4~r910/GenericPlugins/Paragraph/Manager.py0000644000175000017500000001624111242100540022175 0ustar andreasandreasfrom gettext import gettext as _ class Manager(object): def __init__(self, editor): self.__init_attributes(editor) from gobject import idle_add idle_add(self.__precompile_methods, priority=9999) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview return def previous_paragraph(self): cursor_iterator = self.__editor.cursor current_line = cursor_iterator.get_line() try: if current_line == 0: raise RuntimeError line = self.__find_empty_line(cursor_iterator) if line is None: raise ValueError self.__jump_to_line(line) message = _("Moved to previous paragraph") self.__editor.update_message(message, "pass") except RuntimeError: message = _("No previous paragraph") self.__editor.update_message(message, "fail") except ValueError: self.__jump_to_line(0) return def next_paragraph(self): number_of_lines = self.__buffer.get_line_count() cursor_iterator = self.__editor.cursor current_line = cursor_iterator.get_line() try: if current_line == number_of_lines-1: raise RuntimeError line = self.__find_empty_line(cursor_iterator, False) if line is None: raise ValueError self.__jump_to_line(line) message = _("Moved to next paragraph") self.__editor.update_message(message, "pass") except RuntimeError: message = _("No next paragraph") self.__editor.update_message(message, "fail") except ValueError: self.__jump_to_line(number_of_lines-1) return def select_paragraph(self): try: begin, end = self.__get_paragraph_position() self.__buffer.select_range(begin, end) message = _("Selected paragraph") self.__editor.update_message(message, "pass") except RuntimeError: message = _("No paragraph found") self.__editor.update_message(message, "fail") return def reflow_paragraph(self): if self.__is_readonly(): return self.__editor.freeze() try: start, end = self.__get_paragraph_position() except RuntimeError: self.__editor.thaw() message = _("No paragraph found") self.__editor.update_message(message, "fail") return text = start.get_text(end) try: text = self.__reflow_text(text) except RuntimeError: self.__editor.thaw() message = _("No text found") self.__editor.update_message(message, "fail") return self.__buffer.begin_user_action() self.__buffer.delete(start, end) self.__buffer.insert_at_cursor(text) self.__buffer.end_user_action() self.__editor.thaw() message = _("Reflowed paragraph") self.__editor.update_message(message, "pass") return def destroy(self): del self return def __get_paragraph_position(self): iterator = self.__get_current_line_iterator() if iterator.is_start() and iterator.is_end(): raise RuntimeError if self.__is_empty_line(iterator): raise RuntimeError first_paragraph_line = self.__find_empty_line(iterator) if first_paragraph_line is None: begin, end = self.__buffer.get_bounds() else: begin = self.__buffer.get_iter_at_line(first_paragraph_line) begin.forward_line() second_paragraph_line = self.__find_empty_line(iterator, False) if second_paragraph_line is None: start, end = self.__buffer.get_bounds() else: end = self.__buffer.get_iter_at_line(second_paragraph_line) end.backward_line() end.forward_to_line_end() return begin, end def __get_current_line_iterator(self): iterator = self.__editor.cursor if iterator.starts_line(): return iterator line = iterator.get_line() return self.__buffer.get_iter_at_line(line) def __find_empty_line(self, iterator, backwards=True): while True: if backwards: if not iterator.backward_line(): return None else: if not iterator.forward_line(): return None if self.__is_empty_line(iterator): return iterator.get_line() return None def __is_empty_line(self, iterator): if iterator.ends_line(): return True temporary_iterator = iterator.copy() temporary_iterator.forward_to_line_end() text = iterator.get_text(temporary_iterator) if not text: return True if text.isspace(): return True return False def __jump_to_line(self, line): iterator = self.__buffer.get_iter_at_line(line) self.__buffer.place_cursor(iterator) self.__editor.move_view_to_cursor() return def __reflow_text(self, text): if not text or text.isspace(): raise RuntimeError text_lines = text.split("\n") indentation = self.__get_indentation(text_lines[0]) wrap_width = self.__calculate_wrap_width(indentation) reflowed_lines = [] remainder = "" line = " ".join(text_lines) line = line.replace("\t", " ") line = line.strip() line = self.__respace_line(line) if len(line) > wrap_width: while True: new_line, remainder = self.__shorten_line(line, wrap_width) reflowed_lines.append(new_line) if len(remainder) < wrap_width: break line = remainder.strip() else: reflowed_lines.append(line) if remainder: reflowed_lines.append(remainder) indented_reflowed_lines = self.__indent_lines(reflowed_lines, indentation) return "\n".join(indented_reflowed_lines) def __shorten_line(self, line, wrap_width): from textwrap import wrap line = line.strip() new_lines = wrap(line, wrap_width, expand_tabs=False, replace_whitespace=False) new_line = new_lines[0] remainder = " ".join(new_lines[1:]) return new_line.strip(), remainder.strip() def __indent_lines(self, reflowed_lines, indentation): if len(reflowed_lines) < 2: return reflowed_lines indent_line = lambda x: indentation + x.strip() indented_lines = map(indent_line, reflowed_lines) return indented_lines def __get_indentation(self, line): indentation_list = [] for char in line: if not (char in [" ", "\t"]): break indentation_list.append(char) return "".join(indentation_list) def __respace_line(self, line): line = line.split(" ") while True: try: line.remove("") except ValueError: break return " ".join(line) def __calculate_wrap_width(self, indentation): width = self.__get_right_margin_width() if not indentation: return width tab_width = self.__get_tab_width() number_of_tab_chars = indentation.count("\t") number_of_space_chars = indentation.count(" ") width = width - (number_of_space_chars + (number_of_tab_chars * tab_width)) return width def __get_tab_width(self): return self.__editor.textview.get_tab_width() def __is_readonly(self): if not (self.__editor.readonly): return False message = _("Editor is in readonly mode") self.__editor.update_message(message, "fail") return True def __get_right_margin_width(self): if self.__editor.in_fullscreen_mode: return int(0.5*self.__view.get_visible_rect()[2]) return self.__editor.textview.get_right_margin_position() def __precompile_methods(self): try: from psyco import bind bind(self.reflow_paragraph) bind(self.next_paragraph) bind(self.previous_paragraph) bind(self.select_paragraph) bind(self.__reflow_text) bind(self.__shorten_line) bind(self.__respace_line) bind(self.__indent_lines) bind(self.__calculate_wrap_width) bind(self.__get_paragraph_position) bind(self.__get_current_line_iterator) bind(self.__find_empty_line) bind(self.__is_empty_line) bind(self.__jump_to_line) except ImportError: pass return False scribes-0.4~r910/GenericPlugins/ThemeSelector/0000755000175000017500000000000011242100540021103 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/Metadata.py0000644000175000017500000000065011242100540023176 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "ColorTheme.gdb") def get_value(): try: value = "oblivion" database = open_database(basepath, "r") value = database["theme"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["theme"] = value finally: database.close() return scribes-0.4~r910/GenericPlugins/ThemeSelector/__init__.py0000644000175000017500000000000011242100540023202 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/Signals.py0000644000175000017500000000326111242100540023057 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "database-update": (SSIGNAL, TYPE_NONE, ()), "show-window": (SSIGNAL, TYPE_NONE, ()), "hide-window": (SSIGNAL, TYPE_NONE, ()), "activate": (SSIGNAL, TYPE_NONE, ()), "updated-model": (SSIGNAL, TYPE_NONE, ()), "theme-folder-update": (SSIGNAL, TYPE_NONE, ()), "selected-row": (SSIGNAL, TYPE_NONE, ()), "update-database": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "theme-from-database": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "schemes": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-scheme": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "model-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "last-selected-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "ignore-row-activation": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "delete-row": (SSIGNAL, TYPE_NONE, ()), "delete-error": (SSIGNAL, TYPE_NONE, ()), "row-changed": (SSIGNAL, TYPE_NONE, ()), "remove-scheme": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "valid-scheme-files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "process-xml-files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "valid-chooser-selection": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "treeview-sensitivity": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "invalid-scheme-files": (SSIGNAL, TYPE_NONE, ()), "hide-message": (SSIGNAL, TYPE_NONE, ()), "show-chooser": (SSIGNAL, TYPE_NONE, ()), "hide-chooser": (SSIGNAL, TYPE_NONE, ()), "activate-chooser": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/ThemeSelector/Utils.py0000644000175000017500000000013011242100540022547 0ustar andreasandreas# Utility functions shared among modules belong here. def answer_to_life(): return 42 scribes-0.4~r910/GenericPlugins/ThemeSelector/DatabaseMonitor.py0000644000175000017500000000233511242100540024534 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.metadata_folder, "Preferences", "ColorTheme.gdb") self.__monitor = editor.get_file_monitor(_file) return def __destroy(self): self.__monitor.cancel() self.disconnect() del self return def __update(self): self.__manager.emit("database-update") return False def __update_timeout(self): from gobject import idle_add idle_add(self.__update, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__update_timeout, priority=9999) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeFileInstaller.py0000644000175000017500000000213111242100540025172 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Installer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "valid-scheme-files", self.__valid_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager return def __destroy(self): self.disconnect() del self return False def __install(self, filenames): from shutil import copy folder = self.__get_scheme_folder() copy_ = lambda filename: copy(filename, folder) [copy_(_file) for _file in filenames] return False def __get_scheme_folder(self): from os.path import join, exists from os import makedirs folder = join(self.__editor.metadata_folder, "styles") if not exists(folder): makedirs(folder) return folder def __destroy_cb(self, *args): self.__destroy() return False def __valid_cb(self, manager, filenames): from gobject import idle_add idle_add(self.__install, filenames) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/Exceptions.py0000644000175000017500000000011511242100540023573 0ustar andreasandreas# Custom exceptions belong in this module. class FooError(Exception): pass scribes-0.4~r910/GenericPlugins/ThemeSelector/Trigger.py0000644000175000017500000000214611242100540023063 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-theme-selector", "F12", _("Manage themes"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None from MenuItem import MenuItem self.__menuitem = MenuItem(editor) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.activate() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return scribes-0.4~r910/GenericPlugins/ThemeSelector/DatabaseReader.py0000644000175000017500000000146711242100540024314 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "database-update", self.__read_cb) self.connect(manager, "destroy", self.__destroy_cb) self.__read() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __read(self): from Metadata import get_value self.__manager.emit("theme-from-database", get_value()) return False def __read_cb(self, *args): from gobject import idle_add idle_add(self.__read, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/MenuItem.py0000644000175000017500000000146511242100540023206 0ustar andreasandreasfrom gettext import gettext as _ class MenuItem(object): def __init__(self, editor): self.__init_attributes(editor) self.__menuitem.set_property("name", "Theme Selector MenuItem") self.__sigid1 = self.__menuitem.connect("activate", self.__activate_cb) editor.add_to_pref_menu(self.__menuitem) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_SELECT_COLOR message = _("Theme Selector") self.__menuitem = editor.create_menuitem(message, STOCK_SELECT_COLOR) return def destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem) self.__editor.remove_from_pref_menu(self.__menuitem) self.__menuitem.destroy() del self self = None return def __activate_cb(self, menuitem): self.__editor.trigger("show-theme-selector") return False scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeUpdater.py0000644000175000017500000000206411242100540024046 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "new-scheme", self.__update_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager return False def __destroy(self): self.disconnect() del self return False def __update(self, scheme): self.__manager.emit("update-database", scheme.get_id()) return False def __update_timeout(self, scheme): from gobject import idle_add idle_add(self.__update, scheme, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, manager, scheme): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__update_timeout, scheme, priority=9999) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/Feedback.py0000644000175000017500000000520311242100540023141 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager FEEDBACK_MESSAGE = _("Manage themes") class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "schemes", self.__schemes_cb) self.connect(manager, "valid-scheme-files", self.__schemes_cb) self.connect(manager, "delete-row", self.__schemes_cb) self.connect(manager, "row-changed", self.__changed_cb) self.connect(manager, "theme-from-database", self.__database_cb) self.connect(manager, "delete-error", self.__error_cb) self.connect(manager, "new-scheme", self.__new_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "hide-window", self.__hide_cb) self.connect(manager, "invalid-scheme-files", self.__invalid_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__scheme = None return def __update_message(self, data, time): self.__manager.emit("message", data) self.__hide_after(time) return False def __hide(self): self.__manager.emit("hide-message") return False def __hide_after(self, time): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(time*1000, self.__hide) return False def __destroy(self): self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __schemes_cb(self, *args): if not self.__scheme: return False data = ("PROGRESS", _("Updating themes please wait...")) self.__update_message(data, 7) return False def __changed_cb(self, *args): data = ("PROGRESS", _("Changing theme please wait...")) self.__update_message(data, 7) return False def __database_cb(self, manager, theme): if not self.__scheme: return False data = ("INFO", _("Theme is now set to '%s'") % self.__scheme.get_name()) self.__update_message(data, 10) return False def __error_cb(self, *args): data = ("ERROR", _("Error: Cannot remove default themes")) self.__update_message(data, 10) return False def __invalid_cb(self, *args): data = ("ERROR", _("Error: No valid theme files found")) self.__update_message(data, 10) return False def __new_cb(self, manager, scheme): self.__scheme = scheme return False def __activate_cb(self, *args): self.__editor.set_message(FEEDBACK_MESSAGE) return False def __hide_cb(self, *args): self.__editor.unset_message(FEEDBACK_MESSAGE) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/Manager.py0000644000175000017500000000246511242100540023036 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from Feedback import Feedback Feedback(self, editor) from GUI.Manager import Manager Manager(self, editor) from ThemeFileInstaller import Installer Installer(self, editor) from ThemeFileValidator import Validator Validator(self, editor) from DatabaseWriter import Writer Writer(self, editor) from DatabaseReader import Reader Reader(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) from ThemeRemover import Remover Remover(self, editor) from ThemeUpdater import Updater Updater(self, editor) from ThemeDispatcher import Dispatcher Dispatcher(self, editor) from ThemeFolderMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): from os.path import join self.__main_gui = editor.get_gui_object(globals(), join("GUI", "MainGUI", "GUI.glade")) self.__chooser_gui = editor.get_gui_object(globals(), join("GUI", "FileChooserGUI", "GUI.glade")) return False main_gui = property(lambda self: self.__main_gui) chooser_gui = property(lambda self: self.__chooser_gui) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeRemover.py0000644000175000017500000000160011242100540024054 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Remover(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "remove-scheme", self.__remove_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager return def __destroy(self): self.disconnect() del self return False def __remove(self, scheme): filename = scheme.get_filename() from os.path import exists if not exists(filename): return False from os import remove remove(filename) return False def __destroy_cb(self, *args): self.__destroy() return False def __remove_cb(self, manager, scheme): from gobject import idle_add idle_add(self.__remove, scheme, priority=9999) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/0000755000175000017500000000000011242100540021527 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/__init__.py0000644000175000017500000000000011242100540023626 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/0000755000175000017500000000000011242100540022760 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/__init__.py0000644000175000017500000000000011242100540025057 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/0000755000175000017500000000000011242100540024512 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/__init__.py0000644000175000017500000000000011242100540026611 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/Disabler.py0000644000175000017500000000265211242100540026616 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Disabler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "schemes", self.__updated_cb) self.connect(manager, "valid-scheme-files", self.__updated_cb) self.connect(manager, "selected-row", self.__selected_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__is_frozen = False self.__treeview = manager.main_gui.get_object("TreeView") return def __destroy(self): self.disconnect() del self return False def __freeze(self): if self.__is_frozen: return False self.__is_frozen = True self.__treeview.window.freeze_updates() return False def __thaw(self): if self.__is_frozen is False: return False self.__is_frozen = False self.__treeview.window.thaw_updates() return False def __destroy_cb(self, *args): self.__destroy() return False def __updated_cb(self, *args): self.__manager.emit("treeview-sensitivity", False) self.__treeview.grab_focus() self.__treeview.props.sensitive = False self.__freeze() return False def __selected_cb(self, *args): self.__thaw() self.__treeview.props.sensitive = True self.__treeview.grab_focus() self.__manager.emit("treeview-sensitivity", True) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/Utils.py0000644000175000017500000000043511242100540026166 0ustar andreasandreasdef get_selected_path(treeview): #FIXME: This function is deprecated. model, iterator = treeview.get_selection().get_selected() if not iterator: return None return model.get_path(iterator) def get_selected_paths(treeview): return treeview.get_selection().get_selected_rows()[-1] scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/Initializer.py0000644000175000017500000000244611242100540027355 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__set_properties() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.main_gui.get_object("TreeView") return def __destroy(self): self.disconnect() del self return False def __set_properties(self): self.__treeview.append_column(self.__create_column()) self.__treeview.set_model(self.__create_model()) from gtk import SELECTION_MULTIPLE self.__treeview.get_selection().set_mode(SELECTION_MULTIPLE) return def __create_model(self): from gtk import ListStore from gobject import TYPE_OBJECT model = ListStore(str, TYPE_OBJECT, bool) return model def __create_column(self): from gtk import TreeViewColumn, CellRendererText, TREE_VIEW_COLUMN_FIXED column = TreeViewColumn() renderer = CellRendererText() column.pack_start(renderer, False) column.set_sizing(TREE_VIEW_COLUMN_FIXED) column.set_resizable(False) column.set_attributes(renderer, text=0) return column def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/ModelUpdater.py0000644000175000017500000000224111242100540027450 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "model-data", self.__data_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.main_gui.get_object("TreeView") self.__model = self.__treeview.get_model() self.__data = [] return def __destroy(self): self.disconnect() del self return False def __update(self, data): # if self.__data == data: return False # from copy import copy # self.__data = copy(data) self.__treeview.set_model(None) self.__model.clear() for description, scheme, is_removable in data: self.__model.append([description, scheme, is_removable]) self.__treeview.set_model(self.__model) self.__manager.emit("updated-model") return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__update, data) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/RowDeleter.py0000644000175000017500000000352011242100540027140 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Deleter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "delete-row", self.__delete_cb) self.connect(self.__treeview, "key-press-event", self.__key_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.main_gui.get_object("TreeView") self.__model = self.__treeview.get_model() return def __destroy(self): self.disconnect() del self return False def __delete_selected_paths(self): try: from Utils import get_selected_paths paths = get_selected_paths(self.__treeview) if not paths: return False removable_paths, unremovable_paths = self.__separate(paths) if unremovable_paths and not removable_paths: raise ValueError if not removable_paths: return False self.__treeview.props.sensitive = False delete = lambda scheme: self.__manager.emit("remove-scheme", scheme) schemes = [self.__model[path][1] for path in removable_paths] [delete(scheme) for scheme in schemes] except ValueError: self.__manager.emit("delete-error") return False def __separate(self, paths): removable_paths = [] unremovable_paths = [] for path in paths: is_removable = self.__model[path][2] removable_paths.append(path) if is_removable else unremovable_paths.append(path) return removable_paths, unremovable_paths def __destroy_cb(self, *args): self.__destroy() return False def __key_cb(self, window, event): from gtk.keysyms import Delete if event.keyval != Delete: return False self.__manager.emit("delete-row") return True def __delete_cb(self, *args): self.__delete_selected_paths() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/ModelDataGenerator.py0000644000175000017500000000247611242100540030576 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Generator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "schemes", self.__schemes_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager return def __destroy(self): self.disconnect() del self return False def __process(self, schemes): can_remove = lambda scheme: scheme.get_filename().startswith(self.__editor.home_folder) get_description = lambda scheme: (scheme.get_name() + " - " + scheme.get_description()) format = lambda scheme: (get_description(scheme), scheme, can_remove(scheme)) data = (format(scheme) for scheme in schemes) self.__manager.emit("model-data", data) return False def __process_timeout(self, schemes): from gobject import idle_add idle_add(self.__process, schemes) return False def __destroy_cb(self, *args): self.__destroy() return False def __schemes_cb(self, manager, schemes): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__process_timeout, schemes) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/RowSelectionMonitor.py0000644000175000017500000000167511242100540031062 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(self.__treeview, "cursor-changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.main_gui.get_object("TreeView") self.__selection = self.__treeview.get_selection() return def __destroy(self): self.disconnect() del self return False def __path(self): from Utils import get_selected_paths paths = get_selected_paths(self.__treeview) if not paths: return False self.__manager.emit("last-selected-path", paths[0]) return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): self.__path() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/Manager.py0000644000175000017500000000110711242100540026435 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Disabler import Disabler Disabler(manager, editor) from RowDeleter import Deleter Deleter(manager, editor) from RowActivator import Activator Activator(manager, editor) from RowSelectionMonitor import Monitor Monitor(manager, editor) from RowSelector import Selector Selector(manager, editor) from ModelUpdater import Updater Updater(manager, editor) from ModelDataGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/RowSelector.py0000644000175000017500000000520411242100540027335 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "updated-model", self.__updated_cb) self.connect(manager, "theme-from-database", self.__theme_cb) self.connect(manager, "last-selected-path", self.__path_cb) self.connect(manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__treeview = manager.main_gui.get_object("TreeView") self.__selection = self.__treeview.get_selection() self.__column = self.__treeview.get_column(0) self.__model = self.__treeview.get_model() self.__theme = "" self.__path = (0,) return def __destroy(self): self.disconnect() del self return False def __get_scheme_row(self, theme): if not theme: return None row = None for _row in self.__model: if _row[1].get_id() != theme: continue row = _row break return row def __sel(self, iterator, path): self.__selection.select_iter(iterator) self.__treeview.grab_focus() self.__treeview.set_cursor(path, self.__column) self.__treeview.scroll_to_cell(path, None, True, 0.5, 0.5) self.__manager.emit("selected-row") return False def __is_selected(self, row): return self.__selection.iter_is_selected(row.iter) def __select_row_from_theme(self): row = self.__get_scheme_row(self.__theme) if not row: raise ValueError if self.__is_selected(row): return False self.__manager.emit("ignore-row-activation", True) self.__sel(row.iter, row.path) self.__manager.emit("ignore-row-activation", False) return False def __select_row_from_path(self): try: path = self.__path iterator = self.__model.get_iter(path) self.__sel(iterator, path) except ValueError: row = self.__model[-1] self.__sel(row.iter, row.path) return False def __select(self): if not len(self.__model): return False try: self.__select_row_from_theme() except ValueError: self.__select_row_from_path() return False def __destroy_cb(self, *args): self.__destroy() return False def __updated_cb(self, *args): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__select) return False def __theme_cb(self, manager, theme): self.__theme = theme return False def __path_cb(self, manager, path): self.__path = path return False def __activate_cb(self, *args): self.__select() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/TreeView/RowActivator.py0000644000175000017500000000302311242100540027506 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Activator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "ignore-row-activation", self.__ignore_cb) self.connect(self.__treeview, "cursor-changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__ignore = False self.__treeview = manager.main_gui.get_object("TreeView") self.__model = self.__treeview.get_model() return def __destroy(self): self.disconnect() del self return False def __activate(self): from Utils import get_selected_paths paths = get_selected_paths(self.__treeview) if not paths: return False scheme = self.__model[paths[0]][1] self.__manager.emit("new-scheme", scheme) return False def __activate_timeout(self): from gobject import source_remove, idle_add idle_add(self.__activate, priority=99999) return False def __destroy_cb(self, *args): self.__destroy() return False def __ignore_cb(self, manager, ignore): self.__ignore = ignore return False def __changed_cb(self, *args): if self.__ignore: return False try: self.__manager.emit("row-changed") from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__activate_timeout, priority=99999) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/GUI.glade0000644000175000017500000001537711242100540024417 0ustar andreasandreas 10 Select Themes True center-on-parent 600 320 True scribes dialog True True True static True 10 True 10 True True never automatic in True False True True True False True 0 True False 0 True 10 gtk-add True False False Add new themes True False False False 0 gtk-remove True False False False Remove selected themes True False False False 1 _Themes True False False True Download themes from the internet image1 True False http://scribes.sf.net/gtksv2-themes.tar.bz2 False False 2 False False 1 0 True 0 <b>Initializing please wait...</b> True True False False False 1 True gtk-connect scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/AddButton.py0000644000175000017500000000225111242100540025216 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "treeview-sensitivity", self.__sensitive_cb) self.connect(manager, "schemes", self.__disable_cb) self.connect(manager, "delete-row", self.__disable_cb) self.connect(manager, "valid-scheme-files", self.__disable_cb) self.connect(self.__button, "clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.main_gui.get_object("AddButton") return def __destroy(self): self.disconnect() del self return def __destroy_cb(self, *args): self.__destroy() return True def __clicked_cb(self, *args): self.__manager.emit("show-chooser") return True def __sensitive_cb(self, manager, sensitive): self.__button.props.sensitive = sensitive return False def __disable_cb(self, *args): self.__button.props.sensitive = False return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/Label.py0000644000175000017500000000222511242100540024352 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Label(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "message", self.__message_cb) self.connect(manager, "hide-message", self.__hide_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.main_gui.get_object("FeedbackLabel") return def __destroy(self): self.disconnect() del self return False def __set_message(self, data): _type, message = data template = { "ERROR": "%s", "INFO": "%s", "PROGRESS": "%s", } self.__label.set_markup(template[_type] % message) self.__label.show() return False def __destroy_cb(self, *args): self.__destroy() return False def __message_cb(self, manager, data): from gobject import idle_add idle_add(self.__set_message, data) return False def __hide_cb(self, *args): self.__label.hide() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/Manager.py0000644000175000017500000000053611242100540024710 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from AddButton import Button Button(manager, editor) from TreeView.Manager import Manager Manager(manager, editor) from Label import Label Label(manager, editor) from RemoveButton import Button Button(manager, editor) from Window import Window Window(manager, editor) scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/RemoveButton.py0000644000175000017500000000312311242100540025762 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "last-selected-path", self.__path_cb) self.connect(manager, "treeview-sensitivity", self.__sensitive_cb) self.connect(manager, "delete-row", self.__delete_cb) self.connect(manager, "valid-scheme-files", self.__delete_cb) self.connect(self.__button, "clicked", self.__clicked_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.main_gui.get_object("RemoveButton") self.__model = manager.main_gui.get_object("TreeView").get_model() self.__path = (0,) return def __destroy(self): self.disconnect() del self return False def __sensitive(self): is_removable = self.__model[self.__path][2] self.__button.set_property("sensitive", is_removable) return False def __path_cb(self, manager, path): self.__path = path from gobject import idle_add idle_add(self.__sensitive) return True def __clicked_cb(self, *args): self.__button.props.sensitive = False self.__manager.emit("delete-row") return True def __destroy_cb(self, *args): self.__destroy() return True def __sensitive_cb(self, manager, sensitive): if sensitive is False: self.__button.props.sensitive = sensitive if sensitive: self.__sensitive() return False def __delete_cb(self, *args): self.__button.props.sensitive = False return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/MainGUI/Window.py0000644000175000017500000000303111242100540024576 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show-window", self.__show_cb) self.connect(manager, "hide-window", self.__hide_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(self.__window, "delete-event", self.__delete_cb) self.connect(self.__window, "key-press-event", self.__key_cb) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.main_gui.get_object("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy(self): self.disconnect() self.__window.destroy() del self return def __destroy_cb(self, *args): self.__destroy() return def __show_cb(self, *args): self.__show() return def __hide_cb(self, *args): self.__hide() return False def __delete_cb(self, *args): self.__manager.emit("hide-window") return True def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide-window") return True def __activate_cb(self, *args): self.__manager.emit("show-window") return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/0000755000175000017500000000000011242100540024276 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/__init__.py0000644000175000017500000000000011242100540026375 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/GUI.glade0000644000175000017500000001123411242100540025721 0ustar andreasandreas False 10 Add New Themes AddColorTheme True center-on-parent 640 480 True scribes dialog True True True center AddColorThemeID True False 10 False True False True 10 end gtk-cancel True False False False True False False False 0 True False True True True True True True gtk-add False False 0 True 0 A_dd Scheme True True 1 False False 1 False False 1 scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/CancelButton.py0000644000175000017500000000135411242100540027234 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, editor, manager): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(self.__button, "clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.chooser_gui.get_object("CancelButton") return def __destroy(self): self.disconnect() del self return def __destroy_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("hide-chooser") return scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/AddButton.py0000644000175000017500000000154311242100540026537 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, editor, manager): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "valid-chooser-selection", self.__valid_cb) self.connect(self.__button, "clicked", self.__clicked_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.chooser_gui.get_object("AddButton") return def __destroy(self): self.disconnect() del self return def __destroy_cb(self, *args): self.__destroy() return def __valid_cb(self, manager, value): self.__button.set_property("sensitive", value) return def __clicked_cb(self, *args): self.__manager.emit("activate-chooser") return scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/Manager.py0000644000175000017500000000045611242100540026227 0ustar andreasandreasclass Manager(object): def __init__(self, editor, manager): from Window import Window Window(editor, manager) from AddButton import Button Button(editor, manager) from FileChooser import FileChooser FileChooser(editor, manager) from CancelButton import Button Button(editor, manager) scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/Window.py0000644000175000017500000000272411242100540026124 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, editor, manager): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show-chooser", self.__show_cb) self.connect(manager, "hide-chooser", self.__hide_cb) self.connect(self.__window, "delete-event", self.__delete_cb) self.connect(self.__window, "key-press-event", self.__key_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.chooser_gui.get_object("Window") return def __destroy(self): self.disconnect() self.__window.destroy() del self return def __set_properties(self): self.__window.set_transient_for(self.__manager.main_gui.get_object("Window")) return def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide() return False def __destroy_cb(self, *args): self.__destroy() return def __hide_cb(self, *args): self.__hide() return def __show_cb(self, *args): self.__show() return def __delete_cb(self, *args): self.__manager.emit("hide-chooser") return True def __key_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide-chooser") return True scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/FileChooserGUI/FileChooser.py0000644000175000017500000000452111242100540027054 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class FileChooser(SignalManager): def __init__(self, editor, manager): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(self.__chooser, "file-activated", self.__activated_cb) self.connect(self.__chooser, "selection-changed", self.__changed_cb) self.connect(manager, "activate-chooser", self.__load_schemes_cb) self.connect(manager, "show-chooser", self.__show_cb) self.__chooser.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__chooser = manager.chooser_gui.get_object("FileChooser") return def __set_properties(self): from gtk import FileFilter filefilter = FileFilter() filefilter.set_name(_("Color Scheme Files")) filefilter.add_pattern("*.xml") self.__chooser.add_filter(filefilter) self.__set_folder() return def __set_folder(self): from os.path import exists if exists(self.__editor.desktop_folder): self.__chooser.set_current_folder(self.__editor.desktop_folder) else: self.__chooser.set_current_folder(self.__editor.home_folder) return False def __load_schemes(self): filenames = self.__chooser.get_filenames() self.__manager.emit("process-xml-files", filenames) self.__manager.emit("hide-chooser") return False def __destroy(self): self.disconnect() del self return def __validate(self): try: filenames = self.__chooser.get_filenames() if not filenames: raise ValueError from os.path import isdir is_a_folder = lambda _file: isdir(_file) folders = filter(is_a_folder, filenames) valid = False if folders else True self.__manager.emit("valid-chooser-selection", valid) except ValueError: self.__manager.emit("valid-chooser-selection", False) return False def __destroy_cb(self, *args): self.__destroy() return def __activated_cb(self, *args): from gobject import idle_add idle_add(self.__load_schemes) return False def __load_schemes_cb(self, *args): from gobject import idle_add idle_add(self.__load_schemes) return def __changed_cb(self, *args): self.__validate() return False def __show_cb(self, *args): self.__validate() return False scribes-0.4~r910/GenericPlugins/ThemeSelector/GUI/Manager.py0000644000175000017500000000030711242100540023453 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from MainGUI.Manager import Manager Manager(manager, editor) from FileChooserGUI.Manager import Manager Manager(editor, manager) scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeDispatcher.py0000644000175000017500000000243411242100540024531 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Dispatcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "theme-folder-update", self.__dispatch_cb) self.__scheme_manager.force_rescan() def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__scheme_manager = editor.style_scheme_manager return def __destroy(self): self.disconnect() del self return False def __dispatch(self): self.__scheme_manager.force_rescan() get_scheme = self.__scheme_manager.get_scheme schemes = [get_scheme(id_) for id_ in self.__scheme_manager.get_scheme_ids()] self.__manager.emit("schemes", schemes) return False def __dispatch_timeout(self): from gobject import idle_add idle_add(self.__dispatch, priority=99999) return False def __destroy_cb(self, *args): self.__destroy() return False def __dispatch_cb(self, *args): try: from gobject import idle_add, source_remove, timeout_add source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__dispatch_timeout, priority=99999) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/DatabaseWriter.py0000644000175000017500000000141411242100540024356 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "update-database", self.__data_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update(self, theme): from Metadata import set_value set_value(theme) return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, theme): from gobject import idle_add idle_add(self.__update, theme) return False scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeFolderMonitor.py0000644000175000017500000000305511242100540025226 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.__update_monitors(self.__get_monitors()) self.__connect_monitors() from gobject import idle_add idle_add(self.__update) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__monitors = [] return def __destroy(self): self.disconnect() self.__disconnect_monitors() del self return def __get_monitors(self): paths = [self.__editor.scribes_theme_folder, self.__editor.default_home_theme_folder] get_monitor = self.__editor.get_folder_monitor return [get_monitor(path) for path in paths] def __update_monitors(self, monitors): self.__monitors = monitors return def __connect_monitors(self): [monitor.connect("changed", self.__changed_cb) for monitor in self.__monitors] return False def __disconnect_monitors(self): [monitor.cancel() for monitor in self.__monitors] return False def __update(self): self.__manager.emit("theme-folder-update") return def __destroy_cb(self, *args): self.__destroy() return def __changed_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__update, priority=99999) return True scribes-0.4~r910/GenericPlugins/ThemeSelector/.ropeproject/0000755000175000017500000000000011242100540023515 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ThemeSelector/.ropeproject/config.py0000644000175000017500000000660511242100540025343 0ustar andreasandreas# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # Note that ``?`` and ``*`` match all characters but slashes. # '*.pyc': matches 'test.pyc' and 'pkg/test.pyc' # 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc' # '.svn': matches 'pkg/.svn' and all of its children # 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o' # 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o' prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject', '.hg', '.svn', '_svn', '.git'] # Specifies which files should be considered python files. It is # useful when you have scripts inside your project. Only files # ending with ``.py`` are considered to be python files by # default. #prefs['python_files'] = ['*.py'] # Custom source folders: By default rope searches the project # for finding source folders (folders that should be searched # for finding modules). You can add paths to that list. Note # that rope guesses project source folders correctly most of the # time; use this if you have any problems. # The folders should be relative to project root and use '/' for # separating folders regardless of the platform rope is running on. # 'src/my_source_folder' for instance. #prefs.add('source_folders', 'src') # You can extend python path for looking up modules #prefs.add('python_path', '~/python/') # Should rope save object information or not. prefs['save_objectdb'] = True prefs['compress_objectdb'] = False # If `True`, rope analyzes each module when it is being saved. prefs['automatic_soa'] = True # The depth of calls to follow in static object analysis prefs['soa_followed_calls'] = 0 # If `False` when running modules or unit tests "dynamic object # analysis" is turned off. This makes them much faster. prefs['perform_doa'] = True # Rope can check the validity of its object DB when running. prefs['validate_objectdb'] = True # How many undos to hold? prefs['max_history_items'] = 32 # Shows whether to save history across sessions. prefs['save_history'] = True prefs['compress_history'] = False # Set the number spaces used for indenting. According to # :PEP:`8`, it is best to use 4 spaces. Since most of rope's # unit-tests use 4 spaces it is more reliable, too. prefs['indent_size'] = 4 # Builtin and c-extension modules that are allowed to be imported # and inspected by rope. prefs['extension_modules'] = [] # Add all standard c-extensions to extension_modules list. prefs['import_dynload_stdmods'] = True # If `True` modules with syntax errors are considered to be empty. # The default value is `False`; When `False` syntax errors raise # `rope.base.exceptions.ModuleSyntaxError` exception. prefs['ignore_syntax_errors'] = False # If `True`, rope ignores unresolvable imports. Otherwise, they # appear in the importing namespace. prefs['ignore_bad_imports'] = False def project_opened(project): """This function is called after opening the project""" # Do whatever you like here! scribes-0.4~r910/GenericPlugins/ThemeSelector/ThemeFileValidator.py0000644000175000017500000000350411242100540025167 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor, manager) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "process-xml-files", self.__process_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager return def __destroy(self): self.disconnect() del self return False def __validate(self, filenames): try: from os.path import isfile filenames = filter(isfile, filenames) if not filenames: raise ValueError filenames = filter(self.__is_xml, filenames) if not filenames: raise ValueError filenames = filter(self.__is_color_scheme, filenames) if not filenames: raise ValueError self.__manager.emit("valid-scheme-files", filenames) except ValueError: self.__manager.emit("invalid-scheme-files") return False def __is_xml(self, _file): xml_mime_types = ("application/xml", "text/xml") return self.__editor.get_mimetype(_file) in xml_mime_types def __is_color_scheme(self, file_): root_node = self.__get_xml_root_node(file_) if root_node.tag != "style-scheme": return False attribute_names = root_node.keys() if not ("id" in attribute_names): return False if not ("_name" in attribute_names): return False return True def __get_xml_root_node(self, file_): try: from xml.parsers.expat import ExpatError from xml.etree.ElementTree import parse xmlobj = parse(file_) node = xmlobj.getroot() except ExpatError: raise ValueError return node def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, filenames): from gobject import idle_add idle_add(self.__validate, filenames, priority=9999) return False scribes-0.4~r910/GenericPlugins/RecentOpen/0000755000175000017500000000000011242100540020402 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/__init__.py0000644000175000017500000000000011242100540022501 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/Signals.py0000644000175000017500000000050111242100540022350 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "open-last-files": (SSIGNAL, TYPE_NONE, ()), "open-last-file": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcessStarter.py0000644000175000017500000000375111242100540025450 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from ExternalProcess.Utils import DBUS_SERVICE class Starter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(manager, "destroy", self.__destroy_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) def __init_attributes(self, editor): from os.path import join from sys import prefix self.__editor = editor self.__cwd = self.__editor.get_current_folder(globals()) self.__executable = join(self.__cwd, "ExternalProcess", "ScribesRecentFilesIndexer.py") self.__python_executable = join(prefix, "bin", "python") return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) del self return False def __process_init(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) return False def __start(self): if self.__process_exists(): return False self.__start_process() return False def __process_exists(self): services = self.__editor.dbus_iface.ListNames() if DBUS_SERVICE in services: return True return False def __start_process(self): from gobject import spawn_async, GError try: spawn_async([self.__python_executable, self.__executable, self.__editor.python_path], working_directory=self.__cwd) except GError: pass return False def __destroy_cb(self, *args): self.__destroy() return False def __name_change_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__start, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/RecentOpen/Trigger.py0000644000175000017500000000344511242100540022365 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(editor) name, shortcut, description, category = ( "open-recent-files", "r", _("Open recent files"), _("File Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__trigger.command = "activate" name, shortcut, description, category = ( "reopen-closed-file", "w", _("Reopen last closed file"), _("File Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) self.__trigger1.command = "open-last-file" name, shortcut, description, category = ( "reopen-closed-files", "q", _("Reopen last closed file"), _("File Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.command = "open-last-files" return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self, trigger): command = trigger.command self.__manager.activate(command) return False def __activate_cb(self, trigger): from gobject import idle_add idle_add(self.__activate, trigger) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/0000755000175000017500000000000011242100540023523 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/ScribesRecentFilesIndexer.py0000644000175000017500000000052511242100540031134 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- if __name__ == "__main__": from sys import argv, path python_path = argv[1] path.insert(0, python_path) from gobject import MainLoop, threads_init threads_init() from signal import signal, SIGINT, SIG_IGN signal(SIGINT, SIG_IGN) from Manager import Manager Manager() MainLoop().run() scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/__init__.py0000644000175000017500000000007011242100540025631 0ustar andreasandreas__import__('pkg_resources').declare_namespace(__name__) scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/Signals.py0000644000175000017500000000250111242100540025473 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "hide-window": (SSIGNAL, TYPE_NONE, ()), "show-window": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "updated-model": (SSIGNAL, TYPE_NONE, ()), "selected-row": (SSIGNAL, TYPE_NONE, ()), "hide-message": (SSIGNAL, TYPE_NONE, ()), "up-key-press": (SSIGNAL, TYPE_NONE, ()), "shift-up-key-press": (SSIGNAL, TYPE_NONE, ()), "down-key-press": (SSIGNAL, TYPE_NONE, ()), "shift-down-key-press": (SSIGNAL, TYPE_NONE, ()), "focus-entry": (SSIGNAL, TYPE_NONE, ()), "open-last-files": (SSIGNAL, TYPE_NONE, ()), "open-last-file": (SSIGNAL, TYPE_NONE, ()), "activate-selected-rows": (SSIGNAL, TYPE_NONE, ()), "recent-infos": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "model-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "recent-infos-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "filtered-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "open-files": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "recent-uris": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-pattern": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/FileOpener.py0000644000175000017500000000200311242100540026120 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager scribes_dbus_service = "net.sourceforge.Scribes" scribes_dbus_path = "/net/sourceforge/Scribes" class Opener(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "open-files", self.__open_cb) def __init_attributes(self, manager): self.__manager = manager return def __open(self, uris): from SCRIBES.Globals import session_bus proxy_object = session_bus.get_object(scribes_dbus_service, scribes_dbus_path) proxy_object.open_files(uris, "utf-8", "", dbus_interface=scribes_dbus_service, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) return False def __open_cb(self, manager, files): from gobject import idle_add idle_add(self.__open, files) return False def __reply_handler_cb(self, *args): return False def __error_handler_cb(self, *args): print "ERROR: Failed to communicate with scribes process" return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/Utils.py0000644000175000017500000000222611242100540025177 0ustar andreasandreasDBUS_SERVICE = "org.sourceforge.ScribesRecentFilesIndexer" DBUS_PATH = "/org/sourceforge/ScribesRecentFilesIndexer" def pretty_date(time=False): """ Get a datetime object or a int() Epoch timestamp and return a pretty string like 'an hour ago', 'Yesterday', '3 months ago', 'just now', etc """ from datetime import datetime now = datetime.now() if type(time) is int: diff = now - datetime.fromtimestamp(time) elif not time: diff = now - now second_diff = diff.seconds day_diff = diff.days if day_diff < 0: return '' if day_diff == 0: if second_diff < 10: return "just now" if second_diff < 60: return str(second_diff) + " seconds ago" if second_diff < 120: return "a minute ago" if second_diff < 3600: return str( second_diff / 60 ) + " minutes ago" if second_diff < 7200: return "an hour ago" if second_diff < 86400: return str( second_diff / 3600 ) + " hours ago" if day_diff == 1: return "Yesterday" if day_diff < 7: return str(day_diff) + " days ago" if day_diff < 31: return str(day_diff/7) + " weeks ago" if day_diff < 365: return str(day_diff/30) + " months ago" return str(day_diff/365) + " years ago" scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/DBusService.py0000644000175000017500000000130611242100540026253 0ustar andreasandreasfrom dbus.service import Object, method, BusName from Utils import DBUS_SERVICE, DBUS_PATH class DBusService(Object): def __init__(self, manager): from SCRIBES.Globals import session_bus from dbus.exceptions import NameExistsException try: bus_name = BusName(DBUS_SERVICE, bus=session_bus, do_not_queue=True) Object.__init__(self, bus_name, DBUS_PATH) self.__manager = manager except NameExistsException: manager.quit() @method(DBUS_SERVICE) def activate(self): return self.__manager.activate() @method(DBUS_SERVICE) def open_last_file(self): return self.__manager.open_last_file() @method(DBUS_SERVICE) def open_last_files(self): return self.__manager.open_last_files() scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/DataGenerator.py0000644000175000017500000000434111242100540026617 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager from Utils import pretty_date class Generator(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(self.__manager, "recent-infos", self.__infos_cb) def __init_attributes(self, manager): self.__manager = manager from SCRIBES.Globals import home_folder self.__home_folder = home_folder return def __get_language(self, mimetype): self.__manager.response() from gio import content_type_get_description as get_desc return get_desc(mimetype).split()[0].lower() def __get_search_path_from(self, uri): self.__manager.response() from gio import File path = File(uri).get_parse_name() path = path.replace(self.__home_folder, "").strip("/\\") self.__manager.response() return path def __get_display_path_from(self, uri): self.__manager.response() from gio import File path = File(uri).get_parent().get_parse_name() path = path.replace(self.__home_folder, "").strip("/\\") from os.path import split self.__manager.response() if not path: return split(self.__home_folder)[-1].strip("/\\") return path def __format(self, info): self.__manager.response() uri = info.get_uri() self.__manager.response() file_path = self.__get_search_path_from(uri) self.__manager.response() display_path = self.__get_display_path_from(uri) self.__manager.response() display_name = info.get_display_name() self.__manager.response() modified = pretty_date(info.get_modified()) self.__manager.response() location = "" if info.is_local() else _("remote") self.__manager.response() filetype = self.__get_language(info.get_mime_type()) self.__manager.response() icon = info.get_icon(32) self.__manager.response() return file_path, icon, display_name, display_path, modified, location, filetype, uri def __process(self, infos): self.__manager.response() data = [self.__format(info) for info in infos] self.__manager.emit("recent-infos-data", data) self.__manager.emit("recent-uris", [_data[-1] for _data in data]) return False def __infos_cb(self, manager, infos): from gobject import idle_add idle_add(self.__process, infos) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/Feedback.py0000644000175000017500000000450311242100540025563 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Feedback(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "activate", self.__row_cb) self.connect(manager, "search-pattern", self.__search_cb) self.connect(manager, "filtered-data", self.__data_cb) self.connect(manager, "selected-row", self.__row_cb) def __init_attributes(self, manager): self.__manager = manager self.__pattern = "" self.__matches = 0 return def __update_message(self, data, time): self.__manager.emit("message", data) self.__hide_after(time) return False def __hide(self): self.__manager.emit("hide-message") return False def __hide_after(self, time): self.__remove_all_timers() from gobject import timeout_add self.__timer1 = timeout_add(time*1000, self.__hide) return False def __set_message(self): if not self.__pattern: message = _("%s files") if self.__matches else _("No files") if self.__matches == 1: message = _("%s file") else: message = _("%s matches found") if self.__matches else _("No match found") if self.__matches == 1: message = _("%s match found") time = 10 message_type = "INFO" if self.__matches else "ERROR" message = message % str(self.__matches) if self.__matches else message data = (message_type, message) self.__update_message(data, time) return False def __search_message(self): data = ("PROGRESS", _("Searching please wait...")) self.__update_message(data, 21) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __search_cb(self, manager, pattern): self.__pattern = pattern self.__remove_all_timers() from gobject import timeout_add self.__timer2 = timeout_add(250, self.__search_message, priority=9999) return False def __data_cb(self, manager, data): self.__matches = len(data) return False def __row_cb(self, *args): self.__remove_all_timers() from gobject import idle_add idle_add(self.__set_message, priority=9999) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/Manager.py0000644000175000017500000000261111242100540025447 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self): Signal.__init__(self) self.__init_attributes() from ProcessMonitor import Monitor Monitor(self) from DBusService import DBusService DBusService(self) from GUI.Manager import Manager Manager(self) from LastFileOpener import Opener Opener(self) from Feedback import Feedback Feedback(self) from MatchFilterer import Filterer Filterer(self) from DataGenerator import Generator Generator(self) from FileOpener import Opener Opener(self) from RecentInfoListener import Listener Listener(self) from gobject import timeout_add timeout_add(1000, self.__response) def __init_attributes(self): from os.path import join from SCRIBES.Utils import get_gui_object self.__gui = get_gui_object(globals(), join("GUI", "GUI.glade")) return @property def gui(self): return self.__gui def quit(self): from os import _exit _exit(0) return False def activate(self): self.emit("activate") return False def open_last_file(self): self.emit("open-last-file") return False def open_last_files(self): self.emit("open-last-files") return False def __response(self): # Keep this process as responsive as possible to events and signals. from SCRIBES.Utils import response response() return True def response(self): from SCRIBES.Utils import response response() return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/MatchFilterer.py0000644000175000017500000000333011242100540026625 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Filterer(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "recent-infos-data", self.__data_cb) self.connect(manager, "search-pattern", self.__pattern_cb) def __init_attributes(self, manager): self.__manager = manager self.__pattern = "" self.__data = None self.__first_time = True return def __match_in(self, file_path, pattern): self.__manager.response() if self.__pattern != pattern: raise StandardError return pattern.lower() in file_path.lower() def __filter(self, pattern): try: self.__manager.response() if self.__data is None: return False if not pattern: raise ValueError filtered_data = [data for data in self.__data if self.__match_in(data[0], pattern)] self.__manager.emit("filtered-data", filtered_data) except ValueError: self.__manager.emit("filtered-data", self.__data) except StandardError: pass return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 3)] return False def __data_cb(self, manager, data): self.__data = data self.__remove_all_timers() from gobject import idle_add self.__timer1 = idle_add(self.__filter, self.__pattern) return False def __pattern_cb(self, manager, pattern): self.__pattern = pattern self.__remove_all_timers() from gobject import idle_add self.__timer2 = idle_add(self.__filter, pattern) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/0000755000175000017500000000000011242100540024147 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/Entry.py0000644000175000017500000000220711242100540025623 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Entry(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "hide-window", self.__focus_cb, True) self.connect(manager, "show-window", self.__focus_cb, True) self.connect(manager, "focus-entry", self.__focus_cb, True) self.connect(self.__entry, "changed", self.__changed_cb) def __init_attributes(self, manager): self.__manager = manager self.__entry = manager.gui.get_object("Entry") return def __update(self): pattern = self.__entry.get_text().strip() self.__manager.emit("search-pattern", pattern) return False def __update_timeout(self): from gobject import idle_add idle_add(self.__update, priority=99999) return False def __changed_cb(self, *args): try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(350, self.__update_timeout, priority=99999) return False def __focus_cb(self, *args): self.__entry.grab_focus() self.__entry.window.focus() return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/__init__.py0000644000175000017500000000000011242100540026246 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/0000755000175000017500000000000011242100540025701 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/__init__.py0000644000175000017500000000000011242100540030000 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/Disabler.py0000644000175000017500000000170311242100540030001 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Disabler(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "search-pattern", self.__freeze_cb) self.connect(manager, "selected-row", self.__thaw_cb, True) def __init_attributes(self, manager): self.__manager = manager self.__is_frozen = False self.__treeview = manager.gui.get_object("TreeView") return def __freeze(self): if self.__is_frozen: return False self.__is_frozen = True self.__treeview.window.freeze_updates() return False def __thaw(self): if self.__is_frozen is False: return False self.__is_frozen = False self.__treeview.window.thaw_updates() return False def __freeze_cb(self, *args): self.__treeview.props.sensitive = False self.__freeze() return False def __thaw_cb(self, *args): self.__thaw() self.__treeview.props.sensitive = True return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/Utils.py0000644000175000017500000000013311242100540027350 0ustar andreasandreasdef get_selected_paths(treeview): return treeview.get_selection().get_selected_rows()[-1] scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/Initializer.py0000644000175000017500000000253111242100540030537 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.__set_properties() def __init_attributes(self, manager): self.__manager = manager self.__treeview = manager.gui.get_object("TreeView") return def __set_properties(self): self.__treeview.append_column(self.__create_column()) self.__treeview.set_model(self.__create_model()) from gtk import SELECTION_MULTIPLE self.__treeview.get_selection().set_mode(SELECTION_MULTIPLE) return def __create_model(self): from gtk import ListStore from gobject import TYPE_OBJECT model = ListStore(TYPE_OBJECT, str, str) return model def __create_column(self): from gtk import TreeViewColumn, CellRendererText, TREE_VIEW_COLUMN_FIXED from gtk import CellRendererPixbuf column = TreeViewColumn() txt_renderer = CellRendererText() txt_renderer.props.ypad = 10 txt_renderer.props.xpad = 10 pb_renderer = CellRendererPixbuf() pb_renderer.props.ypad = 10 pb_renderer.props.xpad = 10 column.pack_start(pb_renderer, False) column.pack_start(txt_renderer, True) column.set_sizing(TREE_VIEW_COLUMN_FIXED) column.set_resizable(False) column.set_attributes(pb_renderer, pixbuf=0) column.set_attributes(txt_renderer, markup=1) return column scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/ModelUpdater.py0000644000175000017500000000153611242100540030645 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "model-data", self.__data_cb) def __init_attributes(self, manager): self.__manager = manager self.__treeview = manager.gui.get_object("TreeView") self.__model = self.__treeview.get_model() self.__data = [] return def __update(self, data): self.__treeview.set_model(None) self.__model.clear() for icon, info, uri in data: self.__manager.response() self.__model.append([icon, info, uri]) self.__manager.response() self.__treeview.set_model(self.__model) self.__manager.emit("updated-model") return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__update, data) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/ModelDataGenerator.py0000644000175000017500000000313711242100540031760 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager TEMPLATE = "%s\nin %s\nmodified %s %s %s file" class Generator(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "filtered-data", self.__data_cb) def __init_attributes(self, manager): self.__manager = manager self.__data = [] return def __format(self, data): self.__manager.response() file_path, icon, display_name, display_path, modified, location, filetype, uri = data display_info = TEMPLATE % (display_name, display_path, modified, location, filetype) self.__manager.response() return icon, display_info, uri def __process(self, filtered_data): try: self.__manager.response() if filtered_data == self.__data: raise ValueError self.__data = filtered_data data = (self.__format(data) for data in filtered_data) self.__manager.emit("model-data", data) except ValueError: self.__manager.emit("selected-row") return False def __process_timeout(self, filtered_data): from gobject import idle_add idle_add(self.__process, filtered_data) return False def __data_cb(self, manager, filtered_data): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__process, filtered_data) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/KeyboardHandler.py0000644000175000017500000000251211242100540031311 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(self.__window, "key-press-event", self.__window_key_cb) self.connect(self.__view, "button-press-event", self.__button_cb) def __init_attributes(self, manager): self.__manager = manager self.__view = manager.gui.get_object("TreeView") self.__window = manager.gui.get_object("Window") from gtk.keysyms import Up, Down, Return, Escape self.__window_keys = { Return: "activate-selected-rows", Escape: "hide-window", Down: "down-key-press", Up: "up-key-press", } self.__window_shift_keys = { Down: "shift-down-key-press", Up: "shift-up-key-press", } return def __emit(self, signal): self.__manager.emit(signal) return False def __window_key_cb(self, widget, event): if not (event.keyval in self.__window_keys.keys()): return False from gtk.gdk import SHIFT_MASK shift_on = event.state & SHIFT_MASK keys = self.__window_shift_keys if shift_on else self.__window_keys self.__emit(keys[event.keyval]) return True def __button_cb(self, treeview, event): from gtk.gdk import _2BUTTON_PRESS if event.type != _2BUTTON_PRESS: return False self.__manager.emit("activate-selected-rows") return True scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/Manager.py0000644000175000017500000000100111242100540027615 0ustar andreasandreasclass Manager(object): def __init__(self, manager): from Initializer import Initializer Initializer(manager) from UpDownKeyHandler import Handler Handler(manager) from KeyboardHandler import Handler Handler(manager) from Disabler import Disabler Disabler(manager) from RowSelector import Selector Selector(manager) from RowActivator import Activator Activator(manager) from ModelUpdater import Updater Updater(manager) from ModelDataGenerator import Generator Generator(manager) scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/RowSelector.py0000644000175000017500000000211311242100540030520 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "updated-model", self.__updated_cb) def __init_attributes(self, manager): self.__manager = manager self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() self.__column = self.__view.get_column(0) self.__model = self.__view.get_model() return def __select(self): try: if not len(self.__model): raise ValueError self.__selection.select_path(0) self.__view.set_cursor(0, self.__column) self.__view.scroll_to_cell(0, None, True, 0.5, 0.5) except ValueError: pass finally: self.__manager.emit("selected-row") return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __updated_cb(self, *args): self.__remove_timer() from gobject import idle_add self.__timer = idle_add(self.__select) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/RowActivator.py0000644000175000017500000000152211242100540030677 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Activator(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "activate-selected-rows", self.__activate_cb) def __init_attributes(self, manager): self.__manager = manager self.__ignore = False self.__treeview = manager.gui.get_object("TreeView") self.__model = self.__treeview.get_model() return def __activate(self): from Utils import get_selected_paths paths = get_selected_paths(self.__treeview) self.__manager.emit("hide-window") if not paths: return False files = [self.__model[path][2] for path in paths] self.__manager.emit("open-files", files) return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/TreeView/UpDownKeyHandler.py0000644000175000017500000000410411242100540031435 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "up-key-press", self.__up_cb) self.connect(manager, "shift-up-key-press", self.__shift_up_cb) self.connect(manager, "down-key-press", self.__down_cb) self.connect(manager, "shift-down-key-press", self.__shift_down_cb) def __init_attributes(self, manager): self.__manager = manager self.__view = manager.gui.get_object("TreeView") self.__model = self.__view.get_model() self.__selection = self.__view.get_selection() self.__column = self.__view.get_column(0) return def __up(self, multiple_selection=False): try: paths = self.__get_selected_paths() if not paths: raise ValueError row = paths[0][0] if not row: raise ValueError self.__select(row-1, multiple_selection) except ValueError: self.__manager.emit("focus-entry") return False def __down(self, multiple_selection=False): try: paths = self.__get_selected_paths() if not paths: raise ValueError row = paths[-1][0] + 1 if row == len(self.__model): raise TypeError self.__select(row, multiple_selection) except ValueError: self.__manager.emit("focus-entry") except TypeError: if multiple_selection is False: self.__select_first_row() return False def __get_selected_paths(self): return self.__selection.get_selected_rows()[1] def __select_first_row(self): if not len(self.__model): return False path = self.__model[0].path self.__select(path) return False def __select(self, path, multiple_rows=False): self.__selection.select_path(path) if multiple_rows is False: self.__view.set_cursor(path, self.__column) self.__view.scroll_to_cell(path, self.__column) self.__view.grab_focus() return False def __up_cb(self, *args): self.__up() return False def __shift_up_cb(self, *args): self.__up(True) return False def __down_cb(self, *args): self.__down() return False def __shift_down_cb(self, *args): self.__down(True) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/GUI.glade0000644000175000017500000001076411242100540025601 0ustar andreasandreas True 10 Open Recent Files OpenRecentFilesRole True center-always 800 480 True scribes utility True True True static ScribesRecentOpenFilesID True 10 True 10 True 0 <b>_Search for:</b> True True Entry True False False 0 True True 1 False False 0 True False never automatic in True True False False True False True 1 True 0 Initializing please wait... True True False False False 2 scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/Label.py0000644000175000017500000000163111242100540025541 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Label(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(manager, "message", self.__message_cb) self.connect(manager, "hide-message", self.__hide_cb) def __init_attributes(self, manager): self.__manager = manager self.__label = manager.gui.get_object("FeedbackLabel") return def __set_message(self, data): _type, message = data template = { "ERROR": "%s", "INFO": "%s", "PROGRESS": "%s", } self.__label.set_markup(template[_type] % message) self.__label.show() return False def __message_cb(self, manager, data): from gobject import idle_add idle_add(self.__set_message, data) return False def __hide_cb(self, *args): self.__label.hide() return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/Manager.py0000644000175000017500000000036411242100540026076 0ustar andreasandreasclass Manager(object): def __init__(self, manager): from TreeView.Manager import Manager Manager(manager) from Entry import Entry Entry(manager) from Label import Label Label(manager) from Window import Window Window(manager) scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/GUI/Window.py0000644000175000017500000000246611242100540026000 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager STARTUP_ID = "ScribesRecentOpenWindow" class Window(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.__window.set_startup_id(STARTUP_ID) self.connect(manager, "show-window", self.__show_cb) self.connect(manager, "hide-window", self.__hide_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(self.__window, "delete-event", self.__delete_cb) self.connect(self.__window, "key-press-event", self.__key_cb) def __init_attributes(self, manager): self.__manager = manager self.__window = manager.gui.get_object("Window") return def __show(self): self.__window.set_startup_id(STARTUP_ID) self.__window.present() self.__window.window.focus() return False def __hide(self): self.__window.hide() return False def __show_cb(self, *args): self.__show() return False def __hide_cb(self, *args): self.__hide() return False def __delete_cb(self, *args): self.__manager.emit("hide-window") return True def __key_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide-window") return True def __activate_cb(self, *args): self.__manager.emit("show-window") return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/LastFileOpener.py0000644000175000017500000000255711242100540026762 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager DBUS_SERVICE = "net.sourceforge.Scribes" DBUS_PATH = "/net/sourceforge/Scribes" class Opener(SignalManager): def __init__(self, manager): SignalManager.__init__(self) self.__init_attributes(manager) self.connect(self.__manager, "recent-uris", self.__uris_cb) self.connect(self.__manager, "open-last-file", self.__file_cb) self.connect(self.__manager, "open-last-files", self.__files_cb) def __init_attributes(self, manager): self.__manager = manager self.__uris = [] self.__process = self.__get_process() return def __get_process(self): from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (DBUS_SERVICE in services): return None process = session_bus.get_object(DBUS_SERVICE, DBUS_PATH) return process def __open(self, number): count = 0 uris = [] open_uris = self.__process.get_uris(dbus_interface=DBUS_SERVICE) for uri in self.__uris: self.__manager.response() if uri in open_uris: continue count += 1 uris.append(uri) if count == number: break if not uris: return False self.__manager.emit("open-files", uris) return False def __uris_cb(self, manager, uris): self.__uris = uris return False def __file_cb(self, *args): self.__open(1) return False def __files_cb(self, *args): self.__open(5) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/RecentInfoListener.py0000644000175000017500000000255511242100540027646 0ustar andreasandreasclass Listener(object): def __init__(self, manager): from gtk import recent_manager_get_default rmanager = recent_manager_get_default() rmanager.connect("changed", self.__changed_cb, manager) self.__update(manager) def __compare(self, x, y): return cmp(x.get_modified(), y.get_modified()) def __resource_exists(self, info): if info.is_local() is False: return True return info.exists() def __is_scribes_resource(self, info): return info.has_application("scribes") def __get_infos(self): from gtk import recent_manager_get_default infos = iter(recent_manager_get_default().get_items()) scribes_infos = (info for info in infos if self.__is_scribes_resource(info)) exist_infos = (info for info in scribes_infos if self.__resource_exists(info)) return sorted(exist_infos, cmp=self.__compare, reverse=True) def __update(self, manager): manager.emit("recent-infos", self.__get_infos()) return False def __update_timeout(self, manager): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, manager, priority=PRIORITY_LOW) return False def __changed_cb(self, rmanager, manager): try: from gobject import timeout_add, source_remove, PRIORITY_LOW source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(1000, self.__update_timeout, manager, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ExternalProcess/ProcessMonitor.py0000644000175000017500000000063311242100540027065 0ustar andreasandreasclass Monitor(object): def __init__(self, manager): self.__manager = manager from SCRIBES.Globals import session_bus session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0='net.sourceforge.Scribes') def __name_change_cb(self, *args): self.__manager.quit() return False scribes-0.4~r910/GenericPlugins/RecentOpen/Manager.py0000644000175000017500000000060111242100540022323 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from ProcessCommunicator import Communicator Communicator(self, editor) from ExternalProcessStarter import Starter Starter(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self, signal): self.emit(signal) return False scribes-0.4~r910/GenericPlugins/RecentOpen/ProcessCommunicator.py0000644000175000017500000000534011242100540024755 0ustar andreasandreasfrom ExternalProcess.Utils import DBUS_SERVICE, DBUS_PATH from SCRIBES.SignalConnectionManager import SignalManager class Communicator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "open-last-file", self.__file_cb) self.connect(manager, "open-last-files", self.__files_cb) editor.session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__process = self.__get_process() return def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=DBUS_SERVICE) del self return False def __get_process(self): from SCRIBES.Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (DBUS_SERVICE in services): return None process = session_bus.get_object(DBUS_SERVICE, DBUS_PATH) return process def __activate(self, process_method): try: process_method(dbus_interface=DBUS_SERVICE, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) except AttributeError: pass except Exception: print "ERROR: Cannot send message to python checker process" return False def __not_ready_message(self): from gettext import gettext as _ message = _("Recent open process is not ready") self.__editor.update(message, "fail", 5) return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): if self.__process is None: return self.__not_ready_message() from gobject import idle_add idle_add(self.__activate, self.__process.activate) return False def __file_cb(self, *args): if self.__process is None: return self.__not_ready_message() from gobject import idle_add idle_add(self.__activate, self.__process.open_last_file) return False def __files_cb(self, *args): if self.__process is None: return self.__not_ready_message() from gobject import idle_add idle_add(self.__activate, self.__process.open_last_files) return False def __name_change_cb(self, *args): self.__process = self.__get_process() return False def __reply_handler_cb(self, *args): return False def __error_handler_cb(self, *args): print "ERROR: Failed to communicate with scribes python checker process" return False scribes-0.4~r910/GenericPlugins/PluginThemeSelector.py0000644000175000017500000000104311242100540022632 0ustar andreasandreasname = "Theme Selector Plugin" authors = ["Lateef Alabi-Oki "] version = 0.3 autoload = True class_name = "ThemeSelectorPlugin" short_description = "Shows a window to change themes." long_description = """Shows a window to change themes.""" class ThemeSelectorPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from ThemeSelector.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/BracketIndentation/0000755000175000017500000000000011242100540022110 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/BracketIndentation/FreezeManager.py0000644000175000017500000000130111242100540025170 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "empty-brackets", self.__freeze_cb) self.connect(manager, "done", self.__thaw_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __freeze_cb(self, *args): self.__editor.freeze() return False def __thaw_cb(self, *args): self.__editor.thaw() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/BracketIndentation/__init__.py0000644000175000017500000000000111242100540024210 0ustar andreasandreas scribes-0.4~r910/GenericPlugins/BracketIndentation/Signals.py0000644000175000017500000000064011242100540024062 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "done": (SSIGNAL, TYPE_NONE, ()), "empty-brackets": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "mark-bracket-region": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "insert": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/BracketIndentation/EmptyBracketMonitor.py0000644000175000017500000000401211242100540026421 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(self.__view, "key-press-event", self.__event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__buffer = editor.textbuffer self.__brackets = {"}":"{", "]":"[", ">":"<", ")":"("} return def __get_bracket_data(self): close_bracket, open_bracket = None, None close_iter, open_iter = None, None start_pos, end_pos = self.__editor.get_line_bounds() iterator = self.__editor.cursor.copy() from gtk import TEXT_SEARCH_VISIBLE_ONLY as VISIBLE for close_bracket in self.__brackets: match = iterator.forward_search(close_bracket, VISIBLE, limit=end_pos) if not match: continue close_iter = match[1] open_bracket = self.__brackets[close_bracket] match = iterator.backward_search(open_bracket, VISIBLE, limit=start_pos) if not match: continue open_iter = match[0] break result = close_bracket and open_bracket and close_iter and open_iter if result: return open_iter, close_iter, open_bracket, close_bracket return None def __bracket_is_empty(self, bracket_region): string = self.__buffer.get_text(*bracket_region)[1:-1] if not string: return True return string.isspace() def __event_cb(self, view, event): from gtk.keysyms import Return if event.keyval != Return: return False bracket_data = self.__get_bracket_data() if not bracket_data: return False open_iter, close_iter, open_bracket, close_bracket = bracket_data if self.__bracket_is_empty((open_iter, close_iter)) is False: return False self.__manager.emit("mark-bracket-region", (open_iter, close_iter)) self.__manager.emit("empty-brackets", (open_bracket, close_bracket)) return True def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/BracketIndentation/Manager.py0000644000175000017500000000075211242100540024040 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from BracketRegionMarker import Marker Marker(self, editor) from FreezeManager import Manager Manager(self, editor) from TextInserter import Inserter Inserter(self, editor) from BracketIndenter import Indenter Indenter(self, editor) from EmptyBracketMonitor import Monitor Monitor(self, editor) def destroy(self): self.emit("destroy") del self return False scribes-0.4~r910/GenericPlugins/BracketIndentation/BracketRegionMarker.py0000644000175000017500000000157011242100540026346 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "mark-bracket-region", self.__mark_cb) manager.set_data("BracketRegionMarks", (self.__lmark, self.__rmark)) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__lmark = editor.create_left_mark() self.__rmark = editor.create_right_mark() return def __mark_cb(self, manager, bracket_region): self.__buffer.move_mark(self.__rmark, bracket_region[1]) self.__buffer.move_mark(self.__lmark, bracket_region[0]) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/BracketIndentation/TextInserter.py0000644000175000017500000000232211242100540025121 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Inserter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "insert", self.__insert_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__view = editor.textview self.__lmark, self.__rmark = manager.get_data("BracketRegionMarks") return def __insert(self, string): start = self.__buffer.get_iter_at_mark(self.__lmark) end = self.__buffer.get_iter_at_mark(self.__rmark) self.__buffer.begin_user_action() self.__buffer.delete(start, end) self.__buffer.insert_at_cursor(string) iterator = self.__editor.cursor iterator.backward_line() iterator.forward_to_line_end() self.__buffer.place_cursor(iterator) self.__view.scroll_mark_onscreen(self.__rmark) self.__buffer.end_user_action() self.__manager.emit("done") return False def __insert_cb(self, manager, string): self.__insert(string) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/BracketIndentation/BracketIndenter.py0000644000175000017500000000206311242100540025527 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Indenter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "empty-brackets", self.__brackets_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __format(self, brackets): indentation = self.__editor.line_indentation newline = self.__editor.newline_character open_bracket, close_bracket = brackets tab_width = self.__editor.tab_width whitespace = "\t" if self.__editor.tabs_instead_of_spaces else " " * tab_width string = "%s%s%s%s%s%s%s" % ( open_bracket, newline, indentation, whitespace, newline, indentation, close_bracket ) self.__manager.emit("insert", string) return False def __brackets_cb(self, manager, brackets): self.__format(brackets) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/ShortcutWindow/0000755000175000017500000000000011242100540021343 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/ShortcutWindow/__init__.py0000644000175000017500000000000011242100540023442 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/ShortcutWindow/Signals.py0000644000175000017500000000036311242100540023317 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/ShortcutWindow/ShortcutWindow.py.old0000644000175000017500000003227111242100540025502 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from operator import itemgetter import gtk import pango class ShortcutWindow(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __shortcutWindow(self): # Tests if shortcut window already exists from previous view # If so, just show it instead of re-creating it # Prevents memory leaks (tested) & instant access after init try: if self.window: # Window already exists, show it self.__shortcutWindow self.__show() except: # Window does not exist, create it self.__createShortcutWindow() return False def __createShortcutWindow(self): # Colors self.textcolor = gtk.gdk.color_parse("white") self.highlightcolor = gtk.gdk.color_parse("yellow") self.windowcolor = gtk.gdk.color_parse('#000000') # Padding self.box_padding = " " # Create shortcut top shortcut_top = self.__createShortcutTop() # Create shortcut table shortcut_table = self.__createShortcutTable() # Create window box windowbox = gtk.VBox() # Pack window box windowbox.pack_start(shortcut_top) windowbox.pack_start(shortcut_table) # Create Window self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) # self.window.set_default_size(800, 600) # Set window opacity self.window.set_opacity(0.95) # Add Window Title (just incase) self.window.set_title("Shortcuts") # Turn Off Window Decoration self.window.set_decorated(False) # Bind with Scribes' window self.window.set_transient_for(self.__editor.window) self.window.set_destroy_with_parent(True) self.window.set_property("skip-taskbar-hint", True) self.window.add(windowbox) from gtk import WIN_POS_CENTER_ALWAYS self.window.set_position(WIN_POS_CENTER_ALWAYS) self.window.connect('key-press-event', self.__event_cb) # hides help window when focus changes to something else # self.window.connect('focus-out-event', self.__hide_cb) # show window self.__show() # Prints to stdout triggers with missing information #self.__getShortcutsMissing() return False def __createShortcutTable(self): # Widgets tablebox = gtk.HBox() table_columns = 3 table = gtk.Table(1,table_columns, False) # Create left & right tablebox padding mb_buf_left = self.__setTextBuffer(self.box_padding) mb_view_left = self.__setTextView(mb_buf_left, self.textcolor) mb_buf_right = self.__setTextBuffer(self.box_padding) mb_view_right = self.__setTextView(mb_buf_right, self.textcolor) # Add left tablebox padding tablebox.pack_start(mb_view_left) # Category & Column Properties category_check = "" column_cutoff = 20 # len after which no new categories will be created column_count = 0 separator = " : " self.key_separator = "+" self.table_rows = 0 # used for table expanding shortcuts = self.__getShortcutsSorted() for s in shortcuts: self.__editor.refresh(False) # Strip whitespaces name = s[0].strip() key = s[1].strip() cat = s[2].strip() if cat != category_check: # Create new catagory group if column_count > column_cutoff: # Padding to fill in missing space on bottom (if needed) # Make room for bottom column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup bottom padding view padbuf = self.__setTextBuffer("") botview = self.__setTextView(padbuf, self.textcolor) # Add bottom padding view table.attach(botview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL) # Add previously created column (old table) tablebox.pack_start(table) # Create new column (new table) table = gtk.Table(1,table_columns, False) # Reset table rows self.table_rows = 0 # Reset column count column_count = 0 # Set category_check to current category category_check = cat # Make room for column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup padding view padbuf = self.__setTextBuffer("") padview = self.__setTextView(padbuf, self.textcolor) # Add padding view table.attach(padview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Setup catagory view catbuf = self.__setTextBuffer(cat) self.__setTags(catbuf, gtk.JUSTIFY_LEFT) catview = self.__setTextView(catbuf, self.highlightcolor) # Setup blank key view blankbuf = self.__setTextBuffer("") blankview = self.__setTextView(blankbuf, self.textcolor) # Make room for title self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Add catagory title view # (child, left_attach, right_attach, top_attach, bottom_attach) table.attach(catview, 2, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Add blank view table.attach(blankview, 0, 2, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) self.__editor.refresh(False) # Setup key view keybuf = self.__setTextBuffer(key) self.__setTags(keybuf, gtk.JUSTIFY_RIGHT) self.__formatKey(keybuf) keyview = self.__setTextView(keybuf, self.highlightcolor) # Setup separator view sepbuf = self.__setTextBuffer(separator) sepview = self.__setTextView(sepbuf, self.textcolor) # Setup name view namebuf = self.__setTextBuffer(name) self.__setTags(namebuf, gtk.JUSTIFY_LEFT) nameview = self.__setTextView(namebuf, self.textcolor) # Make room for views self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Add views table.attach(keyview, 0, 1, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) table.attach(sepview, 1, 2, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) table.attach(nameview, 2, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Set column count column_count = column_count + 1 self.__editor.refresh(False) # Padding to fill in missing space on bottom (when needed) # Make room for bottom column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup bottom padding view padbuf = self.__setTextBuffer("") botview = self.__setTextView(padbuf, self.textcolor) # Add bottom padding view table.attach(botview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL) # Add the remaining column tablebox.pack_start(table) # Add right tablebox padding tablebox.pack_start(mb_view_right) return tablebox def __createShortcutTop(self): # Widgets topbox = gtk.VBox() textbox = gtk.HBox() # Text title = self.box_padding + "Scribes Keyboard Shortcuts" link = "show user guide" + self.box_padding # Create views titleview = self.__createTitleView(title) linkview = self.__createLinkView(link) # Setup padding view padbuf = self.__setTextBuffer(" ") padview = self.__setTextView(padbuf, self.textcolor) # Pack text views textbox.pack_start(titleview) textbox.pack_start(linkview) # Pack topbox topbox.pack_start(padview) topbox.pack_start(textbox) return topbox def __createLinkView(self, text): # Setup buffer buf = self.__setTextBuffer(text) self.__setTags(buf, gtk.JUSTIFY_RIGHT) # Get link word count text_split = text.split() word_count = len(text_split) # Setup buffer text format tags start = buf.get_start_iter() end = start.copy() end.forward_word_ends(word_count) tag = buf.create_tag(weight=pango.WEIGHT_BOLD) tag = buf.create_tag(underline=pango.UNDERLINE_SINGLE) buf.apply_tag(tag, start, end) # Setup view view = gtk.TextView(buf) view.set_editable(False) # Disable editability view.set_cursor_visible(False) # Disable mouse cursor view.modify_base(gtk.STATE_NORMAL, self.windowcolor) view.modify_text(gtk.STATE_NORMAL, self.highlightcolor) # Setup connect "link" view.connect('button-press-event', self.__openHelp_cb) return view def __createTitleView(self, text): # Setup buffer buf = self.__setTextBuffer(text) self.__setTags(buf, gtk.JUSTIFY_LEFT) # Setup buffer text format tags start = buf.get_start_iter() end = buf.get_end_iter() tag = buf.create_tag(weight=pango.WEIGHT_BOLD) tag = buf.create_tag(scale=pango.SCALE_LARGE) buf.apply_tag(tag, start, end) # Setup view view = self.__setTextView(buf, self.textcolor) return view def __getShortcuts(self): # create a shortcut list # # each trigger is an entry in the shortcut list # one shortcut list that contains a tuple for every trigger # every trigger tuple contains trigger name, accel, cat, and desc # # trigger tuple format: # name, shortcut, category, description triggerlist = self.__editor.triggers shortcuts = [] for trigger in triggerlist: self.__editor.refresh(False) # Create tuple of format: name, accel, category, desc trigger_tuple = ( self.__formatName(trigger.name), self.__formatAccel(trigger.accelerator), trigger.category, trigger.description ) shortcuts.append(trigger_tuple) self.__editor.refresh(False) from Utils import DEFAULT_TRIGGERS return shortcuts + DEFAULT_TRIGGERS def __getShortcutsSorted(self): # sort according to category, shortcut # format: # name shortcut category description # 0 1 2 3 shortcuts = self.__cleanShortcuts() shortcuts_sorted = sorted(shortcuts, key=itemgetter(2,1)) return shortcuts_sorted def __cleanShortcuts(self): cleaned = [] s = self.__getShortcuts() for e in s: self.__editor.refresh(False) if e[0] and e[1] and e[2] and e[3]: cleaned.append(e) self.__editor.refresh(False) return cleaned def __getShortcutsMissing(self): # print information for all shortcuts missing an entry # 0 = name, 1 = shortcut, 2 = category, 3 = description shortcuts = self.__getShortcuts() for e in shortcuts: self.__editor.refresh(False) # check if anything is missing if not e[0] or not e[1] or not e[2] or not e[3]: if e[0]: print e[0] + " is:" else: print "name missing!" if e[1]: print "(shortcut " + e[1] + ")" if not e[1]: print "missing shortcut" if not e[2]: print "missing category" if not e[3]: print "missing description" print "-----" self.__editor.refresh(False) def __setTextBuffer(self, text): textbuf = gtk.TextBuffer() textbuf.set_text(text) return textbuf def __setTags(self, textbuf, justify): # Tags to justify # justify = gtk.JUSTIFY_RIGHT or gtk.JUSTIFY_LEFT start = textbuf.get_start_iter() end = textbuf.get_end_iter() tag = textbuf.create_tag(justification=justify) textbuf.apply_tag(tag, start, end) return textbuf def __formatKey(self, textbuf): # Tags to format key separator iter_start = textbuf.get_start_iter() iter_end = textbuf.get_end_iter() # Make sure separator exists text = iter_start.get_visible_text(iter_end) text_count = text.count(self.key_separator) if text_count > 0: # Get start and end iter's of separator start, end = iter_start.forward_search(self.key_separator, gtk.TEXT_SEARCH_TEXT_ONLY) tag = textbuf.create_tag(foreground_gdk=self.textcolor) textbuf.apply_tag(tag, start, end) return textbuf def __setTextView(self, textbuf, textcolor): # Create textview textview = gtk.TextView(textbuf) # Disable editability textview.set_editable(False) # Disable mouse cursor textview.set_cursor_visible(False) # Set texview base color textview.modify_base(gtk.STATE_NORMAL, self.windowcolor) # Set textview text color textview.modify_text(gtk.STATE_NORMAL, textcolor) # close help window on mouse button press # textview.connect('button-press-event', self.__hide_cb) return textview def __formatAccel(self, accel): accel_str = str(accel) accel_str = accel_str.replace("<", "") format = accel_str.replace(">", "+") # format = self.__rreplace(accel_str, ">", "> + ", 1) return format def __formatName(self, name): name_str = str(name) format = name_str.replace("_", " ") format = format.replace("-", " ") format = format.title() return format def __rreplace(self, s, old, new, occurance): # replaces old with new n-occurances from the LAST occurance li = s.rsplit(old, occurance) return new.join(li) def __show(self): self.window.show_all() return True def __hide(self): self.window.hide() return True def __openHelp(self): self.__editor.help() return def __event_cb(self, window, event): from gtk.keysyms import Escape if event.keyval == Escape : self.__hide() return False def __show_cb(self, *args): self.__show() return True def __hide_cb(self, *args): self.__hide() return True def __openHelp_cb(self, *args): self.__openHelp() self.__hide() return True def __destroy(self): self.disconnect() del self return False def __activate_cb(self, *args): self.__shortcutWindow() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/ShortcutWindow/Utils.py0000644000175000017500000000074411242100540023022 0ustar andreasandreasDEFAULT_TRIGGERS = [ ("Copy Selected Text", " + c", "Common Operations", "Copy selected text"), ("Cut selected Text", " + x", "Common Operations", "Cut selected text"), ("Paste Text", " + v", "Common Operations", "Paste text"), ("Close Window", " + w", "Window Operations", "Close current window"), ("Close All Window", " + q", "Window Operations", "Close current window"), ("Toggle Fullscreen", "F11", "Window Operations", "Toggle fullscreen"), ] scribes-0.4~r910/GenericPlugins/ShortcutWindow/Exceptions.py0000644000175000017500000000013011242100540024030 0ustar andreasandreas# Custom exceptions belong in this module. class ShortcutWindowError(Exception): pass scribes-0.4~r910/GenericPlugins/ShortcutWindow/Trigger.py0000644000175000017500000000223011242100540023315 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "activate-shortcut-window", "h", _("Show Shortcut Window"), _("Window Operations") ) self.__trigger = self.create_trigger(name , shortcut, description, category) self.__manager = None return def __destroy(self): if self.__manager: self.__manager.destroy() self.disconnect() self.remove_triggers() del self return False def __activate(self): try : self.__manager.activate() except AttributeError : from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return def destroy(self): self.__destroy() return scribes-0.4~r910/GenericPlugins/ShortcutWindow/Manager.py0000644000175000017500000000046711242100540023276 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from ShortcutWindow import ShortcutWindow ShortcutWindow(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/ShortcutWindow/ShortcutWindow.py0000644000175000017500000003110411242100540024717 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from operator import itemgetter import gtk import pango class ShortcutWindow(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "activate", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __shortcutWindow(self): # Tests if shortcut window already exists from previous view # If so, just show it instead of re-creating it # Prevents memory leaks (tested) & instant access after init try: if self.window: # Window already exists, show it self.__show() except: # Window does not exist, create it self.__createShortcutWindow() return False def __createShortcutWindow(self): # Colors self.textcolor = gtk.gdk.color_parse("white") self.highlightcolor = gtk.gdk.color_parse("yellow") self.windowcolor = gtk.gdk.color_parse('#000000') # Padding self.box_padding = " " # Create shortcut top shortcut_top = self.__createShortcutTop() # Create shortcut table shortcut_table = self.__createShortcutTable() # Create window box windowbox = gtk.VBox() # Pack window box windowbox.pack_start(shortcut_top) windowbox.pack_start(shortcut_table) # Create Window self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) # Set window opacity self.window.set_opacity(0.95) # Add Window Title (just incase) self.window.set_title("Shortcuts") # Turn Off Window Decoration self.window.set_decorated(False) # Bind with Scribes' window self.window.set_transient_for(self.__editor.window) self.window.set_destroy_with_parent(True) self.window.set_property("skip-taskbar-hint", True) self.window.add(windowbox) from gtk import WIN_POS_CENTER_ALWAYS self.window.set_position(WIN_POS_CENTER_ALWAYS) self.window.connect('key-press-event', self.__hide_cb) # hides help window when focus changes to something else self.window.connect('focus-out-event', self.__hide_cb) # show window self.__show() # Prints to stdout triggers with missing information #self.__getShortcutsMissing() return False def __createShortcutTable(self): # Widgets tablebox = gtk.HBox() table_columns = 3 table = gtk.Table(1,table_columns, False) # Create left & right tablebox padding mb_buf_left = self.__setTextBuffer(self.box_padding) mb_view_left = self.__setTextView(mb_buf_left, self.textcolor) mb_buf_right = self.__setTextBuffer(self.box_padding) mb_view_right = self.__setTextView(mb_buf_right, self.textcolor) # Add left tablebox padding tablebox.pack_start(mb_view_left) # Category & Column Properties category_check = "" column_cutoff = 20 # len after which no new categories will be created column_count = 0 separator = " : " self.key_separator = "+" self.table_rows = 0 # used for table expanding shortcuts = self.__getShortcutsSorted() for s in shortcuts: # Strip whitespaces name = s[0].strip() key = s[1].strip() cat = s[2].strip() if cat != category_check: # Create new catagory group if column_count > column_cutoff: # Padding to fill in missing space on bottom (if needed) # Make room for bottom column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup bottom padding view botbuf = self.__setTextBuffer("") botview = self.__setTextView(botbuf, self.textcolor) # Add bottom padding view table.attach(botview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL) # Add previously created column (old table) tablebox.pack_start(table) # Create new column (new table) table = gtk.Table(1,table_columns, False) # Reset table rows self.table_rows = 0 # Reset column count column_count = 0 # Set category_check to current category category_check = cat # Make room for column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup padding view padbuf = self.__setTextBuffer("") padview = self.__setTextView(padbuf, self.textcolor) # Add padding view table.attach(padview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Setup catagory view catbuf = self.__setTextBuffer(cat) self.__setTags(catbuf, gtk.JUSTIFY_LEFT) catview = self.__setTextView(catbuf, self.highlightcolor) # Setup blank key view blankbuf = self.__setTextBuffer("") blankview = self.__setTextView(blankbuf, self.textcolor) # Make room for title self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Add catagory title view # (child, left_attach, right_attach, top_attach, bottom_attach) table.attach(catview, 2, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Add blank view table.attach(blankview, 0, 2, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Setup key view keybuf = self.__setTextBuffer(key) self.__setTags(keybuf, gtk.JUSTIFY_RIGHT) self.__formatKey(keybuf) keyview = self.__setTextView(keybuf, self.highlightcolor) # Setup separator view sepbuf = self.__setTextBuffer(separator) sepview = self.__setTextView(sepbuf, self.textcolor) # Setup name view namebuf = self.__setTextBuffer(name) self.__setTags(namebuf, gtk.JUSTIFY_LEFT) nameview = self.__setTextView(namebuf, self.textcolor) # Make room for views self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Add views table.attach(keyview, 0, 1, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) table.attach(sepview, 1, 2, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) table.attach(nameview, 2, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.FILL, yoptions=gtk.FILL) # Set column count column_count = column_count + 1 # Padding to fill in missing space on bottom (when needed) # Make room for bottom column padding self.table_rows = self.table_rows + 1 table.resize(self.table_rows, table_columns) # Setup bottom padding view botbuf = self.__setTextBuffer("") botview = self.__setTextView(padbuf, self.textcolor) # Add bottom padding view table.attach(botview, 0, 3, self.table_rows - 1, self.table_rows, xoptions=gtk.EXPAND|gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL) # Add the remaining column tablebox.pack_start(table) # Add right tablebox padding tablebox.pack_start(mb_view_right) return tablebox def __createShortcutTop(self): # Widgets topbox = gtk.VBox() textbox = gtk.HBox() # Text title = self.box_padding + "Scribes Keyboard Shortcuts" link = "show user guide" + self.box_padding # Create views titleview = self.__createTitleView(title) linkview = self.__createLinkView(link) # Setup padding view padbuf = self.__setTextBuffer(" ") padview = self.__setTextView(padbuf, self.textcolor) # Pack text views textbox.pack_start(titleview) textbox.pack_start(linkview) # Pack topbox topbox.pack_start(padview) topbox.pack_start(textbox) return topbox def __createLinkView(self, text): # Setup buffer buf = self.__setTextBuffer(text) self.__setTags(buf, gtk.JUSTIFY_RIGHT) # Get link word count text_split = text.split() word_count = len(text_split) # Setup buffer text format tags start = buf.get_start_iter() end = start.copy() end.forward_word_ends(word_count) tag = buf.create_tag(weight=pango.WEIGHT_BOLD) tag = buf.create_tag(underline=pango.UNDERLINE_SINGLE) buf.apply_tag(tag, start, end) # Setup view view = gtk.TextView(buf) view.set_editable(False) # Disable editability view.set_cursor_visible(False) # Disable mouse cursor view.modify_base(gtk.STATE_NORMAL, self.windowcolor) view.modify_text(gtk.STATE_NORMAL, self.highlightcolor) # Setup connect "link" view.connect('button-press-event', self.__openHelp_cb) return view def __createTitleView(self, text): # Setup buffer buf = self.__setTextBuffer(text) self.__setTags(buf, gtk.JUSTIFY_LEFT) # Setup buffer text format tags start = buf.get_start_iter() end = buf.get_end_iter() tag = buf.create_tag(weight=pango.WEIGHT_BOLD) tag = buf.create_tag(scale=pango.SCALE_LARGE) buf.apply_tag(tag, start, end) # Setup view view = self.__setTextView(buf, self.textcolor) return view def __getShortcuts(self): # create a shortcut list # # each trigger is an entry in the shortcut list # one shortcut list that contains a tuple for every trigger # every trigger tuple contains trigger name, accel, cat, and desc # # trigger tuple format: # name, shortcut, category, description triggerlist = self.__editor.triggers shortcuts = [] for trigger in triggerlist: # Create tuple of format: name, accel, category, desc trigger_tuple = (self.__formatName(trigger.name), self.__formatAccel(trigger.accelerator), trigger.category, trigger.description) shortcuts.append(trigger_tuple) return shortcuts def __getShortcutsSorted(self): # sort according to category, shortcut # format: # name shortcut category description # 0 1 2 3 shortcuts = self.__cleanShortcuts() shortcuts_sorted = sorted(shortcuts, key=itemgetter(2,1)) return shortcuts_sorted def __cleanShortcuts(self): cleaned = [] s = self.__getShortcuts() for e in s: if e[0] and e[1] and e[2] and e[3]: cleaned.append(e) return cleaned def __getShortcutsMissing(self): # print information for all shortcuts missing an entry # 0 = name, 1 = shortcut, 2 = category, 3 = description shortcuts = self.__getShortcuts() for e in shortcuts: # check if anything is missing if not e[0] or not e[1] or not e[2] or not e[3]: if e[0]: print e[0] + " is:" else: print "name missing!" if e[1]: print "(shortcut " + e[1] + ")" if not e[1]: print "missing shortcut" if not e[2]: print "missing category" if not e[3]: print "missing description" print "-----" def __setTextBuffer(self, text): textbuf = gtk.TextBuffer() textbuf.set_text(text) return textbuf def __setTags(self, textbuf, justify): # Tags to justify # justify = gtk.JUSTIFY_RIGHT or gtk.JUSTIFY_LEFT start = textbuf.get_start_iter() end = textbuf.get_end_iter() tag = textbuf.create_tag(justification=justify) textbuf.apply_tag(tag, start, end) return textbuf def __formatKey(self, textbuf): # Tags to format key separator iter_start = textbuf.get_start_iter() iter_end = textbuf.get_end_iter() # Make sure separator exists text = iter_start.get_visible_text(iter_end) text_count = text.count(self.key_separator) if text_count > 0: # Get start and end iter's of separator start, end = iter_start.forward_search(self.key_separator, gtk.TEXT_SEARCH_TEXT_ONLY) tag = textbuf.create_tag(foreground_gdk=self.textcolor) textbuf.apply_tag(tag, start, end) return textbuf def __setTextView(self, textbuf, textcolor): # Create textview textview = gtk.TextView(textbuf) # Disable editability textview.set_editable(False) # Disable mouse cursor textview.set_cursor_visible(False) # Set texview base color textview.modify_base(gtk.STATE_NORMAL, self.windowcolor) # Set textview text color textview.modify_text(gtk.STATE_NORMAL, textcolor) # close help window on mouse button press textview.connect('button-press-event', self.__hide_cb) return textview def __formatAccel(self, accel): accel_str = str(accel) format = self.__rreplace(accel_str, ">", "> + ", 1) return format def __formatName(self, name): name_str = str(name) format = name_str.replace("_", " ") format = format.replace("-", " ") format = format.title() return format def __rreplace(self, s, old, new, occurance): # replaces old with new n-occurances from the LAST occurance li = s.rsplit(old, occurance) return new.join(li) def __show(self): self.window.show_all() return True def __hide(self): self.window.hide() return True def __openHelp(self): self.__editor.help() return def __show_cb(self, *args): self.__show() return True def __hide_cb(self, *args): self.__hide() return True def __openHelp_cb(self, *args): self.__openHelp() self.__hide() return True def __destroy(self): self.disconnect() del self return False def __activate_cb(self, *args): self.__shortcutWindow() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/OpenFile/0000755000175000017500000000000011242100540020041 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/__init__.py0000644000175000017500000000000011242100540022140 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/0000755000175000017500000000000011242100540023057 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/__init__.py0000644000175000017500000000000011242100540025156 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/FeedbackLabel.py0000644000175000017500000000477411242100540026071 0ustar andreasandreasfrom gettext import gettext as _ class Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validate", self.__validate_cb) self.__sigid3 = manager.connect("validation-error", self.__error_cb) self.__sigid4 = manager.connect("create", self.__create_cb) self.__sigid5 = manager.connect("validation-pass", self.__pass_cb) self.__sigid6 = manager.connect("creation-error", self.__error_cb) self.__sigid7 = manager.connect("creation-pass", self.__pass_cb) self.__sigid8 = manager.connect("hide-newfile-dialog-window", self.__hide_cb) self.__set_label() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.new_gui.get_widget("FeedbackLabel") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__editor.disconnect_signal(self.__sigid7, self.__manager) self.__editor.disconnect_signal(self.__sigid8, self.__manager) del self self = None return False def __set_label(self, message=None, bold=False, italic=False, color=None): try: if not message: raise ValueError if color: message = "" % color + message + "" if bold: message = "" + message + "" if italic: message = "" + message + "" self.__label.set_label(message) except ValueError: self.__label.set_label("") return False def __info_message(self, message): self.__set_label(message, False, True, "turquoise") return False def __error_message(self, message): self.__set_label(message, True, False, "red") return False def __destroy_cb(self, *args): self.__destroy() return False def __pass_cb(self, *args): self.__set_label() return False def __error_cb(self, manager, message): self.__error_message(message) return False def __validate_cb(self, *args): self.__info_message(_("Validating please wait...")) return False def __create_cb(self, *args): self.__info_message(_("Creating file please wait...")) return False def __hide_cb(self, *args): self.__set_label() return False scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade0000644000175000017500000001373111242100540026533 0ustar andreasandreas 10 Open New File OpenNewFileRole OpenNewFileID True GTK_WIN_POS_CENTER_ON_PARENT True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True 10 True 10 True gtk-open 3 False False True 0 Create a new file in <b>/home/meek/Desktop</b> and open it True GTK_JUSTIFY_FILL True 1 True 10 True 0 <b>_Filename:</b> True True False False True False True True 1 False False 1 True 10 True 0 <i>processing please wait...</i> True True PANGO_ELLIPSIZE_END True 10 True False True True True True gtk-new True 0 False False GTK_PACK_END 1 False False 2 scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Utils.py0000644000175000017500000000060511242100540024532 0ustar andreasandreasdef new_uri_exists(editor, name): from gio import File return File(get_new_uri(editor, name)).query_exists() def get_new_uri(editor, name): uri_folder = __get_uri_folder(editor) from os.path import join return join(uri_folder, name) def __get_uri_folder(editor): from gio import File if editor.uri: return File(editor.uri).get_parent().get_uri() return editor.desktop_folder_uri scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Exceptions.py0000644000175000017500000000017111242100540025551 0ustar andreasandreasclass InvalidNameError(Exception): pass class NoNameError(Exception): pass class FileExistError(Exception): pass scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/FileCreator.py0000644000175000017500000000214011242100540025625 0ustar andreasandreasfrom gettext import gettext as _ class Creator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("create-file", self.__create_file_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __create_file(self, name): try: from Utils import get_new_uri uri = get_new_uri(self.__editor, name) self.__editor.create_uri(uri) self.__manager.emit("hide-newfile-dialog-window") self.__manager.emit("open-files", [uri], "utf8") self.__manager.emit("creation-pass") except: self.__manager.emit("creation-error", _("Error: Cannot create new file.")) return False def __destroy_cb(self, *args): self.__destroy() return False def __create_file_cb(self, manager, name): self.__create_file(name) return False scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Button.py0000644000175000017500000000223711242100540024710 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validation-error", self.__error_cb) self.__sigid3 = manager.connect("validation-pass", self.__pass_cb) self.__sigid4 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.new_gui.get_widget("NewButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__button) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __error_cb(self, *args): self.__button.props.sensitive = False return False def __pass_cb(self, *args): self.__button.props.sensitive = True return False def __clicked_cb(self, *args): self.__manager.emit("create") return False scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Manager.py0000644000175000017500000000126511242100540025007 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) from FeedbackLabel import Label Label(manager, editor) from InfoLabel import Label Label(manager, editor) from FileCreator import Creator Creator(manager, editor) from Validator import Validator Validator(manager, editor) from Button import Button Button(manager, editor) from TextEntry import Entry Entry(manager, editor) from Window import Window Window(editor, manager) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def show(self): self.__manager.emit("show-newfile-dialog-window") return scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/InfoLabel.py0000644000175000017500000000216611242100540025271 0ustar andreasandreasfrom gettext import gettext as _ message = _("Create a new file in %s and open it.") class Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-newfile-dialog-window", self.__new_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.new_gui.get_widget("InfoLabel") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __set_label(self): from gio import File uri = self.__editor.uri if uri: folder = File(uri).get_parent().get_parse_name() if not uri: folder = self.__editor.desktop_folder folder = folder.replace(self.__editor.home_folder.rstrip("/"), "~") self.__label.set_label(message % folder) return False def __destroy_cb(self, *args): self.__destroy() return False def __new_cb(self, *args): self.__set_label() return False scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Validator.py0000644000175000017500000000267211242100540025365 0ustar andreasandreasfrom gettext import gettext as _ class Validator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("validate", self.__validate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __valid_name(self, name): if len(name) > 256: return False if "/" in name: return False return True def __validate(self, name): try: from Exceptions import NoNameError, InvalidNameError, FileExistError if not name: raise NoNameError if self.__valid_name(name) is False: raise InvalidNameError from Utils import new_uri_exists if new_uri_exists(self.__editor, name): raise FileExistError self.__manager.emit("validation-pass") except NoNameError: self.__manager.emit("validation-error", "") except InvalidNameError: self.__manager.emit("validation-error", _("Error: Invalid file name")) except FileExistError: self.__manager.emit("validation-error", _("Error: File already exists")) return False def __destroy_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, name): self.__validate(name) return False scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/Window.py0000644000175000017500000000370611242100540024706 0ustar andreasandreasfrom gettext import gettext as _ class Window(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__manager.connect("show-newfile-dialog-window", self.__show_window_cb) self.__sigid3 = self.__manager.connect("hide-newfile-dialog-window", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.new_gui.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__window.show_all() self.__editor.busy() self.__editor.set_message(_("New Document"), "new") return False def __hide(self): self.__editor.busy(False) self.__editor.unset_message(_("New Document"), "new") self.__window.hide() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/OpenFile/NewFileDialogGUI/TextEntry.py0000644000175000017500000000244511242100540025404 0ustar andreasandreasclass Entry(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__entry.connect("changed", self.__changed_cb) self.__sigid3 = manager.connect("create", self.__create_cb) self.__sigid4 = manager.connect("show-newfile-dialog-window", self.__show_cb) self.__entry.props.sensitive = True def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__entry = manager.new_gui.get_widget("TextEntry") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__entry) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__entry.destroy() del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): name = self.__entry.get_text() self.__manager.emit("validate", name) return False def __create_cb(self, *args): name = self.__entry.get_text() self.__manager.emit("create-file", name) return False def __show_cb(self, *args): self.__entry.set_text("") return False scribes-0.4~r910/GenericPlugins/OpenFile/FileOpener.py0000644000175000017500000000153311242100540022445 0ustar andreasandreasclass Opener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("open-files", self.__open_files_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return def __open_files(self, files, encoding): self.__editor.open_files(files, encoding) return False def __destroy_cb(self, *args): self.__destroy() return def __open_files_cb(self, manager, files, encoding): from gobject import idle_add idle_add(self.__open_files, files, encoding, priority=9999) return scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/0000755000175000017500000000000011242100540022761 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/__init__.py0000644000175000017500000000000011242100540025060 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/CancelButton.py0000644000175000017500000000147011242100540025716 0ustar andreasandreasclass Button(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.remote_gui.get_widget("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__button.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("hide-remote-dialog-window") return scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/ComboBoxEntry.py0000644000175000017500000000607011242100540026070 0ustar andreasandreasclass ComboBoxEntry(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__editor.recent_manager.connect("changed", self.__entry_changed_cb) self.__sigid2 = self.__entry.connect("changed", self.__changed_cb) self.__sigid3 = self.__entry.connect("activate", self.__activate_cb) self.__sigid4 = manager.connect("load-remote-file", self.__load_file_cb) self.__sigid5 = manager.connect("destroy", self.__destroy_cb) self.__sigid6 = manager.connect("remote-encoding", self.__encoding_cb) from gobject import idle_add idle_add(self.__populate_model, priority=9999) idle_add(self.__emit_error) def __init_attributes(self, editor, manager): self.__editor = editor self.__model = self.__create_model() self.__manager = manager self.__encoding = "utf8" self.__combo = manager.remote_gui.get_widget("ComboBoxEntry") self.__entry = manager.remote_gui.get_widget("Entry") return def __set_properties(self): self.__combo.props.model = self.__model self.__combo.props.text_column = 0 return def __create_model(self): from gtk import ListStore model = ListStore(str) return model def __populate_model(self): self.__combo.set_property("sensitive", False) self.__model.clear() recent_infos = self.__editor.recent_manager.get_items() for recent_info in recent_infos: uri = recent_info.get_uri() if uri.startswith("file://"): continue self.__model.append([uri]) self.__combo.set_property("sensitive", True) self.__entry.grab_focus() return False def __load_uri(self): self.__manager.emit("hide-remote-dialog-window") uri = self.__entry.get_text().strip() if not uri: return False #self.__manager.emit("open-files", [uri], self.__encoding) self.__manager.emit("open-files", uri.strip().splitlines(), self.__encoding) # Generated by [skqr] return False def __emit_error(self): value = True if self.__entry.get_text() else False self.__manager.emit("remote-button-sensitivity", value) return False def __entry_changed_cb(self, recent_manager): from gobject import idle_add, PRIORITY_LOW idle_add(self.__populate_model, priority=PRIORITY_LOW) return True def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__emit_error) return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__load_uri) return False def __load_file_cb(self, *args): from gobject import idle_add idle_add(self.__load_uri) return False def __encoding_cb(self, manager, encoding): self.__encoding = encoding return False def __destroy_cb(self, entry): self.__editor.disconnect_signal(self.__sigid1, self.__editor.recent_manager) self.__editor.disconnect_signal(self.__sigid2, self.__entry) self.__editor.disconnect_signal(self.__sigid3, self.__entry) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) self.__combo.destroy() del self self = None return scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/ComboBox.py0000644000175000017500000000502311242100540025043 0ustar andreasandreasclass ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__quit_cb) self.__sigid2 = editor.connect("combobox-encoding-data", self.__encoding_data_cb) self.__sigid3 = self.__combo.connect("changed", self.__changed_cb) editor.emit_combobox_encodings() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.remote_gui.get_widget("ComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__combo) del self self = None return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) self.__combo.set_row_separator_func(self.__separator_function) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __separator_function(self, model, iterator): if model.get_value(iterator, 0) == "Separator" : return True return False def __populate_model(self, data): self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() self.__model.append([data[0][0], data[0][1]]) self.__model.append(["Separator", "Separator"]) for alias, encoding in data[1:]: self.__model.append([alias, encoding]) self.__model.append(["Separator", "Separator"]) self.__model.append(["Add or Remove Encoding...", "show_encoding_window"]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) return False def __emit_new_encoding(self): iterator = self.__combo.get_active_iter() encoding = self.__model.get_value(iterator, 1) if encoding == "show_encoding_window": self.__combo.set_active(0) self.__editor.show_supported_encodings_window(self.__manager.open_gui.get_widget("Window")) else: self.__manager.emit("remote-encoding", encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __encoding_data_cb(self, editor, data): self.__populate_model(data) return False def __changed_cb(self, *args): self.__emit_new_encoding() return False scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/Manager.py0000644000175000017500000000112611242100540024705 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) from OpenButton import Button Button(editor, manager) from ComboBoxEntry import ComboBoxEntry ComboBoxEntry(editor, manager) from ComboBox import ComboBox ComboBox(manager, editor) from CancelButton import Button Button(editor, manager) from Window import Window Window(editor, manager) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def show(self): self.__manager.emit("show-remote-dialog-window") return scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade0000644000175000017500000001646511242100540026346 0ustar andreasandreas False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 Open Document ScribesRemoteDialog ScribesRemoteDialog True GTK_WIN_POS_CENTER_ON_PARENT 640 True GDK_WINDOW_TYPE_HINT_DIALOG True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Enter the location of the (URI) you _would like to open: True True False False True False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Character _Encoding:</b> True True False False True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 GTK_BUTTONBOX_END True False True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-cancel True 0 True False True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-open True 0 1 False False 3 scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/Window.py0000644000175000017500000000371311242100540024606 0ustar andreasandreasfrom gettext import gettext as _ class Window(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__manager.connect("show-remote-dialog-window", self.__show_window_cb) self.__sigid3 = self.__manager.connect("hide-remote-dialog-window", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__window.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__manager = manager self.__editor = editor self.__window = manager.remote_gui.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__window.show_all() self.__editor.busy() self.__editor.set_message(_("Open Document"), "open") return False def __hide(self): self.__editor.busy(False) self.__editor.unset_message(_("Open Document"), "open") self.__window.hide() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/OpenFile/RemoteDialogGUI/OpenButton.py0000644000175000017500000000214011242100540025425 0ustar andreasandreasclass Button(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__sigid1 = manager.connect("remote-button-sensitivity", self.__sensitivity_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = self.__button.connect("clicked", self.__clicked_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.remote_gui.get_widget("OpenButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__button) self.__button.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __sensitivity_cb(self, manager, value): self.__button.set_property("sensitive", value) return def __clicked_cb(self, *args): self.__manager.emit("hide-remote-dialog-window") self.__button.set_property("sensitive", False) self.__manager.emit("load-remote-file") return scribes-0.4~r910/GenericPlugins/OpenFile/Trigger.py0000644000175000017500000000363211242100540022022 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) editor.get_toolbutton("OpenToolButton").props.sensitive = True def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-open-dialog", "o", _("Open a new file"), _("File Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "show-remote-dialog", "l", _("Open a file at a remote location"), _("File Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "show-newfile-dialog", "o", _("Create a new file and open it"), _("File Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __create_manager(self): from Manager import Manager return Manager(self.__editor) def __activate_cb(self, trigger): if self.__manager is None: self.__manager = self.__create_manager() dictionary = { "show-open-dialog": self.__manager.show_open_dialog, "show-remote-dialog": self.__manager.show_remote_dialog, "show-newfile-dialog": self.__manager.show_newfile_dialog, } dictionary[trigger.name]() return False scribes-0.4~r910/GenericPlugins/OpenFile/Manager.py0000644000175000017500000000630111242100540021765 0ustar andreasandreasfrom gobject import GObject, TYPE_NONE, SIGNAL_RUN_LAST, TYPE_PYOBJECT from gobject import TYPE_STRING, TYPE_BOOLEAN class Manager(GObject): __gsignals__ = { "show-open-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "hide-open-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "show-remote-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "hide-remote-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "show-newfile-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "hide-newfile-dialog-window": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "open-files": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT, TYPE_STRING)), "open-button-sensitivity": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_BOOLEAN,)), "remote-button-sensitivity": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_BOOLEAN,)), "load-files": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "change-folder": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "load-remote-file": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "open-encoding": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "remote-encoding": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "validate": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "validation-error": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "validation-pass": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "create": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "create-file": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "creation-error": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_STRING,)), "creation-pass": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "open-button-activate": (SIGNAL_RUN_LAST, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from FileOpener import Opener Opener(self, editor) def __init_attributes(self, editor): self.__editor = editor pwd = editor.get_current_folder(globals()) self.__oglade = editor.get_gui_object(globals(), "OpenDialogGUI/GUI/GUI.glade") from os.path import join from gtk.glade import XML file_ = join(pwd, "NewFileDialogGUI/NewFileDialog.glade") self.__nglade = XML(file_, "Window", "scribes") file_ = join(pwd, "RemoteDialogGUI/RemoteDialog.glade") self.__rglade = XML(file_, "Window", "scribes") self.__open_manager = None self.__remote_manager = None self.__newfile_manager = None return False open_gui = property(lambda self: self.__oglade) new_gui = property(lambda self: self.__nglade) remote_gui = property(lambda self: self.__rglade) def show_open_dialog(self): try: self.__open_manager.show() except AttributeError: from OpenDialogGUI.Manager import Manager self.__open_manager = Manager(self, self.__editor) self.__open_manager.show() return def show_remote_dialog(self): try: self.__remote_manager.show() except AttributeError: from RemoteDialogGUI.Manager import Manager self.__remote_manager = Manager(self, self.__editor) self.__remote_manager.show() return def show_newfile_dialog(self): try: self.__new_manager.show() except AttributeError: from NewFileDialogGUI.Manager import Manager self.__new_manager = Manager(self, self.__editor) self.__new_manager.show() return def destroy(self): self.emit("destroy") del self self = None return scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/0000755000175000017500000000000011242100540022427 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/__init__.py0000644000175000017500000000000011242100540024526 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/Manager.py0000644000175000017500000000122511242100540024353 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) from GUI.Manager import Manager Manager(manager, editor) # from OpenButton import Button # Button(editor, manager) # from FileChooser import FileChooser # FileChooser(editor, manager) # from ComboBox import ComboBox # ComboBox(manager, editor) # from CancelButton import Button # Button(editor, manager) # from Window import Window # Window(editor, manager) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def show(self): self.__manager.emit("show-open-dialog-window") return scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/0000755000175000017500000000000011242100540023053 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/__init__.py0000644000175000017500000000000011242100540025152 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/GUI.glade0000644000175000017500000001214511242100540024500 0ustar andreasandreas False 10 Open Files ScribesOpenFileRole True center-always 800 600 True scribes dialog True True True static ScribesOpenFileID True False vertical 10 True False False False True 10 True <b>Character _Encoding:</b> True True EncodingComboBox False False 0 True False False 1 False False 1 True 10 end gtk-cancel True False False False True False False False 0 gtk-open True False True True True True True False False False 1 False False 2 scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/0000755000175000017500000000000011242100540025255 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/URISelector.py0000644000175000017500000000157011242100540027772 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__select() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("show-open-dialog-window", self.__show_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") return def __select(self): if not (self.__editor.uri): return False self.__chooser.set_uri(self.__editor.uri) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __show_cb(self, *args): self.__select() return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/FolderChanger.py0000644000175000017500000000154711242100540030341 0ustar andreasandreasclass Changer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("change-folder", self.__change_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") return def __change(self, uri): self.__chooser.set_current_folder_uri(uri) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __change_cb(self, manager, uri): from gobject import idle_add idle_add(self.__change, uri) return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/__init__.py0000644000175000017500000000000011242100540027354 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/URILoader.py0000644000175000017500000000224411242100540027417 0ustar andreasandreasclass Loader(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("open-encoding", self.__encoding_cb) self.__sigid3 = manager.connect("load-files", self.__load_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") self.__encoding = "" return def __load_uris(self, uris): encoding = self.__encoding if self.__encoding else "utf8" self.__manager.emit("open-files", uris, encoding) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __load_cb(self, manager, uris): from gobject import idle_add idle_add(self.__load_uris, uris) return False def __encoding_cb(self, manager, encoding): self.__encoding = encoding return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/Initializer.py0000644000175000017500000000145011242100540030112 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") return def __set_properties(self): self.__chooser.set_property("sensitive", True) self.__add_filters() return False def __add_filters(self): for filter_ in self.__editor.dialog_filters: self.__chooser.add_filter(filter_) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/Manager.py0000644000175000017500000000057411242100540027207 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from FolderChanger import Changer Changer(manager, editor) from URISelector import Selector Selector(manager, editor) from URILoader import Loader Loader(manager, editor) from ActivatorHandler import Handler Handler(manager, editor) scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/FileChooser/ActivatorHandler.py0000644000175000017500000000304511242100540031063 0ustar andreasandreasclass Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("open-button-activate", self.__activate_cb) self.__sigid3 = self.__chooser.connect("file-activated", self.__activate_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__chooser = manager.open_gui.get_object("FileChooser") return def __update(self, uri, folders, files): is_folder = self.__editor.uri_is_folder folders.append(uri) if is_folder(uri) else files.append(uri) return False def __get_folders_and_files(self): uris = self.__chooser.get_uris() folders, files = [], [] [self.__update(uri, folders, files) for uri in uris] return folders, files def __emit(self): try: folders, files = self.__get_folders_and_files() if len(folders) == 1 and not len(files): raise ValueError if len(folders) > 0: return False self.__manager.emit("load-files", files) except ValueError: self.__manager.emit("change-folder", folders[0]) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__chooser) del self self = None return False def __destroy_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__emit) return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/CancelButton.py0000644000175000017500000000144611242100540026013 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.open_gui.get_object("CancelButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__manager.emit("hide-open-dialog-window") return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/ComboBox.py0000644000175000017500000000502711242100540025141 0ustar andreasandreasclass ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = manager.connect("destroy", self.__quit_cb) self.__sigid2 = editor.connect("combobox-encoding-data", self.__encoding_data_cb) self.__sigid3 = self.__combo.connect("changed", self.__changed_cb) editor.emit_combobox_encodings() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.open_gui.get_object("EncodingComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__combo) del self self = None return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) self.__combo.set_row_separator_func(self.__separator_function) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __separator_function(self, model, iterator): if model.get_value(iterator, 0) == "Separator" : return True return False def __populate_model(self, data): self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() self.__model.append([data[0][0], data[0][1]]) self.__model.append(["Separator", "Separator"]) for alias, encoding in data[1:]: self.__model.append([alias, encoding]) self.__model.append(["Separator", "Separator"]) self.__model.append(["Add or Remove Encoding...", "show_encoding_window"]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) return False def __emit_new_encoding(self): iterator = self.__combo.get_active_iter() encoding = self.__model.get_value(iterator, 1) if encoding == "show_encoding_window": self.__combo.set_active(0) self.__editor.show_supported_encodings_window(self.__manager.open_gui.get_widget("Window")) else: self.__manager.emit("open-encoding", encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __encoding_data_cb(self, editor, data): self.__populate_model(data) return False def __changed_cb(self, *args): self.__emit_new_encoding() return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Manager.py0000644000175000017500000000056511242100540025005 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window.Manager import Manager Manager(manager, editor) from FileChooser.Manager import Manager Manager(manager, editor) from ComboBox import ComboBox ComboBox(manager, editor) from OpenButton import Button Button(manager, editor) from CancelButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/0000755000175000017500000000000011242100540024322 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Destroyer.py0000644000175000017500000000104711242100540026656 0ustar andreasandreasclass Destroyer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.open_gui.get_object("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__window.destroy() del self self = None return def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/__init__.py0000644000175000017500000000000011242100540026421 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Initializer.py0000644000175000017500000000127611242100540027165 0ustar andreasandreasclass Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = self.__manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.open_gui.get_object("Window") return def __set_properties(self): self.__window.set_property("sensitive", True) self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Manager.py0000644000175000017500000000040111242100540026241 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Destroyer import Destroyer Destroyer(manager, editor) from Displayer import Displayer Displayer(manager, editor) scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Displayer.py0000644000175000017500000000357011242100540026635 0ustar andreasandreasfrom gettext import gettext as _ class Displayer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("show-open-dialog-window", self.__show_window_cb) self.__sigid3 = manager.connect("hide-open-dialog-window", self.__hide_window_cb) self.__sigid4 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid5 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid6 = manager.connect("load-files", self.__hide_window_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = manager.open_gui.get_object("Window") return def __show(self): self.__window.show_all() self.__editor.busy() self.__editor.set_message(_("Open Document"), "open") return False def __hide(self): self.__editor.busy(False) self.__editor.unset_message(_("Open Document"), "open") self.__window.hide() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__editor.disconnect_signal(self.__sigid5, self.__window) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __hide_window_cb(self, *args): self.__hide() return def __show_window_cb(self, *args): self.__show() return def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True scribes-0.4~r910/GenericPlugins/OpenFile/OpenDialogGUI/GUI/OpenButton.py0000644000175000017500000000152311242100540025523 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.open_gui.get_object("OpenButton") self.__chooser = manager.open_gui.get_object("FileChooser") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__button) del self self = None return def __destroy_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("open-button-activate") return scribes-0.4~r910/GenericPlugins/CloseReopen/0000755000175000017500000000000011242100540020556 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/CloseReopen/__init__.py0000644000175000017500000000000011242100540022655 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/CloseReopen/Trigger.py0000644000175000017500000000157511242100540022543 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "close-reopen", "n", _("Close current window and reopen a new one"), _("Window Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def __activate_cb(self, *args): self.__editor.new() self.__editor.close() return def destroy(self): self.disconnect() self.remove_triggers() del self self = None return scribes-0.4~r910/GenericPlugins/FocusLastDocument/0000755000175000017500000000000011242100540021742 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/FocusLastDocument/Metadata.py0000644000175000017500000000067711242100540024046 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "FocusLastDocument.gdb") def get_value(): try: value = None database = open_database(basepath, "r") value = database["last_document"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["last_document"] = value finally: database.close() return scribes-0.4~r910/GenericPlugins/FocusLastDocument/__init__.py0000644000175000017500000000000011242100540024041 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/FocusLastDocument/Signals.py0000644000175000017500000000036211242100540023715 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "destroy": (SSIGNAL, TYPE_NONE, ()), "switch": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/FocusLastDocument/KeyboardHandler.py0000644000175000017500000000212111242100540025346 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor.window, "key-press-event", self.__event_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from gtk.gdk import keymap_get_default self.__keymap = keymap_get_default() return def __switch(self): self.__manager.emit("switch") return True def __event_cb(self, window, event): translate = self.__keymap.translate_keyboard_state data = translate(event.hardware_keycode, event.state, event.group) keyval, egroup, level, consumed = data from gtk.gdk import MODIFIER_MASK, CONTROL_MASK active_mask = event.state & ~consumed & MODIFIER_MASK ctrl_on = active_mask == CONTROL_MASK from gtk.keysyms import Tab if ctrl_on and keyval == Tab: return self.__switch() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/FocusLastDocument/Manager.py0000644000175000017500000000063711242100540023674 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from KeyboardHandler import Handler Handler(self, editor) from Switcher import Switcher Switcher(self, editor) from DatabaseWriter import Writer Writer(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/FocusLastDocument/Switcher.py0000644000175000017500000000227311242100540024110 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Switcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "switch", self.__switch_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __switch(self): from Metadata import get_value uri = get_value() uris = [instance.uri for instance in self.__editor.instances] if self.__editor.uri: uris.remove(self.__editor.uri) if uri in uris: self.__editor.focus_file(uri) else: _id = self.__get_last_id() self.__editor.focus_by_id(_id) return False def __get_last_id(self): ids = [instance.id_ for instance in self.__editor.instances] ids.sort() if not self.__editor.id_: return ids[-1] ids.remove(self.__editor.id_) if not ids: return self.__editor.id_ return ids[-1] def __switch_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__switch, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/FocusLastDocument/DatabaseWriter.py0000644000175000017500000000143011242100540025213 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor, "window-focus-out", self.__out_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __write(self): if not self.__editor.uri: return False from Metadata import set_value set_value(self.__editor.uri) return False def __out_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__write, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/PluginLastSessionLoader.py0000644000175000017500000000102311242100540023463 0ustar andreasandreasname = "LastSessionLoader Plugin" authors = ["Your Name "] version = 0.1 autoload = True class_name = "LastSessionLoaderPlugin" short_description = "A short description" long_description = "A long description" class LastSessionLoaderPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from LastSessionLoader.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginQuickOpen.py0000644000175000017500000000101211242100540021761 0ustar andreasandreasname = "QuickOpen Plugin" authors = ["Lateef Alabi-Oki ", "Jeremy Wilkins"] version = 0.3 autoload = True class_name = "QuickOpenPlugin" short_description = "Quickly Open Files." long_description = """Quickly Open Files.""" class QuickOpenPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from QuickOpen.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginSaveFile.py0000644000175000017500000000076711242100540021601 0ustar andreasandreasname = "Save File Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "SaveFilePlugin" short_description = "Save a file." long_description = """Press ctrl+s to save a file.""" class SaveFilePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from SaveFile.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/TriggerArea/0000755000175000017500000000000011242100540020534 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TriggerArea/BorderColorMetadata.py0000644000175000017500000000067311242100540024771 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TriggerArea", "BorderColor.gdb") def get_value(): try: color = "brown" database = open_database(basepath, "r") color = database["color"] except: pass finally: database.close() return color def set_value(color): try: database = open_database(basepath, "w") database["color"] = color finally: database.close() return scribes-0.4~r910/GenericPlugins/TriggerArea/Metadata.py0000644000175000017500000000070611242100540022631 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "Templates.gdb") def get_value(): try: dictionary = {} database = open_database(basepath, "r") dictionary = database["templates"] except: pass finally: database.close() return dictionary def set_value(dictionary): try: database = open_database(basepath, "w") database["templates"] = dictionary finally: database.close() return scribes-0.4~r910/GenericPlugins/TriggerArea/__init__.py0000644000175000017500000000000011242100540022633 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TriggerArea/Signals.py0000644000175000017500000000102611242100540022505 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "fullview": (SSIGNAL, TYPE_NONE, ()), "database-update": (SSIGNAL, TYPE_NONE, ()), "configuration-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "new-configuration-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/TriggerArea/FillColorMetadata.py0000644000175000017500000000067111242100540024440 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TriggerArea", "FillColor.gdb") def get_value(): try: color = "brown" database = open_database(basepath, "r") color = database["color"] except: pass finally: database.close() return color def set_value(color): try: database = open_database(basepath, "w") database["color"] = color finally: database.close() return scribes-0.4~r910/GenericPlugins/TriggerArea/Positioner.py0000644000175000017500000000400111242100540023234 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Positioner(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__widget.hide() from gtk import TEXT_WINDOW_WIDGET self.__view.add_child_in_window(self.__widget, TEXT_WINDOW_WIDGET, 0, -120) self.connect(editor.window, "configure-event", self.__event_cb) self.connect(editor, "scrollbar-visibility-update", self.__event_cb) self.connect(editor, "toolbar-is-visible", self.__show_cb, True) self.connect(editor, "show-full-view", self.__hide_cb) self.__position() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__widget = manager.get_data("TriggerWidget") self.__ignore_expose = False return def __get_cordinates(self, position): size = self.__widget.size from gtk import TEXT_WINDOW_WIDGET vwidth = self.__view.get_window(TEXT_WINDOW_WIDGET).get_geometry()[2] vheight = self.__view.get_window(TEXT_WINDOW_WIDGET).get_geometry()[3] cordinate = { "top-right": (vwidth - size, 0), "top-left": (0, 0), "bottom-right": (vwidth - size, vheight - size), "bottom-left": (0, vheight - size), } return cordinate[position] def __position(self): self.__widget.hide() position = self.__widget.position x, y = self.__get_cordinates(position) self.__view.move_child(self.__widget, x, y) self.__widget.show_all() return False def __show(self): self.__ignore_expose = False self.__position() return False def __show_cb(self, editor, visible): if visible: return False from gobject import timeout_add timeout_add(500, self.__show, priority=9999) return False def __hide_cb(self, *args): self.__ignore_expose = True self.__widget.hide() self.__view.move_child(self.__widget, 0, -120) return False def __event_cb(self, *args): if self.__ignore_expose: return False from gobject import idle_add idle_add(self.__position) return False scribes-0.4~r910/GenericPlugins/TriggerArea/DatabaseMonitor.py0000644000175000017500000000156611242100540024172 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join folder = join(editor.metadata_folder, "PluginPreferences", "TriggerArea") self.__monitor = editor.get_folder_monitor(folder) return def __destroy(self): self.__monitor.cancel() self.disconnect() del self return def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__manager.emit("database-update") return False scribes-0.4~r910/GenericPlugins/TriggerArea/FullViewActivator.py0000644000175000017500000000166011242100540024523 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Activator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "fullview", self.__fullview_cb) self.connect(editor, "toolbar-is-visible", self.__visible_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__visible = False return False def __destroy(self): self.disconnect() del self return False def __show(self): if self.__visible: return False self.__editor.show_full_view() return False def __destroy_cb(self, *args): self.__destroy() return False def __fullview_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __visible_cb(self, editor, visible): self.__visible = visible return False scribes-0.4~r910/GenericPlugins/TriggerArea/TriggerWidget.py0000644000175000017500000000625611242100540023666 0ustar andreasandreasfrom math import pi from gtk import EventBox from gtk.gdk import Color DEFAULT_COLOR = "brown" class TriggerWidget(EventBox): def __init__(self, editor): EventBox.__init__(self) self.hide() self.__init_attributes(editor) self.set_app_paintable(True) self.set_size_request(self.__size, self.__size) self.connect("size-allocate", self.__allocate_cb) self.connect("expose-event", self.__expose_cb) self.change_bg_color() self.hide() def __init_attributes(self, editor): self.__editor = editor # position could be "top-left", "top-right", "bottom-left", "bottom-right" self.__position = "top-right" self.__size = 24 self.__offset = 2 self.__bcolor = DEFAULT_COLOR self.__fcolor = DEFAULT_COLOR return def __set_size(self, size): self.__size = size self.set_size_request(size, size) from gtk.gdk import Rectangle rectangle = Rectangle(0, 0, size, size) self.size_allocate(rectangle) self.queue_draw() return def __set_position(self, position): self.__position = position def __set_border_color(self, color): self.__bcolor = color def __set_fill_color(self, color): self.__fcolor = color # Public API position = property(lambda self: self.__position, __set_position) size = property(lambda self: self.__size, __set_size) border_color = property(lambda self: self.__bcolor, __set_border_color) fill_color = property(lambda self: self.__fcolor, __set_fill_color) def __draw(self, cr, _size, position="top-right"): offset = self.__offset size, radius = _size, _size - offset corner = { "top-right": ((size, 0), (size, radius), (offset, 0)), "top-left": ((0, 0), (0, radius), (radius, 0)), "bottom-left": ((0, size), (0, offset), (radius, size)), "bottom-right": ((size, size), (size, offset), (offset, size)), } origin, vline, hline = corner[position] cr.set_line_width(3) # draw vertical line cr.move_to(*origin) cr.line_to(*vline) # draw horizontal line cr.move_to(*origin) cr.line_to(*hline) # draw arc cr.stroke() cr.set_line_width(2) x, y = origin cr.arc(x, y, radius, 0, 2*pi) cr.stroke_preserve() return False def __allocate_cb(self, win, allocation): from gtk.gdk import Pixmap bitmap = Pixmap(self.window, self.__size, self.__size, 1) cr = bitmap.cairo_create() from cairo import OPERATOR_CLEAR, OPERATOR_OVER # Clear the bitmap cr.set_operator(OPERATOR_CLEAR) cr.paint() # Draw the arc cr.set_operator(OPERATOR_OVER) self.__draw(cr, self.__size, self.__position) cr.fill() # Set the window shape self.window.shape_combine_mask(bitmap, 0, 0) return False def change_bg_color(self): self.set_style(None) color = self.__editor.view_bg_color if color is None: return False style = self.get_style().copy() from gtk import STATE_NORMAL style.bg[STATE_NORMAL] = color self.set_style(style) return False def __expose_cb(self, *args): # Draw arc cr = self.window.cairo_create() bcolor = Color(self.__bcolor) cr.set_source_rgba(bcolor.red_float, bcolor.green_float, bcolor.blue_float, 1.0) self.__draw(cr, self.__size, self.__position) fcolor = Color(self.__fcolor) cr.set_source_rgba(fcolor.red_float, fcolor.green_float, fcolor.blue_float, 0.5) cr.fill() return True scribes-0.4~r910/GenericPlugins/TriggerArea/PositionMetadata.py0000644000175000017500000000072111242100540024353 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TriggerArea", "Position.gdb") def get_value(): try: position = "top-right" database = open_database(basepath, "r") position = database["position"] except: pass finally: database.close() return position def set_value(position): try: database = open_database(basepath, "w") database["position"] = position finally: database.close() return scribes-0.4~r910/GenericPlugins/TriggerArea/FullViewHider.py0000644000175000017500000000347411242100540023627 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Hider(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor, "toolbar-is-visible", self.__visible_cb) self.__sigid1 = self.connect(editor.window, "key-press-event", self.__event_cb) self.__sigid2 = self.connect(editor.textview, "button-press-event", self.__generic_hide_cb) self.__sigid3 = self.connect(editor.textbuffer, "changed", self.__generic_hide_cb) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__window = editor.window self.__blocked = False return def __destroy(self): self.disconnect() del self return False def __hide_and_block(self): self.__editor.hide_full_view() self.__block() return False def __block(self): if self.__blocked: return False self.__window.handler_block(self.__sigid1) self.__editor.textview.handler_block(self.__sigid2) self.__editor.textbuffer.handler_block(self.__sigid3) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__window.handler_unblock(self.__sigid1) self.__editor.textview.handler_unblock(self.__sigid2) self.__editor.textbuffer.handler_unblock(self.__sigid3) self.__blocked = False return False def __event_cb(self, window, event): # from gtk.keysyms import Escape # if event.keyval != Escape: return False self.__hide_and_block() return False def __visible_cb(self, editor, visible): self.__unblock() if visible else self.__block() return False def __generic_hide_cb(self, *args): self.__hide_and_block() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/Trigger.py0000644000175000017500000000315511242100540022515 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) from MenuItem import MenuItem MenuItem(editor) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "show-trigger-area-window", "", _("Show trigger area configuration window"), _("Miscellaneous Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) self.__trigger1.command = "show-trigger-area-window" name, shortcut, description, category = ( "show-full-view", "m", _("Show editor's full view"), _("Miscellaneous Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) self.__trigger2.command = "show-full-view" from Manager import Manager self.__manager = Manager(editor) return def destroy(self): self.disconnect() self.remove_triggers() self.__manager.destroy() del self return False def __activate(self, command): activate = { "show-trigger-area-window": self.__manager.show, "show-full-view": self.__manager.fullview, } activate[command]() return False def __activate_cb(self, trigger): from gobject import idle_add idle_add(self.__activate, trigger.command) return scribes-0.4~r910/GenericPlugins/TriggerArea/DatabaseReader.py0000644000175000017500000000210311242100540023731 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "database-update", self.__update_cb) self.connect(manager, "destroy", self.__destroy_cb) self.__update() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update(self): from PositionMetadata import get_value position = get_value() from SizeMetadata import get_value size = get_value() from FillColorMetadata import get_value fill_color = get_value() configuration_data = { "position": position, "size": size, "fill_color": fill_color, } self.__manager.emit("configuration-data", configuration_data) return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/MenuItem.py0000644000175000017500000000152011242100540022627 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from gettext import gettext as _ class MenuItem(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.__menuitem.set_property("name", "Trigger Area MenuItem") self.connect(self.__menuitem, "activate", self.__activate_cb) editor.add_to_pref_menu(self.__menuitem) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_SELECT_COLOR message = _("Trigger Area") self.__menuitem = editor.create_menuitem(message, STOCK_SELECT_COLOR) return def destroy(self): self.disconnect() self.__editor.remove_from_pref_menu(self.__menuitem) self.__menuitem.destroy() del self return def __activate_cb(self, menuitem): self.__editor.trigger("show-trigger-area-window") return False scribes-0.4~r910/GenericPlugins/TriggerArea/Manager.py0000644000175000017500000000231211242100540022456 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from TriggerWidget import TriggerWidget self.set_data("TriggerWidget", TriggerWidget(editor)) from TriggerHandler import Handler Handler(self, editor) from Positioner import Positioner Positioner(self, editor) from PropertiesUpdater import Updater Updater(self, editor) from FullViewHider import Hider Hider(self, editor) from FullViewActivator import Activator Activator(self, editor) from DatabaseReader import Reader Reader(self, editor) from DatabaseWriter import Writer Writer(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) from SyntaxThemeMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def show(self): self.emit("show") return False def fullview(self): self.emit("fullview") return False scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/0000755000175000017500000000000011242100540021160 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/TriggerArea/GUI/FillColorButton.py0000644000175000017500000000250011242100540024610 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__sigid1 = self.connect(self.__button, "color-set", self.__color_cb) self.connect(manager, "configuration-data", self.__update_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__widget = manager.get_data("TriggerWidget") self.__button = manager.gui.get_object("FillColorButton") return def __destroy(self): self.disconnect() del self return False def __set_active(self, color): from gtk.gdk import Color self.__button.set_color(Color(color)) self.__button.set_property("sensitive", True) return False def __update_cb(self, manager, configuration_data): self.__button.handler_block(self.__sigid1) self.__set_active(configuration_data["fill_color"]) self.__button.handler_unblock(self.__sigid1) return False def __color_cb(self, *args): self.__button.set_property("sensitive", False) color = self.__button.get_color().to_string() self.__manager.emit("new-configuration-data", ("fill_color", color)) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/__init__.py0000644000175000017500000000000011242100540023257 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/TriggerArea/GUI/SizeComboBox.py0000644000175000017500000000411711242100540024100 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class ComboBox(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__set_attributes() self.__update_model() self.__sigid1 = self.connect(self.__combo, "changed", self.__changed_cb) self.connect(manager, "configuration-data", self.__update_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__widget = manager.get_data("TriggerWidget") self.__model = self.__create_model() self.__combo = manager.gui.get_object("SizeComboBox") return def __destroy(self): self.disconnect() del self return False def __create_model(self): from gtk import ListStore model = ListStore(str, int) return model def __set_attributes(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_start(cell, True) self.__combo.add_attribute(cell, 'text', 0) return False def __update_model(self): data = ( ("small", 24), ("medium", 32), ("large", 48), ("very large", 64), ("extra large", 128), ) self.__combo.set_model(None) for position in data: self.__model.append([position[0], position[1]]) self.__combo.set_model(self.__model) return False def __set_active(self, size): for row in self.__model: if size == row[1]: break iterator = self.__model.get_iter(row.path) self.__combo.set_active_iter(iterator) self.__combo.set_property("sensitive", True) return False def __update_cb(self, manager, configuration_data): self.__combo.handler_block(self.__sigid1) self.__set_active(configuration_data["size"]) self.__combo.handler_unblock(self.__sigid1) return False def __changed_cb(self, *args): self.__combo.set_property("sensitive", False) iterator = self.__combo.get_active_iter() size = self.__model.get_value(iterator, 1) self.__manager.emit("new-configuration-data", ("size", size)) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/GUI.glade0000644000175000017500000001456211242100540022612 0ustar andreasandreas 10 Customize Trigger Area True center-on-parent True Scribes dialog True True True True 10 True True 3 2 10 10 True 1 <b>_Choose color of trigger area:</b> True True True 2 3 GTK_FILL GTK_SHRINK True True True False #000000000000 1 2 2 3 GTK_FILL GTK_SHRINK True 1 <b>_Position trigger area at:</b> True True PositionComboBox True GTK_FILL GTK_SHRINK True 1 <b>_Make the trigger area:</b> True True SizeComboBox True 1 2 GTK_FILL GTK_SHRINK True False 1 2 GTK_FILL GTK_SHRINK True False 1 2 1 2 GTK_FILL GTK_SHRINK 0 scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/PositionComboBox.py0000644000175000017500000000424411242100540024773 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class ComboBox(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__set_attributes() self.__update_model() self.__sigid1 = self.connect(self.__combo, "changed", self.__changed_cb) self.connect(manager, "configuration-data", self.__update_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__widget = manager.get_data("TriggerWidget") self.__model = self.__create_model() self.__combo = manager.gui.get_object("PositionComboBox") return def __destroy(self): self.disconnect() del self return False def __create_model(self): from gtk import ListStore model = ListStore(str, str) return model def __set_attributes(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_start(cell, True) self.__combo.add_attribute(cell, 'text', 0) return False def __update_model(self): data = ( ("top right corner", "top-right"), ("top left corner", "top-left"), ("bottom right corner", "bottom-right"), ("bottom left corner", "bottom-left"), ) self.__combo.set_model(None) for position in data: self.__model.append([position[0], position[1]]) self.__combo.set_model(self.__model) return False def __set_active(self, position): for row in self.__model: if position == row[1]: break iterator = self.__model.get_iter(row.path) self.__combo.set_active_iter(iterator) self.__combo.set_property("sensitive", True) return False def __update_cb(self, manager, configuration_data): self.__combo.handler_block(self.__sigid1) self.__set_active(configuration_data["position"]) self.__combo.handler_unblock(self.__sigid1) return False def __changed_cb(self, *args): self.__combo.set_property("sensitive", False) iterator = self.__combo.get_active_iter() position = self.__model.get_value(iterator, 1) self.__manager.emit("new-configuration-data", ("position", position)) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/Manager.py0000644000175000017500000000046711242100540023113 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from PositionComboBox import ComboBox ComboBox(manager, editor) from SizeComboBox import ComboBox ComboBox(manager, editor) from FillColorButton import Button Button(manager, editor) scribes-0.4~r910/GenericPlugins/TriggerArea/GUI/Window.py0000644000175000017500000000275311242100540023010 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(self.__window, "delete-event", self.__delete_event_cb) self.connect(self.__window, "key-press-event", self.__key_press_event_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_object("Window") return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.disconnect() self.__window.destroy() del self return False def __hide(self): self.__window.hide() return False def __show(self): self.__window.show_all() return False def __delete_event_cb(self, *args): self.__manager.emit("hide") return True def __key_press_event_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/SizeMetadata.py0000644000175000017500000000065011242100540023462 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TriggerArea", "Size.gdb") def get_value(): try: size = 24 database = open_database(basepath, "r") size = database["size"] except: pass finally: database.close() return size def set_value(size): try: database = open_database(basepath, "w") database["size"] = size finally: database.close() return scribes-0.4~r910/GenericPlugins/TriggerArea/SyntaxThemeMonitor.py0000644000175000017500000000147211242100540024733 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor, "syntax-color-theme-changed", self.__changed_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__widget = manager.get_data("TriggerWidget") return def __destroy(self): self.disconnect() del self return False def __change_color(self): self.__widget.change_bg_color() return False def __destroy_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__change_color) return False scribes-0.4~r910/GenericPlugins/TriggerArea/PropertiesUpdater.py0000644000175000017500000000213711242100540024572 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "configuration-data", self.__data_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__widget = manager.get_data("TriggerWidget") return def __destroy(self): self.disconnect() del self return False def __update(self, configuration_data): self.__widget.position = configuration_data["position"] self.__widget.size = configuration_data["size"] self.__widget.fill_color = configuration_data["fill_color"] self.__widget.border_color = configuration_data["fill_color"] self.__widget.queue_draw() self.__editor.textview.queue_draw() self.__editor.window.queue_draw() return False def __data_cb(self, manager, configuration_data): self.__update(configuration_data) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/TriggerArea/TriggerHandler.py0000644000175000017500000000077411242100540024017 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(self.__tbox, "enter-notify-event", self.__notify_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__tbox = manager.get_data("TriggerWidget") return def __notify_cb(self, *args): self.__editor.show_full_view() return False scribes-0.4~r910/GenericPlugins/TriggerArea/DatabaseWriter.py0000644000175000017500000000201311242100540024003 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from PositionMetadata import set_value as position_value from SizeMetadata import set_value as size_value from FillColorMetadata import set_value as fill_value UPDATE_DATABASE = { "position": position_value, "size": size_value, "fill_color": fill_value, } class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "new-configuration-data", self.__data_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update(self, data): key, value = data UPDATE_DATABASE[key](value) return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__update, data) return False scribes-0.4~r910/GenericPlugins/PluginRecentOpen.py0000644000175000017500000000113511242100540022133 0ustar andreasandreasname = "Recent Open Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "RecentOpenPlugin" short_description = "Quickly open recent files" long_description = """Open recent files as quickly as possible via a search interface. More effective than using the recent menu.""" class RecentOpenPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from RecentOpen.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/UndoRedo/0000755000175000017500000000000011242100540020057 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/UndoRedo/__init__.py0000644000175000017500000000000011242100540022156 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/UndoRedo/Trigger.py0000644000175000017500000000304211242100540022033 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "undo", "z", _("Undo last action"), _("Text Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "redo", "z", _("Redo last action"), _("Text Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "redo_", "y", _("Redo last action"), _("Text Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, trigger): function = { self.__trigger1: self.__editor.undo, self.__trigger2: self.__editor.redo, self.__trigger3: self.__editor.redo, } function[trigger]() return scribes-0.4~r910/GenericPlugins/PluginBracketCompletion.py0000644000175000017500000000112211242100540023472 0ustar andreasandreasname = "Bracket Completion Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "BracketCompletionPlugin" short_description = "Bracket completion operations." long_description = """This plug-in performs bracket completion operations""" class BracketCompletionPlugin(object): def __init__(self, editor): self.__editor = editor self.__manager = None def load(self): from BracketCompletion.Manager import BracketManager self.__manager = BracketManager(self.__editor) return def unload(self): self.__manager.destroy() return scribes-0.4~r910/GenericPlugins/PluginSearchSystem.py0000644000175000017500000000107011242100540022501 0ustar andreasandreasname = "Search and Replace Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "SearchSystemPlugin" short_description = "Search and replace operations." long_description = """This plug-in performs search and replace operations \ """ class SearchSystemPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from SearchSystem.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/MatchingBracket/0000755000175000017500000000000011242100540021366 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/MatchingBracket/__init__.py0000644000175000017500000000000011242100540023465 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/MatchingBracket/Trigger.py0000644000175000017500000000206311242100540023344 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "find-matching-bracket", "b", _("Move cursor to matching bracket"), _("Navigation Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate_cb(self, *args): try: self.__manager.match() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.match() return False scribes-0.4~r910/GenericPlugins/MatchingBracket/Manager.py0000644000175000017500000000134711242100540023317 0ustar andreasandreasfrom gettext import gettext as _ class Manager(object): def __init__(self, editor): self.__init_attributes(editor) def __init_attributes(self, editor): self.__editor = editor return def __find_matching_bracket(self): match = self.__editor.find_matching_bracket() if not match: return False self.__editor.textbuffer.place_cursor(match) self.__editor.move_view_to_cursor() return True def match(self): match = self.__find_matching_bracket() if match: message = _("Moved cursor to matching bracket") self.__editor.update_message(message, "pass") else: message = _("No matching bracket found") self.__editor.update_message(message, "fail") return def destroy(self): del self self = None return scribes-0.4~r910/GenericPlugins/PluginUserGuide.py0000644000175000017500000000105011242100540021761 0ustar andreasandreasname = "User Guide Plug-in" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "UserGuidePlugin" short_description = "Show Scribes' user guide." long_description = """\ This plug-in launching the Scribes's help browser, yelp. """ class UserGuidePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from UserGuide.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginAbout.py0000644000175000017500000000076011242100540021146 0ustar andreasandreasname = "About Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "AboutPlugin" short_description = "Shows the about dialog." long_description = """Shows the about dialog.""" class AboutPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from About.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginPrinting.py0000644000175000017500000000077411242100540021673 0ustar andreasandreasname = "Printing Plugin" authors = ["Lateef Alabi-Oki "] version = 0.4 autoload = True class_name = "PrintingPlugin" short_description = "Shows the about dialog." long_description = """Shows the about dialog.""" class PrintingPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Printing.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/Bookmark/0000755000175000017500000000000011242100540020105 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/MarginDisplayer.py0000644000175000017500000000145611242100540023557 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __toggle(self, lines): show = self.__editor.textview.set_show_line_marks show(True) if lines else show(False) return False def __destroy_cb(self, *args): self.__destroy() return False def __lines_cb(self, manager, lines): from gobject import idle_add idle_add(self.__toggle, lines) return False scribes-0.4~r910/GenericPlugins/Bookmark/Metadata.py0000644000175000017500000000101211242100540022171 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "Bookmark", "Bookmark.gdb") def get_value(uri): try: database = open_database(basepath, "r") lines = database[uri] if database.has_key(uri) else () except: pass finally: database.close() return lines def set_value(uri, lines): try: database = open_database(basepath, "w") if lines: database[uri] = lines if not lines and database.has_key(uri): del database[uri] finally: database.close() return scribes-0.4~r910/GenericPlugins/Bookmark/__init__.py0000644000175000017500000000000011242100540022204 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/Signals.py0000644000175000017500000000141611242100540022061 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "toggle": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "remove-all": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "add": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "lines": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "bookmark-lines": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "feedback": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "model-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "scroll-to-line": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "updated-model": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/Bookmark/LineJumper.py0000644000175000017500000000163211242100540022533 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Jumper(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "scroll-to-line", self.__scroll_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __scroll_to(self, line): iterator = self.__editor.textbuffer.get_iter_at_line(line) self.__editor.textbuffer.place_cursor(iterator) self.__editor.textview.scroll_to_iter(iterator, 0.001, use_align=True, xalign=1.0) return False def __destroy_cb(self, *args): self.__destroy() return False def __scroll_cb(self, manager, line): from gobject import idle_add idle_add(self.__scroll_to, line) return False scribes-0.4~r910/GenericPlugins/Bookmark/Utils.py0000644000175000017500000000107511242100540021562 0ustar andreasandreas# Utility functions shared among modules belong here. BOOKMARK_NAME = "ScribesBookmark" def create_bookmark_image(editor): pixbuf = __create_pixbuf(editor) editor.textview.set_mark_category_pixbuf(BOOKMARK_NAME, pixbuf) editor.textview.set_mark_category_priority(BOOKMARK_NAME, 1) return def __create_pixbuf(editor): from os.path import join current_folder = editor.get_current_folder(globals()) image_file = join(current_folder, "bookmarks.png") from gtk import Image image = Image() image.set_from_file(image_file) pixbuf = image.get_pixbuf() return pixbuf scribes-0.4~r910/GenericPlugins/Bookmark/MarkUpdater.py0000644000175000017500000000464011242100540022702 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from Utils import BOOKMARK_NAME class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(editor.textbuffer, "source-mark-updated", self.__updated_cb, True) self.connect(editor, "modified-file", self.__modified_cb, True) self.connect(editor, "renamed-file", self.__updated_cb, True) from gobject import idle_add idle_add(self.__optimize, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__buffer = editor.textbuffer self.__lines = () return def __destroy(self): self.__update() self.disconnect() del self return False def __destroy_cb(self, *args): self.__destroy() return False def __line_from(self, mark): iter_at_mark = self.__buffer.get_iter_at_mark return iter_at_mark(mark).get_line() def __get_bookmarked_lines(self): mark = self.__find_first_mark() marks = self.__get_all_marks(mark) lines = [self.__line_from(mark) for mark in marks] return tuple(lines) def __find_first_mark(self): iterator = self.__buffer.get_bounds()[0] marks = self.__buffer.get_source_marks_at_iter(iterator, BOOKMARK_NAME) if marks: return marks[0] found_mark = self.__buffer.forward_iter_to_source_mark(iterator, BOOKMARK_NAME) if found_mark is False: raise ValueError marks = self.__buffer.get_source_marks_at_iter(iterator, BOOKMARK_NAME) return marks[0] def __get_all_marks(self, mark): marks = [] append = marks.append append(mark) while True: mark = mark.next(BOOKMARK_NAME) if mark is None: break append(mark) return marks def __update(self): try: lines = self.__get_bookmarked_lines() except ValueError: lines = () finally: if lines == self.__lines: return False self.__lines = lines self.__manager.emit("lines", lines) return False def __optimize(self): methods = ( self.__update, self.__get_bookmarked_lines, self.__find_first_mark, self.__get_all_marks, ) self.__editor.optimize(methods) return False def __updated_cb(self, *args): from gobject import idle_add idle_add(self.__update, priority=9999) return False def __modified_cb(self, editor, modified): from gobject import idle_add idle_add(self.__update, priority=9999999) return False scribes-0.4~r910/GenericPlugins/Bookmark/Trigger.py0000644000175000017500000000364511242100540022072 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self, editor) TriggerManager.__init__(self, editor) self.__init_attributes(editor) # self.connect(editor.textview, "populate-popup", self.__popup_cb) self.connect(self.__trigger1, "activate", self.__activate_cb) self.connect(self.__trigger2, "activate", self.__activate_cb) self.connect(self.__trigger3, "activate", self.__activate_cb) def __init_attributes(self, editor): from Manager import Manager self.__manager = Manager(editor) self.__editor = editor name, shortcut, description, category = ( "toggle-bookmark", "d", _("Add or remove bookmark on a line"), _("Bookmark Operations") ) self.__trigger1 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "remove-all-bookmarks", "b", _("Remove all bookmarks"), _("Bookmark Operations") ) self.__trigger2 = self.create_trigger(name, shortcut, description, category) name, shortcut, description, category = ( "show-bookmark-browser", "b", _("Navigate bookmarks"), _("Bookmark Operations") ) self.__trigger3 = self.create_trigger(name, shortcut, description, category) self.__browser = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return def __popup_cb(self, textview, menu): from PopupMenuItem import PopupMenuItem self.__editor.add_to_popup(PopupMenuItem(self.__editor)) return False def __activate_cb(self, trigger): function = { self.__trigger1: self.__manager.toggle, self.__trigger2: self.__manager.remove, self.__trigger3: self.__manager.show, } function[trigger]() return False scribes-0.4~r910/GenericPlugins/Bookmark/Marker.py0000644000175000017500000000173411242100540021705 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Marker(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "toggle", self.__toggle_cb) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__lines = [] return def __destroy(self): self.disconnect() del self return False def __toggle(self): line = self.__editor.cursor.get_line() emit = self.__manager.emit emit("remove", line) if line in self.__lines else emit("add", line) return False def __destroy_cb(self, *args): self.__destroy() return False def __toggle_cb(self, *args): from gobject import idle_add idle_add(self.__toggle) return False def __lines_cb(self, manager, lines): self.__lines = lines return False scribes-0.4~r910/GenericPlugins/Bookmark/DatabaseReader.py0000644000175000017500000000172711242100540023315 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "loaded-file", self.__update_cb) self.connect(manager, "destroy", self.__destroy_cb) from gobject import idle_add idle_add(self.__update, priority=9999) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update(self): uri = self.__editor.uri if not uri: return False from Metadata import get_value lines = get_value(str(uri)) if not lines: return False self.__manager.emit("bookmark-lines", lines) return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Bookmark/MarkRemover.py0000644000175000017500000000227611242100540022720 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Remover(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "remove", self.__remove_cb) self.connect(manager, "remove-all", self.__remove_all_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __get_region(self, line=None): if line is None: return self.__editor.textbuffer.get_bounds() start = self.__editor.textbuffer.get_iter_at_line(line) end = self.__editor.forward_to_line_end(start.copy()) return start, end def __unmark(self, region): start, end = region from Utils import BOOKMARK_NAME self.__editor.textbuffer.remove_source_marks(start, end, BOOKMARK_NAME) return False def __destroy_cb(self, *args): self.__destroy() return False def __remove_cb(self, manager, line): self.__unmark(self.__get_region(line)) return False def __remove_all_cb(self, *args): self.__unmark(self.__get_region()) return False scribes-0.4~r910/GenericPlugins/Bookmark/Feedback.py0000644000175000017500000000427711242100540022155 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from gettext import gettext as _ MESSAGE = _("Bookmarked lines") class Feedback(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "add", self.__add_cb, True) self.connect(manager, "remove", self.__remove_cb, True) self.connect(manager, "remove-all", self.__remove_all_cb) self.connect(manager, "feedback", self.__feedback_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "scroll-to-line", self.__scroll_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__feedback = True return def __destroy(self): self.disconnect() del self return False def __mark(self, line): if not self.__feedback: return False message = _("Marked line %s") % str(line+1) self.__editor.update_message(message, "yes") return False def __unmark(self, line): if not self.__feedback: return False message = _("Unmarked line %s") % str(line+1) self.__editor.update_message(message, "yes") return False def __remove(self): if not self.__feedback: return False message = _("Removed all bookmarks") self.__editor.update_message(message, "yes") return False def __destroy_cb(self, *args): self.__destroy() return False def __add_cb(self, manager, line): from gobject import idle_add idle_add(self.__mark, line) return False def __remove_cb(self, manager, line): from gobject import idle_add idle_add(self.__unmark, line) return False def __remove_all_cb(self, *args): from gobject import idle_add idle_add(self.__remove) return False def __feedback_cb(self, manager, feedback): self.__feedback = feedback return False def __show_cb(self, *args): self.__editor.set_message(MESSAGE) return False def __hide_cb(self, *args): self.__editor.unset_message(MESSAGE) return False def __scroll_cb(self, manager, line): message = _("Cursor on line %s") % str(line+1) self.__editor.update_message(message, "yes") return False scribes-0.4~r910/GenericPlugins/Bookmark/Manager.py0000644000175000017500000000237311242100540022036 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from LineJumper import Jumper Jumper(self, editor) from Feedback import Feedback Feedback(self, editor) from Utils import create_bookmark_image create_bookmark_image(editor) from MarkAdder import Adder Adder(self, editor) from MarkRemover import Remover Remover(self, editor) from MarginDisplayer import Displayer Displayer(self, editor) from DatabaseWriter import Writer Writer(self, editor) from MarkReseter import Reseter Reseter(self, editor) from MarkUpdater import Updater Updater(self, editor) from Marker import Marker Marker(self, editor) from DatabaseReader import Reader Reader(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def toggle(self): self.emit("toggle") return False def remove(self): self.emit("remove-all") return False def show(self): self.emit("show") return False scribes-0.4~r910/GenericPlugins/Bookmark/bookmarks.png0000644000175000017500000000257111242100540022610 0ustar andreasandreas‰PNG  IHDRàw=øbKGDÿÿÿ ½§“.IDATxÚ¥–ylTUÆï½ÎL;CW 5ERPR)HRv¨ÚÄ 1BDcD@Tˆ(Hˆ1b4‚eqA P 1 ®U)JZ(݇:íl7Λ™7×?¼ÓS#âINî_ï|ç;÷»ßy0xh ,˜ˆ$‹U3€ À ¨üÏÐæÏŸ?Û‘ž%vî?,~,?ïd@¹Ýâ*0Þ‘ž%¶¼³OôôôˆÚËW„=5CKQ€ãvY¨ÀøÌœ;Ŷ÷>>¿_477‹ÚÚZñáþ—$‹û€aÿ……:à,HšSµvãë,_R†»»·Û®ëŒ»7ìô¡Ày·  ÃrGU­X·ÉX¹t!×;:ðù|$''F±$i<ûÜŠ³À H’ä·Ê yÀØœ¼üªk6Ö?û„ÍårljD"Äb1LÓÄ4MЦŽNÍž`‘.™Ø%X"“%»¤ T/}f¥kõ²Ei].†a`š&ñxÓ4III! ‡ÂÖ'_ÜUXXxh<€ôÊlÖ“%¸PÔâK˜2á^G,Å0 Ün÷M…MÓĈDC.ϰ²y¥Ù³‡ÛYûä^Yþ4ËæÎæÂ… !B °¸ä) .ÙiZk}õk}ÖìeÍÌÐu¨RU•ÞÞ^, ׺<™C¬é'ßܬ̉v’çná÷–vozƒ±ãèêê ¤ž>}ªøèÂ*pG[CÞÇGOëÙÙÙX­Öþù;ÚÚ;oÄúÙŸîÞ¡<’B±Ù©ŒX™¾z#EEEØl6œÎ6åÛŠZ€ž"Pº?Îç»_*½Š¢`š&š¦ Ñõ`@ï3’;¢– /ÂŒRå 0åù ”–ÎÃ0 4MÅÕÝÅoëDùÙ¯Tà] ˜€P0PâêhËûìø×Á‘#G¢iV«•ú–ö¦CŸìÉ,K5)j¡Óˆ“9cÓ>†ÍfÃf³7MÊË¥ÝåÁçj¸(/? ˜*j*¾9ÊÙò‹Uýëíµ¶9/qøÀ„=SGSîàL»ïÝ÷±ô­]ýÅ“4§ó=Ìžo+±hdc qURéJ¼]×óö>Ñ“››k¼¿kwÞ¶Ò”¤ÊŸ¨ö…ŽŸÁª}‡UQˆDbÔ]mä·ªzzÜHùú$ƒO<8‹ô1wÉ Í'Nô9rD8,ZæŒ[Í>¿_ÄLSD¢QaD¢"‹‰æ¶kbïÁc 3\ w 4Ä„õ³¸Z}~ô¤iE¡’üQ Ûü[­cxøå-d¤§ÔuŒpUUˆ›qššÛ8ó}!ÝŸèÞ/»Js$IÄwÑXUNþ„éYÞS‡IKRhÐ R³rè ‡±X,Øívªë®ÐÒÞɱ}ÛÖɹûT‘Ð1À Uå9E»ï±7U+»›|üPY/B1M4:¯  ¤¤¤Ø¨«o¢¢²F”Ÿ;£»à–fÿöPXÈ3LX5"Ywhʈ¢×»ãÇ󱦿Ö_¯©üQs%ÞÐä­×»ãÛ_}IÖÍÀ/'‘¨Õ?¢DÄ$@€ŸcBäÎÌJQ35ÅÑPS±·¡¦"L,*éÕ{^.ÝRž7ç–†œl,ésîZjaš¥erFrÖ.§ž<)b— ^鬿Kóßâ<0I²œ |)ÿ,îòä~dÊ=0èž¾Õ¿ƒÄ¦R¤"»5å9hçx«fT™s`IEND®B`‚scribes-0.4~r910/GenericPlugins/Bookmark/GUI/0000755000175000017500000000000011242100540020531 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/GUI/__init__.py0000644000175000017500000000000011242100540022630 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/0000755000175000017500000000000011242100540022263 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/__init__.py0000644000175000017500000000000011242100540024362 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/Disabler.py0000644000175000017500000000153511242100540024366 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Disabler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") return def __destroy(self): self.disconnect() del self return False def __sensitive(self, files): value = True if files else False self.__view.set_property("sensitive", value) return False def __lines_cb(self, manager, lines): from gobject import idle_add idle_add(self.__sensitive, lines) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/RowActivationHandler.py0000644000175000017500000000174411242100540026732 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(self.__view, "row-activated", self.__activated_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() return def __destroy(self): self.disconnect() del self return False def __activate(self): selection = self.__view.get_selection() model, iterator = selection.get_selected() line = model.get_value(iterator, 0) - 1 self.__manager.emit("scroll-to-line", line) return False def __destroy_cb(self, *args): self.__destroy() return False def __activated_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return True scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/Initializer.py0000644000175000017500000000342211242100540025121 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") return def __destroy(self): self.disconnect() del self return False def __set_properties(self): from gtk import TreeView, CellRendererToggle, TreeViewColumn from gtk import TREE_VIEW_COLUMN_AUTOSIZE, CellRendererText from gtk import SORT_DESCENDING, SELECTION_MULTIPLE from gtk import TREE_VIEW_COLUMN_FIXED view = self.__view # view.get_selection().set_mode(SELECTION_MULTIPLE) # Create column for line numbers. column = TreeViewColumn() view.append_column(column) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.set_spacing(12) renderer = CellRendererText() column.pack_start(renderer, True) column.set_attributes(renderer, text=0) column.set_resizable(True) column.set_reorderable(False) # Create column for line text. column = TreeViewColumn() view.append_column(column) column.set_sizing(TREE_VIEW_COLUMN_FIXED) renderer = CellRendererText() column.pack_start(renderer, True) column.set_attributes(renderer, text=1) column.set_resizable(False) column.set_spacing(12) column.set_fixed_width(250) column.set_reorderable(False) view.set_model(self.__create_model()) view.realize() return def __create_model(self): from gtk import ListStore model = ListStore(int, str) return model def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/ModelUpdater.py0000644000175000017500000000351311242100540025224 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "model-data", self.__data_cb) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__model = self.__view.get_model() self.__column1 = self.__view.get_column(0) self.__column2 = self.__view.get_column(1) self.__data = [] return def __destroy(self): self.disconnect() del self return False def __populate(self, data): if not data: return False if self.__data == data: return False from copy import copy self.__data = copy(data) self.__view.window.freeze_updates() self.__view.set_model(None) self.__model.clear() for name, path in data: self.__model.append([name, path]) self.__column1.queue_resize() self.__column2.queue_resize() self.__view.set_model(self.__model) self.__view.window.thaw_updates() self.__manager.emit("updated-model") return False def __clear(self): if not len(self.__model): return False self.__view.window.freeze_updates() self.__view.set_model(None) self.__model.clear() self.__view.set_model(self.__model) self.__view.window.thaw_updates() return False def __destroy_cb(self, *args): self.__destroy() return False def __data_cb(self, manager, data): try: from gobject import idle_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = idle_add(self.__populate, data) return False def __lines_cb(self, manager, lines): if not lines: self.__clear() return False scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/ModelDataGenerator.py0000644000175000017500000000203311242100540026334 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Generator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __text_from(self, line): start = self.__editor.textbuffer.get_iter_at_line(line) end = self.__editor.forward_to_line_end(start.copy()) return self.__editor.textbuffer.get_text(start, end).strip(" \t\r\n") def __generate(self, lines): data = [(line + 1, self.__text_from(line)) for line in lines] self.__manager.emit("model-data", tuple(data)) return def __destroy_cb(self, *args): self.__destroy() return False def __lines_cb(self, manager, lines): from gobject import idle_add idle_add(self.__generate, lines) return False scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/Manager.py0000644000175000017500000000111511242100540024205 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from Disabler import Disabler Disabler(manager, editor) from RowSelector import Selector Selector(manager, editor) # from UpKeyHandler import Handler # Handler(manager, editor) # from KeyboardHandler import Handler # Handler(manager, editor) from RowActivationHandler import Handler Handler(manager, editor) from ModelUpdater import Updater Updater(manager, editor) from ModelDataGenerator import Generator Generator(manager, editor) scribes-0.4~r910/GenericPlugins/Bookmark/GUI/TreeView/RowSelector.py0000644000175000017500000000205111242100540025103 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Selector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show", self.__updated_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_object("TreeView") self.__selection = self.__view.get_selection() self.__column = self.__view.get_column(0) self.__model = self.__view.get_model() return def __destroy(self): self.disconnect() del self return False def __select(self): if not len(self.__model): return False self.__selection.select_path(0) self.__view.set_cursor(0, self.__column) self.__view.scroll_to_cell(0, None, True, 0.5, 0.5) return False def __destroy_cb(self, *args): self.__destroy() return False def __updated_cb(self, *args): from gobject import idle_add idle_add(self.__select) return False scribes-0.4~r910/GenericPlugins/Bookmark/GUI/GUI.glade0000644000175000017500000000332311242100540022154 0ustar andreasandreas 10 Bookmarked Lines ScribesBookmarkBrowserRole 350 200 True scribes dialog True True True True True never automatic in True True False False True 0 False vertical scribes-0.4~r910/GenericPlugins/Bookmark/GUI/Manager.py0000644000175000017500000000044011242100540022453 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from TreeView.Manager import Manager Manager(manager, editor) # from Label import Label # Label(manager, editor) # from Entry import Entry # Entry(manager, editor) from Window import Window Window(manager, editor) scribes-0.4~r910/GenericPlugins/Bookmark/GUI/Window.py0000644000175000017500000000303311242100540022351 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.__set_properties() self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "scroll-to-line", self.__delete_event_cb) self.connect(self.__window, "delete-event", self.__delete_event_cb) self.connect(self.__window, "key-press-event", self.__key_press_event_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_object("Window") return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.disconnect() del self return False def __hide(self): self.__window.hide() return False def __show(self): self.__window.show_all() return False def __delete_event_cb(self, *args): self.__manager.emit("hide") return True def __key_press_event_cb(self, window, event): from gtk.keysyms import Escape if event.keyval != Escape: return False self.__manager.emit("hide") return True def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/Bookmark/DatabaseWriter.py0000644000175000017500000000151111242100540023356 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Writer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb, True) self.connect(manager, "lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __update(self, lines): uri = self.__editor.uri if not uri: return False from Metadata import set_value set_value(str(uri), lines) return False def __destroy_cb(self, *args): self.__destroy() return False def __lines_cb(self, manager, lines): from gobject import idle_add idle_add(self.__update, lines) return False scribes-0.4~r910/GenericPlugins/Bookmark/MarkAdder.py0000644000175000017500000000216411242100540022314 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Adder(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "add", self.__add_cb) self.connect(manager, "bookmark-lines", self.__lines_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __mark(self, line): iterator = self.__editor.textbuffer.get_iter_at_line(line) from Utils import BOOKMARK_NAME self.__editor.textbuffer.create_source_mark(None, BOOKMARK_NAME, iterator) return False def __update(self, lines): [self.__mark(line) for line in lines] return False def __destroy_cb(self, *args): self.__destroy() return False def __add_cb(self, manager, line): from gobject import idle_add idle_add(self.__mark, line) return False def __lines_cb(self, manager, lines): from gobject import idle_add idle_add(self.__update, lines) return False scribes-0.4~r910/GenericPlugins/Bookmark/MarkReseter.py0000644000175000017500000000243211242100540022704 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reseter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "lines", self.__lines_cb) self.connect(editor, "reset-buffer", self.__reset_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__lines = () self.__update = True return def __destroy(self): self.disconnect() del self return False def __reset(self, operation): if operation == "begin": self.__update = False self.__manager.emit("feedback", False) else: self.__manager.emit("remove-all") self.__manager.emit("bookmark-lines", self.__lines) self.__update = True from gobject import timeout_add timeout_add(250, self.__enable_feedback, priority=9999) return False def __enable_feedback(self): self.__manager.emit("feedback", True) return False def __destroy_cb(self, *args): self.__destroy() return False def __reset_cb(self, editor, operation): self.__reset(operation) return False def __lines_cb(self, manager, lines): if self.__update is False: return False self.__lines = lines return False scribes-0.4~r910/GenericPlugins/PluginScrollNavigation.py0000644000175000017500000000107511242100540023352 0ustar andreasandreasname = "Scroll Navigation Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "ScrollNavigationPlugin" short_description = "Keyboard Scroll navigation for Scribes." long_description = """Keyboard Scroll navigation for Scribes.""" class ScrollNavigationPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from ScrollNavigation.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/0000755000175000017500000000000011242100540022575 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/AdvancedConfiguration/__init__.py0000644000175000017500000000000011242100540024674 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/AdvancedConfiguration/LexicalScopeHighlightMetadata.py0000644000175000017500000000070011242100540031010 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "LexicalScopeHighlight.gdb") def get_value(): try: value = "orange" database = open_database(basepath, "r") value = database["color"] except KeyError: pass finally: database.close() return value def set_value(color): try: database = open_database(basepath, "w") database["color"] = color finally: database.close() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/Trigger.py0000644000175000017500000000172511242100540024557 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__show_window_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None self.__trigger = self.create_trigger("show-advanced-configuration-window") from MenuItem import MenuItem self.__menuitem = MenuItem(editor) return def __show_window_cb(self, *args): try: self.__manager.show() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.show() return def destroy(self): if self.__manager: self.__manager.destroy() if self.__menuitem: self.__menuitem.destroy() self.remove_triggers() self.disconnect() del self return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/MenuItem.py0000644000175000017500000000151611242100540024675 0ustar andreasandreasfrom gettext import gettext as _ message = _("Advanced Configuration") class MenuItem(object): def __init__(self, editor): self.__init_attributes(editor) self.__menuitem.props.name = "Advanced Configuration MenuItem" self.__sigid1 = self.__menuitem.connect("activate", self.__activate_cb, editor) editor.add_to_pref_menu(self.__menuitem) def __init_attributes(self, editor): self.__editor = editor from gtk import STOCK_PROPERTIES self.__menuitem = editor.create_menuitem(message, STOCK_PROPERTIES) return def destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__menuitem) self.__editor.remove_from_pref_menu(self.__menuitem) self.__menuitem.destroy() del self self = None return def __activate_cb(self, menuitem, editor): editor.trigger("show-advanced-configuration-window") return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/BracketSelectionColorButton.py0000644000175000017500000000352511242100540030570 0ustar andreasandreasclass ColorButton(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = self.__button.connect("color-set", self.__color_set_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__changed_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_widget("BracketSelectionColorButton") from os.path import join preference_folder = join(editor.metadata_folder, "PluginPreferences") _path = join(preference_folder, "LexicalScopeHighlight.gdb") from gio import File, FILE_MONITOR_NONE self.__monitor = File(_path).monitor_file(FILE_MONITOR_NONE, None) return def __set_properties(self): from LexicalScopeHighlightMetadata import get_value from gtk.gdk import color_parse color = color_parse(get_value()) self.__button.set_color(color) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__button.destroy() del self self = None return def __color_set_cb(self, *args): from LexicalScopeHighlightMetadata import set_value color = self.__button.get_color().to_string() set_value(color) return True def __destroy_cb(self, *args): self.__destroy() return True def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False self.__button.handler_block(self.__sigid1) from LexicalScopeHighlightMetadata import get_value from gtk.gdk import color_parse color = color_parse(get_value()) self.__button.set_color(color) self.__button.handler_unblock(self.__sigid1) return True scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/0000755000175000017500000000000011242100540026545 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/Metadata.py0000644000175000017500000000072211242100540030640 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "TemplateIndentation.gdb") def get_value(): try: value = True database = open_database(basepath, "r") value = database["indentation"] except KeyError: pass finally: database.close() return value def set_value(indentation): try: database = open_database(basepath, "w") database["indentation"] = indentation finally: database.close() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/__init__.py0000644000175000017500000000000011242100540030644 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/CheckButton.py0000644000175000017500000000253411242100540031334 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = self.__button.connect("toggled", self.__toggled_cb) self.__sigid2 = self.__manager.connect("destroy", self.__destroy_cb) self.__sigid3 = self.__manager.connect("get-data", self.__update_cb) self.__button.set_property("sensitive", True) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__button = manager.gui.get_widget("TemplateIndentationCheckButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__button) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) del self return False def __update(self, active): self.__button.handler_block(self.__sigid1) self.__button.set_active(active) self.__button.handler_unblock(self.__sigid1) return False def __set(self): self.__manager.emit("set-data", self.__button.get_active()) return False def __toggled_cb(self, *args): from gobject import idle_add idle_add(self.__set, priority=9999) return True def __update_cb(self, manager, active): from gobject import idle_add idle_add(self.__update, active, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/Manager.py0000644000175000017500000000223211242100540030470 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_BOOLEAN from gobject import TYPE_NONE SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "set-data": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "get-data": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "destroy": (SSIGNAL, TYPE_NONE, ()), } def __init__(self, manager, editor): GObject.__init__(self) self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) from DatabaseUpdater import Updater Updater(self, editor) from CheckButton import Button Button(self, editor) from DatabaseListener import Listener Listener(self, editor) def __init_attributes(self, manager, editor): self.__editor = editor self.__gui = manager.gui return def __destroy(self): self.emit("destroy") self.__editor.disconnect_signal(self.__sigid1, self.__editor) del self self = None return False # Public API reference to the advanced configuration window GUI gui = property(lambda self: self.__gui) def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/DatabaseListener.py0000644000175000017500000000223611242100540032334 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) self.__update() def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from gio import File, FILE_MONITOR_NONE self.__monitor = File(self.__get_path()).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self self = None return False def __get_path(self): from os.path import join folder = join(self.__editor.metadata_folder, "PluginPreferences") return join(folder, "TemplateIndentation.gdb") def __update(self): from Metadata import get_value self.__manager.emit("get-data", get_value()) return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update, priority=9999) return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/TemplateIndentation/DatabaseUpdater.py0000644000175000017500000000151411242100540032151 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("set-data", self.__set_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self self = None return False def __set(self, indentation): from Metadata import set_value set_value(indentation) return False def __destroy_cb(self, *args): self.__destroy() return False def __set_cb(self, manager, indentation): from gobject import idle_add idle_add(self.__set, indentation, priority=9999) return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/Manager.py0000644000175000017500000000241311242100540024521 0ustar andreasandreasfrom gobject import SIGNAL_ACTION, SIGNAL_RUN_LAST, TYPE_NONE, GObject from gobject import SIGNAL_NO_RECURSE, TYPE_PYOBJECT SCRIBES_SIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "show-window": (SCRIBES_SIGNAL, TYPE_NONE, ()), "destroy": (SCRIBES_SIGNAL, TYPE_NONE, ()), "selected-placeholder": (SCRIBES_SIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from WidgetTransparencyCheckButton import Button Button(self, editor) from ForkScribesCheckButton import Button Button(self, editor) from BracketSelectionColorButton import ColorButton ColorButton(editor, self) from Window import Window Window(editor, self) from TemplateIndentation.Manager import Manager Manager(self, editor) def __init_attributes(self, editor): self.__editor = editor self.__glade = editor.get_glade_object(globals(), "AdvancedConfigurationWindow.glade", "Window") return def __destroy(self): self.emit("destroy") del self return # Public API reference to the advanced configuration window GUI gui = property(lambda self: self.__glade) def show(self): self.emit("show-window") return def destroy(self): self.__destroy() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/ForkScribesCheckButton.py0000644000175000017500000000263611242100540027524 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show-window", self.__activate_cb) self.__sigid1 = self.connect(self.__button, "toggled", self.__toggled_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("ForkScribesCheckButton") return def __update(self): from SCRIBES.ForkScribesMetadata import set_value set_value(self.__button.get_active()) return False def __reset(self): self.__button.handler_block(self.__sigid1) from SCRIBES.ForkScribesMetadata import get_value self.__button.set_active(get_value()) self.__button.handler_unblock(self.__sigid1) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __toggled_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__update, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/WidgetTransparencyCheckButton.py0000644000175000017500000000266311242100540031125 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Button(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "show-window", self.__activate_cb) self.__sigid1 = self.connect(self.__button, "toggled", self.__toggled_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("WidgetTransparencyCheckButton") return def __update(self): from SCRIBES.WidgetTransparencyMetadata import set_value set_value(self.__button.get_active()) return False def __reset(self): self.__button.handler_block(self.__sigid1) from SCRIBES.WidgetTransparencyMetadata import get_value self.__button.set_active(get_value()) self.__button.handler_unblock(self.__sigid1) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__reset) return False def __toggled_cb(self, *args): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__update, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/Window.py0000644000175000017500000000274611242100540024427 0ustar andreasandreasclass Window(object): def __init__(self, editor, manager): self.__init_attributes(editor, manager) self.__set_properties() self.__sigid1 = manager.connect("show-window", self.__show_window_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid4 = self.__window.connect("key-press-event", self.__key_press_event_cb) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_widget("Window") return def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __show(self): self.__window.show_all() return def __hide(self): self.__window.hide() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__window) self.__editor.disconnect_signal(self.__sigid4, self.__window) self.__window.hide() self.__window.destroy() del self self = None return def __show_window_cb(self, *args): self.__show() return False def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True def __delete_event_cb(self, *args): self.__hide() return True def __destroy_cb(self, *args): self.__destroy() return scribes-0.4~r910/GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade0000644000175000017500000002427611242100540031233 0ustar andreasandreas GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 Advanced Configuration ScribesAdvancedConfigurationWindow True center-on-parent 350 True scribes dialog True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Bracket Selection Color</b> True True False False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.85000002384185791 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 _Selection Color: True False False 0 True False True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True #000000000000 False False 1 False False 1 True 0 0 <b>Template Indentation</b> True True False False 2 True 0.81999999284744263 _Use indentation settings from editor True False False False True Convert spaces to tabs, or vice versa, before expanding templates in the editing area. The conversion is based on indentation settings from the editor. Enabling this option is highly recommended. True False True True False False 3 True 0 <b>Fork Scribes</b> True True False False 4 True 0.89999997615814209 _Fork scribes' process True True False Free Scribes from its parent process. Especially if you don't want Scribes blocking the terminal. True False True True False False 5 True 0 <b>Widget Transparency</b> True 6 True 0.87999999523162842 _Enable widget transparency True True False Enables widget transparency if your GTK+ theme supports it. True False True 7 scribes-0.4~r910/GenericPlugins/PluginCase.py0000644000175000017500000000102711242100540020744 0ustar andreasandreasname = "Case conversion Plugin" authors = ["Lateef Alabi-Oki "] version = 0.2 autoload = True class_name = "CasePlugin" short_description = "Case conversion operations." long_description = """This plug-in performs case conversion operations \ """ class CasePlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Case.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/SwitchCharacter/0000755000175000017500000000000011242100540021416 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/SwitchCharacter/__init__.py0000644000175000017500000000000011242100540023515 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/SwitchCharacter/Signals.py0000644000175000017500000000045611242100540023375 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "dummy-signal": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/GenericPlugins/SwitchCharacter/Trigger.py0000644000175000017500000000223411242100540023374 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "switch-character", "t", _("Switch Character"), _("Text Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/GenericPlugins/SwitchCharacter/Manager.py0000644000175000017500000000044511242100540023345 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Switcher import Switcher Switcher(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/GenericPlugins/SwitchCharacter/Switcher.py0000644000175000017500000000247611242100540023571 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Switcher(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __switch(self): try: start = self.__editor.cursor.copy() if start.starts_line() or start.ends_line(): raise ValueError self.__editor.freeze() start.backward_char() end = self.__editor.cursor.copy() textbuffer = self.__editor.textbuffer character = textbuffer.get_text(start, end) textbuffer.begin_user_action() textbuffer.delete(start, end) iterator = self.__editor.cursor.copy() iterator.forward_char() textbuffer.place_cursor(iterator) textbuffer.insert_at_cursor(character) textbuffer.end_user_action() self.__editor.thaw() self.__editor.update_message(_("Switched character"), "yes") except ValueError: self.__editor.update_message(_("Invalid operation"), "no") return False def __activate_cb(self, *args): self.__switch() return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/PluginDocumentSwitcher.py0000644000175000017500000000113411242100540023357 0ustar andreasandreasname = "Document Switcher" authors = ["Lateef Alabi-Oki "] version = 0.3 autoload = True class_name = "DocumentSwitcherPlugin" short_description = "Functions to switch between windows." long_description = """ (ctrl+PageUp) - focus next window (ctrl+PageDown) - focus previous window """ class DocumentSwitcherPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from DocumentSwitcher.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginFilterThroughCommand.py0000644000175000017500000000142311242100540024156 0ustar andreasandreasname = "FilterThroughCommand Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "FilterThroughCommandPlugin" short_description = "Use external programs to process current document" long_description = "Use external programs to transform the content of the current document. Press x to show the command interface. You can choose replace the current document with the transformation or have the transformation show in a new window." class FilterThroughCommandPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from FilterThroughCommand.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/DrawWhitespace/0000755000175000017500000000000011242100540021252 5ustar andreasandreasscribes-0.4~r910/GenericPlugins/DrawWhitespace/Metadata.py0000644000175000017500000000052711242100540023350 0ustar andreasandreasfrom SCRIBES.Utils import open_storage STORAGE_FILE = "ToggleDrawWhiteSpaces.dict" KEY = "toggle_white_spaces" def get_value(): try: value = False storage = open_storage(STORAGE_FILE) value = storage[KEY] except KeyError: pass return value def set_value(value): storage = open_storage(STORAGE_FILE) storage[KEY] = value return scribes-0.4~r910/GenericPlugins/DrawWhitespace/__init__.py0000644000175000017500000000000011242100540023351 0ustar andreasandreasscribes-0.4~r910/GenericPlugins/DrawWhitespace/WhitespaceDrawer.py0000644000175000017500000001055411242100540025072 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Drawer(SignalManager): def __init__(self, editor, manager): SignalManager.__init__(self) self.__init_attributes(editor, manager) self.__sigid1 = self.__textview.connect('event-after', self.__event_after_cb) self.__sigid2 = manager.connect("destroy", self.__destroy_cb) self.__sigid3 = manager.connect("color", self.__color_cb) self.__sigid4 = manager.connect("show-whitespaces", self.__show_cb) from gobject import idle_add, PRIORITY_LOW idle_add(self.__precompile_methods, priority=PRIORITY_LOW) def __init_attributes(self, editor, manager): self.__editor = editor self.__manager = manager self.__textview = editor.textview from gtk.gdk import color_parse self.__color = color_parse("orange") self.__show = False self.__blocked = False return def __draw_whitespaces(self, event, start, end): cr = event.window.cairo_create() cr.set_source_color(self.__color) cr.set_line_width(0.8) while start.compare(end) <= 0: c = start.get_char() if c == '\t': self.__draw_tab(cr, start) elif c == '\040': self.__draw_space(cr, start) elif c == '\302\240': self.__draw_nbsp(cr, start) if not start.forward_char(): break try: from cairo import Error cr.stroke() except Error: pass return False def __draw_tab(self, cr, iterator): rect = self.__textview.get_iter_location(iterator) from gtk import TEXT_WINDOW_TEXT x, y = self.__textview.buffer_to_window_coords(TEXT_WINDOW_TEXT, rect.x, rect.y + rect.height * 2 / 3) cr.save() cr.move_to(x + 4, y) cr.rel_line_to(rect.width - 8, 0) cr.rel_line_to(-3,-3) cr.rel_move_to(+3,+3) cr.rel_line_to(-3,+3) cr.restore() return False def __draw_space(self, cr, iterator): rect = self.__textview.get_iter_location(iterator) from gtk import TEXT_WINDOW_TEXT x, y = self.__textview.buffer_to_window_coords(TEXT_WINDOW_TEXT, rect.x + rect.width / 2, rect.y + rect.height * 2 / 3) cr.save() cr.move_to(x, y) from math import pi cr.arc(x, y, 0.8, 0, 2 * pi) cr.restore() return False def __draw_nbsp(self, cr, iterator): rect = self.__textview.get_iter_location(iterator) from gtk import TEXT_WINDOW_TEXT x, y = self.__textview.buffer_to_window_coords(TEXT_WINDOW_TEXT, rect.x, rect.y + rect.height / 2) cr.save() cr.move_to(x + 2, y - 2) cr.rel_line_to(+7,0) cr.rel_line_to(-3.5,+6.06) cr.rel_line_to(-3.5,-6.06) cr.restore() return False def __block_event_after_signal(self): if self.__blocked: return self.__textview.handler_block(self.__sigid1) self.__blocked = True return def __unblock_event_after_signal(self): if self.__blocked is False: return self.__textview.handler_unblock(self.__sigid1) self.__blocked = False return def __check_event_signal(self): if self.__show: self.__unblock_event_after_signal() else: self.__block_event_after_signal() self.__textview.queue_draw() return def __precompile_methods(self): methods = (self.__event_after_cb, self.__draw_whitespaces, self.__draw_tab, self.__draw_space) self.__editor.optimize(methods) return False def __event_after_cb(self, textview, event): if self.__show is False: return False from gtk.gdk import EXPOSE if event.type != EXPOSE: return False from gtk import TEXT_WINDOW_TEXT if event.window != textview.get_window(TEXT_WINDOW_TEXT): return False y = textview.window_to_buffer_coords(TEXT_WINDOW_TEXT, event.area.x, event.area.y)[1] start = textview.get_line_at_y(y)[0] end = textview.get_line_at_y(y + event.area.height)[0] end.forward_to_line_end() #from gobject import idle_add, PRIORITY_HIGH #idle_add(self.__draw_whitespaces, event, start, end, priority=PRIORITY_HIGH) self.__draw_whitespaces(event, start, end) return False def __destroy_cb(self, *args): self.__destroy() return False def __color_cb(self, manager, color): from gtk.gdk import color_parse self.__color = color_parse(color) return False def __show_cb(self, manager, show): self.__show = show self.__check_event_signal() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__textview) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) del self return scribes-0.4~r910/GenericPlugins/DrawWhitespace/DatabaseMonitor.py0000644000175000017500000000243711242100540024706 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.storage_folder, "ToggleDrawWhiteSpaces.dict") self.__monitor = editor.get_file_monitor(_file) return def __update(self): self.__manager.emit("database-updated") return False def __update_timeout(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__remove_timer() from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(250, self.__update_timeout, priority=PRIORITY_LOW) return False def __destroy_cb(self, *args): self.__monitor.cancel() self.disconnect() del self return False scribes-0.4~r910/GenericPlugins/DrawWhitespace/Trigger.py0000644000175000017500000000225411242100540023232 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor from Manager import Manager self.__manager = Manager(editor) name, shortcut, description, category = ( "show-white-spaces", "period", _("Show or hide white spaces"), _("Miscellaneous Operations") ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() self.__manager.destroy() del self return False def __activate_cb(self, *args): from Metadata import get_value, set_value value = False if get_value() else True set_value(value) if value: icon = "yes" message = "Showing whitespace" else: icon = "no" message = "Hiding whitespace" self.__editor.update_message(message, icon, 10) return scribes-0.4~r910/GenericPlugins/DrawWhitespace/DatabaseReader.py0000644000175000017500000000143011242100540024451 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.connect(manager, "database-updated", self.__updated_cb) self.__read() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __read(self): from Metadata import get_value self.__manager.emit("show-whitespaces", get_value()) return False def __destroy_cb(self, *args): self.disconnect() del self return False def __updated_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__read, priority=PRIORITY_LOW) return False scribes-0.4~r910/GenericPlugins/DrawWhitespace/Manager.py0000644000175000017500000000150211242100540023174 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import TYPE_PYOBJECT class Manager(GObject): __gsignals__ = { "destroy": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "color": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "show": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), "database-updated": (SIGNAL_RUN_LAST, TYPE_NONE, ()), "show-whitespaces": (SIGNAL_RUN_LAST, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from WhitespaceDrawer import Drawer Drawer(editor, self) from DatabaseReader import Reader Reader(self, editor) from DatabaseMonitor import Monitor Monitor(self, editor) def __init_attributes(self, editor): self.__editor = editor return def destroy(self): self.emit("destroy") del self return scribes-0.4~r910/GenericPlugins/PluginSwitchCharacter.py0000644000175000017500000000103711242100540023150 0ustar andreasandreasname = "Switch Character Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "SwitchCharacterPlugin" short_description = "Switch Character" long_description = "Move character before the cursor forward" class SwitchCharacterPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from SwitchCharacter.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/GenericPlugins/PluginPreferencesGUI.py0000644000175000017500000000111111242100540022671 0ustar andreasandreasname = "Preferences Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "PreferencesGUIPlugin" short_description = "GUI to customize the behavior of the editor." long_description = """Implements the GUI to customize the behavior of the editor""" class PreferencesGUIPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from PreferencesGUI.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/scribesmodule0000755000175000017500000002360611242100540016217 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- MODULE_DICTIONARY = { "trigger": "Trigger.py", "manager": "Manager.py", "signals": "Signals.py", "utils": "Utils.py", "exceptions": "Exceptions.py", "guimanager": "Manager.py", "metadata": "Metadata.py", "dbmon": "DatabaseMonitor.py", "module": None, "emodule": None, "all": None, } def main(): options = parse_command_line()[0] validate(options) create_files(options) return def validate(options): module_types = ("module", "emodule") if not (options.type in module_types): return if not options.name: fail("Error: Please provide a filename with -n option") return def create_files(options): option_type_handler(options) if options.type else option_name_handler(options) return def create_file(_file, content=""): try: with open(_file, "w") as f: f.write(content) except IOError: fail("Error: Failed to create %s" % _file) return def create_scribes_module(filename, content): if __exists(filename): fail("Error: %s already exists!" % filename) create_file(filename, content) return def option_type_handler(options): try: filename = MODULE_DICTIONARY[options.type] if not filename: raise ValueError content = MODULE_CONTENT_DICTIONARY[options.type] create_scribes_module(filename, content) except ValueError: option_type_all_handler() if options.type == "all" else option_type_module_handler(options) except KeyError: fail("Error: Wrong type option - %s" % options.type) return def option_type_all_handler(): fail("Error: all option has not been implemented") return def option_type_module_handler(options): create_module(options.name, options.type) return def option_name_handler(options): create_module(options.name, "module") return def create_module(name, content_type): content = MODULE_CONTENT_DICTIONARY[content_type] create_scribes_module(append_extension(name), content) return def append_extension(filename): if filename.endswith(".py"): return filename return "%s%s" % (filename, ".py") def __exists(_file): from os.path import exists return exists(_file) def fail(message): print message raise SystemExit def parse_command_line(): # options.name, options.type from optparse import OptionParser usage = USAGE parser = OptionParser(usage=usage) parser.add_option("-n", "--name", dest="name", help="Creates a scribes template module with signal connectors and destructors", ) parser.add_option("-t", "--type", dest="type", help="The type of module to create. [signals, manager, trigger, utils, exceptions, module, emodule, all]", ) return parser.parse_args() USAGE ="""%prog -t option [-n filename] Examples: scribesmodule -n Foo.py # Creates Foo.py template with manager signal connectors scribesmodule -t signals # Creates Signals.py template scribesmodule -t manager # Creates Manager.py template scribesmodule -t guimanager # Creates Manager.py template with "gui" attribute scribesmodule -t trigger # Creates Trigger.py template scribesmodule -t utils # Creates Utils.py template scribesmodule -t exceptions # Creates Exceptions.py template scribesmodule -t metadata # Creates Metadata.py template scribesmodule -t dbmon # Creates DatabaseMonitor.py template scribesmodule -t module -n Foo.py # Creates Foo.py template with manager signal connectors scribesmodule -t emodule -n Foo.py # Creates Foo.py template with editor signal connectors """ TRIGGER_MODULE_SOURCE_CODE = """from SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "activate-scribes-foo", #FIXME: Update this! "c", #FIXME: Update this! _("Activate Scribes Foo"), #FIXME: Update this! _("Miscellaneous Operations") #FIXME: Update this! ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False """ MANAGER_MODULE_SOURCE_CODE = """from Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from FooFighter import Fighter Fighter(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False """ GUI_MANAGER_MODULE_SOURCE_CODE = """from Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) self.__init_attributes(editor) from FooFighter import Fighter Fighter(self, editor) def __init_attributes(self, editor): from os.path import join self.__gui = editor.get_gui_object(globals(), join("GUI", "GUI.glade")) return gui = property(lambda self: self.__gui) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False """ EXCEPTIONS_MODULE_SOURCE_CODE = """# Custom exceptions belong in this module. class ScribesError(Exception): pass """ UTILS_MODULE_SOURCE_CODE = """# Utility functions shared among modules belong here. def answer_to_life(): return 42 """ SIGNALS_MODULE_SOURCE_CODE = """from SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) """ PLUGIN_LOADER_SOURCE_CODE = """name = "Scribes Plugin" authors = ["Your Name "] version = 0.1 autoload = True class_name = "ScribesPlugin" short_description = "A short description" long_description = "A long description" class ScribesPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Foo.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return """ SCRIBES_MODULE = """from SCRIBES.SignalConnectionManager import SignalManager class Implementer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __activate(self): return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False def __destroy_cb(self, *args): self.disconnect() del self return False """ SCRIBES_EDITOR_MODULE = """from SCRIBES.SignalConnectionManager import SignalManager class Implementer(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(manager, "quit", self.__destroy_cb) def __init_attributes(self, editor): self.__editor = editor return def __destroy_cb(self, *args): self.disconnect() del self return False """ METADATA_MODULE_SOURCE_CODE = """from SCRIBES.Utils import open_database from os.path import join basepath = join("PluginPreferences", "MyConfig.gdb") def get_value(): try: value = True database = open_database(basepath, "r") value = database["storage_value"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["storage_value"] = value finally: database.close() return """ DBMON_MODULE_SOURCE_CODE = """from SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(manager, "destroy", self.__destroy_cb) self.__monitor.connect("changed", self.__update_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join _file = join(editor.metadata_folder, "PluginPreferences", "MyConfig.gdb") self.__monitor = editor.get_file_monitor(_file) return def __destroy(self): self.__monitor.cancel() self.disconnect() del self return def __update(self): self.__manager.emit("database-update") return False def __update_timeout(self): from gobject import idle_add self.__timer = idle_add(self.__update, priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False try: from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(250, self.__update_timeout, priority=9999) return False """ MODULE_CONTENT_DICTIONARY = { "trigger": TRIGGER_MODULE_SOURCE_CODE, "metadata": METADATA_MODULE_SOURCE_CODE, "dbmon": DBMON_MODULE_SOURCE_CODE, "manager": MANAGER_MODULE_SOURCE_CODE, "signals": SIGNALS_MODULE_SOURCE_CODE, "utils": UTILS_MODULE_SOURCE_CODE, "exceptions": EXCEPTIONS_MODULE_SOURCE_CODE, "guimanager": GUI_MANAGER_MODULE_SOURCE_CODE, "module": SCRIBES_MODULE, "emodule": SCRIBES_EDITOR_MODULE, } if __name__ == "__main__": main() scribes-0.4~r910/intltool-update0000644000175000017500000007442411242100540016504 0ustar andreasandreas#!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.37.1"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+|". # GOK specific. "policy(?:\\.in)+"; # PolicyKit files my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "service(?:\\.in)+"; # DBus specific my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = $ENV{"srcdir"} || "."; my $POTFILES_in; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; my $PKGNAME = FindPackageName (); # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown"; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted, @buf_potfiles_ignore_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, "$SRCDIR/.." if "$SRCDIR" ne "."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s "$SRCDIR/$ignore") or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\w\.GetString *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } ## C_ N_ Q_ and _ are the macros defined in gi8n.h if (/[CNQ]?_ *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } foreach (@buf_potfiles_ignore_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { my $dummy = $_; my $srcdir = $SRCDIR; $srcdir =~ s#^../##; $dummy =~ s#^$srcdir/../##; $dummy =~ s#^$srcdir/##; $dummy =~ s#_build/##; if (!exists($in2{$dummy})) { push @result, $dummy } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file --version >$devnull") == 0)); return 0; } sub isGNUGettextTool { my ($file) = @_; # Check that we are using GNU gettext tools if (isProgramInPath ($file)) { my $version = `$file --version`; return 1 if ($version =~ m/.*\(GNU .*\).*/); } return 0; } sub GenerateHeaders { my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! isProgramInPath ("$EXTRACT")) { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! isGNUGettextTool ("$XGETTEXT")) { print STDERR " *** GNU xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { print OUTFILE "$SRCDIR/../$_\n"; $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=.", "--default-domain\=$MODULE", "--flag\=g_strdup_printf:1:c-format", "--flag\=g_string_printf:2:c-format", "--flag\=g_string_append_printf:2:c-format", "--flag\=g_error_new:3:c-format", "--flag\=g_set_error:4:c-format", "--flag\=g_markup_printf_escaped:1:c-format", "--flag\=g_log:3:c-format", "--flag\=g_print:1:c-format", "--flag\=g_printerr:1:c-format", "--flag\=g_printf:1:c-format", "--flag\=g_fprintf:2:c-format", "--flag\=g_sprintf:2:c-format", "--flag\=g_snprintf:3:c-format", "--flag\=g_scanner_error:2:c-format", "--flag\=g_scanner_warn:2:c-format", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge"; my ($lang, $outfile) = @_; if (! isGNUGettextTool ("$MSGMERGE")) { print STDERR " *** GNU msgmerge is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } &GatherPOFiles; foreach my $lang (@languages) { print STDERR "$lang: "; &POFile_Update ($lang, ""); } print STDERR "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print STDERR "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = ""; # Ignore recursive definitions of variables $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "$SRCDIR/../configure.ac") { $conf_in = "$SRCDIR/../configure.ac"; } elsif (-f "$SRCDIR/../configure.in") { $conf_in = "$SRCDIR/../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } # unwrap lines split with a trailing \ $make_source =~ s/\\ $ \n/ /mxg; $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } sub FindMakevarsBugAddress { my $address = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; $address =~ s/^\s+//; $address =~ s/\s+$//; return $address; } scribes-0.4~r910/mkinstalldirs0000755000175000017500000000672211242100540016237 0ustar andreasandreas#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: scribes-0.4~r910/py-compile0000755000175000017500000001013511242100540015426 0ustar andreasandreas#!/bin/sh # py-compile - Compile a Python program scriptversion=2009-04-28.21; # UTC # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software # Foundation, Inc. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= destdir= files= while test $# -ne 0; do case "$1" in --basedir) basedir=$2 if test -z "$basedir"; then echo "$0: Missing argument to --basedir." 1>&2 exit 1 fi shift ;; --destdir) destdir=$2 if test -z "$destdir"; then echo "$0: Missing argument to --destdir." 1>&2 exit 1 fi shift ;; -h|--h*) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--v*) echo "py-compile $scriptversion" exit $? ;; *) files="$files $1" ;; esac shift done if test -z "$files"; then echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, py_compile files = '''$files''' sys.stdout.write('Byte-compiling python modules...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, py_compile files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: scribes-0.4~r910/intltool-update.in0000644000175000017500000000000011242100540017064 0ustar andreasandreasscribes-0.4~r910/xmldocs.make0000644000175000017500000000615411242100540015740 0ustar andreasandreas# # No modifications of this Makefile should be necessary. # # To use this template: # 1) Define: figdir, docname, lang, omffile, and entities in # your Makefile.am file for each document directory, # although figdir, omffile, and entities may be empty # 2) Make sure the Makefile in (1) also includes # "include $(top_srcdir)/xmldocs.make" and # "dist-hook: app-dist-hook". # 3) Optionally define 'entities' to hold xml entities which # you would also like installed # 4) Figures must go under $(figdir)/ and be in PNG format # 5) You should only have one document per directory # 6) Note that the figure directory, $(figdir)/, should not have its # own Makefile since this Makefile installs those figures. # # example Makefile.am: # figdir = figures # docname = scrollkeeper-manual # lang = C # omffile=scrollkeeper-manual-C.omf # entities = fdl.xml # include $(top_srcdir)/xmldocs.make # dist-hook: app-dist-hook # # About this file: # This file was taken from scrollkeeper_example2, a package illustrating # how to install documentation and OMF files for use with ScrollKeeper # 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.2 (last updated: March 20, 2002) # # ********** Begin of section some packagers may need to modify ********** # This variable (docdir) specifies where the documents should be installed. # This default value should work for most packages. docdir = $(datadir)/gnome/help/$(docname)/$(lang) # ********** You should not have to edit below this line ********** xml_files = $(entities) $(docname).xml EXTRA_DIST = $(xml_files) $(omffile) CLEANFILES = omf_timestamp include $(top_srcdir)/omf.make all: omf $(docname).xml: $(entities) -ourdir=`pwd`; \ cd $(srcdir); \ cp $(entities) $$ourdir app-dist-hook: if test "$(figdir)"; then \ $(mkinstalldirs) $(distdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ done \ fi install-data-local: omf $(mkinstalldirs) $(DESTDIR)$(docdir) for file in $(xml_files); do \ cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ done if test "$(figdir)"; then \ $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done \ fi install-data-hook: install-data-hook-omf uninstall-local: uninstall-local-doc uninstall-local-omf uninstall-local-doc: -if test "$(figdir)"; then \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done; \ rmdir $(DESTDIR)$(docdir)/$(figdir); \ fi -for file in $(xml_files); do \ rm -f $(DESTDIR)$(docdir)/$$file; \ done -rmdir $(DESTDIR)$(docdir) clean-local: clean-local-doc clean-local-omf # for non-srcdir builds, remove the copied entities. clean-local-doc: if test $(srcdir) != .; then \ rm -f $(entities); \ fi scribes-0.4~r910/help/0000755000175000017500000000000011242100540014352 5ustar andreasandreasscribes-0.4~r910/help/Makefile.in0000644000175000017500000007532211242100540016430 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # gnome-doc-utils.make - make magic for building documentation # Copyright (C) 2004-2005 Shaun McCance # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ################################################################################ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/gnome-doc-utils.make subdir = help ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ $(filter $(LINGUAS),$(DOC_LINGUAS)), \ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ _xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ db2omf_args = \ --stringparam db2omf.basename $(DOC_MODULE) \ --stringparam db2omf.format $(3) \ --stringparam db2omf.dtd \ $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ --stringparam db2omf.omf_dir "$(OMF_DIR)" \ --stringparam db2omf.help_dir "$(HELP_DIR)" \ --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ $(if $(_ENABLE_SK), \ --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ $(_db2omf) $(2) _DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) _DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) _DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) # FIXME _DOC_OMF_ALL = \ $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) _DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) # FIXME: probably have to shell escape to determine the file names _DOC_C_HTML = $(foreach f, \ $(shell xsltproc --xinclude \ --stringparam db.chunk.basename "$(DOC_MODULE)" \ $(_chunks) "C/$(DOC_MODULE).xml"), \ C/$(f).xhtml) ############################################################################### _DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) _DOC_LC_PAGES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ $(lc)/$(notdir $(page)) )) _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) # FIXME: probably have to shell escape to determine the file names _DOC_LC_HTML = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) _DOC_SRC_FIGURES = \ $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) _DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot) ################################################################################ _DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ $(_DOC_C_HTML) $(_DOC_LC_HTML)) _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) _clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) _doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) DOC_MODULE = scribes DOC_ENTITIES = DOC_INCLUDES = legal.xml DOC_FIGURES = \ figures/scribes_add_dialog.png \ figures/scribes_completion.png \ figures/scribes_template_editor.png \ figures/scribes_document_switcher.png \ figures/scribes_test_template.png \ figures/scribes_toolbar.png \ figures/scribes_placeholder.png \ figures/scribes_window.png \ figures/scribes_popup_menu.png DOC_LINGUAS = all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gnome-doc-utils.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu help/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu help/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-local pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ dist-hook distclean distclean-generic distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-local pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local DOC_H_FILE ?= DOC_H_DOCS ?= $(DOC_H_FILE): $(DOC_H_DOCS); @rm -f $@.tmp; touch $@.tmp; echo 'const gchar* documentation_credits[] = {' >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ xsltproc --path "$$xmlpath" $(_credits) $$doc; \ done | sort | uniq \ | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp echo ' NULL' >> $@.tmp echo '};' >> $@.tmp echo >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ echo $$xmlpath; \ ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ for id in $$ids; do \ echo '#define HELP_'`echo $$docid`'_'`echo $$id \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ done; \ echo >> $@.tmp; \ done; cp $@.tmp $@ && rm -f $@.tmp dist-check-gdu: @HAVE_GNOME_DOC_UTILS_FALSE@ @echo "*** GNOME Doc Utils must be installed in order to make dist" @HAVE_GNOME_DOC_UTILS_FALSE@ @false .PHONY: dist-doc-header dist-doc-header: $(DOC_H_FILE) @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) .PHONY: clean-doc-header clean-local: $(_clean_doc_header) distclean-local: $(_clean_doc_header) mostlyclean-local: $(_clean_doc_header) maintainer-clean-local: $(_clean_doc_header) clean-doc-header: rm -f $(DOC_H_FILE) all: $(DOC_H_FILE) ################################################################################ DOC_MODULE ?= DOC_ID ?= DOC_PAGES ?= DOC_ENTITIES ?= DOC_INCLUDES ?= DOC_FIGURES ?= DOC_FORMATS ?= docbook DOC_LINGUAS ?= ################################################################################ _xml2po ?= `which xml2po` _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` _malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl @ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` @ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` @ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml $(_DOC_OMF_DB) : $(_DOC_OMF_IN) $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist." >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } $(_DOC_OMF_HTML) : $(_DOC_OMF_IN) $(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml @ENABLE_SK_TRUE@ @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ @ENABLE_SK_TRUE@ echo "The file '$(_skcontentslist)' does not exist" >&2; \ @ENABLE_SK_TRUE@ echo "Please check your ScrollKeeper installation." >&2; \ @ENABLE_SK_TRUE@ exit 1; } xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } .PHONY: omf omf: $(_DOC_OMF_ALL) .PHONY: po po: $(_DOC_POFILES) .PHONY: mo mo: $(_DOC_MOFILES) $(_DOC_POFILES): @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi @if test ! -f $@ -a -f $(srcdir)/$@; then \ echo "cp $(srcdir)/$@ $@"; \ cp "$(srcdir)/$@" "$@"; \ fi; @docs=; \ list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi $(_DOC_MOFILES): %.mo: %.po @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi msgfmt -o $@ $< # FIXME: fix the dependancy # FIXME: hook xml2po up $(_DOC_LC_DOCS) : $(_DOC_MOFILES) $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \ if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) ################################################################################ all: \ $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) ################################################################################ .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) clean-doc-lc: rm -f $(_DOC_LC_DOCS) rm -f $(_DOC_MOFILES) @list='$(_DOC_POFILES)'; for po in $$list; do \ if ! test "$$po" -ef "$(srcdir)/$$po"; then \ echo "rm -f $$po"; \ rm -f "$$po"; \ fi; \ done # .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc/.xml2po.mo"; then \ echo "rm -f $$lc/.xml2po.mo"; \ rm -f "$$lc/.xml2po.mo"; \ fi; \ done clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ echo "rmdir $$dir"; \ rmdir "$$dir"; \ fi; \ done; \ done clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) distclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) mostlyclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) maintainer-clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) ################################################################################ .PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk doc-dist-hook: \ $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) @for lc in C $(_DOC_REAL_LINGUAS); do \ echo " $(mkinstalldirs) $(distdir)/$$lc"; \ $(mkinstalldirs) "$(distdir)/$$lc"; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done dist-doc-figs: $(_DOC_SRC_FIGURES) @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ for fig in $$list; do \ if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$fig"; then \ figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$figdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ $(mkinstalldirs) "$(distdir)/$$figdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ fi; \ done; dist-doc-omf: @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" dist-doc-dsk: @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" ################################################################################ .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ for page in $(DOC_PAGES); do \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ done; \ done check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done ################################################################################ .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk install-data-local: \ $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) # $(if $(_DOC_DSK_IN),install-doc-dsk) install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ else \ figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ if $$figsymlink; then \ echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ else \ echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ fi; \ done; \ done install-doc-html: echo install-html install-doc-omf: $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk ################################################################################ .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) # $(if $(_DOC_DSK_IN),uninstall-doc-dsk) uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/help/C/0000755000175000017500000000000011242100540014534 5ustar andreasandreasscribes-0.4~r910/help/C/figures/0000755000175000017500000000000011242100540016200 5ustar andreasandreasscribes-0.4~r910/help/C/figures/scribes_template_editor.png0000644000175000017500000030312511242100540023605 0ustar andreasandreas‰PNG  IHDR:µ › sBIT|dˆtEXtCREATORgnome-panel-screenshot—7w IDATxœìÝw|åøñÏlUï]²äÞ{‘+îf¡8L‰R€#É]á’ü®ä’pÇ+ä’@HBMà6ØÆ¶Üåªb¹7l«÷¾}æ÷ÇZk­´’ve5ìï;¯ ÖìÌó<3»;³ß}žç; „B!„B!„B!„B!„B!„B!„¸J7×ïê¿B!„Bq­4?ÿÛŽ?‰'ˆY±zž+ð¶ !„B!Dà6­ß~åŸ*î ¦í[Ð&èé*ÐQV¬ž§ö\S…B!„"p›ÖïŽÁà¸Úü×WÐÓi ãä<ðý¥½Ñ^!„B!„èЛÿó…çß›ÖïNÂà¸g«»ðîéé0Ðñ9Oüt ÑñÔÔWô|«5 }M††*\Æ`œ1‰`E¦ú!„B!Ü>À¾MçØ´~÷ ÜAŽpp5àqÒªwÇÐAYžH#:"žÊšÒN+Ö4 %ÐàDÓ0cð‘I5×QZªãË!³±d.‚  ÀÊB!„âרÐÌå‹eØ­ö-×h4’ž@Tt¸Ïç'…—ÊpÚ$§ÅÒ­z¬E—+ÔôD‚‚Lžç† ê t€`ÜŽwÜÒòh¶¦š¯èÄÓ›óÀ÷—é³!.‡BlD a¡‘ i4[›¨®/£ë™?ª†ùÒi†ÚHZdµÅ.ªªÍuvN.¾÷ë`!„B!ÀÒleÿÎãŒ5°Ðˆ-Ûj³wìSf'"2Ìë9»ÍνÇ7'Åé GÉœ;ލßAQGšš,dïÌgPâ4 ¨ì,3çO 44سÎ{ol¦ª¬€Mëwl€½Õ£%øqjG=:.Õw.‚ÆZqicIˆMÆ`0àTTÕsüœúºŽ T5‚.dÈ…,R£›©»ì ¢&„HƒƒØ¹••Ó‡úwD„B!„”U’‘:’GîN×£ekšÆÛï¹t1ŸQã¯öÖ8Ní=Fjü¾½ö)Ì&3›¶}Ì'[þFæM㉌ ë¤Ô«,Í6²wä1kÊbî¹ã!à­÷_%{×næ,˜ŒÉlôµYW»WZ’´NP€¯@Ç«?FuùtŒÁ*ùgv2Ò’Ijr:ƒŒ”ÑD†Å²9ûmÌ¡>6Ò4‚.ŸaØ—Û^OS¡…¢ê(âMVâ"š)sšQb:¬S!„BÑžÝf'ÒÔãAN‹  `l6‡×÷ôŠ’ÌJ$ßzð vù_¹äŽ?›ésÆÝy°ÓÜdåàžfNYÌš»E¯×pÿÝë¨z¥’‹¥ –ê³IWþÛ6Èiy(]öè¨ôèèàRë9Y¸›¦æI Í…Óé$&:É#sôâtºÖ1“†¹ä#Ï|NZ´…¦B _VF“d!&¬‰J%„ÜÁ‹Pã“ ƒ:…B!„íiZ‡÷ͼf-sñ5MóŠ TÕ…^o@¯Ó{–ét:V,Z…¦ª|úÅß™’9ªÃ`ÇÒdåPöqfMYÂ}w>ì rtŠ‚Á Ç¦jÅ#Ax8-É tW®.{t\]ô®8Ôf*ª‹IO@]]©‰éì͵ue‘¦\r±'>&-ÞI]¡ƒ¢ê(’ƒ,D‡4PfŠáHÂ,#'£×麬SqcÉÞ}¸ÛÛΚ7­[Òû|íkll4#Æ\Û^Õ¥RRT€¢SHIK¼¦ò|éÎëÔÙëS]YËé“çü*§í1ê‹ýBˆDU{/Ði¡iš×÷ôȘÎ>Îï½ÂÃk¾‡Ñèb¦ÓéX±xo~‡©3Çé=ÜËj±qxßqfO]Ê=w¬Å`0xêÐ46¾Ëé/2}ö¸Žb3ÞAŽÐ_y(Ü££)¸ì èUô-[jzÂC£p¹\(Š‚ÓéD¯(ÂPU+h!%{ö3ÒâÔ–8©¨ !Þd%&¬‰2c GâfÒ4bz½®Ã$!ÄíÅ}/àmžüù=_ÉsJë}Í=žÍ›¼ÔíýÐTò²* /£Óë™?s%[wLRJ|O5×K ¯SW¯O}}“ÇÍâÑû~äµMÛzZ£¾Þ_!„(ú Îi×££×ë˜8m$¹²yí]¼‚½ÞàÆöÑgo2%s´'ر4[ÉÙ’ÙÓ–rß{9ª¦òцwÙºû¦ÌÉlèèZaÄÜZ=ô\íÑñgŽŽëꪉøÐ¡DÇDRT~ºæRbCÒIM‚Ó餶¶–ÈÈHL&¡Á‘49 -:ÃèÂÝ¤ÅØ©-vRQL¤ÁN\„…JB87“¦á“Ð믺„¢'\ç§ÓÙíý¸pî2µ5õÌž¾„ î&2<š­»?0Ç¥³vX-Vˆö¯—Ë}Œúþ !DoQÎ^¯CsiíΧF£žI3F‘{Ðì—ú:Ÿê :ÆONþ‘lÞü;¬]ó]LFÓ•íV,ZšÆÇ›ÞA§S˜;c9÷ܱÖ+ÈQ5Õäìù”ñS‡a 2uuîö4Wº6Ëͺ¦q¹ä4 Qƒˆ‰ŽgPÒH4Õ½ùùù\¾|§ÓÉÊ•+ž1– ¸bª*i.²p©*†D³…¸ð&*U3ÙÉóh2¢“,kBˆ.µ Yjñèš1y쬟o¡ºTjkê)+©Àf³Ñz®¦‚‚Éh$.1–ØøhòŽoW†^¯w‹º²±èô:BCBi¶Xp¶úM¯Sˆ&9%‘¼œíÊÒéuh.ÕsG3¢Fê dŒÆŽ{R]*N§‹ÒârjkêQ].ÚŽRÐéuDFE’š€Á`ðì‹ÉdnW^ÎÁ&M Ð1òWîñlþòî󮣺T\.¥%ÔTÕ¶‡­@šïíþýÅðúÛl6yöÉŸý­¯o¤´¤K³{ˆµ§FE!(ÈLbr‘QîûPøzO´¾-¢@|B,É©2HÑô:Z›+ƒÍf¥¢ª¬[åÅDÅru^;››ÖqFfƒžq“†’“»í•G¾ñ†+s]ôz=+–¬FÑ騩©äž;Âh¸š2ZÓ4>Úð[w}¸ÉC 6û(=¾ŽM«!kÿ'¤'Ž!51ƒ   4MeìØ1ÔÖÖ0iÒ$Bë/b-ÞGhÑA¥vJ¢I ¶ZO™!š½13i6^zr„~?y´×ßÇóNûµž¦ÁÅ EÔÖÔ1uÂ\æL[JZò‚ÌÁXmJ+.s0o'ûo¥¾®žô¡ƒïù'ÎæòÉ–·¹eñ½ MC9˜º†öÚÂæpÓ̕ܔ¹‚¸èDš,ìÏÉbÃÖwQ}»²rgs '‹eóï"-i0§ãgrY¿é¯œ=uᣇtx ìgO]Àl aõò5l"±Ñ  &N;µõÕœ:›ÇçYïsúäF\)Ëל™–eOþüœ.•¢K%£@‚P0µº³u “ÉHhXv‡ƒó§¿D§˜XµìA&Idx M–NžÍ¥¸ì’ÏRÛ×7þïE¿ö×¥ª”—SY^͸‘S¹)si#2‡`±6q©ø{}Aþ‰ÄÄE{’´­¯°ø‹çÞŽÁ`d×þMdøH®gBˆþ¥­ÍyèüÅ3üæÅÆ` ,å´Ýæä±‡~ÈÜ™‹<Ë\W~`ëì\§7ºƒÜÜlþ÷-…ïûAfwh½NÏÍKîðZ¿õpµ-;×3~ê0ÌÁ]öä´hØ´Óu2‚6Ñ”^§ …X8uùu¤'BÕTjë+˜8e‰Ñ‘Ôýu-ÉA—qX‚°iA¤˜0è¬\4%’6ºô1èQ¤'GÑ£ÚžSjªë¨«­ç»o7”)$8”¡é£š>šñ£¦ó§·CUEu»2S3øá·~‰¡Õ/OÑ‘±Üºd “ÇÍ"5i°gyDXËnº›ÝÂÖÝëÛ•5,c “ÆÌô¤é4MLŸ8Œ´á<÷û¢¢´ªÃ}«,«Æ 3óÃoýq1Þ=&£™„Ødb“;r*¿ùý?úÜ_ª+k>F1±Q~•—²›Vwøü–]á´ÙÑ)&~øí_’wõ> aQdN^èW=.§spjªë¨,¯æÎ•±hÎm^Ï……F0vÄÆŽ˜Âùû'"(¨}ïÐðŒ±^½‰'Îæº‡]È5MÑ4—ïl!!ALœ>< ²Žç_ð.ûJÏ·?ç:½^Çè ƒÉ;šòww°cöÑÓîôÔm|‡/vÊè‰C0™Œ=z.íÖ}ttz…ˆX#uöKœ8× ŠJUã%Œú â"R‰MXŒ£v/æºK„è,W9©nФbÊdªF'ÙÕ„½ íy¥²¬šYS{}ÿxó›)ØËÄ1™ÜuóÃŒ9•¹Ó—±/g[»2#£QU•ⲋ$Æ¥yåøOMŒÕf¡¾±–„ØdÏò™“²yçíÊ ¤¸ì"g/gú¤› vßW >&‰³oñµpØÌË\îä\*:ËùK§HNĨaˆN`æ”EìÏÝ À»>bâ˜LâR<Û}±ë£k:FQѶ³µä„tn_öŸß²ë#jkë¹uÉý^AŽÅÚÌ¡¼ÄÅ&1fød¿êj½oíoEYSÇÏñ rì‡òvÉ„Ñ3˜7c9_^>MÎñ½íê ÀbmâPÞ.L¦ NŸ?Jú๮ !úUÛakþ>çKÛî£ÓƒAψ±ƒ8rlÚ»ß|àÉv72u§þ~̨ñé{ü<ÚõеN¢*EÍ=î/2&E§PÕp‘ÐŒé&Ž&¼öL0Ÿ§ðB"ŧ\„ªU„Ç4ÒÐÐ!„èZÛó•Ãå`îô¥ž¿KÊ/ñÅ•`"kß2'/ -Ù=Ä+sòvÜä³Ü×ßÿor ö¶KuÜliâ—/ý u<|ï˜:~1Q øº¦457ðÛ?ý36»•cgŽðÝŸõ<7eÜl6ïhµvú|ûä"¢ 2³~󛨪‹ÄøTž}âÏziÃÙ}`ѱQ|üÅ[ÄÅ&y}ñÿxË[EMumÀǨ'ïuær©L“éµì¯ïÿ7ÇNçÜ÷C¦Œ›íWY~íoUógÝìµÝ›üŽÜcÙ<øµ'˜1i>7e®à@ÞŸu½¿á/ÌÛ‰Éd$"2 sPÜNѯ:ºŽ†ðù©£›¶½NgœN.—JHp¨'PjMQBCÂÐT ‡Ý…ÉÜóçÐnõè´f ¾Úp‡ÝEFâ% g׿D^Ö¢”€>Qãâ©ËD4Z‰\1…Ú!Ѩz‰v„=§ÝùJs÷*´HNHïð>/Iñi>ƒ€£'BIùe¯å—ŠÏÑÐX‡A¯çrñ9O Óº×§µ‹…g°Ù­$$ÆsöÂ1¯çâ[õùb 2q¹ø, Ï’˜Îà´‘Ü{Û:IJbº×ºƒMÓˆ‰¢®ºÞgy©ƒ’¨©ª øùû‹[Iù%åíêr½˜È8¯¿O_( 19žêÊj Nò;Ðñw[·ÇOçŸKmu='Ïæy”ÄŒßÇÏä—ãIX ½9BˆþÖQpÈy»«²üíѱÙìœ;YÄüÌ•Ü{çC>€å‹nGU]¬ßôCF$P;»âÇÿÆ=k.…´˜q JÅÖÐbê©<‘¬íãì.F$$b29[\DØ{{‰^:™šq 8ͽ—Oqcñu¾j}rµÚ,TT•øÜVÓ4wú,'w§ÓATth»/½.—EE§óµYû:®VFÛý:¥ó‰¢Õ•µ¤$æ¡»ÿÄø«Ã¼š-M)Øë ²Zó•™ÍÓv§ËÓ„@‘¿×…²Êb¶ìZÁG69£Ñp¥‡¥¶ýUÓÐTç•¶ù?Ößým»’††¦j i^ÇBí ¿µÝa£©¹Ø„T¹?bÀh›ˆ Õ3Ÿ«Úœ—ÝçiMíº,»ÍɹS…ÌŸ¹’{îXÛ.»š¦ižal:Ž‹WðáÆ·22™Pßóyºãš†®û8è03†Øð4vìÞŒTCh¸-,ŽZ×DNl+@_VNz|<ŽÓ……˜?=@|ÃD*§¦b é²BъﯳíÎW ”Vz~Áo¶4ò_/?íùb‚Õfñü­×ëqupW5÷ÝÈ|5EQüû<8mfs0ååUŒ:Î빚ºÊN¶Ôp:<øµÇ=ANcS=¯½÷g¿<†Éhö踇(´¿øéõz /lîæ1 ä—A §ÃÑn©ÓáÀÒlq×_YȠ䡞çF ›DÁ©CŒáïÿ÷·¨ì"Cô²»oý&1QñÜ{Û·8|t7#†Œgå»QU•†¦Z²ömàpAuu >Ëv÷fø®×ŸÞ€Ðp~ø­çôù¦N˜ëõ\Á©Ãèt'jIˆ½:浪¦œ3 ÐétܲxMû6qåxèš,^Ï=x×XmÞýøeôúÀ‘¿C &Õá08p§{Ö+zrŽîõ tÖÞý$óvϸ‘Sýª ?÷×`0°kÿg^΃_{‚ƒy;‰ ö$#عÿs FN‡÷ÝÆ[‚>®&„H:K8ðе6eù“ŒÀnsré|)ógÝÌ}w>ì5ŒÛBú6e­G§s—ÿà½ß&È \éÙY´MÕøèówHˈí‘`'àôÒÞÏÁ¤±Ä„¥rôÄaêŇéÛmcKùüÑ(;O¡–—‘˜ˆ>=c……”ìÉ'©ÑŠaæP*ą̃:‰v„ë(°h{î e÷ÁÍî”ÁW¾0ϱŒ¹3–yÖÑëõ44Ö±çÐVÌ¦Ž‡I©ªÚA—N' ò!9!ÝkN ¸ƒ–Í;? (ØLs“¥ÃâŸÉeÂèé€;áÀüäÏôÌæ`œN‡'¶AoMÃåT1ôœýò8óf,÷”7uÂ\TÕÅß>y…ЀQO¦þ fÇþϘ1y¾ç¸™ƒ¹)suõÕDFÄtYަ¹_ÿ®ö74,”Cù»2h7Í\ €Ùäµ>ÀÎìÏ8|t7Ñ1‘ÔT×ù¬SÒI !:ãtºh¨oÆégú{ ""‚Ѽ/J ]ëNú{ß—5¥Ã²v'—Η±`ö-ÜsÇZ ƒ§nwvµwÙ¼c=ƒÇ¡×ë9œïž¿ùðšïa4º¯]­‡±}°ñM Ž'(¸ý}Øð C=Ë*C“¦;”ýGvÑà("(LïÓìãà(Câ(uº`ïÔÒ¥¤¢4ˆ¼ÂË\·k=t+÷x6y÷yï0›M„……¢Óé|Öo6› ¥±¡ ›Õî5¤@A¹r7lï_˜t:1±Ñ476c±ZÛLúWÐëõDEG ÓÐ1êHGÇ®3ñ ±¨ªFccv›Ý«Š¢tœE¨ ³ÙLDdšæÏþ*Ømvšš,¸œ®vC4 !¡Á˜¯9¾öK§Óðþ !n –f;Mµ.þßKTdÏž+ªk*ùůŸ":1“ùêDÿªò:FÁcýÀ³¬©¹‘K…ü>—¶–š<ˆÈˆ«m_ÿÙ»|±ç#“¯.s¹TŠ/V1ßÇœœ–ájŸoûˆÔŒXŒ&ïï÷.§JÑ¥ fL^à5Œ­eû϶~Äß"5=㕤6'^¢ªÌ=Ä|ÓúÝ_,@ó•GS«[k`=:šB|D£‡L#48‚ÍÛ>¥‰b‚CM¨šÖõð hC㸸öœÆzö ®Ù#‰ÁBme5v»ŒþgÙBÜxBÃC i·¼£_ØÍAfÌ>îpßZË9,¦“/¯>ç£üêÊšvË¢ã¢Ú-×p·¿£:TM#$,„°öûÝ‘–¬aA¡A…úî-×Ðp©£Žtv|:Òòš…†…À¾uVV×û«¡7ˆˆ ÷«¼ŽöKzt„q:]˜MA˜L×6ôʳÉLPpN—½zuD¦®ÍQ¡!aŒ9¡Gê5Œhª÷¹ÏÒl#%i÷¬^ëx@Sùpã;lÚþIiÑè ºöçL$¦Åp0w' °vÍw= EaÅ¢Uœûò狎Ö½6wµBëráAñÌ¿ˆ¤ÄTçÀ¢•aÖœ²NɈ¦Ð9öŸ'úàÒÂi°8¨“ŽjФëB\Ç$%±B\ß:NõÜsTUms=Q;ÌÚ,V ÞuªªŠÅÞ„ÍnÃh4yzâ?Üð›¶~HBJ$zCÇ·%Ð)AvNª¦òè7žpÏ3Åá²±©¥;鱯ð;ëšAg&#qÁÁaœ=wš3_EoR;Le×¥Á±\Öë¨=[†bwb1׈D¾ !Äu@QÉÖ%„×9Eõõ”–‘˜Òõ(.+¤®¾–˜à`¯ë‰X¬Í¨ªŠ¢(5ÖÚÜ7¬eh[GÛhš†ÅÒxgp3™ TÔ–òÒŸ~Íßú AæÖo|—ÛþÄ”HôÆÎ³‰‚{®kBr$ûsv  ðརðç·^äü—$¤FuûºÙåc9çÐa"=v"a!œ-̧É^…ÞÐqºUhª†ÓæUCg6 ×ë$Å´âºÑäcÞŽÁ`ÀÔóC„B š¦QSÙª‘ð°÷×[÷=7ýظÕzm¶Ñ€†úZ£‹èØP¯›O;í.j«,Œ=ó•ù. J§i§[´^Ï×6§ã's ×a6z=§©U• ÄF¤Áù‹'ˆNÃhô/QO —K¥ª´A)øX|†ø¤Hw|pÅ¥s=;G§%‚R±q®ä0 E゙Ç®SzóÕƒÐQÆ6!„ø* ñ=ODzt„âú‚ÓéÂ¥ú¾?[w…Å0ÚÏ×"bÌœ¾”ZÏ_g‚#LzŸ×°èØP¬ÖJšk*‰IE§|ô‚¢@lb5M…Ä%F (×vÍ ì>:Ê•ñqh2Ä\!„BˆéuŠ{"JS;èmÐéBBŒí7è±z;:ZgU»–ûŒ™Z²/kªëÚz@º}!„B!„¨üîÑ9™؆„B!„âZžÜ½„~ÏÑxë•W»U‰B!„Bêß^×íy:rgN!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuG!„B!ÄuÇÐ…nÝôZo+D·-Yñ°Ï嚦qéÒ%.]ºLee%V« €  3qqq¤§"==EQ®S>B!nd]{/^¼ÈÅ‹_RQY‰Õb (8ˆø¸822“‘‘Ñ­koGõÙíœNôL‘ zL&c½–ê•@:~s Ñ×: 8›Ù³gFc“§Ì")9ÐÐ0šš)-)$7'›“§N3wîl®<ù!„¸uxímld×Î]Íf&O™CRò BCChj½Ò­: IDATj¢´ä2¹9{9qü7Í¿‰°°À¯½-TU¥¡¡‰Ë…eTU7Q[×€ÕjCÓ´n—)ü£( AAf¢"É ePZ"áá¡èt};˜¬×€Ø„Q½Y¼]ª*?åsyss3Û¾ØÎôÌùŒŸ0­Ýóa¡á >†áÃÇPpô0Û¾ØÎÒeK ¸ ò9Bq#éðÚÛÔÄ–-[˜>ã&ïkï•À#4$„aÃF1lØ( ŽfË–-¬X¾œ+P œ.ÅÅ圜áÇSPPÀ¡CÑéu¤&'ôY°)ÉÄ §¸¨“ÉÌèÑÝ¿"ùñ9rF£‰â¢¢þn¾Bñ•STXˆÁhdä¨q¨ªÓ¯Çð£ÐôTWcS3§N2kÖl rˆñãÇ3kÖlN*¤±©¹Ïê•@GÜpοÀðáÃp:mh­þWW_Ç¿ýû/©«¯óZ®¡bµÔ2bÄοÐßÍB!¾rΞ;ËÁ8ìÍhšËó°Z›Ù¹sV«÷rUuÒÜXÉÐ!C8{î¬ßõhšFQQ9Á!áŒ=º÷Hjôèч„STTÞgó¤$Ð×¥Úš¢çÆTVVƒ¥©—à š†ÍjåW¿ú ¹¹yüêW¿Áfu/×T–Æ*œŽfbcc¨¬¬ìã=׋ÎÞ“Bq½«(/'&6𦆠¶f4Õ…Ãng÷žƒ”–U°goN‡Mu¡ºîõìbb£©(/÷»»ÝAYy-cÇŽíŽÝ5vìXJËj±Û}RŸ:â†cµZ1™ ¸\vJil(ã·¿ý-gθ1:sæ,¿}á¿in®¡¡¾»½Uub2°Z­ýÜz!„â«Çj³a2êq¹ì4Ô—ÒPWξìÃTW×PUUÅCG±4×PWS„ÝvåÚkÔcµÙü®ÇétQ]Ó@rrro트IIIÔÔ6¸S}÷ tÄ GÓ4åê[ÿµ×ßæÐá\¯u:Ÿÿü¿¨êÕ¢¢è$%¥BÑ îkïÕ èGŸ£¬¼Úk¢¢bNœ.EUUÏ2EQ»ö*î^³Ù|Ím=Ïd2a·;P5µë•{@¯g]b Òé  i8œ6ÖÜ{+kî½ÕçzN§£ÁŒN×w©…Bˆë‘Ng4vÇĒ™™IxDR»õêKi¨-êöµWÓ4TUE߇iŒ{KMM ëÖ­CUUžþy†ÐöwÞy'™™™<óÌ3=ºnw´¼.}ù£±:↤Óp8¬WþÝù‰Ð¥:Ðé 蔯þ S!„è/:Þ}íU@§è©­ú’Úª/;]¿»ÁNËêþ¸gÎÚ_~Ɖ‹îÞª11üõÙ›»]ÖŽ;0lÙ²…Ç{¬GÚØœNgŸ×ÙoκǞfò¤±<þ½µýÕ!®üºÔ5ÕåÂ`2õxýë{ƒ^ÏÏö$)ɉ®#Ÿ•ëۺǞn·L¯×ÊÁƒ˜S&' ììA×ú>-+«$11®ÇÊB @š;èð7xQUC÷† iš†Ýnï—!l'.Vó/-BþßËÛ¯©¬¬¬,ÒÓÓ‰ŒŒdçÎ<òÈ#˜záûHos¹\¸\}3/§5éÑ7¬@%Òè_…œ.¯½þ<ó“ïÊÝšo`©,[2Ïó·Ýî ´´‚=û‘›wœÕ«–qû­Kú±…½gë¶½¼÷þþøû_öwS„½HST¿`ôlÓÅM½;ÜNÓ<ÁÎW10¸pá/^ä¶Ûn#))‰¼¼<öìÙâE‹ú»iQU»ÝÞ/uK #nPJÀ'[¥›'[œ¿p‰-[w³|éM½V‡Ø¢£"™5sJ»åK—ÎåW¿ùŸ|º•Ó&’”ß­ëÚÌÌÉ œÖ­mOœ<‹³Í/}×Ržb`RС 4 Ö5Îçp¹\_Ù`'++ €iÓ¦‘––Æ«¯¾Ê_|á3Щ­­åÍ7ßäÀX­VFŽÉ#<â³Ü@Ö½V-Ç¿¿H #nHŠN‡¢Ö{Ò[=:#†¦´¬’Öofʤ±ÄÇÇöJ=â«)&:Š5÷ÞÎ^~“=ûóµ;Wöw“|úÖ7× èò„ýO§(hÎwUºyím=áÝét¢ª*&“ ]À‘V÷]Kˆ¦ª*;wî$,,Œ & ×ë9r$ǧ¸¸˜””Ϻüä'?¡¾¾žÛn»„„öïßÏÏ~ö³vå²îµ²Ûíý2/§µ¯D SZZÁg›²8yòuu  (¤¤$²xálæÍîYoÝcOsëÍ‹ˆeË»(+¯"<<”Y3§°zÕ2 ­²o466ñ|NnÞq,Vé)Ü}×ͼþæ$%Æ{Æ…w4Nüw¿ÿ+¹yÇyõå_ÜÎ@ê°Ùì|ºq‡åS]SKDD8S&eõªå„†÷è±¾Q¼ö¿êï&x„††ð¯¯æ¯¼Åÿþõ}þé‡ßîrÛµ~&æÌšÊ«—³/û›6郎¬’ˆˆp–.™ËòeÞ½JòþëS&%88ˆ3g.x-÷÷µq¹T6~¾}ÙG¨ªª!88˜±c†s×+ˆ‹‹ñ¬W_ßÈGo&/ÿMDGE2gö4n½e1z½ûËÁºÇžfù²›¨©©#'÷8¡¡Á<óãïòô³Ïy+×=ö47¯\H|\ ŸoÞAUU 11ÑÌŸ7ƒËç{¾l´žŸ´î±§=çT_ç^‹ÅÊ'Ÿnåð‘£ÔÖÕÁÔ)ãXuûRBZío ×!Dßyóí·û¬®¶™½\.‹ƒÁ€Á`豌l­xÕïù?˜ñí·¼žó'AAnn.µµµ,Y²ÄÓÖ¹sçrúôi¶lÙÂC=äYwýúõ”——óóŸÿœ)SÜ#–-[ÆóÏ?ÏîÝ»½Ê dÝîÐ4 §Ó‰Ãá·äðNyy¿üõÿÊ¢…³‰ˆ§¦¶Ž]»ðÚ_ßÇl61cúDÏúûäb³;X¼h6Q‘ádïÏå³Ï³°Ûí|ý¾U€ûËÁ¯ÿóTVÖ°tÉ\bÉÉ=Îó/ü½^GRbàCCig õ;~ó_¤¢¢š… f‘˜GIi9Y;²9~â,Ï>ý}‚ƒƒ®ñ(<•ÕìË>ªۖz-ÿøÓ/˜=k*ñ­¾œêöÛ–Ÿ8¢{í*;Óíz;3}Ú¦NÏ‘œvìÜϳ:\7ÐÏDöþì'‹Í&2"œíYûØðÙv¾¼XHqI9‹Î&88ˆ¬Ùüýý ÄÅÅ0uÊ8àÆ}ÿùÒ›ïÉ®èt:R’(+¯ò, äµyûÝõìÜu€E g‘>(•ªª¶lÝÍùó—ø÷ýƒ†Æ&~ù«ßQWßÈâ…³IJŽçÔ©ó|üéTU×ðÈC÷xêÎÚ‘MZj2÷¯YEeUµW°ÔÚ¡CùTUײ`þL JæèÑSü߇ŸSRZΣß ÀºGïcËÖÝ\¼XĺGïëðX­6žû¯—)))gÁ‚™ JKáÒå"¶ïØÇñgyæ'ßõz/ús-Bô*K9÷>´§ËÃnÅâhÂfkFU]žûæèt:t:=ª¦ât8pªN4MåÈö=Ö§Ó‰ÓéDQôz=z½EQ¼8q±šÿzr)õê¸NG“Õ‰¦Á¯¾¿§ª¡iîQx ðó—·uYîöíî$sçÎõ,›;w.¯½öYYY<ðÀžhÿþý$%%y—«W¯n¼²nWZæAµ¤î¯„ðΖ­»±ÛíüãŸ"6&ʳ|Æ´‰üôgÿI^þ ¯/uÕ5uüë/~àÇ>götž~ö7<”ﹸ}±m¥¥|ÿ»2e²û Ýüy™¼ü§w8x(¯×ÛHý›¶ì¢¸¨ŒŸý󓤦\ÍÊ5yÒX~óŸdÃgÛ¹û®î§-¨"#Â9tè(q±1Ì™=€½ûŽpèÐQV._ÐÏ­ëܧNŸãý>câÄÑÄDGù\/ÐÏDm]=¿øÙ?x²º –Á/þå·œ:užÿ·$.6€Ñ£†ñÏ¿xžü£'<Îúþó¥¿ß“!¡!4_,ôüÈk“½?‡#sÿšÕžõ¢c"Ù¾}eåU¤¦$òù¦TU×òø÷Ö2yÒXÀ}^RU½ûްêöež÷›êRyâñ‡ í´Í•Õ<ôà]Ü4/ÓSÞ_^{½û³xÑg¤1kæ>ÊÅ‹E>ç(yöwóN.–ðío}Ìé“®,ΰ¡üéÏï²ñó,¯a}þ\ „}KAA¯èQŒAè LzõMW{C4MÃjmÆ©öþp'UU=½-VKD =6+šÑ4PU U—ªáRÁ©‚Ë¥áT5T†&¹{Ÿ+++;,Ïb±°ÿ~Ìf3f³™S§NyžKMM¥°°­[·2uªûZTRR¨Q£Ú•ê>GÛívÏs¬Û™–€°%8t©º>èèÜ¿f«n[Bxx˜g™¦iØ®Ll²Û^ëg¤§zMÖÕëu¤¥&Qpì´gÙÁCùÄÅÅx‚Œ7¯XÐí@'vRÿáÃG2da446y–'%œˑœ‚ëò‹¦Édä;ÝÏþ×+ œ À{ïoàŸþñÛ˜LÆ~n]ã¾{nç/¯ý¿¾ñO=ù¨ÏõýL JKñJ]’œÀ¡éž ð¤ömj²x–ݨï?_Â{Ò`¸zÊ䵉Œ çüùËlþbÓ¦N 6&Šùó2™%ÈË?A\\Œ'ÈiñõûnçöÛáY–6(¹Ë §¥Þysgx-[¾t{÷æHNƒ3üO6p$§€Ø˜¨VAŽÛÌÌÉ|ðáçääó tü¹!ú—Á`",8’ºFw°cwØp©½Û# ªªgÎNGéÕ‘á3…ôSÌçð¹ZvíË÷¹Mgu>|‡Ã}-öÙg}®³{÷n¦M›æÕæ¶e¶:Z?Ⱥ]iÝ£Ó¢ehà@È$;àEQ°Xllݶ—Ë…%TVVS^Qíy´}£FD„µ+C¯×{E祥Œ=¬Ýz)) }ÒÎ@ê/-«Äápðƒý›Ïz¯ç±æ)ɉÜs÷­¼øÒkÜs÷­Þkæz1göTÌ¥àØiöî;âé9h-ÐÏDddx»ívókZ–{}Vnà÷Ÿ/ýùžlhhô nymÖ>p|ù-þþÞþþÞRS™2yóçgzz++ª3fx»r""ÂÚW#ÂÛŸg}IKMjw¡k >**ÚiïLyE5£Fñù\rr'O÷n£×!Dÿ3Lfl¶æ rÚž{4MÃápx®‘=õ%üwOÌm·lÅÓŸy¥PØôëÀ~ÌÎÎàþûï'&Æ{h°¦i¼úê«P[[Ktt4‰‰‰”””´Û§ŠŠ Ï¿[ž dÝîr¹ÜÃõz½×týaÀ:yù'øÃß$8$˜1£†1uÊxRR>,ƒzúWíÖ÷÷Ź֋]Ûím§¿õkšÆÁƒ¸óŽå×ÔÞ¯ª9³§²{ï!Ï¿o>p¿ø—ßò·÷>aü¸‘ížï­Ï„/7úûÏ—þxO:NŠŠÊ˜4ñêMCymFÆo~õ4yGOPPpšã'ÎðéÆmlÙº›ŸüãwHOOÞ'þMÐuú¾ììœéë¹ðK¢Â[³Å‚¦ºP5—æ¼2?Ç…êÒh²ZQ{)ÐiéÅÿÏ_×**ÔˆzåÔHUUUœ>}š””–-[æscÇŽ‘••Åž={Xµj™™™|øá‡mÛ³öñÛþÌÌÌÉÔÔÔ±=kññ±”¶ê ¤ÔËÊ…ääãÕ¿¼ËÉSç<8²²J²vdÄÝ_»1&‚ßhEáá¿Æ/þõÏÜ›½ñ™èˆ¼ÿúNMmÙûs<Ûí ‹JØ—ƒ^¯ç©'ï÷NàïkEæŒIì?Ëïÿø&ãÇÄép±cg6ƒ…óÝCn¹yGŽðû?¾Á’ÅsHˆãÔéóìË>âþ;!ðÙôzþðÊ[,]2—¸¸rrsôèIn½y‘W¢€–l?›6ïdé’yž{ö´vóŠÉ)àÏù;gÏ]ô¤—Þ±s?‰‰qÜzóâ€Û'„ zá˯¢(žTÇ}õ庥×bdZ$ürƒçß­ƒœ®<÷Üs~ÕÕ6IAhh(k×®eíZïû>¾ðÂ í¶ dÝžÒ’´ ¯³²õk SYUÃŽû}>×è<ôà× &'÷8‡sŽÁ´©xüûñÆ›pìøl6;f³ÉïzÍf?þÑc|ðÑçìÞ}‹ÕÆàŒT~ôƒuüú¹?`lÕ½vß=·b29p0·ßYORR<߸5……¥lhõkv í ¤þàà žùñ÷ذqGr ؽç Af3ãÆŽàÎÕ+¼¾,ˆëKBB,w¬ZÆ{ÿ·Ñkyo|&:"￾sñb¯þåož¿ qqÑÌ=•+áµ~ ¯Í#¹‡¦8˜O^þqÌf3ƦóÐÚ»ÉÈpg 晟|Öof÷žC455ͽ÷Üʲ%óºµOãÇbÄðÁlÛ¾—ÚºzRR’xôá{ÛÍmZ´`&'NœáÃ61uÊ8âãÛU!WÚ÷ñ'[8’sŒ¬ÙDFD°xán»u ¡¡róZ!ÄUªª¢iZŸ÷ hšÆžšï™;h/ƃ>P}o¼ñF@ë÷'UUû<Ðñuä+Vϳ<ðý¥Øå:s:¿”·^yÕ¯B·nz%+&6aU姺ޠ566ÜîWÆÆ&~ð£cÉâ9½zŸ…þ®ÿFP[SİQ‹©*?åy?¶h¨/¿¦††Gø7·` Dßjýž¼¬{ìi&OËãß[ÛõÊBˆëNÛkï ¯ü·ß{‡ïdªJYua‡eß{ާ¾ý~ÕÛÔláÓ{y衇®uD/Ðëõüå/á–•³üºMÀ7¾½Ž‘“¨*k¢ª¬€Mëw °ÍWM­þm¬ýÒ£³î±§ýZïÕ—Ý+õðá&öî;Ìs¿~Æ+é¾ì# ’Þ+õ”úÅÀàïç µÞúLˆþ#ï!„èAš{¥Íf#¸s Eï²X,˜LFtJßôìôK ÓßéÙWÒÃ>÷üËÜ4w¡¡!\¼TÄÎ]ûœ‘ÆôV“d¯ÇúÅÀÐߟ10Èû@q£ öôâx÷è¸0÷P‚ƒAOLt8ååå <¸GÊ=§¬¬Œè¨p †¾¹߀O/ÝF ÌŸú&6nç“ [q8ÄDG±léMÜvËbŸa¯§ú…B!®G&“‘Ä„(NŸ>Å!¾o2,úÏéÓ§HJŒê³Ì¥7d îè5솭_!z“ôT !úƒ¢(¤¦&PX|’3gÎ0rdûo‹þqúôi,–&RÇê»Lx}R‹B!„} ,4„Ñ£Ò8tè .—‹±cÇöw“nxÇ''çS&#,4¤ÏêíÕ@ÇaoFU½Y…>ED&RQz ®ÿcyù¸úžBˆë]_{E!)1ŽITŽËçìÙ³L˜0¤¤$BBBú<åôHÓ4š››)--åèÑ£ØlÍLš0„¤Ä¸>=þ½úNlnªÄé´õfBtÊdêÿ@G>B!n$]{›-–ÓKÛìŸÛt—A¯'-5‘Ȉ0.–Qp4—Ý»°Zmž{܈ޣ( AAf¢"É‹ ePZáá¡×× C›+qÉ<ÑL&ÿr´÷&ù!„¸‘ „k/€N§#22œˆˆ0ìvN§;È}C§è0ô˜LÆ~ëEëÕ@'ïðæÞ,^ˆ.eι³¿› Ÿ!„7”pímMQÌffs·Dôµ^ tn¾Ã¿áÝyçdffòÌ3ÏxþNHHÀf³qË-·ÍÎ;)((àÖ[oeݺu>·¢­pz?B!Äõ` \{…€œu­²²’_|‘ÔÔT/^Ìc=Æž={<ŽB!„Bø2`ïL9lØ0O ×ëÉÈÈ ®®®[%„ݳqãÆþn‚BqC°NTTT»eƒA2e!¾’n¹å–þn‚BqC°C×$ǹB!Äõ#$8Ø“RÚ;½´ ³ÉØkõjšæÉº†|½ì;×wÖ5!„B!úƒªª444q¹°Œªê&jëä>:}¥õ}tbcB”–xýÝGG!„ÛÆeøšB´òñ»Ÿú\>eáèk.ÛérQ\\ÎÉS…˜ƒ‚™8i*ÉÉÉ„„„Ȩ¡> iÍÍÍ”””ŸŸGqÉIFJ#%%ƒ^ßgíè—@gÇŽÄÅÅ1nܸþ¨^!úœ?AަiìÞ½›­[·rþüyš››‰ŠŠb„ ¬ZµŠ!C†´ÛÆß4û}™Ž¿¸¸˜”””.Ûã‹^¯'::š &ðo|ƒØØØn·Ãf³ñ‡?üýû÷ãp8¸í¶Ûxøá‡»]ž¢g­Zs›gèZIå¥+WÓ4JË*É;zéÓg0~üø+[øGQBCC>|8ǧ  €C‡¢ÓëHMNè³`³_^xÌÌL t„â «ÕÊsÏ=GNNcƌᮻî"<<œ²²2²²²Ø¹s'>ø wÜqG7µS6làµ×^ã½÷ÞërÝaÆqûí·{-³Ûí?~œ¬¬,Nœ8Áoû[‚‚‚ºÕ–õë׳cÇæÎË”)SÈÈÈèV9Bˆ¯–ƦfN*dÖ¬ÙŒ}í½CâÚ?ƒÁ@~Þ"# í“zû%ÐùðÃú»EÛ_";ZO!¾j^zé%òòòxòÉ'Y´h‘×s÷Üs¿ûÝïxýõ×‰ŽŽfÁ‚—?þ|†ÞSÍíP~~>N§Ó¯uccc}î˲eË4ho¼ñYYY¬\¹²[mùòË/xüñÇ», !zN³Å‚¦ºP5—ædÓ›|®7vΰnסiEE凄K3ÀŒ=š3gÎPTTΨ‘ƒû¤WGæè!DèlŽÎÑ£GÙ»w/÷Þ{o» Àh4òä“OráÂ^{í5æÌ™ƒÑX†¢üàÝjwY¾|9o¼ñ'Ožìv ãr¹$Èb€ZvÇÒ+C×Tʪ {¤L»ÝAYy-“&Ïè‘ò:“›—æ͟ukÛ‡×>JbbR·hà;v,¹92ØÙlêõú$ÐBˆ>ÐÙíÛ·£ÓéÚ ãjM¯×sûí·óûßÿžÃ‡3kÖ,¯ç·lÙ‡~HEE‰‰‰,]º”U«Vy2Üøš£cµZyï½÷سg•••DEE1sæL¾þõ¯æU~mm-ï¼ó¤¾¾žØØX-ZÄ=÷܃þÊÄÒÖónî¼óÎkêu7Ü—§–`%Ð6·m x¤œÕ«WSYYÉ ãW¿ú‰‰‰•q÷Ýw“””ÄÇLII ,X°€¯ýëž}õ÷8Ò~!n4N§‹êš’““{½®M›?ãÛë¾Kttt@Û9r„×þú¾~ߤ¥¥õy&²þ”””DMmN§ ³¹÷ë“@G!úÙÉ“'IKKëò Y_§ IDATê„ 8qâ„W “ŸŸÏáǹùæ›ÉÈÈàðáüþúëòøãû,Ën·óì³ÏRZZÊÊ•+III¡°°Ï?ÿœ¼¼<ž{î9BBB¨¯¯çÇ?þ1µµµÜ|óͤ¥¥QPPÀßþö7***xâ‰'xê©§øä“O8wîO=õÔ5“ýû÷x · ¤Íµ%r>ÿüs222X·nååå$&&\ÆÎ;±ÙlÜrË-DGG³sçN>øàl6ëÖ­ è8Z·Õ–¾ð¹üZ†®¡¸{uÌ}ñ-ˆŽŽ¦±±Ñk™¦ižhhª††ÆŽ;˜3g.S§NeêÔ©üæ?ÿƒµ<Ò'AÙ@a2™°Û¨šÚ'õI #„ý¬¦¦†Q£Fu¹^\\ÕÕÕ^Ë­V+?øÁ˜?>K—.套^bëÖ­¬X±‚#F´+kýúõ\ºt‰çŸžôôtÏòÌÌL~úÓŸòþûï³víZOOÑ3Ïýë_‰‹‹céÒ¥Ýjsgm ¤p÷*=ûì³DDDt»ŒÊÊJ^|ñERSSX¼x1=ö{öìñ:þç@ëb ê¡kà4TUõêí ­ 4MMC4U¥©©É€555ñ“ú)¿ùÏÿà'ÿôÓveu”™²-zÎÛöèw”…ÓŸŒ™×¢åuéËûI #„} ³9:‡ÃkøRGZ.m/ñññž §Åí·ßζmÛØ¿¿Ï@gïÞ½Œ1‚¨¨(¯`#55•ääd²³³=_–fdd““ãYæïqî©ã Äõ¬å u_¥1þŸ?¼Øéóëý«•?¾ò?~—é+3eo $cfwù›¨¦'I #„} ³9:111ÔÔÔtYFUU•gýÖ ÔnÝ–/Õeee>Ë*..Æn·û 4¯À«¬¬Œ‰'¶['**Ѝ¨¨.ÛݑѣG³fÍÀ=+;;›mÛ¶1wî\¾óïÜí6w&Ðr|ícO”a0¼‚VsOñÿÙ»ïð¨ªôãßɤ—I/JB 5 ‚”ˆtÜE°,(kGvÙŸPWÝU¬øØXÛªHˆ"=R€$0 $¤L¤O½¿?â\3dR&eá|xò9÷ÞsÏÜœÀ}çžóáF&IZ­Ö&CØ$I⑇ÿíIŽc­¥$£±æIÑÈÁƒ)*( 19 °båó¼öÆ+õÖ[_fÊ–²”…ÓšŒ™Ía0ê̹´ñ¯¡ B;ëÛ·/‡¦¼¼¼Áy:éééuR¦ZúÄÒt]ß$WI’èÕ« ,h´}mõ‰¨J¥bРAòëÈÈH:uêÄW_}EAA/½ô’ÙM»5mnˆµõXº†ÖÖÑ”kØÔëÜZ×AlÍÕÅE^ Ô éåïFNŽÖe’lŒi™V«Åѱm³{ÉÁŒÜl›¥k/_®Ye¼öp©Ú(//7 4L’’’̆jùûû“››[g¿ÌÌL6mÚÄŒ3Zmž¹sçrþüyøê«¯ÌžZXÓæ†´F=­Õ–ÚšzÛâÜ‚p£2 mì%‰ÿ|ò¡UÇŒɉ{ôyœÎ!íã{[è\½z•/¿ü’ÄÄDª««éÝ»7 .¬³Ÿ¥9;µ·µæ:•¦ëß^nž|v‚ íhçÎõn‹ˆˆ`Ô¨QlÞ¼™½{÷ÖÙ®Óéx÷Ýw¹|ù2÷ßÿ°333¹té’üZ’$6n܈B¡à–[n±xΑ#G’››ËáÇÍÊO:Å+¯¼ÂÆå²#F››KJJŠÙ¾±±±ÄÅřͣi4©>ú(žžžlÛ¶ .4«Í izZ«-µ5õ:·Å¹áFS;ó™^¯§ºº£±2}IF?ø‹=ă óÀÂÅ,úË,¼ÿÞ·ûï]Èý÷ü…ûî¹þòwßõg¼ÖÝ.9šÄƒ«5%l©ï«¶òòrž~úi>̤I“X¼x1ÎÎÎ<÷Üs6éÒ¥ôìÙSþ¾µhµZ4ÙÏ–‰@ ]„vsàÀüüüèß¿{7E°†æè,Y²„7Þxƒ÷Þ{½{÷2|øp<<<ÈËËãàÁƒ°`ÁÆ_çXwwwV®\ÉôéÓñööæðá䦦òç?ÿ™.]ºX<ßœ9sHHH`õêÕœûì3***ˆŠŠâöÛooï& ‚ ØDívÓhÌד$#÷ßsÿoCÖŒÔä0þö„ ÓV˜9^ÿ̨Òö›ú#\ÿD¦!#FŒ`óæÍ$%%1räH¹Ü”ÉÓÒÓÚ¯MmhÍëcºîöööm¶[c:D #‚ ´>;;;Ö­[×ÞÍAh7µƒœÖ¼Ù®ªÚH­…Bk-jÄHÑŠž ýÓUó€¸?ô}ÍþÆßI’,%%%9r¤Áv˜–¸ãŽ;HJJâÓO?åâÅ‹téÒ…´´4ÒÒÒä% z¢cZ¬:66–Ûo¿½Õ²ÒI’„Á`h·';"ÐA°;w¶Ûð5A„›B¡ç´ÅÓ³ìbF#_|õ…ÅýžùŽßî=ƒ²S?9õ´¥9A×ËÌÌdÍš†³¹EGG5‰ V¬XÁÆ9zô(tíÚ•eË–ññÇ×;Çd„ œ:uŠ72|øpštš¢=ƒè‚ Ø€rAlG¡PÈÁH[::ÝïY⌒Ä=w/¨ bÌ’üiÎ\ f[M™QþÞD«ÕâäädöTçóÏ?·ºMnnnÜwß}uÖÒzçwÌ^[ª;$$„·ß~Ûês6•ézØ:+[‡ tòòòعs'gΜáÚµk3~üx9õê—_~ÉÞ½{yõÕW 4;þµ×^#77—·Þz ¥RÙ¤úAA„¶áêâ"§”6O/mÀÉÑ¡UÏe4ÖÌ‘i«¹!¦ápð[Ö5LssL‹†þÐHr S{Ÿß‡¾UUUáèè(·õÞ{ﵪ-_|aùiRGc4E ŸŸÏË/¿Œ‡‡ãÇG¥RQRRÂÁƒY·nÎÎÎDFFrË-·°wï^ÍS+))áìÙ³ÄÄÄ T*›\Ÿ ´…’’’ön‚ ‚ Ü4 E› Y31 ꬬ¤K×îͪ£ºº@ÈLíýòË/[§‘P[Ÿ–tÈ@g÷îÝhµZþïÿþ___¹<22’gŸ}–””"##éÑ£AAA$$$˜: H’ĨQ£¬ªOAAø“ÀÑÑFÓ¦k‡9;;Ó½kï}ðNã;7 ¸SœQ*•n±Í¶PóôÊ;…mÞk‡ t,XÀŒ3P©Tr™$Iòª­¦¿¡&ÛĦM›ÈÊÊ¢k×®@M L÷îÝ­®O¡-ìÙ³‡ &´w3AnhööJ|¼=P«Õ„„„´Ùyœ™]HNNÂ`0Я_¿V©Wh¾Ó§OsâÄq† ›«ÍÎkó@Çßߟììl9ÅœÁ` ;;›àà`yŸââbºwïn”H’ĶmÛ€ëi†Η_~ÉÖ­[ÉÏÏ7KLМúAZ›˜£#‚P—Q’ÐèªQ* tZaøšB¡ (ÐAœ:•Æùóç8p AAA¸ººÞsaÚ›$ITVV’——ÇÉ“'Ñh*40” @¿;ëÚ­·ÞÊ7ß|ÃG}DDDIII\½z•»ï¾[ÞgðàÁ$''óñÇÓ¯_?ª««IJJ¢°°wwwªªªÌêtrrbذaÄÇÇËß×fm}‚ÐÖ-ZÄ!Cxâ‰'Ú»)fòóóë¬I%´Ž†‚œE‹Õ)³³³ÃÓÓ“0kÖ,³§Ô¶è?-=‡Á`àСC9r„¬¬,t:>>> 8)S¦àããÓÊ-þã¿ÂͨªºÉhD'¥Z½¦5bì•Jºâ©r'+;Ÿô“)ÄÅ•Q]­i•!rBÃjæ09áåéŸ]»tÇÃÃíÆ_G'&&­V˾}ûHIIÁÏÏ… š¥w^¸p!nnnœ8q‚cÇŽáååŰaÃX²d Ÿþ9éééh4œœœäcn¹åâãã6l˜Yysë„›ÍÏ?ÿÌwß}Çš5kÚ»)7¥bbbä×:Žœœ<ÈéÓ§yá…êÌmì¨JKKyçwÈÊÊ"22’‘#GbooÏ… 8pà ,[¶¬M3"ýшß?áfc0¨¨¼†^¯‘Ë”J%Îv®htÕ¥–'ŠªùÀȕʭV‡^oh•z…¦±SØao¯ÄÑѡݞ¢Ù<ÐQ(L›6iÓ¦Õ»‹‹ ÷ß?÷ßm=ö˜ÅcúõëÇÚµk[­>A¸Ùœ9sÆl¥gÁ¶¼½½åµ¿jëÓ§ï½÷{öìaæÌ™íÐ2ëH’Äûï¿O^^Ï>û,=zô·3†¨¨(Þ~ûm>þøcþýï£TÚ&ÅhG'~ÿ„›$Ñ4hª«¨ÖWa4ÖíóvJ%n* z=:ƒƒ±åÓ  NNŽˆÏ³o>2½´ ¦¹st@NNNk7©M$%%qþüyî¹ç³ Ǥoß¾DGGsèÐ!222Ä$aA¸‰lýnK³ŽSÚhqIáÆ#AhGd×®]áççǘ1c¸ýöÛÍÆ°–––²yófRRR(//ÇÛÛ›èèh¦M›&¾hÑ"¦M›†¿¿??ýôjµwww¢££™={6ñññÄÆÆ’ŸŸJ¥"&&†I“&Éç¨=GdÑ¢Eõ>𝹉Ôj5:ujp¿ªª*¶nÝʱcǸzõ*žžž 6Œ™3gâêjžá¦)}êzååå¼öÚkò÷¿ÿ^½zYÜ/!!;;;‹O§Lî¼óNæÌ™ƒ‡‡‡Õío¾Þ’ã4 Û·o'))‰ââbT*C‡eÖ¬Y¸¹¹Õ9W@@?þø£|®Q£F1kÖ,ìííåýj#~ÿ„ÑóîÃ?Ðò¿)È?×Ê­n"ЄvrúôiÒÒÒ?~<]ºt!--ï¾ûŽÜÜ\.\@YY/¿ü2×®]cüøñtîÜ™_~ù…­[·RTTdvƒtäÈt:ãÇÇÓÓ“½{÷òÃ?pñâErrr˜0a...ìÛ·o¿ý???9qÇâŋٽ{7™™™,^¼¸]®ÇÍN¯×SVV&¿6äääÈéñÇ_ï±ÕÕÕ¬ZµŠÜÜ\n»í6ºuëÆ¥K—Ø»w/§NbÅŠ¸¸¸Öõ)“ªª*Þ~ûm ùÛßþVopñâE‚ƒƒåóY¢R©šÝ~hY_oéñ:ŽU«V¡V«7näææ²oß>N:ÅsÏ=gÖÖ£G¢Õj?~<^^^=z”;w¢Õj™?> ~ÿAÚŠt¡h4þú׿ʋÛÞzë­¬]»–C‡qÛm·*?íyâ‰'2dP3ÏÁh4røðafΜ‰¯¯/W¯^åÅ_¤sç΄……ñÜsÏ‘‘‘Á+¯¼"¯ÜÜ·o_–/_Njjª|ó6jÔ(’““ÉÌÌlð“x¡íœ|8Ë—/gÛ¶mõ:jµºÞ ¤S§Ndddȯ­éSééér9{ö,ýû÷oð=@Mö¸«W¯6º_mÖ´ZÞ×[r|^^:ÎâÓ7@žwcâééiqñû'mÏh4RVVAVv>EÅ\½&Öѱ•Úëèøú¸ÑµKàÍ±ŽŽ 5útÃô5Ÿ€ˆ•žoL¾¾¾„……qî\ó&ã^ÿº5ýÄÁÁ'Ÿ|’-[¶°sçN"##–Ö£G’’’¨ªªªwžÎ¥K—øæ›o˜0aÇ·ªýÖ¾KZz|hh(sæÌ±É¹Ah½Á@NŽš_2²qrv!bÐP:uê„«««ø½´I’¨¬¬$77—´´Trr!¼O:wÀÞ†Ë ´i S{%oAhE¿e¬êˆ®]»V§ìÊ•+ÀïOv|||ä¬[µeee±sçN&Mš$]¼ H’Ôà‚Æ¾¾¾äææZ<.''ÇlÎ5}jÀ€ôë×OOOþùϲvíZV®\Ùà'rQQQ=z”Ç3qâD‹û˜RK;Öêö·7___*++-¦ÅNII1Ë$'Bû$‰¼üBRO^døðH ÐÞMºé( ÜÜÜ #,,Œôôt’““°SÚÜ)ÀfÁ¦HL.í$++‹ììlùµ$IìØ±…BAdd$P3Á9??ŸS§N™»oß>Ìle-[?N¾ÙìÙ³§YÇ•––ráÂ…×›:t(EEE$&&š•=z”’’ $—5§O3yòd233ùùçŸlïÀéÙ³'›6mâÂ… u¶§¥¥qàÀä~nMûÛÛСCÉÏÏ'))ɬ<##ƒwß}—;v4«^ñû'­§¼¢’ŒŒl¢¢F‰ §ƒ0`QQ£ÈÈȦ¼Âvs„ÅÐ5Ah'nnn¼öÚkÄÄÄàååEbb"§OŸfæÌ™òš)S§N娱c¼ÿþûLœ8‘€€222ˆgâĉòdéÖjÔd•Љ‰+Ö·²Ææè”””päÈùµ$I”––rðàA”J¥Y¢‚ëM™2…cÇŽñé§ŸrþüyºvíÊåË—Ù¿?L›6MÞ·¹}jÆŒ$&&²iÓ&† ‚¿¿¿Åý <òo¼ñ«V­bøðáòü›_~ù…¤¤$ÜÜÜxä‘Gä>fMûÛÛÔ©S9~ü8kÖ¬áÌ™3„††’——Ǿ}ûpqq1KD` ñû'­C’$®\QãâêAxxx{7G¨%<<œsçÎq劚>½ClòTG:‚ÐN¢¢¢ðõõe÷îÝ\»v   xࢣ£å}ÜÜÜX±b›6mâСCTTTàççǼy󈉉iÕöŒ7ŽÓ§O³iÓ&†J@@@«Ö/4,33“O>ùD~­T*Q©T„‡‡3mÚ´ uuueÅŠò‚›ûöíÃÓÓ“ &0}út³IöÍíSöööÜwß}¼ùæ›ü÷¿ÿåÿøG½ûúøøðüóϳ{÷nŽ;ÆñãÇ1øúú2a¦Nj6Ißšö·7V¬XÁöíÛ9~ü8‡ÂÙÙ™þýû3gγ kÖ¿‚Ð:´Zùê« ÙÞM,èׯ)'’ Ñáä䨿ç³J9Lš9Z pÏcIÍþýû9sæ «W¯ÆÙÙÙ¦íêôz½ÍÏÙ!Žäܹs<ÿüóxxx0~üx¨ªª"!!>úˆcÇŽñÌ3ÏtˆÅ¦vìØÁúõëÙ°aC{7EA¡Ã$ ­Vkó!l¾¾¾òaµÅÄÄеkW¾øâ öïßÏwÜaÓvµ7ƒÁ€Á`°ùyÅë¬_¿GGGÞ|óMæÍ›Çøñã™:u*/½ô&L 11±Îú -1f̘fçxOKKk—èXë‰9:‚ ¶c&¥ÕjÛ»)²Ûo¿¨Iµ31ý$I²é°5Otê8{ö,¨Tª:Û¦OŸÎ¾}ûÈÈÈ`Ĉ­r¾¿ýío­R ›˜£#‚`{ƒ­V‹£cÛ§2nŒ½}Ím÷õO6ª««Ù°a‡¦°°///FŽÉÝwß»»»¼ßìÙ³™;w.AAAlÛ¶ÜÜ\T*ãÆcþüùìß¿Ÿ-[¶““ƒ——Ó¦McæÌ™f窬¬äÛo¿¾Z IDATåÈ‘#ãííMTTóæÍ“Sù¯Y³†]»vñá‡ÖYÚ`åÊ•\¹r…O?ý¥RÙhÛM׿½tØ@çÊ•+lÚ´‰“'ORRR‚B¡ k×®L™2E¾a°æÑ”ú¼¼¼ÈÈÈ //¯ÎzÝ»wgãÆuÚzõêUþ÷¿ÿ‘””Dii)¾¾¾Œ7Ž»îºKž7{ölfΜIaa!‰‰‰¸»»óꫯòðÛÍÑ™={6wÞy'lÙ²µZ¿¿?111Ìš5KžT{ÂÛìÙ³;Ìü&AA„öVûÉ^¯Çh4âèèØªó¬­•@XX˜\¦ÕjY±byyyÜqÇtîÜ™ììlbccIMMåõ×_7K“}àÀ´Z-S¦LÁËË‹]»vñý÷ßsþüy²²²˜2e ®®®ÄÆÆ²~ýz‰ŠŠ ªªŠ+VͤI“ å×_e×®]¤¦¦²jÕ*\]]¹í¶Ûصkqqqf‹ qúôi¦M›†R©l´íÿú׿Ú=ÀìNnn.O=õ*•ŠÉ“'ãååEQQ»wïæý÷ßÇÙÙ™èèè&ÿ šZÔ<µY·nK–,aäÈ‘DFF———Ŷ–––òÔSOqõêU&OžL—.]HOOçÛo¿¥  €'žxBÞ766–îÝ»óàƒ¢V«ë]üðáÃÈðرc|ñÅdgg³dÉ–.]ÊöíÛ¹páK—.m­K/´ooïön‚ ‚ ØL‘ZÝÞM¨3DÊ`0PUU…½½=ööö,\õg.[Ugßî>|¾brƒûèõzJKKÍÊ*++IKKãóÏ?ÇÏω'ÊÛ¶nÝÊåË—yë­·èÖ­›\>bÄ–/_Î÷ßÏ}÷Ý'—³zõjºví @xx8O>ù$ééé|ðÁòbÃäñÇ'99Yt¶lÙBff&Ë–-côèÑ@Íhƒ>}ú°zõj6nÜȽ÷ÞKïÞ½ æÐ¡Cf÷ׇB’$n»í¶zÛ.IC‡åùçŸgãÆÌ›7ϪkÜÚ:d ³}ûv4 /½ôþþþrytt4>ú(IIIDGG7ùÑÔúf̘ƒƒß|ó qqqÄÅÅÈYצL™b–)cóæÍðì³ÏÊÃÙbbb0ìÛ·yóæÉç4 ¬X±Ââ°¸ÚòóóyôÑGåUÊcbbx÷ÝwÙ·oS¦L!,,Œ±cÇÏ… ,NzAAÌéõzôz=g.óæ’‰èŒ @g°|8‹-’‡ˆÄÇÇÓ«W/¼¼¼Ì¤àà`:uêÄÑ£GÍÐÐP9Èäï{÷î-9€œ‘·¼¼\.;zô(þþþrc2f̾üòK¸÷Þ{¸í¶Ûøê«¯ÈÌÌ$$$¨¹¿îÖ­=zô0k»‡‡EEEF þþþ’””$K/^ÌŸÿüg<==å2I’Ðh4òßд„5õLž<™˜˜ÒÒÒ8~ü8©©©dff’™™ÉÏ?ÿÌK/½„ŸŸIIIÖ™³óÀð§?ý ¹,$$¤Ñ jžÔŽö¡&Û·oG5{ä)ÂÃÎ;™2eJ{7CAøM¹ÆÀ¥‚J$ ŒF ££„Áz# z£„Ñ=‚\(,,l°Îž={2cÆ t:Ç'>>žáÇsÏ=÷`gggVÇ•+WÐétƒ#¨™×S{777‹mptt´X®ÑhäòÜÜ\z÷îmq¿€€222äm|ýõ×üôÓOÜyçäååñ믿2gÎ Q(rÛ-ZToÛÛ[û·À…BAee%;vì 33“üü|òòòäÉLFãï«©ÞvÛm|ýõ×:tˆ®\¹Â¯¿þjýZSŸ‰½½=C‡eèС@Íz5ÿýïILLäÓO?å™gžjž¾DDDÔ9ÞËË«Îp·ú†¿]¯{÷îuÒW——פ:AèXD#‚ÐþŒF#z½ž^Á*þùŸ}VÛ+XÕèò"ôïß_~=xð`Ù¼y3ÅÅÅ,[¶Ì,$‰ÐÐÐzÌΩP(êmCcå¦u…z¦m¾¾¾ôéÓ‡¤¤$æÌ™Cbb" …‚¨¨(³ú,µ]©Tbgg×!–b±y c0¨¬¬ÄÃÃì¼öÅHJJâõ×_ÇÍÍE·nÝçÁ4;ÎÏÏǽ÷ÞËÁƒQ(Œ3¦Yõ}ñÅLš4ÉìñÔ<|úé§yì±ÇHMMµØîÆ4u\C+ù¶ç$:AA„?‚ëïÏ$IB§ÓÉn¿ÿD´ÍÎ=mÚ42339qâ[¶l1›náççGEE…Ypd’’’‚‡‡Gúšèøùù‘››kñÚäääàççg¶-::šÏ>ûŒÌÌLèÛ·¯ÙH¥†ÚžššŠ§§g»;6¿k^°`«W¯6+Óét¸¸¸È¯×®]‹¯¯/}ôË–-ãî»ï&::ºÞ`ܸq¨ÕjÎ;Ç¡C‡ˆˆˆÀ××·YõýüóÏ$''[<þþþfÁ†¿¿?¹¹¹uöÍÌÌäí·ßæüùó _ rrrê”]¾|€.]ºX]Ÿ ‚ ÂÍÄôäB¡P I’¼î ]›}™ÎkiÛÂ… Q©TüôÓO\¾|Y.:t(jµšääd³ýÏ;Ç{ï½ÇÎ;­¿©åÆ £¨¨¨Î¹)))aðàÁfå‘‘‘899±mÛ6Ôj5ÑÑÑfÛjû»ï¾ËöíÛåë^ûçaK6t¹té’Q .]ºd–i¢¨¨///³àG’$¾ûî;ù˜ÚF…³³3ß~û-¹¹¹r‚æÔ׫W/6lØPoðræÌ³ù8#FŒ 77—””³}ccc‰‹‹3›pÖT¹¹¹;v̬lË–-( 9iˆ§;‚ðG²sçÎön‚ ÂMÇ4T Ìo¶ÛâËÄÒ6•JÅ=÷܃ÑhdݺuF Ó§O§S§N¬Y³†Ï?ÿœC‡±aÃÞyç\\\øÓŸþÔhýM-Ÿ:u*AAA|òÉ'|ýõ×ÄÅÅñÕW_ñÙgŸÄôéÓÍŽwvvføðᤥ¥áääÄðáÃͶ7¥í’$Õ¹o·%›]›8q"k×®å7Þ`ذaÄÇÇS\\l6‘)22’øøxÞzë-"""¨ªª">>µZ‡‡•••fu:;;Åþýûåïk³¦¾3fðâ‹/²téRFM¯^½P*•\¸pýû÷ãëëk6alΜ99r„×^{©S§Ò©S'ÒÓÓÙ¿¿üÚZööö¼ñÆL›6ÀÀ@8vìsçΕçêòð¿-[¶0}úô‡¼ ËìÙ³ÍÖO²õñ‚í54G§£þ|¸YÖa Ém7;표Àægœ6m†ØØX’’’àñÇ7{RñØcáîîNBBGŽÁÇLJQ£F±|ùr>úè#RRR¨®®6»àãÆcÿþýDEEÕùAXS_DDÿþ÷¿ùá‡8yò$jžDM:•Ù³g›­RëîîΪU«øúë¯Ù³geee°páB¦OŸÞ¬k4tèPúöíËÎ;)..¦[·n,Y²„qãÆ™íwÇwššÊW_}ETTTNA:²;v°~ýz6lØÐ®utD7êû[Q(ò“[:Ÿþy£û<ùä“uÊÜÝÝ™?>óçÏoVýÖ”{xxpß}÷™%íjHÿþý|_Mm»$IH’dóÑH6t sçÎeîܹõîãêêÊ#<Â#Úà>õµ­¾òY³f1kÖ¬ëìÑ£ÿùÏšÖHA„&--MRÒžutD7êû[1r–1[0­?c/¾ø¢ ZÒqÆ?ÐA¸‰utAlC¡PØ|ÈÚ—_~i³sý‘Ù2øèB»Ú½{7›7o¦  €ÀÀ@&NœÈŒ3äOùä~úé'&OžL=P«Õlß¾ŒŒ Þÿ}Xºt)Û·oçÂ… ,]ºT>ÖšöÕW‡5×àÀhµZ¦L™‚——»víâûï¿çüùódee1eÊ\]]‰eýúõÊIo¬=×ÁƒÑh4L™2ooo<ȦM›Ðh4òºnõ½/Ago¯ÄÇÛµZMHHH{7G¸N~~>Þ^ØÛÛ&–t:ñÉÝÍ£ººš¿ýíoòâ¶'Nä½÷ÞcÏž=Lš4‰^½z5ŸŽ¯X±•Je±Ž—_~™+W®°råJúõëgÓ÷ ´ž–ô‡­[·rùòeÞzë-³Tý#FŒ`ùòå|ÿý÷òÄÓíÛ·£Ñhx饗ð÷÷—÷ŽŽæÑG%))©N cm?;pàýúõcñâÅr™ŸŸ;wî$77—nݺ1vìXâãã¹pácÇŽ•÷³¦}õÕaÍõ(..fõêÕtíÚ¨™§ùä“O’žžÎ| / =pà@üq’““å@ÇÚsòî»ïÊ4ÇÏC=ÄáÇå@§¾÷%Bã ðâìÙ BCCÛ»9ÂuÎžÍ (Ð GG›œO,Ä"íÄßß_¾©51eêKHHËBBB,9:ŽW^y…_~ù…§Ÿ~ÚâÊÄBÇÑØ::-éñññôêÕ ///JKKå¯àà`:uêÄÑ£Gå}/^ÌgŸ}fDH’„F£ÿ6iN?óööæìÙ³lÛ¶‚‚bbbX½zµY0`‰µí³Äšë*9€ü}ïÞ½å S=———7û\={ö4[&@©TÒ½{w®]»Öèû¡q …‚àપ*8wî\›¯#¾šþuîÜ9ªª*°Ù<ñDGÚIí+Ó P~~¾\æååeñø'NÈÿPœ>}šÁƒ·A+…ÖÒØ–ô‡œœ´Z­Ù_µÕ^»@¡PPYYÉŽ;ÈÌÌ$??Ÿ¼¼<´Z-€¼˜³IsúÙ#<Âo¼ÁºuëX·nݺucäÈ‘Ü~ûíøùù5x¬µí³Äšë5ÙõmêÌm2•K’ÔìsYúùÙÛÛ›Õ)B˸»¹Þ§ ÉÉI 1Ú¡8}ú4'NgÈàž¸»¹6~@+Ž ´KŸf˜nvj§_¬/£££#Ë—/ç›o¾aÓ¦MDGGÓ½{÷¶i¬ÐæZÒ$I¢W¯^,X° Ñó$%%ñúë¯ãææÆÀ‰ŠŠ¢[·n„‡‡ËC§jkN?8p kÖ¬!99™ãÇ“ššÊ† ؾ};ÿþ÷¿éÑ£G«µÏk®´l [žK„¦Q(ú1h ‘S§Ò8þ<$((WWWñ{h’$QYYI^^'OžD£©dÐÀP‚ýnœ¬k%%%mY½ ü¡Yúý¸|ù2€ÙЖú <˜AƒáííÍßÿþwÞÿ}^{í5›ç¨ZGKúC@@ååå 4¨Î¶¤¤$³¡nk×®Å××—Õ«W›e$ºzõªÅº­ígz½žË—/ãääÄèÑ£=z4‡æÍ7ßdçÎfÉ®gmû,±æz´”-Ï%BÓÙ+•t ÄSåNVv>é'Sˆ‹+£ºZ#ž Ú€B¡ÀÙÙ /Oü|ÜèÚ¥;nbA¸YdffréÒ%ùÓqI’ظq# …‚[n¹¥ÉõtëÖÙ³góý÷ßóÃ?0cÆŒ¶j²Ð­£Ó’þ0räH6mÚÄáÇÍ œ:uŠW^y…ÈÈH–/_@QQ=zô0 "$Iâ»ï¾W¿^SûYII ÿøÇ?0`/½ô’\n:ÒØÓ)kÛg©k®GKµÕ¹Ä‚Ðrvvvxzz R¹£ÕêÐë ¥Æ‡¿ ­ÃNa‡½½GG‡v{Š&Ah'îîî¬\¹’éÓ§ãííÍáÇIMMåÏþ3]ºt±ª®?ýéOÄÅÅñõ×_3räÈ:)¨…öר–ô‡9sæÀêÕ«9yò$aaaäää‹«««YÖ¯ÈÈHâããyë­·ˆˆˆ ªªŠøøxÔj5TVVÖ{ž¦ô3n½õV<Èk¯½ÆÐ¡CÑétüøã8880iÒ$y_¶lÙÂôéÓQ*•V·ÏRÖ\–j«sYz_‚ 4B¡ÀÉÉ'§ön‰`k"Єv2fÌüýýùá‡())!88˜%K–0nÜ8«ërppàá‡æŸÿü'~ø!/¾øb´XhK-é®®®¬ZµŠ 6pôèQ~þùg\\\úè#RRR¨®®ÆÙÙ¹ÎyšÚÏüqüýý‰‹‹#)) gggúôéÃc=FÏž=åýî¸ãRSSùꫯˆŠŠ"((ÈêöYªÃšëÑRmu.KïKA°Ž¥çH“fŽÖÜóØD¥p6-¯Ö|Ú¤J÷ü¸ž “þ‚C@ã; B2êÔr4)+UãØ«YõäŸÃCÕ´~m:¯o@ŸfKAþˆŠÔíö¯pãYð×éQóaOQ~Eùeü¸5nPTþöUQëû* Z A°ÆÖÑA¡u‰@GÁ›£#‚ Bë²ùE‹1dÈžxâ‰V­³©Ö®]Û¤ý***X¹r%•••¼ð òŠØµ%''óá‡2vìØz‹AAÚ$IrÖ5‹“6„¶!!²®µ†Å‹›½Þ½{7™™™uÊ­áææÆÂ… yçwøì³ÏX¾|¹YÖ›¢¢"Ö¯_OPPwß}w³Ï#‚ ‚ ´>£ÑHYYYÙùWpõšXGÇVj¯£ãëãF×.bæ5j”Ùëääd233ë”[+""‚Ñ£GÇÎ;™>}:Pó‹³fÍ4 ýë_qttlÑyA¸ñ5¶ŽŽ ‚Ðzô99j~ÉÈÆÉÙ…ˆACéÔ©®®®íötáf"I•••äææ’––JNî/„÷éBçÎØÛ0]þ è´¥»ï¾›3gΰmÛ6L×®]Ù¾};çÎcîܹ„„„´wAøAŽ ‚mH’D^~!©'/2|x$ hï&Ýt nnn„……Fzz:ÉÉIØ)íî`³`³C:yyyìܹ“3gÎpíÚ5‚ƒƒ?~<·Þzk³ëÕh4lß¾¤¤$Š‹‹Q©T :”Y³fáææf¶¯‹‹ ‹-âÍ7ßdݺuÜsÏ=lß¾ððp&OžÜ¢÷'‚ ‚ ´®òŠJ22²‰ŠExxx{7G €½½=i©ÇñT¹ãáîÖøA­ Ã:ùùù¼üòËxxx0~üxT*%%%ÿüsÒÓÓÑh4VO6sqqaÅŠlß¾ãÇsèÐ!œéß¿?sæÌ!((€ï¾ûŽ+W®0iÒ$úôéS§/^Ì¿þõ/Ö¯_/¯ù#×ké§R+Ô!t|Ž. í9 òJ.’[r£dÀË-€.¾}òîÁ±s»(­,”ù#ö–´¹[À:ù„‘Wò+E¥Ù”UËu5·ÞëëПÞÁ#ùùÄÚVk· ¶gú}5 hµZ«‚­NËGûŸá—ê]ô ÌPG°WÚFŒ$#FôH’ŒèP(t„úõâ×¢|‹o¹ñƒ¦0h4šv;¿Ík×®m|'j’û￟û￿ζÇ{¬ÁcŸx≷»¹¹1oÞ<æÍ›Wï>óçÏo4«ZHHŸ~úiƒûB‹3mI’ÈÖuƒS `pèD\û÷ïgË–-äääàååÅ´iÓ˜9s¦ÙñwÞy'lÙ²µZ¿¿?111Ìš5Ël®Ree%ß~û-GŽ¡¸¸ooo¢¢¢˜7onnnfuΜ9“ÂÂBqwwçÕW_åá‡6ÛgóæÍ ^÷ö$BMAhc­1^¹£Œyš/=é"»[ÜäÝ/÷@N_Ž£¤"¿Îö¢²+\):K¿p¼=‚(*½"oû#öæ¶Ùtƒ¢7šÿÇ™zqO³êkè¸Úmlný‚ ´ŸëŸÀêõz X’zY IDATŽŽŽõfc3 ìLù‚KÆŒ ˆôè%Pzc5eº<Êty”ëÔTè‹‘:Šší¦øÉ( ‰²²Rª««qwwor›8€V«eÊ”)xyy±k×.¾ÿþ{Ο?OVVS¦LÁÕÕ•ØØXÖ¯_O`` QQQòñ‡¦  €I“&ʱcÇøâ‹/ÈÎÎfÉ’%TUU±bÅ ²³³åý~ýõWvíÚEjj*«V­ÂÕÕU®366–îÝ»óàƒ¢V« déÒ¥lß¾ .°téR‹×^«Õ6{>}kŽ ´±ú†»89¸Ò«óp¼Bp´w¦Z[Á•¢ Îç7ûä¸ö…ÂŽž†ìÛGt E¥W8{%‘JMË2 m«ÿðnõö… Ÿ0$IâJÑÙz÷ÉÈN #;­þ÷ù‰×§rsö¢gÐ|TÁ89¸‚$Q^]Â%u:Ù…¿Èû5¥µ¤¯99¸Ò;x^!(í¸Z¡æ—¬x‹mVÚ9Öy(¼ÃpvtC£«"ÿêEÎå$¡Óÿ>Üaòðß?A¼cØCìJþXÞ–5“ãçcå×rS©)%40WgO´ºjrŠÏrîJ’¼~ƒ¥ãjŸ£¾ú앎„uNwœ\Ñè*É+¹Èùœdtóv7¥-‚ ´.Kÿ–J’Duu5vvv888˜=m‘$‰’Ò"¶ž{“½#0 A2*¨2\¥Xs™kÚl*õE(ìÀNQóÁKÍß¿%¨ÒHxeßÁøXÝæââbV¯^M×®]çÉ'Ÿ$==>ø€€€Èã?Nrr²Y “ŸŸÏ£>JLL 111¼ûî»ìÛ·)S¦Æ–-[ÈÌÌdÙ²eŒ=€ &ЧOV¯^ÍÆ¹÷Þ{å: +V¬@¥RÉecÇŽ%>>ž .0vìX¹Ü4Ç´æeG Ahc–þ±u´wfTß;q²wáRA:åU%øzÖy8ÎŽî¤]ÜW»¹ŽþÝ¢éПKêt®Uàê¤"$0/·@œüF©ý?=¬çéæOYU±Ùýõ4ºJ ¥¿÷ 7gOné{'Z}5—Ôéhu•89¸ÑÍ¿CnCoÐ’[|hZ?jn_s°wbTølœ¹˜—F•¶Œ ïŒè3£N›•vöŒ Ÿ›“'—Ô§¨¨¾Š»‹7Ýúã«êBüéè 5OoRÝCH`žnþ¤þZó„ÅüwK2{ÝÙ§J;{2Õ'ÑèªèìÛ‹AC°SØsúrœÅã®?G}õÛ+ˆê37o.«OQZYˆ§›?Ýúã§êBü™Mr»­k‹ ¶`š7¢ÑhP*•(•J$Iâ蹟P¸•ádïD…¾„âêKk2©Ö—#%t0ARH89Úáê¬ÀQYäH@¥FÂåâíÌ}’.]ºÔIdÕ˜ÐÐP9Èäï{÷î-9€œÒ¹¼¼Üìxooo&NœhV6cÆ öíÛÇÑ£G ãèÑ£øûûËAŽÉ˜1cøòË/IHH0 tBBBÌ‚œë™²© ŒÆŽ÷Át¡Y tz ÆÅÑäs;É/Éà²ú4]üÂ9{%‰*MÙoü^G°_oŠÊrHÏ<(×U©)#$p ®N*ʪŠÛöÍmÂÉÞ…²Ê"ë'»×ê!(íì9zf UÚßÿóË->Ïm ð !§è<д~Ôܾ8'3~ àÚe ¦o »Î>aæm„‡‹/qéߙ՗_r‘Q}gÓ³ÓP~É:@vaAÞ=ðtó'»0£ÁkàìèÎÁ“ßP^]@VÁƺ—N>=9uéÅã]Žö¿gÐ,¯*¦¢ú*AÞ¡ò7K﹡òk•jÊ«ž$É@YU!~žÝ,o©¾úË‚¼{P¥)#§øœÙÖ+Eôé:’ ïr€f}[AhkµŸ@˜>À¨®®&§ê4JÈ­ü…J] Z­„âJ8Cusèæ×<==qpp@­Vs¦fB•Z »_Æs{ÐCôêÕ Ÿ&'!¨A¡PÔ›,¡)åvvvuö3½6m“$©Áó4¥ÎÚ$I’SG+ ìíí=Æ–D #m®î/»«“'E¥Ùu¶itUhäÕÚÛj¾?™y€¡a“è×m4ýº¦¬ª˜ü’_¹¬>mö)¾ÐñôÖ­ÞmÕÚrœܰÔW÷û1J'B#ðpõÃÕI…«“ê·§&豦5·¯¹:{þ–,Áü½”W•Ôi³›³'J;{b†ZË^3ÅÒ5©ï:ý^^ó{d¾ŸÑh4» ×W™«“Šâ²‹û”W•ðÿìÝ{\Tuþøñ×™0Àpn‚ âýž¨™š·Ì{fm¶n–vÙvÛÊݶvͯíV»eûíòÛ¶­m_k»mm¥™ix SQEPÌPQä2€\æz~#rAý<:g>ç|Þg83œ÷|nz]Db¡;8»Ñn¼)o:HÞ>ÉÉO]°.Y.bV”c±ÈHŸÅ÷÷ÄôëOPPZ­”JeÃ~á’IF:1ƒÙHrœÅÙ•D§¸¸¸E¹‚‚ ¡µG’$‚‚‚(,,lQN–e  jwLΞ³X,ö„§µI\I$:‚ÐÜ@Èm<×ü—Ë]¬. )ó#Büûâ…Þ¯/qá76’”›¨¬-éÆÈW©¨1Ð'0µÊÃalGS:mC¢&‘[œEQyÃX›¦×Fˆ4câfc±)«¾@qùYªëÊ(¯)fúÈ{:|uþZk¨£åµ-·ˆY’$*.8™°Õׯá8’“mMžsÜ.·,çlÿæûµVG³¸[‹CrzþíŒE„nÓü½e³ÙìÝ­œ¾w%‰@)† õGñôS”w3tð0ÂÂÂÐh4-Z_*êlôɹ…Ùa¿$>>¾SIN{ZtÚ»Ý`0pìØ1FŒaß–˜˜ˆ$I$$$ IcÆŒaëÖ­¤¥¥‘`/—’’Byy9³gÏnWLILkŸa‹Y–Q«Õm½=®G€€€ž<¼ \Q™ÁpåB=ÌÙ‡@±oO¿Ïùzé‰í3š³ÅG©´¯¥"ý4»‹¯@¬6 Eå9ö›Ý>±Œê?‹~¡Ã8–»»‡ÏFè O®@ß œ3d9-<˜@ßpòJO4¹n.ÿ5 £éû~ø/ëåo<ÔZ‡²í¹ŽŽŸÛÓék­ö§ š_ÛÞ^þ-b®3V£VzPV}æBüûa²Ô7;Në FÓã:ÜÚþ-÷s^‡cÜ>^Nãðñ ¤ÎXÝÉXAè V«ÕÞÒÐFC¤÷rÍ_¡ñe]0cb§ætR///VÈPEªèß¿‡“œFÝÙ¢£R©xóÍ7™5kÁÁÁ¤§§sôèQæÏŸOŸ>}˜7oééé¼û>}š¨¨(Î;ÇîÝ» cÁ‚튩qÚìÄÄDn¹å§­76› ³ÙŒJ¥rÛghÑ„æìÍm¨Ì%&t$Á~‘”VåÛ·÷ JŸÀ8Nºü­ñOÇðÐx3iÈ”U_ íä7ö}ÊkŠ€†q⦩÷jkÒªóT\*&>bq—[©hX´slÜ •ç¦t¶§wN[RšõuwRÎÙþ-Ë9omuw¸~…?MF ³«yj¼É->Ú©XAè>ï-›Í†Íf»â@yOOO††M$ùLO´âééét_†ŠJ¥ÂÛÛ»ÓINÓc7ÜÑí#FŒ`À€ìܹ“ŠŠ """xðÁfXóññaíÚµlܸ‘ôôt’’’ðóócæÌ™,Z´ÈaÁжêž1cÇgÆ Œ7ÎaV¸æl6[§^Ÿî Aèa-odÎeæßŸÑ±·pÎpœÚúJ}à ×àœ!‹:c•Ã~FÓ% /ž¦O`£cgSZy…BIdÐ`l²•ü’Nëz‡áã¢Û|>óÌ.ÆÅÏgüÀ…•Ÿ¡¼¦€ŸpÂûc±É<³d¹Åµ`¨`-VOnb@ŸˆÐÇ£QyRgª&;?…ó†¬fc.w{9~~õ¦Âb ù鯱âR1ÇÏ梁®L|;|3š/‘òãFú… #Ä?šPÿh$IA©†<ÃqÎgb4×¶zmüp~/«‰ÿ~„úÇPo®ÅPq–#9Û5™ ]_TJ V›¹]×Qg¯5›l%íäæŸZu RyP]WFúéo3Ý!f«ÍLjö×ôï3šÿhú Âb5SVÏé‚CÔ+[œoÃ?ÎÆèH­¾6mî߬\^éèu ˆH ¤òÜåÅQ›Ç}òkbûŒ!, †¨à!Íuœ/ù3…éXl¦ÎÅ"B·‘$©ÝI4Œ9 `JìbòNdRêA©ëñ÷iÓuk:ãÃ?´ÿ¿·~¦\^øÜµñ‰DGz˜$9o.7[Œü— yÉÍw°Ë»ãÈÿ9C–eNætááv×#\=¬6 gŠ28S”áôù¦¿ãæ×†ÕfáD^2'š_OÀѳ»ŽÑžë¨+ךÕf!;?…ìü‡í{²>m±¿Åfæä…TN^H½b=™gv:ÝÞüµhþ¸µý•«©+gßñÿ:ÄଜÅjrzŽÍ˵7Aº_ãTÊí!IZ­–¨¨(×=ÅvÛ(ØD¿ðX<4W>@|ôÑGÝrœÖ&è-ÜÑ…M$:‚ÐÃzó‡Žà:ÇRÏ2ýP\%_Jôö{ŽÎü^ºB$:‚ÐÃD|`DBw‡ ‚pí“A£QSWWש14†|||ˆ°D PÿÔ2¤èÝË?ùäw‡Ð.uuuh4j—%Ž.Ot/^LBB«W¯vuÕ‚à½ýÛAA¸V¨TJ|1 DGGwê•Je_XT©PŠ¿åݤ¸¸˜T*×LL Zt¡‡‰GAAp FMhˆ?'OfÓùîÂJ¥Ò-³„]ëNžÌ&,4Æ5 ‰ŠDGz˜l,dÌaäøXw‡!‚pM“$‰ˆˆò ~äÔ©SÄÇÇ»;$á''Ož¤®îÃ"]ö%°Ht¡‡‰1:À¨ñqîAáºàã­eÐÀ¾:”†ÍfcÈ!îéº÷Ã?ž~˜Ñ£bññÖº¬Þ^›è´6–çÅ_$55•7Ú·]¸p 6pìØ1ÊËË‘$‰ÈÈHæÎËŒ3\º 8(­(tw‚ ‚à:¡î­^’$ÂBƒ9ÜFVV&§Nbøðá„……¡ÕjE—re™ÚÚZŠŠŠ8vìFc-#‡Ç$f]ëˆÂÂBžzê)t:sæÌÁßߟ²²2vìØÁo¼§§'“&Mrw˜ÂulÉä'Ý‚ ‚ ¸L™!ÛÝ! R*銟·¼üb²Že°o_5õõFûâ•BÏ‘$ OOüý| ô&²o?|}½Q(\ÛÿªOt6oÞŒÑhä¹çž#88ؾ}Ò¤Iüú׿&--M$:‚ ‚ ×…BŸŸ/:&“‹ÅŠM¶¹;¬ë†BR R)ÑhÔnkE»ê|»îº ???û6Y–1öAÜiëÖ­Ì;×Ýa‚ \w$IÂÃCƒ‡‡»#\íªOt$I¢¶¶–-[¶››Kqq1EEE˜L& aVAwIŽ ‚ ¸ÖU—è4ïW™––Æßþö7¼½½>|8&L **ŠAƒñÀ¸)JAAAÜ©×&:’$a6›[l¯¬¬tx¼~ýzôz=¯½ö^^^öí=£ ‚ ‚ ½S¯]ÉP§Ó‘››‹Åb±oËËË#''Ç¡\YYþþþIŽ,Ëü÷¿ÿÀjµº&`A„6lݺÕÝ!‚ ÂuÅ--:¹¹¹¼ýöÛNŸ{øá‡¸ñÆùöÛoyöÙg™Ÿþ¹»CÚË‚ ìm6UUUlÙ²…7ÞxI’˜>}z‡Žyµüî+**øË_þBnn.“&MbòäɨT*Nž<ÉöíÛÙ»w/þóŸ‰uw¨½ÆÕò»w²ÙlTW_"/¿˜²‹—¨¨ëè¸JÓutôÞDö ½>ÖÑÙ¸qc»Ê©Õjî½÷^î½÷^‡í7ÝtË–-³?ÖjµüêW¿âW¿úU‹cüáèZ°‚p 8zô¨CP¡wÒëõL:µÅö &ðÈ#˜˜ØáDçjøÝ˲ÌK/½DAA/¼ðñññöçf͚Ŕ)SxöÙgyùå—yã7P*•nŒ¶÷¸~·‚àN«•‚?fçãáéň‘cèÓ§Z­Öm­ ×Y–©­­¥°°£G3)(ü‘Aû‚Ê…Ÿã½vŒŽ µ¤³ctBCC8p çÏŸïæˆz‡ääd~üñGî¹ç‡$§ÑðáÙ>}:ÅÅÅdee¹!BA®6²,ST\Jæ±³ 1ŠÛo_B\\ÞÞÞ"ÉqI’ðöö&..ŽÛo_Âð£Èj/ûý÷ßc2™˜;w.þþþ|ûí·|ñÅœ>}š¼¼<æÎ‹V«%11‘÷ߟÐÐP&L˜ÀªU«Ø¼y3999¬ZµÊ]§+tA]]§NbÀ€Ü|óÍ|ñÅìÝ»×!Ñ©¯¯'55•o¼6÷Gå‡~`îܹ‘œœÌ_|Åb±w®««cÍš5äçç3{ölbbb8sæ ß~û-™™™¬[·­Vk?æž={0Ì;—€€öìÙÆ 0m®ivúôi¢¢¢ŽÕœŸŸ_‹×¤#±uå=ÔÕýM&kÖ¬¡¨¨ˆ[o½•ððpòóóILL$33“¿ýío~ÅûZZ'Ë2.ðÒúŠ$§—4h§NâÂã£]Òº&Apƒ7RRRÂêÕ«IHHÆ#Øl6’’’Xºt)ÁÁÁ\¼x‘×^{ÈÈH áƒâñÇ'++‹þóŸ„„„ ]|~ó›ßpèÐ!ûMÖÔ©SÙ¿?999m~c.¸ŸÅb¡ªªÊþØjµ’ŸŸÏgŸ}Fmm-K–, ""‚¸¸8’““¹ÿþûí­)))Fn¾ùf íß½Ùl楗^"** €éÓ§óË_þ’½{÷Ú¯¾úŠÜÜ\žxâ nºé&f̘ÁÀyíµ×øòË/¹çž{ìÇ,--åõ×_'""Âá˜ÉÉÉm&:•••ôëׯC¯UGcëÊ{¨«ûoÚ´‰óçÏóÊ+¯Ø_o€„„ž~úi¾øâ –/_Þ¡×Q¼¯¡u&“™bC#Gsw(‚C† !ãH*1Ñxxhz¼>1FGÜ --ÐÐP{’Óèþûïçïÿ;öm111ö,Àþÿøøxû `Ÿf¶¦¦¦'C:éJctÒÓÓí°Ü{ャ\¹’gžy†¢¢"V­Zň#ìe§M›FUUGµoûþûïÑëõ >üбįÆ:Üt+•J¢££¹xñ¢}[JJ ÁÁÁöD¢Ñ”)SæàÁƒ-ŽÙxsÞxÌ~ýúµXä¹9…BÑáoõ:[WßC]Ùÿþý 0ªªªì?ôéÓ‡””‡º:û: ‚ÐÀb±r±¼š>}ú¸;Á‰ÐÐPÊ+j¦úvÑ¢#nP\\ìpãÚÈß߇mo ›öíoº]L›Ù;]iŒÎ AƒÆÕ¨Õj k‘Lž<™õë׳wï^FMEEGeÑ¢EíJš_cÐpCÝôÚ)**bèСN÷oìjy¥cªTª+^z½Þ!ÁjŽÆÖÕ÷PWö/((Àd2µ˜A´QóñK}Aø‰ÔЪãááÑ-‡³X,T¿¿¾\‡×Æ:±\Iyxx`2™±É6—Ô'ApƒŽ|ƒ-fˆ¹>èt:FŽÙ®²¾¾¾Œ;–ƒb6›Ù·o6›ÍÞm­;´ucíì¹Î^§ñññ$''S[[Ûê83gΰ~ýzæÎË7Þè²ØºcY–0`€Ã²=U—  dYÆf³uy:z‹ÅBùÿ­Æ»ú̺†I„º)Êë,ËöWéÑD§¼¼¼'/W­àà` [lÏÍÍeÆ ,\¸¸¸87D&\-¦M›Fjj*GŽ!99™˜˜‡îh]B~~~‹í²,“——çÐe«+¦L™Âž={HJJbÞ¼yNËìܹ“ãÇsË-·¸4¶îBMMÓ$6--Ía&9AºÍfÃf³uzJ{’Sy õ˜Ù˜Ó·R__ß-±59±-½}FÅ‚‚{—Ýö0›Í.octÁ (,,$##Ãa{bb"ûöís˜·«\½ ±à\g×ÑiÍ 7Ü€ß}÷ÙÙÙN[sºò»?~<%%%ìÛ·Ïaûž={(++ã†nèô±›3f äã?&;;»Åó‡fûöí„……1iÒ$—ÆÖÆOaa!ÉÉÉÛ?Î /¼À—_~Ù©ãŠ÷µ ´M–åNßXÛ“œ‹é¨FÜŒl5¢èæqó±±±¬ZµªÍŸÞlË–-<þøãí.o±X°Ùl.OtD×5Apƒ%K–pàÀ^zé%æÍ›GŸ>}ÈÊÊb÷îÝöÇÝÅ××h˜©jÁ‚bey7éÊ::ΨT*&MšÄ¶mÛP(L™2¥E™®üîo¿ývRRRøûßÿÎ?þhŸÂyÛ¶m„‡‡sÇwtËyH’Äïÿ{žyæÖ¬YÃ7Þh“••Err2>>><ùä“öø][wX²d äµ×^ãØ±cÄÅÅQPP@bb"Z­ÖaƵŽïkA¸²ÆdG£i–Ò˜ähKSQ¸¬F$ $OÐ?C•@’dµ¶È)¨g?†×¸[Ûý%„^¯¿ªgMùävíÚEuu5!!!¬X±‚ tk]·Þz+™™™|üñÇL˜0Aô/¾†L›6mÛ¶1räH§ƒØ»ò»÷ööfݺu|ú駤¤¤˜˜H@@sçÎåg?ûY‹ø]ÄË/¿Ì7ß|ÃÆùê8 IDAT8xð V«•àà`æÎË’%K&pel]¥ÕjY·nŸþ9)))ìܹ///FŲeËfXëñ¾„¶5¶X­VL&S»’{’S”ŒzØM`3‚,!šydÀ²µáÇfK=¶’sX6â|ýjµºÕ/^LBB«W¯¾âù;vŒ?ýéO 4ˆ¿þõ¯öøwïÞÍßÿþwæÌ™ÃC=ÄâÅ‹¹ýöÛ å«¯¾Â`0̬Y³¸í¶ÛZšjkkùì³Ï8pà/^$ € &°téR‡®ó‹/fÑ¢E”––’ššŠ/¾ø"?ü°CŒ­%jL2›[¿~=óæLÄ×§}Ýô—=ôñ#¾Ì)+¾DYq5Û6í[Ôµ?ý\jòÿ: ^´è‚ ¸ÀÖ­[»½ûZbb">>>‹[ ‚ -g`´X,X­V4Ó®žõõõTUU¡µZÀjÈ’„¤ü)Ak=ru!ò¥"äšbäú2°™ì]Ù$5xäü•;&0û¾6»”6_$º¹Æ‰J†Μ9sغu+Û·ogöìÙ”””ð¯ý‹ÈÈHî»ï>û>ÉÉÉ”””0{ölbbb8|ø0~ø!ùùù<öØcÔÕÕ±fÍòóóíåΜ9÷ß~Kff&ëÖ­s˜311‘~ýúñÀ`0 eÕªUlÞ¼™œœ§c‰dYÆd2aµºf­œ¶ˆDGÁº+É‘e™ÿ÷ÿþUUUdddp÷Ýww¨ÿ¹ ÂõÀÙ wY–©¯¯G¡P V«[¬cU>ýAŠ?-bdv*ª¸Q ’mr}9TžG®ÊC®-m˜ÊKAC‚Óø%H:Pîú+µãàÜj Rã"Ñ­iÚJ²|ùrŽ9Â|@BBÿøÇ?0›Íüîw¿søü/..æ×¿þ5³fÍ`Ö¬Y¼þúë$%%1wî\âââøê«¯ÈÍÍå‰'ž°/ºõg©<´íÌ»[mÕi¾Ht[<<ù„­[·²páB{9ƒÁÀ±cÇ1b„}[bb"’$‘€$IŒ3†­[·’––FBB‚½\JJ åååÌž=Ûi"Ó\ãØ£¶¦ë–e¹Íi¶]Á­‰ÎÖ­[ÉÈÈpHP»­ 4¨Å>ÅÅÅ<ÿüóøúú2}útt:åååìÙ³‡÷Þ{OOOÆ×b¿ºº:^}õUJKKùíokOrÌf3ëÖ­Ã`00mÚ4BCC),,$))‰ãdzvíZ{“ãƒ>ÈŽ;ÈÍÍåÁìйv¤áÚS^^îîAáºeµ^n]i¯ÆdgàÀœQ¯â{Ëoˆ÷òj‘xzzFÍè©Ô|ý/üås`…KáC ÑhZ­³¼¼œ”””6c˜8q"‹…wß}¥RÉ}÷݇$IÌœ9“””6oÞÌèÑ£‰ŠŠºÞ½ùæ›Ìš5‹àà`ÒÓÓ9zô(óçϧOŸ>Ì›7ôôtÞ}÷]NŸ>MTTçÎc÷îÝ„……±`Á‚V»¿5Õ¸0sbb"·Ür‹ÓIl6f³•Jå¶®lnKtbbbÐëõ>|¸E¢3zôh§švìØÉdâÉ'Ÿt˜Ä`ܸq¬^½šŒŒŒ‰ŽÑhäµ×^£°°U«Vo.11‘ .ð§?ýÉa@ØèÑ£yñÅùæ›o¸óÎ;†‹íСCäææ2qâÄkGêAAº¦ñƺq¢Î ”×h4áåå…ÅbÁÛÛÛéq<== ¥É U5aXâ'âééÙj½¹¹¹¼óÎ;mÖ?iÒ$¾þúkòòò¸ûî» µ?wÿý÷óÌ3Ïðî»ïòç?ÿ€#F0`ÀvîÜIEE<øàƒ3¬ùøø°víZ6nÜHzz:IIIøùù1sæL-ZÔ¢—‘$INÏaÆŒ?~œ 60nÜ8BBZ_ÐÕf³µ˜ÊÛUܺŽÎرcIJJ¢¾¾OOOJJJ8wî\«7ýË–-cáÂ…ÓÜ5Θ´X}Õl6óúë¯súôižxâ t\¡þСCÄÄÄ Óé&> ³!êŽÄUõ‚Ð{íÚµ‹3f¸; A„ëŠÕjíRk‚Z­Æßß¿Í2ÓS+6äKp*ä.BÃñððpZ÷|Ðîúï¼óN§÷ˆ‘‘‘¼÷Þ{-¶Ï›7yóæµyL___–/_ÎòåËÛ,×VœÑÑѼúê«mîßH–e¬Vk› ¨ö·':Û·oçèÑ£$$$pøða|||Z$$$I¢®®Ž]»v‘——GII ƒÁ¾0Qóù»³²²ìØÉ“':t¨ÃóEEE˜Ífüq§õuWöéªzAè½D’#‚à:’$u9Éi/Y–‘.UàU›Gžz æ‹ @©Tv¹þ¦kÚ´æÃ?´ÿ¿·ÌvÖ\ãìv×Ídqqqèt:>LBB‚½ÛZk_FFo¾ù&Z­–Aƒ1vìX"""ˆ‹‹ã‰'žhQ^­VóøãóÕW_±uëVÆ×b훘˜—,¸çªzAAìS)÷4‹Ù„6ã+JuÓÈ™ð£¢ÐjµÝ²®ÌG}Ôî²î˜Õ¬#ÜÑ…Í­‰Ž$IŒ;–`08{ö,·Ýv[«å?ýôSxöÙg`ªªªrZ~ذa 2???þüç?³~ýzþçþÇ~áéõzjkk2dH‹}322fƒë WÕ#‚ ‚p½“$É>½qO“m6¬e…ÔöAÙà…Äéõº­·NoNt—ý^¹} Ó±cÇR__Ï'Ÿ|‚V«eðàÁ­–mœ–¹i’#Ë2_ý5ÐÐÓ™ˆˆæÌ™Cnn.;wî´o3f ÅÅŤ¥¥9”ÏÎÎæõ×_gË–-]95—×#Bïµk×.w‡ ‚pí“A£QSWWסuj:û2xûá9týúõ#$$ÍO³­¹òç“O>á‰'žpy½ý©««C£Q£\“‚¸}pÈÀñññáèÑ£Lž<¹ÍJ£FâСC¼ýöÛ 2„úúzÒÒÒ(--ÅÇLJºººV÷]¸p!©©©lذѣGlŸbïwÞáĉÄÄÄPTTDRR^^^Ý6A€«ê„Ž(..v˜ÁEèY½}ŒNóë¡=ëƒ]-ºãZ¿Vß/×êy ×/•JI`€/ƒèèè¯OR(Ñøø¡¡aR‚îè®v-+..&Àß•Ê5¸ý·¡T*5jÐкӖ+V0uêT~üñG>üðCvìØAll,Ï=÷äüùóF§ûªT*–/_ŽÉdâßÿþ7^^^¬Y³†3f••Å|Àž={:t(k×®µÏ9ÞU®ªGÚkçά]»ÖÝa½Äµ|=tǹ]«¯Ïµz^ÂõM£QâÏÉ“Ù.i¡P*•h44}òñÓúÏɓل… Ñ¸f!Q—·è¬_¿¾Å¶•+W²råÊ+–õòòâÞ{ïåÞ{ïmQö‘G¹b=C† i±ÝÛÛ›¥K—²téÒ+ÆÞÚ7›Íé¬îŽÔ#=íĉX,w‡!ôή‡ &¸äÛОÖ×úµú~¹VÏK¸¾I’DDDù?rêÔ)‡õ÷:yò$uu—ˆ‰$¹fœŽÛ»® ‚ \®¶utzè!w‡ ‚Ð)>ÞZ ìË¡CiØl6§“A ®õÃ?ž~˜Ñ£bññÖº¬^‘è‚›TUU±qãF222¨©©! €I“&1þ|‡±juuulÚ´‰Ã‡SQQŸŸcÇŽeÑ¢Ehµ—?,V®\Éüùó aÛ¶m |||˜8q"·Ýv›}˜¦­§+W®tÚ)t¿+%9½ízh>F§#Çs6¶çÿøGŽq¸ÞŒF#›7o&--Í>Ù̘1c¸í¶ÛZ¬ÎÝœÕjeË–-8p€ÒÒR´Z-C† áöÛo'88¸Ísƒ†õͶnÝʉ'¨¬¬&®™>}:“'Ovدµc´7þÆ×.88˜íÛ·Û_»I“&±xñböïßObb"ÅÅÅèt:fÍšÅìÙ³η£u‰Ïáz&Ia¡AŒn#++“S§N1|øpÂÂÂÐjµ.kM¸žÉ²Lmm-EEE;v £±–‘Ãc réë/Apƒêêjžþy*++™>}:áááüøãlÚ´‰²²2ûMH}}=ëÖ­£°°›o¾™¨¨(Î;Çwß}ÇñãÇY³f ^^^ö㦤¤`2™˜>}:þþþ¤¤¤°uëVL&?ÿùÏxðÁÙ±c¹¹¹<øàƒn9ÁÑÕr=´çxíe6›Y·nƒiÓ¦Jaa!III?~œµk×:œKsü1ßÿ=Ó§O'**в²2¶oßNNNýë_Q«Õ­ž[qq1Ï?ÿ<¾¾¾LŸ>NGyy9{öìá½÷ÞÃÓÓ“qãÆµùút4þ`6›™>}:~~~|÷Ýw|óÍ7œ={–‚‚f̘——III|öÙgÙÇ­v´.ñ9  R*銟·¼üb²Že°o_5õõFûâ•BÏ‘$ OOüý| ô&²o?|}½]>YƒHtÁ ¾ýö[ÊÊÊxôÑG=z4S¦LÁf³‘œœÌ¢E‹Ðëõ$&&’——ÇÃ?LBB7Ýt±±±¼óÎ;lÙ²…;î¸Ã~Ü‹/ò—¿ü…°°0&MšÄSO=Ejjªýgâĉ:tˆÜÜ\&Nœèâ3œ¹Z®‡ö¯½¹páúÓŸˆˆˆ°o=z4/¾ø"ß|óM›3R8p€øøx–-[fßÈ®]»0 DDD´zn;vìÀd2ñä“O¢×ëíÛÇÇêÕ«ÉÈȰ':­££ñWTTðì³Ï4,˜½víZ²³³yá… `ðàÁ<ýôÓdffÚŽÖ%>¡B¡ÀÏÏΓɌÅbÅ&ÛÜÖuC!)P©”h4j·µ¢‰DGÜ ##ƒàà`ûMm£Ÿÿüç,\¸>Œ^¯·ßÔ6š0a_~ù%ééé7¶ýúõ³ßÜ@ì†}ûö%++«ÏFh¶Æè\-×CwïСCÄÄÄ Ó騮®¶o #44”ôôô6rrrؾ};cÇŽE¯×3eʦL™rź—-[ÆÂ… Ñétöm²,c2™ìÿvgü‘‘‘ö$°ÿ¿ÿþö$°Oõ\[[ÛéºÄç€ 8’$  îŽDp5‘è‚”––:]W§Ó9Ü| èô}úô!;;Ûa›ŸŸ_‹r*•J4Ó÷mѹZ®‡î<^QQf³™ÇÜéóWZU|ùòå¼õÖ[|úé§|úé§DDD0f̦NJ```›û6.Z·k×.òòò())Á`0`6›†•»»;þÆdµi @‹±HÛ›¾¦­K|‚ 4‰Ž ¸Aw4á:»i,¯NWËõЕã9‹/&&†%K–têxƒæÿ÷ÉÌÌ䨱c?~œÍ›7³}ûvþøÇ?Ò¯_¿V÷ÍÈÈàÍ7ßD«Õ2hÐ ÆŽKDDqqq<ñÄ펡#ñwõwáʺA®=šèôäááŠÊ w‡àT`` '±ååå±uëVfÏžMtt4z½žÂÂÂådY¦  Àa|põº–®I’ì-#MUUU9<ÖëõÔÖÖ:ö5##__ßVë°X,\¸pì]ùÒÒÒx뭷صk—ÓµÙ}úé§ðì³ÏâééÙjŒméJüåʺA®%®ú@ aqqq1ÇwØž””Djjª}¥1cÆPVVFjjªC¹””ÊËË9rd§êwõ¬'BÃÖ\K׃¯¯/yyy QpîÜ9‡rcÆŒ¡¸¸˜´´4‡íÙÙÙ¼þúëlÙ²¥Õ:*++yî¹çøðö7. Øô|œ[ãôÌM“Y–ùú믆©«›rvŒ®ÄßQ=U—øáZ'º® ‚Ì›7ÇóÆo0sæLBBBÈÎÎfÿþýÌœ9Ó> yîܹ>|˜wß}—Ó§OÉùóçÙ½{7¡¡¡ÌŸ?¿Sõ7Ž HLLdÖ¬Yë´=£­1:×Òõpà 7ðÝwßñꫯ2~üxÊËËùî»ï¦¨¨ÈáœÓÓÓyçw8qâ111‘””„——W›èõzÆOJJ ÿüç?>|8f³™Ý»w£V«¹ùæ›Û<·Q£FqèÐ!Þ~ûm† B}}=iii”––âããC]]Ý_Ÿ®ÄßQ=U—ø® “4̺†èÙé:2bÖ5A¸y{{³fÍ6lØÀÞ½{¹téAAA,]º”Y³fÙËiµZÖ¬Yc_ 2)) ???f̘Á‚ ®¸¨bk¦M›Æ?üÀ† 3f !!!ÝujB'\K×ÃÒ¥KÑh4„kÍf£ºú'sNq®(ŸÒ²Rêë걉‰9zœB’ðôò$HD¿°¾ÄÇpË::ÎÒ+õìE7™~ñÈLR÷6LGyòh¿ón»ºkÛû̘}úç³ ‚«”²í×c£ê*Á¡:u¼’âSøêÚw3ÐX¯B-nA„ë‡ÍlpÛßÞF«•¼ü ìMݤ’8$ŽàP=ž^bÂe™ú:#%ÅedÿpÙ"19áF"ûF ê`ëñ²‡ ~DÃ:eÅ—(+n˜fÛ¦}K€: ö§ŸKMþ_Ô‹AhkA¡ûȲ̅Â"vìÝÅàqÄ ìßây¡çyzyNdt8§³Ï°cï.fß| Qá.K6E¢#‚à"ÉApšKµ$ÚÏÐQ‰‰‹D–¯¼6–гbã£Q(”$ÚO ÿ\|}:×Õº£\žè,^¼€ØØX^~ùåVË=úè£äçç“ÀêÕ«íÛ/\¸À¦M›ÈÈÈ ¼¼OOO¢££™·$:aaaqðàA§Ó¡8pN×bñ¶÷ßFÃË/¿ŒN§³oŸ7oo¼ñ»ví"--;xœ Bo!Æè‚ ô<‹ÅŠ¡ÄÀð„8dD—µÞÆW¯ÅjÀb±òÓÄ–=Ê-‰NTT’$‘’’â4ÑÙ¿?'NdÛ¶mÛOž<Ɉ#’œF , ))‰ììl‘è‚Ðëˆ$GÁ$0HJ›KZtlV55µTUVSQ^…Éh@ã¡Æ?@‡ÎÏ- ¥X ÉŒÑhÄæ¢qSnëº6qâD¾úê+ªªª—ÂÂBÎ;ÇÊ•+[$:þþþdggSTTÔbÝ€~ýúñå—_º$vAA¡w²É2õ¦KhÔ=×d Ë2•ÕœÏ-æd¾†Â?Jkc¨1ªðñ0¤­¡O ñ}MDE‡âçï{]¯°X͘ÍF—®cäÖDgÆ ¤¦¦2sæLûöýû÷£Óé6lX‹},XÀ{ï½Çc=Æøñã7n#FŒÀßßß•¡ B‡¸;AAp™2ƒÁÝ!`±˜0šëШ<»ýØ6«¢ÂÒ2kÈ. ¡Ö‚ÞWMl˜ OµY–¨ª3RYãKza9ËxÁÀ¸‘µ„õ n³uçg·<Î ‡ñÔ³v©LOìÛ%2ÔÖU¹|ܔ۸¸8‚ƒƒIIIi‘èŒ?ÞéÊ© .D­Vóé§Ÿ²oß>öíÛ`Ÿumîܹxzvÿ-‚ ‚ \=ddjë«Py«‘¤îë6&Ë2.“œn$»4o/ƒB}P«$d¹áyY–ñòP¡V*ñѪ(.×s䂚:s1“ÆzÅ–™+'í)ÓûvF½éf«É¥u‚›×Ñ™0a‰‰‰ÔÕÕáååEqq1gΜaùòå­î3gÎfÍšÅÑ£GIOO'33“ÜÜ\rssÙ¹s'Ï=÷AAA.< A„+Ûºu+sçÎuw‚ ×Y–±Z­ÔÔVâãåÝÐcL–eÊË*9x¤ŠK¢ñöÔèMD–øH?<=Tô ö¦¬²ž’ŠzöfQg²è«ÁPîÍñÂTGò¸ÙKC€Þ¯Íd§=kÿte} W®-d¶©5VãâÜ ps¢3qâD6oÞÌáǹ馛8p྾¾N»­5¥R©3f cÆŒ   €ÿûߤ¦¦òî»ïòÇ?þÑá ‚ ´›HrA\§±‹”É\OÞº.';‹•œSœ,@©òE¯óÀh¶2gB£š £ˆløgÆ <ûþa K/á륡¬Æ‡“¥ÁDžºÀ(?T*¥óØ‘¯ØÅ«=ezbߎ²XÍÔÔVºmªo·&:ƒ Âßߟ””{¢3~üx”Jç¿ø?üÙ³gâ°=<<œ?üá<òÈ#dffº"tAA¡—jzcm4Öa³Zñöòít76Y–©,¯$;OM•9„ð&³ …RbOf!i?–ðã¹rJ*ë™=®/·Oí·§š["yçëX¬6ÙÉÁ½™”•T ó÷!aÒp–üâ||µ­îûó9O²àÎi„öѳù‹$J‹Ëч0ýÖñÌ_2µK³Å™Lõ\ª¯Á-M9?qk¢#I&Làûï¿§¨¨ˆS§N±téÒVËïܹ½^ï(}Ÿ­ IDATô›Q…BAppp‹µwAA„ëKóDÁd®Çb5£õðAÝ‰ÙØl6™RC9…5:ÙAkÜžè :___>ÌŒ3Zí¶ ³®=û쳬ZµŠ›nº‰ T*ÉÉÉa÷îÝèõzî½÷Þ+Ö™››ËÛo¿íô¹‡~¸Óç"ÝañâÅ$$$°zõêNío4yë­·8xð f³™ùóçsß}÷uoB‡])ÉY¼xñ±qãÆî §K ·?îê5Ûzê}ÔÙã¶¶ßÕðZ ÂÕ¨­1!f‹³¥Ш4(Uj” UCâ")—fùÕj¥¦º†KVo4Jf  ‘d™ŠU—LTÖš©«7óâ/' Óª9W\Ãû‰?b±6´.IÈV+—¬¾ÔT×`µZQ(Z&ZGqû/fµÿKkþ†V™†ãÜ›Iÿ‘øùûP]Yc/Þ7ˆ°ð í?Î]+nmúê8´xùê˜rË ÛæÜvûv¥“¶?‹˜Í_]dl² ›ÍŠÅbÆb5a±ZZÙ]Üžè(•Jصk'Nl³ìˆ#øë_ÿÊ7ß|ñcÇøþûï eÞ¼y,^¼Ÿ+Öi0Z,FÚH$:ÂÕnÓ¦M|ÿý÷Lš4‰Ñ£GÓ¯_?w‡$´Sll, ,pwmÚ²e ï¿ÿ>Ÿþ¹»CéQ®x]/¯¥ ôV²,SoªÃf¼„lk¸ùoHZ&If³…‹¥È€ÙbÅbµQuÉdOrýê¶aüâ–TÔ˜øÕ+ßSYã8¥²R)!+J)*ÍC­ny+®ñTÔ·íîuFcE¥y^(Ål²ð«»ŸwZV©RØË6ß $ÂÃÅ|‡}Z+çÏå;”½LB’~’…BêÖi¼»‹ËgßHþæ7¿á7¿ùM»Ê4ˆAƒuº¾Þò¨ ô”ÜÜ\ á}%Ö•ººèõz¦Nêî0ÚtôèQ,Çoí¦L™B\\œ›"ê­½:{®Îö»^^KAp‡+MÝl±Z°Ùš ø·7ä´ÜW’$Ôj[Õ&ªjŒTT;&1~>ž¾g4ë>JçXÎE‡ç jµ­µZeOœTvå.uMÊÈ6™¨ØPæÜ1¾âRÓ E‹ú»ã)ÚŒ¥a¬U¶aµ$)P*(%U·LçÝÜÞ¢#B÷²Z¾…INïr-Ñùíoëîº]kï£Îžk{÷»_KApÉɶ X-&¬?%8ÎÊ´F_?o´†.Ök©¾dnQfxÿ†uÏ×ðñŽS-ž×¨•h4j´¶||ý¼Q h5†öÄÖX&0XGm‘ø¡Q-Ê?r_¯Çkú¸´¨¢ÅóÅÊlÿë$ËX-VlXêØúpW‰Ž ¸IEE}ô©©©Ô××ÏŠ+œ–­¯¯çóÏ?'99™ÒÒRüýý?~ûì38ÀÅ‹ `„ ,]ºooo‡ã´7Fg\ý>j~®íßÙ~½íµ„kIónT cILÈ´ÝÚÓ…RA ^‡÷©|”êþ( ¬6«C™cgJ¹ûÙ]T^ªo¹¿$á¥Q¢T«ð&Ÿ@½…²eK 44†\)Ʀe†ßП]›“™zšQãØËäüxõ¯maèèîÿÝüV_Z\ÉGÏ3xäå.º»·¦#)$FЩ×Ëjµ€,£RjÜÚº#>õÁ jjjøÃþ@UUóçÏ'$$„ƒ²víÚeM&kÖ¬¡¨¨ˆ[o½•ððpòóóILL$33“¿ýíohµ sä¯ZµŠÍ›7“““êU«\}ZBY,–V§È×ét:æž={0Ì;—€€öìÙÆ 0<ðÀTUUñÔSOQQQÁœ9sèÛ·/YYY|öÙg”””ðè£í¿¾êêêX³f ùùùÌž=›˜˜Μ9÷ß~Kff&ëÖ­³_³íÑ™Þò>êLü½íµ„kMÓ›s›ÍŠÅjnè²ÕÉã) ü| ÓýÈÅòÔÕ1™/';Ãû1¼ @‹nk¾Þj<½4øÚr (Á/`J']Æ~оÉÅå23Œ#ëðY>zs§O\ 2&„’¢ ’wÅÓKÂ¥“šÏñøJ•‚ÿã[¦Ì‰>Ø£‡r8‘™Ë¬ÛÆØ‘—ÉM¶a±™Q«4>FW‰DGÜ`Ó¦M žyæFnèÏ;kÖ,^yåöíÛ×¢ìùóçyå•WˆŠºÜ,ÀÓO?Í_|Áòå˘:u*û÷ï'''§×õZJOOouæÈζ̕––òúë¯Ñ0kÎôéÓùå/Irr²ýÆwãÆ”””°zõj€†ëÑf³‘””ÄÒ¥K n÷õõÕW_‘››ËOêlüíáª×R®5f‹InxÔ’­Ö‹þñ‘X-çPœÚO…zõ¾ýQÊ2[SóØ•žR© ¶¯‹MÂd©î4Aæ,† éß­Öëòz=M<öóW;ÓëŸü®Ëç%ѱ‰:Ãjµ¢T(]>µ¸C7hí¦ÃÙ·;²,3`À–-[ÖÓa W9g×U{¾ÉìŽo;¯G[Ïu¶þÞò>êîׯ)W½–‚p­‘i#B7¾'$IB©–Ðø0px ZŸ"NŸÜKqÍIêT‘Ø<úPeõ« µ…±oK¡>ÅÄ ëCdL>:-JµÒé{õõÿ<Ñm±v˜ >;,V+jµkgbëÑD§¼¼¼'/W­ÿÏÞ}‡EuåEú8t,Ø5Q#(¢XŠ»˜ÄH²®&f¿)¦ü’˜U×dM5ÅÍ&1É®›¨Ù]³£F±`A^Q±&b¡ ‚ tf~¸Ì:2”‘2 Ÿ×óÌsî¹ç|îåÌ0gî=çÔ „¾SVVV­4nܸ¡÷›þää令.Ú/…BAeeí©M¯_¿~Wå9;;ëm{lÛ¶éÓ§´¶‹‹‹‹Þö­Ñh¸té...wçî‡×QkK!î%& Ušêéø+ :t0§£Ê–}»àä¢"7ûy¹'(¼GÙr,­,P¹Øáä¢ÂÅ­?íí°²¶ÀÔL'Ǩ­ó%‰ j4˜´âñ·½%L…¸øùùqõêÕZãvïÞ]+ïðáÃÉÊÊ"66V'ýäÉ“¼ÿþûlݺµEcÍcÏž=ÍV–R©$##Cg±ÉK—.qþüù»*ÏÇLJ¬¬,ÒÒÒtÒȉ‰Ñ™ÂXßÕ’; >\oûŽŠŠ"??Ÿ¡C›ç>ðöþ:jKçRˆ{†,,,¨(­Ð.ÈÙÜÌÌͰUZãÚÙ‰>tÇ{ÄFÂÓ|xx’£Æ Á{Äú<Ð×ÎNØ*­137Ó.ÎÙVk6¿Î^ŸÝjõ•—V`aaI+ÝÂ&·® aÓ§O'..ŽÏ>ûŒŸþ™®]»’ššJjj*:yƒƒƒILLäÓO?åĉôêÕ‹ÌÌL°¶¶–‰Ú‰æ\GgäÈ‘ìÝ»—•+W2zôhòóóÙ»w/nnn\¹rÅàò‚ƒƒ‰çÃ?dÊ”)têÔ‰ôôt"##µÏkØÙÙ·f›6mšvÛÍž=›„„>ûì3Μ9£yß¾}tîÜ™9sæÜýÁߦ½¿ŽÚÒ¹â^affŠ‹“3Å¥8¹µÜ•Z…B 0é`Bssll¬Ñ¨ÕÔÜQªP€ÂÄäÖÕ‹VºbÒ\¿VŒ‹³ ff­s ›tt„0KKKÞ{ï=¾ÿþ{¢¢¢¸qãÝ»wgÅŠüå/ºƒ­­­Yµj[¶l!!!ƒbeeÅC=DHHˆÎ Kâþ°`Á,,,ˆŽŽæÿøîîî<óÌ3üöÛoüøã—gkk˪U«øþûï §¸¸,XÀ´iÓtòNš4‰cÇŽ±qãF|}}qss«Už «V­bÓ¦M$$$†½½=AAA<úè£:‹s6E{µ¥s)Ľ¢Cszvõäøùc8wêØâõÕt`n]ŸhÝñ'íÑÕ+E ê9˜Ì[¥>}ÝKó‰3FU<ñüx’¢oÍèrîx6×~Ó¨BÃ÷m`ÜÄßcb.÷ ãRWæjÛcâ¢\œ]{×½S=®æüŒ²qíº¦^G—¾wU—BÑåçž5Úÿ^€â7Ùy`ö¬põ0|æHÑ2r.RUÊôÀ©ØÙÚ4¼Ã…<ó4}Ýú"(?ç&ù9ÅìÛ ”%ÿ}ܼí÷R L®è!D+hÌ::B!šÎÖÆšQÃF¹µZMçnNÆé¾—ù[W.\cÒñµ±nµz¥£#„­@:9BÑ: îܘ0zaÏŸ?Ÿ+V°iÓ&¨7§§'ÁÁÁ*¯©suRWc>2¤L!„B!DÓ´‰ŽŽ££#sæÌáßÿþ7ÿú׿ôn/))aÀ€µ¶¥¥¥5x똡±4w]­¿B!„ÂÈctnçïïOß¾}III©µÍËË‹œœ’““uÒÏž=ËçŸÎîÝ»›-Ž–¨«5ãB´M2FG!„h]mâŠܺÝì÷¿ÿ=o¾ù&•••:Û¦L™Bjj*k×®åôéÓxzz’MDDVVVÍ:cYKÔÕšñ‹öoáÂ… 2„Å‹·ê¾¢e54F§5þv999ÚIXÚ»… ÖJ355ÅÖÖ–=z0fÌÜ*±û¼»~!„h«ÚLGnÍ‚6kÖ,~øát+++–/_Nhh(©©©DGGciiÉ<@pp0nnnÍCKÔÕšñ !„>ä‡~`íڵƥÙtïÞÀÀ@íóŠŠ ²²²ˆåèѣ̜9“éÓ§·h Æ>¯Æ®_!Ú²Vïè¬[·®Þí“&MbÒ¤IµÒmll˜;w.sçν«ò Io‰º[¦B´„Ó§OSUUeì0𕽽=#FŒ¨•>aÂÞ{ï=vî܉O‹~™dìójìú…¢-k3ct„â^&ctZƒƒóæÍC­Vcìp„BI›ºuMˆûIQQ[·nåèÑ£”••ѳgO{ì1½yËËË %99™k×®¡T*ñòòbæÌ™µÖ‡m“¡ëè,\¸©S§âââ¾}ûÈÍÍÅÖÖ–#F0sæLíú[ÕÕÕìÞ½›øøxòòò°¶¶fÀ€Ìž=gggmY·—{ûUçììlöìÙÃéÓ§¹~ý:îîî0zôhƒã[m{ûöí¤¥¥qãÆ ìííñóócêÔ©˜ššjóµd»2dVVVœ;wN'½±u6å¼.\¸‰'ríÚ5ÒÒÒ°¶¶fÙ²e¼ñÆzÇa}ñÅ=zTçïÒ˜sXßßµ´´”;v’’Baa!;vÄÛÛ›3f`mm­³Ÿ¾XkŽQ!Ú3éèa7oÞäÝwߥ¸¸˜ÀÀ@œœœHMMå£>ª•·²²’U«V‘››‹¿¿?®®®deeÁÉ“'Y±bVVVF8 ÑÒ¨¨¨ •JEBB{öì¡¢¢‚yóæ°qãF>L@@]»v%??Ÿýû÷sþüyÞ{ï=ÌÍÍY´h ##ƒE‹iËÏÉÉáwÞÁÎÎŽ€€”J%DEE±~ýz,--6l˜AñóÎ;ïpýúuèܹ3gΜaÇŽäççk?œ·t»611¡sçÎäææjÓ ©³)ç ""æÍ›G^^žA‡ÆžÃºê/++cÕªUdeeñðÃÓµkW~ûí7:ÄÉ“'Y¾|¹Î¹mJ¬BÑ–IGG#Ø·oyyyü¿ÿ÷ÿxðÁ3f ûÛßHJJÒÉÆ•+Wxë­·pwwצ2„>ø€]»vÉÌ}÷¨k×®ñî»ïjǘøùù±dÉ’’’´‹øøxúôéCHHˆv?ÂÃÃÉÍÍÅÝÝ#FpäÈ222tÆ´8p€ŠŠ ^ýuµéÆ céÒ¥¤¥¥éttÏÞ½{ÉÏÏgñâÅ 2¸Õ¶Õj5±±±Ì˜1GGÇVi×666dddhŸRgSÎ+€Z­æ¥—^º«uÒ{ëª?,,ŒK—.ñÿ÷øøø0jÔ(zöìÉÚµkÙ½{7sæÌi–X…¢-“1:BAjj*...ÚNN‰'ÖÊ{äÈ<==Q*•knnn¸ºº’ššÚZa‹&¸›1:ݺuÓHojjЇ‡ÅÅÅÚ4•JÅùóçÙ¿?ùùùÀ­Å+W®Ôù0¯OHH«W¯Öéäh4***´? ‰'-- gggíôóæÍãwÞA¥R­×®o¿¥Î:›r^ºtérׇƞú¤¤¤àèè¨íäÔðõõÅÑѱֹmJ¬BÑ–É!ŒàêÕ«ôíÛ·Vº‡‡G­´ììl*++y饗ô–uû9Ñv:F cÇŽµÒÌÌÌÐh4Úç¿ûÝïøúë¯Ù´i›6mÂÝÝ///ÆŽ‹ƒƒC½å+ JKK çÒ¥K\½z•ÜÜ\íZfjµÚàxòòòèß¿­|J¥¥R©}Þíº¸¸ø®ëlÊytê5TcÏa]rssõ¾¿têÔ‰³gÏÖ*W!îEò I#¸ýƒáí …ÞtOOO‚ƒƒ[2$ÑÕÕn׿>þøcŽ;Ɖ'8yò$¡¡¡ìß¿Ÿ?þñtëÖ­Î}ÓÒÒøê«¯°¶¶¦_¿~x{{ãîîN¯^½xõÕWï*žÆä©Ñ’íº²²’Ë—/×Z4´±u6å¼Â­1Buçû!çÐPúÞ{ ‰U!Ú“íèØÛÛ·dñB4(ÿ¶ÈmIÍ è;åê‰×ÑÑ‘’’ Pk[ZZšÜrr«ªªâÊ•+XXXàã㣽U)99™¯¿þšððp™¹î´iÓ&ìííY¹r%–––Úô¢¢¢»ŽÉÁÁAo;¾té{öìaâĉtïÞ½ÅÛõÑ£G©¬¬ÔcÔØ:›z^ë¢P(´WËnwçùnì9¬‹£££Þ÷FCff¦Î­ŠBq/“¯q„0‚aÆ‘ŸŸ_kâƒÖÊëååENNÉÉÉ:égÏžåóÏ?g÷îÝ-«h-±ŽÎõë×yûí·ù׿þ¥“Þ§O@÷›z}ßÚ×L¯|{'G£Ñ°sçNàÖˆ2d999œù„5kÖÔ;ýéýBS…) sKLÍÌè`Ú¢›×´Û5 ee%T©«ê)EˆÆ —ÛׄBˆVÔêctNœ8A\\sæÌ©ÕÉ077çÅ_¤K—.lذAï*Ò yå•W˜6mZs„Û.êŽåÌ™3<ùä“:œ$ €œœÒÓÓ[5¶öÂ̬¶VµÏ+*Ë¥“#š•tr„BˆÖÕêWt"""011©·3`jjÊ´iÓøê«¯HIIÁ××Wgûؾ};W¯^ÅÕÕ•ñãÇ3}útíÂpúÆ„”••±eËbccÉËËC¥R1|øpüqlmmuÊ/,,ä?ÿùÉÉÉáè舿¿?<òˆöjȬY³´ùgÍšÅöíÛkÕ½víZöîÝËW_}E§NtêøÓŸþÄ•+Wøæ›o0555(¾;EGGcbbRïÕ¯žxâ ”J¥6íÊ•+lÛ¶'NPPP€B¡ K—.é|(›5ksæÌÁÍÍ;w’••…R©ÄßߟyóæÉO?ýDff&*•Š©S§2cÆŒzcn‹ÌÌ:`nnAyy ÕjÃW„B!„mG«wtΜ9ƒ‡‡GƒÞÀéÓ§u::Ç'%%…É“'Ó­[7RRRøî»ï¸|ù2/¼ð‚Þ²***X¾|9ÙÙÙLš4‰Î;sùòeÂÂÂ8vì}ôÖÖÖ±dÉ ™LEEAAA¨T*öîÝË?þÈ/¿üÂ¥K— ÂÚÚš°°06lØ€««k­j[RRZŠF]Z£¦ZSõßñ9Õ¨«5Ü,+CÝŒ{{ûf+K!„hëòss‚€::ôíÛðB¢53„]»vM'½¬¬ŒW^y…1cÆ0~üx¾øâ ÂÃÙ8q"½{×^ŒjÇŽ\¼x‘Õ«WÓµkWmºË–-ãÇäw¿û€öJÑÒ¥KñññnsQ«ÕDDD0wî\œ;v,qqqœ?¾Î+)}úôÁÝÝèèhŽNtt4†‡~Øàøô¹~ý:ݺu«s»>¡¡¡”——óöÛoãìì¬M÷óóã¹çž#99Y§£síÚ5>ýôSºté@¿~ýx饗HOOçË/¿Ô®>pà@^xáŽ9Ò¦;:u131Góß „B!DûÕêct*++13k¸¥Ñht~ÖpvvÖvrjÔÜ—˜˜¨·¬¸¸8z÷îJ¥¢¨¨Hûpww§S§N$$$hó&''ãêêªíäÔxê©§øì³Ïppphø oóðÃséÒ%222´iÑÑÑtíÚ•=zŸ>&&&( ƒâZ´hß~û­N'G£ÑP^^ ýYÃÓÓSÛÉ´¿÷éÓGÛÉ´Sm߸qàxÚ … š†3 a ={ö;!„â¾ÒêWt(((h0_~~¾6ÿínÿ°]ÃÝÝ€œœ½eeffRQQÁüùóõn¿½ã•““àAƒjåQ©T¨Tªã¾ÓÃ?Ì÷ßOtt4Ý»wçÊ•+\¸pAç !ñéãèèXëÊWC %%%ìÞ½›ŒŒ rrrÈÎΦ¢¢@;Ír;o¿ªéXÝy bMúÔvÃÀ£dì„BˆûJ«wtú÷ïOll,7nܨwœNÍì`ýúõÓI×w墿CuÍdú¶÷îÝ›ã3ôÊHCœœœxðÁ‰‰‰áÉ'Ÿ$** …B¡sUÊøôéÓ§±±±”””Ô9NçÂ… ¬[·Ž   FŽIrr2}ô666 8___ºvíJ¿~ýxúé§kíßÜçE!„Bˆ–ÔêqãÆÅO?ýÄO<¡7OUU¡¡¡(•J†ª³MßÕ ‹/ÿ»²s'nܸÁàÁƒkmKNNÖ™‰ÌÙÙ™¬¬¬Zù222ضmÓ§O7x>ÿüs~þùg¢££4hŽŽŽwŸ>cÆŒ!**Šˆˆ¦L™¢7ÏÁƒ9yò$&L`ݺu8::òé§Ÿbee¥ÍWXXhб !„BѵúAƒ1bĶoßΡC‡jm¯¬¬äóÏ?çâŋ̟?Ÿ:èlÏÈÈà·ß~Ó>×h4lݺ…BÁÈ‘#õÖ9|øp²²²ˆÕI?yò$ï¿ÿ>[·nÕ¦ùøø••EZZšNÞ°°0bbb°±±Ñ¦ÕuéN#FŒÀÒÒ’Í›7“••¥„ànâÓÇËË‹¾}û²qãFΞ=[k{JJ û÷ïÇÍÍM;Á@~~>*•J§“£Ñhøá‡¨®–é•…hN2FG!„h]­~EàÅ_äã?æ‹/¾àСC :;;;²³³‰ŠŠâêÕ«„„„Pk_[[[þô§?1mÚ4ìíí‰åرc<öØcxxxè­/88˜ÄÄD>ýôSNœ8A¯^½ÈÌÌ$,, kkkñ2ÁÁÁÄÇÇóá‡2eÊ:uêDzz:‘‘‘Úç5ìììøé§Ÿ˜6mšv;YZZâëëKdd¤ö÷»O…BÁk¯½Æ›o¾ÉòåË9r$<ðpëÀØØXlmmyýõ×µ16Œ¸¸8V¯^Í Aƒ(--%..ŽÜÜ\ììì())©·ÎöÎÚÊJ;¥´ÎôÒêj,:˜5¶;×Ò·.”!233µ“DãiÌêêj<ÈáÇÉÈÈ ¢¢'''¼¼¼˜={¶v6JcjOí©¥_KM-ï^ÒØsÑšç¬=µU!DË0JGÇÒÒ’?ýéOÄÄÄÎ?þHYY*•ŠAƒ1uêTíŒdw3f ÎÎÎìÚµ‹‚‚ÜÝÝyñÅñ÷÷¯³>kkkV­ZÅ–-[HHHààÁƒXYYñÐC¢sË›­­-«V­âûï¿'<<œââb\\\X°`A­EN'MšÄ±cÇØ¸q#¾¾¾¸¹¹Õƒ¿¿?‘‘‘øúúbiiy×ñÕÅÉɉO>ù„]»vObb"ÕÕÕ8;;Dpp°Î„Ï?ÿ<¶¶¶$&&ƒƒ#FŒ`Ù²e|ýõפ¥¥QVVV+VѾìÞ½› 6°eËc‡"PXXÈ»ï¾KFF~~~Œ=333Î;Çþýû‰ŽŽæÏþ3={ö4ZŒ÷s{ºŸ½=’¿—ŒÔÑ[W!FÍèÑ£½ÏöíÛµ¿OŸ>½Þ¼wÞVfkkË‚ X°`Aƒõ¨T*ž{î¹óõèу¿ÿýïuÆx»AƒÕ¹ÍÐøêbmmÍ£>Ê£>Ú¨¼Ï>û,Ï>ûl­mo¼ñ†Îóºânlz}Ç-6f̃DžÕ8~ü8UUUÍ‘hn†?üÌÌLÞÿ}úôé£ÝȘ1cX¹r%Ÿ|ò kÖ¬©óêqKkïí©¹_KM)ï~ÕZ笽·U!Dó0ZG§¥”––èŒ=¢={å•WŒ‚h{öì©óöµØØXΜ9Ã3Ï<£ÓÉ©1pà@8xð éééz'. kî×’¼6 'çLњNLL §Nn-p)D[VXXÈ¿ÿýo’’’(++£OŸ>z¯èé»§½°°ÿüç?$''STT„££#þþþ<òÈ#ÚoûgÍš¥S†\Y3®úÆèDGGcbbÂØ±cëÌÂO<¡…qÖ¬Y̘1ƒ¼¼<’’’°µµåƒ>ÀÕÕ•²²2¶lÙBll,yyy¨T*†Îã?^kZÿ+W®°mÛ6Nœ8AAA …‚.]ºĸqã´ùêkO†Ô§Occ¨‹±^KúÊ+))aóæÍÄÇÇsíÚ5ìííñõõeîܹ:“ÙÌš5‹9sæàææÆÎ;ÉÊÊB©T2vìXüqõÓ ùÝÙ&xàbbbxÿý÷éß¿¿ÎùøË_þBrr26lÀÂÂBï¹mìñÔ8pàÛ·oçêÕ«¸ºº2~üx¦OŸ®½ËBß93¤ýÈ{ŸÂ÷LGG­Vóí·ßróæM|}}µÓ( ¡OIi)u5júŽÉÔ”WT¶xý7nÜà7Þ ¨¨ˆ©S§âââBbb"+V¬hpߢ¢"–,YBaa!“'OÆÃÃôôt6oÞÌÕ«WY¼x1/¿ü2¡¡¡œ?ž—_~¹¥I4Á/¿üB×®]ë\  cÇŽµÒÂÂÂèÖ­O?ý4¹¹¹¸ººRQQÁòåËÉÎÎfÒ¤Itîܙ˗/ƱcÇøè£´õdee±dÉ”J%“'OF¥R‘ŸŸÏX³f –––Ú™ëjO†Ô§!1èÓ–^K¥¥¥,_¾œË—/3qâD<==¹pá{÷î娱c¬ZµJç\DEEQ^^NPPöööDEE±mÛ6ÊË˵ë™z~îlþþþÄÄÄ­ÓÑ)++#))‰‘#GÖÙÉ1ôxŽ?NJJ “'O¦[·n¤¤¤ðÝwßqùòe^xá½uÒ~ä½Oa¨{¦£cbbÂúõ놲cÇrssyóÍ72dpk,ÆêÕ«‰‰‰©wßšoK—.]Šv_µZMDDsçÎÅÙÙ™±cÇÇùóçë½R ŒïúõëtëÖÍàýª««Y¾|¹ÎZ[;vìàâÅ‹¬^½š®]»jÓ}||X¶l?þø£v&ÇÐÐPÊËËyûí·qvvÖæõóóã¹çž#99Yû!º®ödH}úƒ>méµôÓO?‘‘‘Á«¯¾Ê¨Q£€[kÇõíÛ—O?ý”­[·òä“OjóçååñùçŸk'œ àø±±±ÚŽŽ¡çG_›èÕ«±±±<õÔSÚ« ”——×Zî )ÇSVVÆ+¯¼¢]{üøñ|ñÅ„‡‡3qâDz÷î]«CÚ¼÷ ! Õêëè! 11777í³3fÌhpßääd\]]µÿèk<õÔS|öÙg8884k¬¢yÔ·ŽŽ‰‰ …Âà2»wï^kAḸ8z÷îJ¥¢¨¨Hûpww§S§N$$$hó.Z´ˆo¿ýVç´F£¡¼¼@û³>†Ô§OSchK¯¥„„œµ‚5³…&&&ê¤÷ìÙSgVMSSSºuëÆõë×µi†ž}mÂßߟ¢¢"Ž?®M;|ø0ŽŽŽ 8°ÙŽÇÙÙYÛÉ©Q3[éykÒ~ä½Oa¨{抎íIvv6>ø`­ôۿѬKNNƒ ª•®R©P©TÍŸh~õÑqttäÚµk—©ïï™™IEEóçÏ×»Ïíc? %%%ìÞ½›ŒŒ rrrÈÎΦ¢¢¸uKpC ©OŸ¦ÆÐ–^KÙÙÙÚ5ÌîTs›ÕõÜÉÌÌ F£}nèùÑWæèÑ£Y·nÑÑÑ 2„ÂÂBŽ?ÎŒ3êí`z<]ºt©•¯¦#—““£·CÚ¼÷ ! %!Œàö2·»sZt}îæ›ѶõéÓ‡ØØXJJJêÏráÂÖ­[GPP#GŽô·FCïÞ½ i°Þääd>úè#lll8p ¾¾¾tíÚ•~ýúiojˆ!õµD méµTW,umkLý†ž}Çmgg‡··7‰‰‰TVVƒZ­®÷¶µæ:žš|uý= i?òÞ'„0T‹vt Z²x!Ú­š·wÊÊÊjp_ggg½ù222ضmÓ§O—µ=Ú™1cÆEDDS¦LÑ›çàÁƒœ|8YYYÄÆÆê¤Ÿ} áNméµ4{öløì³Ï8sæŒv:æ}ûöѹsgæÌ™So<-q~j˜™™áççǾ}û011©5i€>†­­-úÓŸ˜6möööÄÆÆrìØ1{ì1<<<ôÖaHû‘÷>!„¡¤£#„XZZòÞ{ïñý÷ßÅ7èÞ½;+V¬à/ùK½ûÚÚÚ²jÕ*¾ÿþ{ÂÃÃ)..ÆÅÅ… hg8ª1iÒ$Ž;ÆÆñõõÅÍÍ­%K4““Ÿ|ò »ví">>žÄÄDª««qvv&((ˆàà`ìíí,ÇÚÚšU«V±eË8xð VVV<ôÐC„„„èÜBôüóÏckkKbb"ñññ8880bÄ–-[Æ×_MZZeeeXZZúÛ“!õéch wjK¯%V­ZŦM›HHH ,, {{{‚‚‚xôÑGµxjsŸŸÛùûû³oß>ܨÁû†OÍll»ví¢  www^|ñEüýýë¬Ãö#ï}BCéÙg>qƨ €'žORô­YUÎÏfãÚoUhø¾ Œ›ø{LÌ ¿Yˆæ¤®ÌÕ¶Ç]û ͼÎ+:Yyë,ïhä^~æµFÕ]S¯£Kߦ†B4Ùùóçyíµ×tÖºim³fÍÂ××—7ÞxÃ(õ‹Ö‘Ÿ{¶ÖÿÞâ¢\œ]k¯¥ÔWs~ÆN)Ÿ)ïW!Ï}šªªªæW!šlÏž=rûšBÑŠZ}2‚Ó§OsäȦNªwá;333žzê):wîÌæÍ›©¬”Ûˆ„íŸtr„BˆÖÕêWtâââ011!00°Î<¦¦¦L˜0 6püøq¼½½µÛŠŠŠØ¾};iiiܸq{{{üüü˜:uªvA°… jó/\¸uëÖiŸggg³gÏNŸ>Íõë×pww' €Ñ£Gðïÿ›C‡ñÁÔãóᇒ••ÅêÕ«155¥¼¼œÐÐP’““¹víJ¥///fΜ©³J³B!„¢õ´zGç—_~¡S§N vúõëÀÏ?ÿ¬íèóÎ;ïpýúuèܹ3gΜaÇŽäççk;8‹-âÀddd°hÑ"m™999¼óÎ;ØÙÙ€R©¤  €¨¨(Ö¯_¥¥%Æ cäÈ‘:tˆ¤¤$EÈ 8wšRYYɪU«ÈÍÍÅßßWWW²²²ˆˆˆàäÉ“¬X±B¦Ñ;!„BˆûN«wt éÙ³gƒù´ùkìÝ»—üü|/^Ì!C€[+1«Õjbcc™1cŽŽŽŒ1‚#GŽ‘‘¡3ÆçÀTTTðúë¯ãèè¨M6lK—.%--aÆѣGÜÜÜHLLÔéè$&&¢Ñh´e†……qåÊÞzë-Õ›‡ Â|À®]»xä‘GîòL !„B!îV«Ñ©ªªÂ̬ñý+F£ý=-- gggm'§Æ¼yóxçwP©Tõ–ÂêÕ«u:9†ŠŠ íO€‘#G’™™É¥K—´i‰‰‰¸»»Ó­[7Ž9‚§§'J¥’ââbíÃÍÍ WWWRSS}œ¢uY[Yaee…•¥å ,:˜×ùân…‡‡;!„â¾ÒêWtT*•vlL}®]»€½½½6-//þýû×Ê«T*Q*• –©P((--%<<œK—.qõêUrssµ¨ÕjmÞ‘#G²}ûvéÒ¥ ÙÙÙüöÛo:Wh²³³©¬¬ä¥—^Ò[Ÿ!:!ĽmܸqÆA!„¸¯´ú'ñÞ½{“œœÌÍ›7ë§söìYzõê¥MS(Mª;--¯¾ú kkkúõ뇷·7îîîôêÕ‹W_}U'¯ƒƒýúõ#))‰9sæ€B¡À××W'Ÿ§§§Q`B!„BÔ­Õ;:£F"!!°°°:;UUUìß¿;;;¬Mwpp 77·VþK—.±gÏ&NœH÷îÝë¬{Ó¦MØÛÛ³råJ,--µéEEEzó9’o¿ý–_ý•ÄÄDú÷ï¯s…ÉÑÑ‘’’ Pkß´´4ìììêŒE!„BÑrZ}ŒÎ€ðööfïÞ½ÄÄÄÔÚ^YYÉ·ß~Ë•+Wxä‘G07ÿ߸ˆ!C†““ÃÉ“'uö‰ˆˆ ))Ig†3“Ú‡V3ýóíFÃÎ;¨®®ÖÉ?tèP,,,رc999Œ9Rg»——999$''뤟={–Ï?ÿœÝ»w7t:„÷ £#„B´.£ "yúé§ùꫯX·n±±± <[[[rssIHH ??ŸÙ³g3jÔ(ý¦L™BJJ kÖ¬aüøñ¸¸¸pöìYâââ?~¼Îš75·Å………i§ƒ~衇8räûÛß0`eee$''“——‡­­-¥¥¥:õYXXàííM\\œö÷;ãIMMeíÚµœ>}OOO²³³‰ˆˆÀÊÊJf\kÃJJKѨ«QkÔTkªP««ÿûPS^Ѷ©]¸p!C† añâÅzŸÃ­‰4¾ûî;RSS©ªªbüøñ<öØcÆ YèÑØ1:ׯ_çÕW_E­VóÖ[oi'?1}mÍu¶TûÎÉÉ©µVš1Êh‹îÕãBÜ_ŒÒѱ°°àå—_&))‰èèhvíÚEyy9J¥’0~üx½ÿÜmllX¾|9Û¶m#::š›7oâääÄܹsk-@êïïÏ©S§Ø¶m^^^¸¸¸°`Álll8zô()))¨T*¼½½yñÅùç?ÿIzz:åååXXXhË9r$qqqx{{ë¤XYY±|ùrBCCIMM%::KKKxà‚ƒƒqssk™(Ĉgذa<øàƒxxx;$q—âãã077'**Š'Ÿ|ÒÈ_K´ïƒòÃ?°víZ£–ÑÝ«Ç%„¸ÿmZ0…BÁðáÃ>|¸Aû)•J~ÿûß7˜¯[·n|ôÑG:iVVVÌŸ?Ÿùóç×ÊÿüóÏë-gÀ€¬[·®Îzlll˜;w.sçÎm0&!šƒ¯¯o­±h5Ó /\¸°V‡\´/qqq¸»»cggGBBsçÎÕ¹…÷^×ZíûôéÓTUU½Œ¶è^=.!Äý§ÕÇè!šæ™gža„ :i5S£K'§íjÌ‹/rùòeúõëÇC=Dii)III­]Û!í[!Ds‘…^„0’òòrBCCINNÖN”áååÅÌ™3ëz]ߘ۷õ^…ÆÑ˜1:qqq 4ˆN:ñý÷ߟŸŸN¾… îßg¬ IDAT2uêT\\\Ø·o¹¹¹ØÚÚ2bÄfΜÙà^wÛöª««Ù½{7ñññäååammÍ€˜={6ÎÎÎM.¿æØšÒ¾ãeÞ^^vv6{öìáôéÓÚ5ßÜÝÝ `ôèѵbÑWFc¿æïèììÌþýûµG???fÍšE\\aaaäää T* dâĉ:Çkh] µ™úŽK!Úéèa•••¬ZµŠÜÜ\üýýquu%++‹ˆˆNž<ÉŠ+tf¬Ï¢E‹8pà,Z´¨…#-E­V“€ ýúõÃÔÔ”=zpîÜ9½Ã¨¨¨ •JEBB{öì¡¢¢‚yóæÕYOSÚÞÆ9|ø0tíÚ•üü|öïßÏùóçyï½÷077oÖ¶ †·ïÆÄXW™999¼óÎ;ØÙÙ€R©¤  €¨¨(Ö¯_¥¥%Æ «7.C?>>žÊÊJèØ±#‡b×®]üúë¯dff2nÜ8¬¬¬ˆˆˆ`óæÍ899i'Æ1´®Æ´y?BÜK¤£#„„……qåÊÞzë-ÜÝݵéC† áƒ>`×®]žµoĈ9r„ŒŒ FŒÑR!‹vòäIŠŠŠ5j¦¦¦øøøpáÂ>Ì£>ª“ÿÚµk¼ûî»ÚIOüüüX²d IIIõvtšÒöâããéÓ§!!!Ú4ÂÃÃÉÍÍÅÝݽYÛ6Þ¾c]e8p€ŠŠ ^ýuµéÆ céÒ¥¤¥¥i;:u•aèñ²råJ:wî ÜZ${ÅŠœ={–÷ß'''ú÷ïϲeË8v옶£ch]i3ò~"„¸—Èq_²¶²ÂÊÊ +KË;Xt0¯óÑ\Ž9‚§§'J¥’ââbíÃÍÍ WWWRSS›­.Ñ644F'66¸Õ¹©1lØ0 qqqµÖùêÖ­›ÎÌŽ¦¦¦xxxP\\\o=Mi{*•Šóçϳÿ~òóó3f +W®Ô~Ð6vÛnLŒu aõêÕ:FCEE€ög} =þ.]ºh;9€ö÷=zh;9€öŠ^IIÉ]×u·mF!Ú+¹¢#„dggSYYÉK/½¤w{Cc,DûSßÒÒRŽ=Š……ÎÎÎäååi·yxxpéÒ%ÒÒÒtÖòêØ±c­rÌÌÌÐh4õÆÑ”¶÷»ßýޝ¿þšM›6±iÓ&ÜÝÝñòòbìØ±8884¹üæÐ˜ë¢P((--%<<œK—.qõêUrss©¬¼µ¶Vͤõ1ôøU*U­€Zc™jÒoÿûZ×ݶ!„h¯äÓ”FâééIpp°±ÃmÀ‘#G´¦—.]ª7OTT”NG§æƒïݸ۶׿>þøcŽ;Ɖ'8yò$¡¡¡ìß¿Ÿ?þñÚõόٶ£>iii|õÕWX[[Ó¯_?¼½½qww§W¯^¼ú꫎ÁãoÊß±µëBˆö¦E;:ööö-Y¼ ÊÏÍ5vz9::RRR€jmKKKÃÎÎÎQ c©™mmÞ¼yµ®:h4¾ùæÒÓÓ)((hòûêݶ½ªª*®\¹‚……>>>Ú[ì’““ùúë¯ gáÂ…FmÛ±.›6mÂÞÞž•+Wbii©M/**jt ­yüò>"„õ“1:B——999$''뤟={–Ï?ÿœÝ»w)2ÑR꣓ŸŸÏ¹sçèܹ3ãÇÇËËKçáíí¯¯/†èèè&Çq·mïúõë¼ýöÛüë_ÿÒIïÓ§&&&M*¿946Æ;¯Q3=óíFÃÎ;j“ÒWFkKե︄¢=’[×Ä}©¤´ºµFMµ¦ µºú¿5å•-^ÿ”)SHMMeíÚµœ>}OOO²³³‰ˆˆÀÊÊÊ Y©DûP׸¸84 cÆŒ©wßÇôiÓšÇݶ=GGG†NBB_~ù%¤²²’ÈÈHÌÍÍyøá‡›T~shlŒð¿10aaabjjÊC=Ä‘#GøÛßþÆ€(++#99™¼¼œ;wŽS§N5©¾¦´½š[Ó’’’HKKž={²`ÁºwïÞäò›Ccbð÷÷çÔ©SlÛ¶ ///\\\X°`666=z”””T*ÞÞÞ¼øâ‹üóŸÿ$==òòr,,,ê,£5¿¥êÒw\BÑé™h>qƨ €'žORt:çŽg³qí7*4|߯Mü=Ž.}›-P!îF~îYm{¬ñ×µŸ0íÑ™u^Ñɹv¹ÎòNÅçåg^kTÝ5õš˜Ë‡!„÷uen­ÿ½ÅE¹8»ö¾«ò®æüŒRþ—Þ¯Bžyš>ƒn}q“Ÿs“üœ[SâïÛ ”%ÿ}ܼí÷R LnÄBˆVÐÐ::B!„h^ÒÑBˆVPß::B!„h~­>FgÖ¬YµÒ VVVxxx0a„v÷`Ö¬YøøøÔ¹þ…B!„¢ue2‚ž={ê̤V«)**b÷îݬY³…BA@@€1BB!„BÜŒÒÑqttdìØ±µÒ}}}yþùç “ŽŽhQÖVVÚ t'#¨Æ¢ƒ¹±Ã÷ ðððvwµZ!„hÏÚÔôÒ®®®ôíÛ—óçÏ;!„hVÒÉBÜÏÂö¦²òî'e™7ïñfŒFÜ/ÚTG C‡µVe¾rå Û¶mãĉ P(èÒ¥ AAA:ª««Ùºu+‘‘‘äææbccÃàÁƒ ÁÕÕU›¯°°ÿüç?$''STT„££#þþþ<òÈ#: £5¶^!„BQ·ÊÊ*^xéMƒ÷Óh4|ùù;-‘¸´©ŽNii)?ÿü3½{ÿožõ¬¬,–,Y‚R©dòäɨT*òóó9pàkÖ¬ÁÒÒR»ÐÞ?þñöïßÏäÉ“éÑ£¹¹¹„††röìYÖ¬Yƒ¹¹9EEE,Y²„ÂÂB&OžŒ‡‡ééélÞ¼™«W¯²xñbƒë¢>öööÆA!„h5ù¹¹zÓ5êj Ã&üÕ¨+›#$qŸ2JG§ªªŠ¢¢"íóêêj._¾ÌæÍ›)))!88X»-44”òòrÞ~ûmœµé~~~<÷Üs$''k;‡fÀ€,Z´H›ÏÉɉ={ö••E×®]Ù¾};W¯^eéÒ¥øøøˆZ­&""‚¹sçâììlP½B!„¢~ju%&¦ Ú§²²¼…¢÷£ttRSS™?~­tGGG^~ùe ¤M[´h=ö;vÔ¦i4ÊËo5üšŸpë›ósçαsçNFŒ³³3jó$''ãêêªíäÔxê©§xôÑGqpp0¸^Ñþ””–¢QW£Ö¨ï˜Œ@My…|{$šßž={ 2vBa4•%XX6~µºšªŠ›-‘¸×¥£Ó¯_?æÎ«}nnn޽½=nnn( ¼ …‚’’vïÞMFF999dggSQQÜššºÆ³Ï>ËÇÌúõëY¿~=]»veøðáL˜0'''rrrt:R5T**•ê®êBˆ†H'Gq¿«¬(ÁÔÌS³Æ\ÕÑPVZˆZ]Õâq‰{—Q::J¥’Áƒ7*orr2}ô666 8___ºvíJ¿~ýxúé§uò8µk×räÈRSS9vì[¶l!44”÷Þ{=zÔêH5G½B!„¢~ju¥7ó°²v`Ýú³oÿZy&Näé§PVR@UU™¢÷’65>ëÖ­ÃÑÑ‘O?ý+++mzaa¡N¾ªª*.^¼ˆ……£FbÔ¨QÄÆÆòÉ'Ÿ°gÏ^xáœÉÊʪUOFFÛ¶mcúôéôêÕ«Ñõ !„Bˆ†Õ\¹QœÍãs§’Ÿ•#)iÚíC‡z2›â¢+häÎÑ ›úÂòóóQ©T: FÃ?üܚȠ  €×^{¿ÿýï:û0@;eµYYY¤¥¥éä #&&ƒêBˆÆØ³g±CB£Q(h4ÿë¼TVÜdþ“Óðìî€gww~7o2¥7óP«ÿ÷K£Q7ún!îÔæ¯è 6Œ¸¸8V¯^Í Aƒ(--%..ŽÜÜ\ììì())ÀÙٙѣGŇ~ˆ——•••ìÛ·sss&Nœ@pp0ñññ|øá‡L™2…N:‘žžNdd¤ö¹!õ ÑÒfÍš…K—.5v(¢ ;F§  €§Ÿ~µZÍêÕ«éÑ£G GV·¶Þö233éܹ³ÑËh‹îÕãí—¥¥%UXYZQYUŽZ]¹¹9Ï?ûë¿û‘óçÐÁÂFCUU%æf˜˜˜RZZ‚¥¥¥±ÃíT›ïè<ÿüóØÚÚ’˜˜H||<Œ1‚eË–ñõ×_“––FYY–––Ú[ÓbbbHNNÆÒÒ’¾}ûòüóÏÓ³gOlmmYµjßÿ=áááãââ‚ ˜6mÚ]Õ+„ÍåðáÃÀ­IZ8Àþð#GÔ6íÞ½› 6°eË£–ÑÝ«Ç%Ú7'''òó¯Ñ©“&&·hW*íxiñ‚Zù«Õ•˜˜š‘ŸM;¡”†jõŽÎöíÛ ÊommͳÏ>˳Ï>[kÛo¼¡óÜÜÜœ'žx‚'žx¢Þ2U*Ï=÷\³Õkè1 ã³¶²ÒN)­;½t5?õ¥Í-22’®]»Ò±cG¢¢¢X°`:¶îÄýàøñãTU5m6¦æ(£-ºWK´o={xrîÜÏtê䆉Iã>~ª««ùùçŸéÕÓ³…£÷ª6?FG!î£ó믿òÛo¿ñàƒ2lØ0JJJˆm…è„¢euvw§²ª‚_ÍÀÄÄ´Q .PQYAgwwc‡/Ú©6ëš÷ª²²2¶lÙBll,yyy¨T*†Îã?Ž­­mûUWW³uëV"##ÉÍÍÅÆÆ†Áƒ‚««k“Ë-£1ct"##ðööÆÃÃo¾ù†ƒâïﯓoÖ¬YÌ™3777vîÜIVVJ¥’±cÇòøãcfVÿ[{[n{©cÖ¬Y:çâö«êW®\aÛ¶mœ8q‚‚‚ ]ºt!((ˆqãÆéìWW¿®¿ƒ¿¿?óæÍ#22’Ÿ~ú‰ÌÌLT*S§NeÆŒwõ·hìß¼¾ãÂØFŽðåÀƒhÔЧoßzóž;{–éÇ ßJщ{‘¾i,Ì'ÎUðÄóãIŠNàÜñl6®ý¦Q…†ïÛÀ¸‰¿ÇÑ¥þF,DKËÏ=«m5þºö›ÿx·®eå]¬³¼£‘gxù™×U÷õ !„÷‹ºþÞ¸yƒØ˜8LMÍ0`Î.®Xÿw†Û’ÒR®ææpêÔ)ª«+ñ5[ùbî~òÌÓôtklW~ÎMòsŠØ·#&(þ?{÷U•>pü;-ɤ’z ½H DªtTA®+ŠŠ®ÕŸ® *⮊«kׂÒDZ(ÒI¨!t !´´éw~ 2™™$“L€÷ó<ó8sî{Ï=3s1÷Snñ…GQ©çÀ(=:BÔ å¿íï&!„uFhH(Æ åèÑ£<¸Ÿ×c4š $&&†V­ZФIYVZT›$:âªTl0`Wl(v¥LŽ‚Él¹$ÇÞ!„ÂJ¥¢iÓ¦4mÚÔßMW8YŒ@!„BqÅ‘DG!„BqũѡkgÏž­Éê…¸lØív²²²ÈÊ:©Syìv{¹ûœ6äÖRë„¢ny å^7A‹_…ÅâýžL*•Š   bbbhÒ¤±Ì«uŽÌÑ¢†²fõttéÚ›„ú A¥òÜ¡jWl|ôÁ?¹cl ªR # ^Q²bMi/ñ/ñ—K| Ånãço"6¾•×Q{,–å<>áe¯Ûív…¢¢Br²±mëöìÝGŸ>½d¥4QgH¢#D *.*béÒ¥tïÑŽ’.n°Û±Ûm÷±Z6›µJsqÅs<€âa›ÄK¼ÄKüå_Âl5zÝ&üîؼþ0§BEhH-[¶£eËvìڙƊe© :˜àààZn©î$Ñ¢­]»–k{^GÛv½&6e™M…Žÿš肜åŠ]ñº§ ‰—x‰—øË%¾„ÑXìu›ðE± ÖT*¶C§nh´Ö¯ßÀàÁƒj¸eBTLqU Öë½Þ040@wIŽqüØ1´:­Ût@Q\Ç8Ûív¶mßE×.\ÊÅŠÙX€Á\ˆ¦Ôîmvïã¤=m“x‰—x‰¿\âlŠ £EºÆb.&0Èõïâ—_}Íý÷õ8§uëìÍÜÆ‰ãÇiаam5S$Ñ¢†8x€æÍšb1£Õ:Ëm6…›¶rüx=ºwÇrá»Ýn§¸0EqÜÇÇd6  D«uü’VÞ¯ Q•x‰¯düÜ™¿rsÊæý°€›SF (6–Î]ÆÐ[‡Ôz{$þê‹·…EgÝ~þg1£Ñ¡Ñ^ìÕY¸pyyyL˜ð¥{{ì çhÕªì—DGø$:BÔS§NѵkgŠ N…VˆÙláu[8sæ<mfSv»BqÑY¬–‹ãÓÅFAÑYBôáhµuîÂD⯜ø²ÛKz7}©ërz¿_·â»B±¡‹Õäuá?ŠbÅP”‡>8 öâv7nbòä)¼ðüs„‡‡a·+‹Ïbµ‰ŽŽbÃ†Ž©—ø«6¾ì>ŽDGñº_]k¿Ä_~ñvì(6«“¹¥‚åö…ÿ”ô²ä  F§»¸ÈÀþýøàƒxæ™Ç1›ò±_øÞ´’¸ ÿóKN³fÍ:t¨óµ¢(²lÙ2¾úê+T*}ûöõGÓ„¨1&S-[D`³Á™3çœåE…y¨Õºrï=`2Sl4¢Ø×®žæ™Ì¯õI¼Ä—•wÔåyIüÉ3Çj½=åÇ«T BZ­F«Ö‚Ü{å²`2`(¾xÄæÍrÏ]7RT‹F«s¹%‚u_ÈÈHzõêåVÞ­[7&NœHjjª$:¢F ØŠ])³Ráaeb¶ØÐb1›Pì6t ÛÅqèH0ÇŽŸ@Qì(Š.µúârÒjµì`²±)6l =BˆË…Ýv›‚U±¤ rùÿŸ¨;Ôj-ØíX¬&—Þ»®]Ú3î¾1ètZìv;V«ÖñwÌ`(&((°œZ…¨ujŽNll,‰‰‰9rÄßM¢Úbcc9sú, 1 ¢Ô=qì´lJPP3çw›Í‚Z­q¾V«5Å’à!®lv0šMèƒÑh$Ù©kÔj-– óGKþ> Ô›;Æ w‰`S,¨5ZNŸ>CLLL­·Uˆ²êT¢ Óé¿d—b2™˜?>›7oæÌ™3„‡‡Ó­[7n½õVBBBœqãÆãúë¯çÌ™3lÛ¶àà`&NœXÛoAZ&¶dï¾=$$Äxü¥²Ià NºlSÚ “=ņUV µ ë€¶Ÿ·ïèæˆ«’“ÅH¨.Üß ^¨Õ/ïºó¯qŠÍÆþýûi™Ø¼6š%D¹êT¢c49|ø0-Z´p–Y,¦NJnn.$>>žììlRSSÉÈÈॗ^B¯×;ãSSSiÔ¨wß}7yyyÄÆÆúã­AÃFÈÈÈàèÑc4kÖÌcLÁ¹.<ìæßX¬—fB\ņÕ*?îÔE¾ +|¸sÛâÅ‹9~ü8“'O¦a©4]»vå7Þ`Á‚Ü~ûí.uM˜0°°°Úy3B”£oß¾,þ}16;´J¬ä¯ãV’!kBˆ«Åföw„•ÛrÞìÛ»—»¶3t¨ûý·„ð¿$:;wîd„ nå‘‘‘<ôÐC´oßÞY¶eËš7oNxx¸Kr”@||<ééé.‰NãÆ%ÉuFpHÆ]ÏêU«È:r”¶mZ‹>(Èë*k%«Ö”]nZ!®t6›ôd×5*µ•Ýóß+»]¡Ø`àTîIvïÞÍfaðA{Œ¢¶ù%ÑiÙ²%·ÞzëÅFhµDDDçvñ—““ƒÅbñ˜•ì[Zx¸ŒïuKhh(7NVVYYGØ’–ŽÑhÀ^Á}#ÒS3k©…BQ·œ:¹ßßM|ýÕç^·•Ü1&&†V­ZФI“ro• DmóK¢æÒkS‘æÍ›3zôèJÅ–]È@O‚õzç’Ò®ËKÛ<Þ¢ºT*Íš5ó:WG!„¨kî¾û.7Aˆj©S‹xMqq±ÇÄhÛ¶m2LM!„Bá¦ÎwtëÖ“'O²yóf—ò½{÷òÁ°páB?µL!„BQWÕù›nº‰ôôt>ûì3233iÞ¼9999¤¦¦¢×ë]"B!„B¸ ½^ϤI“˜?>ééé¬Y³†   :tèÀèÑ£IHHðw…B!„uL­':_~ù¥Ïû„„„’’BJJJ•ê®Ê1Å•­Ø`À®ØPìJ™ÅLfYÞT!„ârWççè!„B!„¯$ÑB!„B\q$ÑB!„B\q$ÑB!„B\qêüªkB\®–ÿþµ¿› „BQ' ¾þ¾?†$:BÔ ÚøG,„Bq9©­ƒ%ÑW¥`½Þ¹¤´ëòÒ6t—ôXÑqm.i}B!„—«Ó¹{kíX5šèDFFÖdõBTètn®¿› „B!ü@#B!„B\q$ÑB!„B\q$ÑBøÝÒ¥K5j§OŸöwSÄeê\Þ ›µÜ9ÏüïLN–¿› „¸ŠÈbâªTl0`Wl(v¥Ìb &³ÅßÍ`õOplÅ —²nÏ=GÛ{ïõS‹jNnn.:ލ¨¨ c36üÆêÙÓ8qhfc1o.8Yåãþûßÿfýúõ.esæÌ©r}¢êž.POLƒtt;}oZ­©Ô¾9G2ùüÅÛiÞáZîþǧ¨5žÿ´ùã<ëüv ϼ—{’†û´ïû«gò]úoŒìП—†>X¥ãW—Éj&Pàu»/ßÛíkøzÊ=ô>–¾ZSMB'It„~±oß>f͚Ş={(,,Än·3nÜ8Ú·oϳÏ>ëqŸkð¿7¸dmœÁÂéœ8´‹”ÿû¸Â}NgáóÇPx.m@*µë@…ºpžUÕwé¿a²Z˜³3µÖ´c™|²nÛïcóS3Ê­ì÷f1Pkæ~Š.PÏõ}¡&š.„N2tMˆ:ªï»ïrgz:w¦§û»)—\ZZ/¼ðûöí£W¯^DDDШQ#zôèÙlöºßê9Ó­Ëco/â_³«7 &))‰‘#G2räHbbbªU—¨ž×fåùé[èÔg[SgqêØþr÷±šM|ûÚ}žË£U—ë¸ãïï£R]ü³VWγªz¬Ï4ˆˆeT§µ~ìÌ“‡Ù|4³­ün_¾·vÉÃýä;¬øñ=voX|i-„eÔzΨQ£ÜÊT*z½žF1lØ0쟜œÌ /xÿå§lŒ¯Ç¢.Rkµ ½2;]g̘Ahh(~ø!aaa¬[·ŽÎ;óàƒåÿjs$€Cï¦IÛ¤Úhª¨%Ú€@"ã3rü¿Ø¹vG÷¦Û¨•×}Vüô.9G2 «Çÿ÷±ÛµËý<Ûcc{ŒðÛñ+Ã×ï-iÐìKOeÛÊÙÌþøYZ\Ó‡ à°Úl²â*â—«¨ÄÄDFŽé|­( ùùù,\¸>ú•JÅ Aƒêü1„¨ª# pàçŸ9»gVƒ€°0"òí·UªÏtö,™_}EΆ 9‚Õh$(*Џ=¸æñÇ kÚÔ%þÐܹš=›³ûöa-*BBh“&ôxùe¢;v¬rle?~œæÍ›FQQ………Ô¯_¿ÂýÌÆbBëUÜû²nÝ:/^ÌÁƒ1„‡‡ÓªU+&Nœès{óóó™9s&™™™œÝ¥ÌpêY‹‘³a#-"àÂ…å¶wße÷_¸Äš 8“‘áäI(•¼ø닦M›ràÀ–-[FÓ IX|||•êòdÚ´i,]º” 0|øpBBBÈÍÍ%½ŠÃsssÙµkíÛ·§ÿþ(ŠÂæÍ›ùþûï1Ü[fˆéÓ§³páBZ´hÁ-·Ü‚^¯'??ŸcÇŽa·Û«ë«Ó§OóÜsÏѨQ#î¼óN¶nÝJjj*ÁÁÁÎ^ _ß›Á``úôéôìÙ“… 2gÎN:Eß¾}Y´h ,ࡇÂjµ2yòd:Ä AƒHHHàðáÃ,^¼˜;vðÖ[o9“-¯Êyÿ[Wþ‚ÙXŒ. ˆäëïñSSç™ÅfåáŸ_#ýØg™ îbÓÑ ^¹~<·–nö]Ú"²óóœ¯3rñè/Sùß=ÿ¢M¬£m "bIŒiäŒ9o($¯èœÇ6(v;æ¾ÅÚÃ#s±……»×°öð6fÞóšK²3ù÷O™»3Õ¥Žs†—÷pÉTpÞFD×§SŸ‘lMŦÅß–›èÌŸ?‹Å¼yó$ÑBø¬N‹‰§M›6†ÞY°À™ä´5ŠãÇ£‰¡(;›ìµk«\oPTI/¼@|r2! b3™ØöÎ;š3Ó™3d¯YCÓ᎟öÿ=‡ !iâDÂÃ1Ÿ?ÏùƒÝz~|‰õÅøñãyå•Wøøã ¨°çÂX\à|® ô·zõj–.]JïÞ½yúé§]z$ªš8$&&òÑG¹”5ŠÇ{Œ+V¸%Ë—/G£Ñ0uêTt:]¹uûë«ãÇ3|øp|ðAT*#GŽäÁdÆ ÎDÇ×÷¶ÿ~ž}öY’““Y¸p!ééé<õÔSôêÕ‹E‹‘ Ào¿ýƾ}û˜2e :urîß±cG¦M›Æ²eË1Âó°,]@³Ñå;/košcEÂz{úTSçÙ['ýØT¨øÇ ±ŒhßÜÂ3LZô1{rðÖÊ kÛ‹`ÝÅD.;?[:ö牾)Ï?Å£³Þ Èlà›Móyý¦ÇÜø_Ú"ÞJõÜË;wW*koG§ÑòúðÇèÓ¼ {s³xfÞ»œ.>Ï´µ?óÚðÇGONI’skÇ<ÐóVbBê‘“ŸÇÚ#;\êÝô÷Î÷øÎªÿ¹”U¤2ß[‰Ž½†³5uçòNpòè^â›´ñwÓM7±páB¯çŠB”§Î-F€Z]³Íªcˆº-X¯G¯×£ *ó$0@çõQ]ûp ùˆéÜ™žÿü'aMš  &"1±ZËFG$&Òæž{¨×º5º‚¢¢huÇÎíÆ3gœÏÕ.¦ yyrsÑœ@ý>}mÔÈ¥^_b}ѺukÞ{ï=ŒÅâ˜ìüâ‹/2mÚ4ÎsýÛj6‘&‡E_]\޶QK÷¡A%/^ŒN§ãoû›Û2•JU¥ö–Þ¯  €S§N9‡b?Þ->** ›ÍÆÂ… ïÏ_b}Õ¬Y3g’ Õjiܸ1gJ¾¾· ЫW/´æÕ¯_Ÿ¾}û:_Ûl6À‘p6hЀøøxrss¶mÛ™™éµÝ[w mùäÉÄb6ºÅdÊp¿…÷^Åš:Ïe:~”Ð2‰»»Ý@xP-cóÂàû(4»õ” kÓ‹Woø±¡‘tiКÛö`˱Ý^Û_žù«¸©]_ú'vG«ÖÒ!!ѹpÁ†¬ÎØŸ¶-àšú­x冇iR/`]-¢ñ×2K^jujuhJý,)+yxS™ï­D£V]œÏs²¼÷*;–Ÿ~ú‰¿þõ¯^c„›:Õ£c0Ø¿?­Z¹Nb´Z­äç—?淺Ǣ6œÝ»€×]U¼èöæÏ¥KÙÿÓOœÝ½s~>vEqn+ý¼ÃÓþæ›ämÛÆï))Ö«G|r2Ín¾™F]‡Ûø뫸¸8ÜñKöƉ‰‰aéÒ¥¤§§óæ›o À¤Ûš8÷ ‹Œ£ß­¸\$•uäÈš7oîüÿR°Ùlüøã,]ºÔíÙ“ &ðæ›oòÍ7ßðóÏ?ÓµkWzöìIÏž= AUb}î–Ü©Õj—ž-_ß[LLŒKe_—8zô(f³™‡~Øc=EEE^qÛãÿfÖOstOï>>Àí>6EùŽ›~†„E–ÛÞš8Ï98‡ÒÚÅ·p>ÏÎ?å²­sר&‘Ž9-§‹Ü“ÉÊØêOæîZÉÜ]+ݶ—®w_®cÕ¸~‰]Qqiÿ¿SZe¾·¥çTçŸñ#„Õå—D§lâb³Ù8vì?þø#ÅÅÅŒ=Ú%>==±cÇÖè1„¨ еü;·WUÆçŸ³ý½÷*ÛöÞ{‰¹æÍËÉ)8z”£K–ptÉZß}7Ý'MªRlUåä䘘ÈäÉ“ùùçŸùþûï™3gŽÇ•±,&ƒó׫ÕêÖ“S]ß~û-óæÍ£{÷îôéÓ½^À?üÀ‘#GÜâ[·nÍ'Ÿ|ÂúõëÙ°aiii¬]»–øøx—Éú¾ÆÖ_ß[eÙív7nìu^E½zõ¼î[”cqv»â5¦ä~9VkåzÁ.åy¦(žÛUº½š nvj°8z;‚tÞ‡a–§Øâ½·\G±*¶*ÃW•ùÞJ”þñE[ÅÏ@!*â—DÇ[âÍßÿþw®¹æ—ò¶mÛ’’â¾L‰W^y¥ÚÇ¢6„6lHþáÜX½šŽ?|Ézuö|ó ={Òãå— Žçìž=,ñr‘Ó¥ 1]¿Vde±iÊNnÜÈÁٳݒ_b«"''‡nݺ¡R©5jßÿ=999Îío.8IqÁYVüø.kæ~ʪ_>¦MÒ`¯éã±¾¸¸8Ž=ŠÕj­vH‰+VP¿~}&NœèÒ{±hÑ"¯ûпú÷ïÉdbÞ¼yÌœ9“Ÿþ™'Ÿ|²Ê±—ZUÞ[eÄÆÆRXXHrr²ÏCgô 'î¥A‹ŽÜ;ékêŹ“ JàLNgOVî7—òÒ¦Nõ؆íï¿O|r2á-ZŽJ£qܳŠŒ¬rlUX,Μ9ã\ k÷nÇ|…ƻćErý__p.'|ò诉NÏž=ùå—_øþûïÝÆõÛíö*ýû7›Íèõz—}7nÜȾ}û*µ`` 7Þx#3gÎ,wÈ–¯±—Buß›7IIIÌŸ?ŸE‹qÓM7ù´ï©cŽ„¡KÿQDÆ7öÓ¨UÎädq8cc…õ]êó¬b3¶,dÅþMü´m)7¶ëMvþiþ½ÂñƒCÓÈút*3¬íTáY MÅ­f¾Üø+ÛN8>ß;:­°ýžômÞ…¹»Vò}úbšÖK _b7BtAYŒdŸ?Ep€cÀÐ6=ùlýlvdïçÅEÓx¸×hbBëqâü)6Íàîn7¸Õ_/èâÐϙ鋹½ólŠBÖÙl:Õoé±M•ùÞJden@¥RÓ¨UW¯q²¼´¢:ü’èT%q©‹Ç—¯bƒ»bC±+ØìVÅvá¡`2_Ú á¥µàޝ\ÉÙ={8ÏËËs++¹W§NHKKãÝwߥiÓ¦ìØ±ƒ½{÷ŒÑè>„è™gž¡eË–ÄÄÄ@QQ6l@¥R1dÈ*ÇÖ_ß[e3†õë×óÅ_––Fûöí Äd2‘••Ř1cœK>—¥\j¥Ñx­¿CÏÙ±æWN;Àñƒ;h˜èÞK_SçÙÉ·°tïr Nóڲ鼶ìâÒîAº@^½áÔeê¯7ÏçëÍó]ÊÆ\3˜ëÛöòúËóXß;ص“œ‚ÓLþýSÛÇ_HtîO¾™UÓÙ›{„»×°`÷—XO‰N¯f ÐSd6ðîªïxwÕwÎmžî£•ûÞœu¬ž @‹kzæ}£,/-„¨Ž:µW:mp0Cÿ÷?2¿úŠ?—,¡àèQì6úøxâ{ô¨r½É¯¼Â¦W^!gÃÔ ú÷'é¹çXtÛmn‰N“ë¯çlf&†Ü\lf3º¢:u¢ÝرÔï۷ʱ¾¨_¿>›6m¢ðBÛ¶nÝJll,Æ côèÑDV£·(88˜©S§2wî\Ö¯_Ïœ9s°ÙlÔ«W6m\—°ýòË/Ýö/]V’è<öØc|úé§lÚ´‰M›6Ñ¡C¦NÊ—_~鲂Y‰ÐÐP¶lÙÂùóç±Ùl„„„ЦM|ðA—¥–}­ ¾¾·Ê ç­·Þâ§Ÿ~"--;v8Ë›4iRñ=t*ЩÏ}YŸó§³Iýé}îyaº[LMg‘Áá|wÏküwÝ/¬9”N^Ñ9‚BHnÒ‡{Žv¹Îø^·±åÏÝ:}œ|cz] ­c›r{—!ÜÔ®üC%KFxjÅ}ƒéç²ê`:ÙyXlVBô´‰kJÇ„Dgl°.ˆoîšÂ7›ç³tßFþ<—ƒMQˆ ‹¢GãöÎg·OâÃ?~dWÎAŠÍƒBiÝÐ÷¬ŒìÃÎåÁûÞ<¾ÜXY^ZQ’èQË´z=}”N>Zn\雊èccéÿñÇnå·­^íVÖ÷w*]¯/±¾˜½½róð*û½)ŠÙ=ƒÝ®Ð¢coÚ%+·Þ±cÇú¼‘B”›É!üæèÑ£ÄÅÅUú×ýÆÆòo^:“ãw”{Ÿqy±šMœË;ÁüÏ_t–Å6ô<¤D—·Ñ¥ÿ(~|çqòNòw¹œgo¯œÁžÜ#[Œ¤Ûï«èÖ¨m­¿*|ýÞæ}ö"G÷¦VÛŸz_æÌ !j”ôè!üf„ >Å»ç|6i çNçƒ Ž_ï½Ý§ãJRzÞPEJ†Û]nJßÇ‹ ´¸¦w…ûyò]Îæ#+s3_¼tÏüw[ÂåržÍز[º”jx¤Wݽ‚/ßÛêÙÓX¿àKtzî}ñ¢â›xŒBˆK¥ÖÊñ%¾¢áBTdéÜeËÛ÷NôX.ü£yÇ^<2u.˾ÿG÷lÁX\àï&Õ Os‰¼¹\p yªÛˆö×^Ï ”§P©*t  Ô3î•™|ûúýô~_¹Ã¦*Ë_çÙ m{³åÏÝœ)Î',0˜¤Fíx¤÷hÚTq êÚRÙï­Ë€ÛؾæWn7™æzÖr+…W#éÑzëçªk'ÏówsD9š¶ëÁ¯z^õéJu5üxS“ pÆ¿öË%lγ7GÔì=“j‚/ß[xTO¼û{ ¶F!\I¢#®JÁz½sIi×å¥mT|cJófM°ÛzõìÆ‚EËØ¸1–‰Mq&“™­Û2èžt :–¸‹¥ËÖ•uŒ¸Ë¥îÝ™ûÙ·ÿƒö!*²›·lgÁ¢eX­n3ÂyÜ©ÿžFvÎIú_׋&uô8+V®%#sŸ{½>ÈYç†i˜ÌìCDD6meÑo+0™LÜrë¥úø„B!„Uä—DÇf³’_pñžŠM!;'—y –a0~ãìv…øøhš5mĦ-Û¹óŽ‘h4jÒÒw`6›éÕ³+v»BÏä.lÙ²¬,è™ÜÅå¸V«•‰Ï?NÃñôî•Ä󓦲qó6ÆŒÀâßSùóØ Æ?t7ÉÝ;Чw‰-šðùôïYøÛrFºÑY癳çyuòÓ$$ĺԹyËîºóæKø !„B!ª¢foŠçái;wíå©ÿ{Õ­<22‚ÇÝI»¶‰Î}{÷Jbæ¿’¹g?;´`ÃÆt"##hÛ¦…‡c¸¾nÚ¤! Ä9Ë5Õg×®½Î²ô­»ˆŽªGr÷k\ö¿6¹3³çüÆÖmŒuƒK 1®u6L`WÆ>¯ïY!„BQ{j8ÑQy,m™Ø”›Gu¾ÖiµDD„…JåºOrr~üy>›6o§c‡6äç¹ç ÆöC¥RWxÌðð0·2Z}aŽ£<÷ÔÚ´nî±½õëDZgï!—mëÔh\êu…$žB!„W£Mt<'"J‡öm*UGXh(:¶cë¶ l6…Í[v¢( ½{u/S¿ÊË1UË\b/$(žÚk·;¢KoS©*Q§¨ìv›¿› „B!ü †Ͻ*•÷mžôéÝmÛ3Ø•±Í[¶Ó¤q5¬ïV§§cz:VÙØè˜(²srÝâìv;'²OãÚÓT™:EÝ ·PB!„¸:ù¥GÇ[ï‰7]:w$$$˜µë¶pðPwÞ~³ÛþjµÚË1+î}IêÚ‰…¿-gó–í$÷èêŒÚ°1³gÏsðn½GÒ£sy ÖëKJ»./m#0@çïæ !„BˆjòS¢ã[B Ó©IîÑ…Ô•ëP«Õôr¶æ°ø÷• Úæâýl¼«¤ü¦áCHKßÁçÓgrà@Mš4$+ë©«Ö’ËÈÃÜꨨN!„B!„ÿøièšÊç!^}û\KêÊuth߆zánÛìKÆî½ü2g!Ý“:ãõX%¯KþÌK“žbί¿‘–¾ƒ+×ÎÁ×qËÈë ®°ýeëB!„BøO­÷è|ûÕ‡UªK§u 'êÛ'Ùc½Íš5á·¦TêXr¼[YXX÷Þs÷ÞsG¹íð¥N!„B!„øm蚯–§þAHH0Ý»w•áaB!„BˆrùeèZeÙív>ùôk Ù¹+“Ñ· 0 àµN\ÍŠ ìŠ Å®”YŒ@Ád¶ø»yB!„¢šjö†¡ÕìyQ©àĉ²³O2p@_nycµëB!„B\ùêüе×þõÒ%h‰âR0/ý ã§O¢òst×¥”kÝ´Ó¼÷QïÀn*&|VA•ŽYüf ÖÍ ]Ê‚î›JÀˆÇªTßå xÊH¬;WTùs»j˜  ÷[½ÅSF¢œÁÏýˆmÿ& õ¸Ÿ’•8.5­{T¯ã!Dôðûþ;¸.u\‚Æýˆ_°íß,‰ŽB\P£‰NæռÀ¢šNçîõw.k¶ ‹öÚ‘¨"°CÓ±ê„æ¨š{ÝÏn*@^~Œe͘—~åœÇ£ ‰@ݨ-!ÿü½JíµœÆüëûXw®B9±»Ùˆ*<mû¾¦¼ˆº~¢ëñS¿Ã¼â[”¬]Ø …¨‚ÃP'$ôÐ;hZ&U9Ö'#¦ybYû JöATZ-(Š—X¦cYó#Jö!TZš–IÜ2m—!îá•ø|óÇ„®óžÌ >Æøõó€ë¡ü1ah; @Óñ:ÌsþÁáèŸø ë–ß°,ûUX4ú¿OGÓ¶—c«ÙÑÞ•ß¡œ<‚J†¶ËÇw×Ô­ ¡ïmÁ¼ì+,«¾³m÷ zä#TúP·ØÒÊ–•´Ù—óÁ—z =‚eåw.ÛÊ7VÉïÍ—Ï¡4UTçs{ÑyÏmBˆ«PÍ®º&D¬×;—”v]^ÚF`€ô”PG& äý‰yá4ì†BGY™d¡ª ÓŲb†K™½à ¶ÌuU®Óvt7¦¹ïºÖy6ËÚYXw®$ôÃm¨B"0}7Óœw\c‹Îc;˜ŽýL¶K¹/±>±˜(š2Ûž ëõ¶º¹ÕLÑ«7»|>v‹ëΕXw­Bÿ·Ñ ú«s[M|¾¶C[±î^‹¦QlY»0¼{?öâ|Çë#;1~ý!SW‚]q,$±ui©öš°¬þëÖ¥„¼¹Ê%Ù(~ç^”£»¯-kAIÐC®ßi¥ÛêÃùà utÔÛ ü™Y~°ßTós°Û+ÿF„â '“h„^Üü$ö³Îy7¶=±î\åu»¡Ô*aAc,k~t^„ëÞCèGÛ û_¡ïm&è¾7ªÜ^uD,AãþMè;›‘MØôCè:E°ççaÝvñ¢Û¼ø3ÀÑ[öÙ^¾;Iè3 ~qꦮsŠ|‰õ…yÑINàíÏöUaÓyì!2ÿö©ãbY¥"hÜ¿ ûæOBßÙˆ¦yg°Û1~ý}e”$Ç–•ß¡Íp,"„W9º&„(WÀûèÅ¯ÝæXJV3Ö­K0~ýú¿} ¸®ˆ¦ªOàÈ'Ð$vóX§rd'Ún78î | Y6üŠeé—ØmÃ^xì¥æ»”šû8úYŒ_¿€mïFŠž€*, mÇëÐ]wÚÃ]êô%Öʉýh:\WqìqÇ|3Mëd—rMb—‹1§þtü·?_•>{9¯ÇÅ6`Iý–Ôÿ¹ÕáéÂ]Ó¦g©þy Û¾Í>íØ_îÁ$„¸ÚIŽ¢bº@ìEçQ…DößLgc]?×s¼©%ÿ”çm€Ýf­‰Vbšý o߃uû Ç=ìÞ/dFk¾œ5Å—ï­ZÇ)8ƒ½¸À/ïQ!ê*ItÄU©Ø`À`0`0Ë}¾%=>¥.•œC•|åT @ਧ ŸUàþø¹š«ƒ•0\®,_χÊÖë _¾·ê0|ú$ÊÑ 4M;:-ƒðŸó«]§B\îj=Ñ5j”Çǘ1cx衇øàƒ8}útm7KááãG°¬›mßfÇ’ÊÑõ±¦ÿŽe©c"º¦}_—xUXw½ä|ímE*]¯Q€ãbÏðÑÃ(Ù±‹PŽîƼè×`‹ñâÃY±Õ½ŒRËZGÄ¢ ‹Â–•ñ«ç<¶Á4s Ö©ØÏœpì§Ñ:ï×£©r¬/4íz;Þâ³°eíBÉ9DñëcPòþt‹Õvw ‘³lœù÷/«¾eír¾?uƒ–hZu|û|KÛ…ïÊz¡þêÒv 8\°¬˜ý\.vS1ös¹Ø¤¡ÛS­úUaQÎçæEÿÅn(À^tÛþ-Îr_Î_êõåœôå{«åø>t}oGפF†, !ÄåÆ/st9r¤K™Ùlf÷îݬ\¹’ÌÌLÞ}÷]‚‚ª6ùSqiXR¿Ã’zñ~!ÖÍ‹°n^€*¤žË U%TÁ_xBpëSX·ü†íÈ,«¾wÜ/¤ôöás>/=÷§„ñÛ1^Xô ô<í5÷tùãgçDu\STú0·Õ¨L³ß†Ùo{l_à«ë‹€‘cY?{ÁiŠþ¯—³\Ó2 Û4×ãŒzëú9(yÇ0~þÆÏŸrnS£ôP9~»òåóÕ%À¼ìk,+f`Û³Áq/ŸÈøê-› Ýõ¶+QòŽa˜ö¨ÛöÀ”—Ó¶Êõk;vÌ 2bœñ"ÆÁ(9'|9|©×—sÒ—ï­ZJzWµ²<¾B”ðËеèèhú÷ïïò:t(&Làž{î!''‡•+Wú£iBˆR´ÝoDU/îâ…˜F‹:¶ CÇòŸu¨UíBUBðkK ¼c"ê&í+Zit¨ãš ø—*·Wÿðh»ßzTúPt}ÆòúrÔ»Åêzr¬F *5ª´|oB!.­:·êÚ°aØ1c{öìá†nðws„¸ª?ÿÆo&bžÿ!!¯/÷º’ZiªÀ`Ç0¥bïóTÁÞñw¼Pn]¾¬¥ŠLp¶¹´°/Üç¼èÿ¯òsk|‰õ•¶û„v¿Ñ­<`Äcneªzñ¯RõVöóUéÃÐ?ó?Ê^ú{úÜK—©¶.÷58.òƒî{*¸w§cŒxÌãgPš¦eÁ/ÏóºÝ—óÁ—z}]ͬ²ß[U?{áÙ‹/t/l!„W‹:·VëȽl6Ï+Õ!jŸrlh´hš´¯T¼úB2dY1Û¡mWÏ==JÏݨè!DuYŒŽ!q¥æ©´òcƒ„¢n©s=:7n eË–~n‰¢Dð¤Ù>Å¥¼HÑ”(yRô~ÀÕqOOs7¼¹>Q³ÊžošÄnh;öóSk„¢îñK¢cµZÉÏwÒR\\ÌŽ;øöÛo‰‰‰aÈ!þhš¸Jëõ(Š E±a³[ÏÅF`€Læ­.Mû>„¼ºÓÏS±íÝèuâ·¢št¨c¡íq£ÿqi6Bˆ+„_ôôtÆŽëV®ÑhèÞ½;ãÆ#$$Ä-B\*š6×üâ7£VI/¨Mr¾ !Dùü’è´mÛ–””À±¬ô† X±b}úôá‘GA¯÷¾"ŽB!„BTÄ/‰Nxx8;wv¾îÑ£õë×ç»ï¾ãÔ©S¼úê«ÎE „B!„ÂWuf0ï˜1c¸öÚkÉÌÌä»ï¾«x!„B!„ð¢Î$:>ú(Ì›7ƒË¿ÏÕQl0`00e&Lf‹×‡B!„¸<Ô©D'<<œ‡zEQøøãå^:B!„Bˆ*©S‰@Ÿ>}¸öÚk9|ø0óæy¿3µB!„BxSë3þçÌ©x¹Ù矾Z"„¨Œü1a€c)[åø> '$9_×V¬B!„¯ê\ŽB!„BT—$:B!„Bˆ+Ž$:B!„Bˆ+ŽÜ•S\•‚õzņ¢Ø°Ù­ÎçŠb#0@çïæ !„Bˆj’DGQ®Ò‹¨¶.w±€šŠB!„ð• ]B!„B\q$ÑB!„B\qjtèÚÙ³gk²z!„B!„ðHæèˆ«R±Á€]±¡Ø•2‹(˜Ì7O!„BT“ ]B!„B\q$ÑB!„B\q$ÑB!„B\q$ÑB!„B\q$ÑB!„B\qj}ÕµqãÆy,×h4DDDЮ];n»í6"##ËÝG¥RDýúõéß¿?ýúõs‹oÖ¬/¿ü²×¶Lš4‰ììlºvíÊOL‹-ܶ%%%±hÑ"¶mÛæ²XAɰµ¶mÛVêß}÷«V­bРA4iÒ„Ó§O³dÉ<Èk¯½†Nç˜Ó±yófNŸ>Í€hÒ¤ ;vì`Ö¬YdggóÀ޹HS§N%77—Ovv6©©©dddðÒK/¡×ë(((àŸÿü'çÏŸgРA4hЀ={öð믿rúôi¯ ;!„BqµóK¢cµZÝæÆ 233ùùçŸ‰ŠŠrIL<í£( 'Nœ`Þ¼y †îvœæÍ›MZZš[¢ÓµkW½@ž¬_¿žÖ­[ó—¿üÅYÅòåËÉÍÍ¥aÆœ:uŠûî»ë®»pÌ9š>}:k×®eðàÁ4k֌ŋsüøq&OžìÜ k×®¼ñÆ,X°€Ûo¿€ß~ûÓ§OóÄOеkWgŠ¢°víZn¹å -ˆŠ ØŠ])³‚Élñwó„B!D5ù%ÑÙ¹s'&Lp+×h4tîÜ™””‚ƒƒ+µOdd$=ôíÛ·÷x¬¤¤$RSS1qêÔ)²²²œÉDeÔ«Wƒ²dÉ’’’œCÒJšn Ú°aÃX»v-iii4kÖŒ-[¶Ð¼ysÂÃÃ]·„„眢’¶mÛ¶ØØXg’Sâî»ïææ›o¦^½z•~B!„B\Mü’è´lÙ’[o½³ÙLzz:üñ=zôàÞ{ï%((¨Ü}À1—'""‚¸¸8T*•×c%%%±dÉvìØArr2iii„††Ò¦M›J·÷Þ{ïå“O>á‡~à‡~ aÆtëÖþýûåŒkÔ¨‘[[ÈÍÍ ''‹Åâ1i+y_%òòòh×®[Lxx8ááá•n¿B!„W¿$:aaa.=0]ºt!..ŽÙ³gsúôiž}öY— ~OûTVË–- '--äädç°5_&ò·k׎·Þz‹íÛ·³sçN222˜?>K–,áù矧iÓ¦ë,I|J“kÞ¼9£G®ð¸å%pBøÃÒ¥K™6m_|ñ… ›B!DVg#1bGŽ!==Ù³gsÇw\’zU*III¬_¿žÜÜ\>ìÒ3T«ÕÊñãÇ $99™äädÀ±ðÀ'Ÿ|ÂòåË‹œŽìÞ„ÙX\‹­½ù„¯¿þš—^zé’Ü+¦M›6„††²cÇúõëçSÑÑÑ\{íµlذ?þ˜N:a±XX¹r%:Ž8cµZ-Ó¦McèÐ¡ÄÆÆ’žžÎŽ;1b„s®ÎM7ÝDzz:Ÿ}ö™™™4oÞœœœRSSÑëõ.‹$ÜtÓM¤¥¥ñÑG1dÈâââØ»w/ëÖ­cÈ!ÄÇÇWû³¢Î½^ϤI“˜?>ééé¬Y³†   :tèÀèÑ£ @HH“&MböìÙ¬Y³†¢¢"bbbHIIaèСÕúL®vÁz½sIi×å¥mèüݼ:cÆŒ„††òá‡ƺuëèܹ3>ø`¹ûåÉ ÇлiÒÖ÷sWm@ ‘ñ9þ_ì\»€£{Ó%ÑB!ª©Ö/¿ü²Â˜ÇÜç}*Š7nœÇlV¦n­VËèÑ£+µ€À 7ÜÀ 7ÜPnLHH)))¤¤¤TX_xx8÷Ýw_…qBÔ„ãÇÓ¼ysÂÂÂ(**¢°°Ð9߬<%ÃÕBëÅT»nÝ:/^ÌÁƒ1„‡‡ÓªU+&NœèŒ5j×\s S¦LqÙwòäÉìØ±ƒ9sæ¸Å¾ð ̜9“U«Va±XèÝ»7?ü°ó¿v»ßÿåË—sìØ1L&ÁÁÁÄÆÆ2eÊ—Õ F#¿üò kÖ¬!//°°0’’’¸ë®»Üfð¥ %"¢/~®†¢ü ?7!„B”¯Îõè!ꎦM›ràÀ–-[æ\]ðR™œ6mK—.¥Aƒ >œrssIOO¯V½ƒ_|³ÙÌÈ‘#ÉÌÌdùòåDFFºÜøwúôé,\¸-ZpË-· ×ëÉÏÏçØ±cØívgœÅbáå—_æÀôë×믿ž?ÿü“ÔÔT¶mÛÆþó"""ªÔJ[!„U#‰Ž«ñãÇóÊ+¯ðñÇ Pá=œŒÅo„« ô·zõj–.]JïÞ½yúé§]æÎÙ«y¡¿ÿ~ºuëÆóÏ?N§ÃjµòÿíÝy|TÕýÿñ×d²odBØ„}ǰ#;$PD±€Z\ªÜ…b¿_µPE«í·‚­Ö_ë®ÅªUDQd•@YöÄ@€$ Ûl¿?B†  $áý|<æ‘Ì3ç~îuÔyçÜsî”)SØ´i“SÈX½z5F£‘Ù³gW:ÊRnÙ²e8p€G}”Ûn»Í±½cÇŽ¼÷Þ{|ûí·.#ÆU­¡"/o_Ì¥ÅNçPDDD®Îuµêšˆ\_Ú·oÏ[o½ÅÈ‘#1›Í¼øâ‹¼û>}Ú©­¥´„‚SY,ÿäUǶæm{\²ï+VàååÅ“O>é²@ȵÞC*""‚çž{Î^<==騱£ãÊ…††bµZY¶l™ËkÅÇÇìrYêÈ‘# dÇŽW]CE‘í{°sõ|²2R1—Wí€EDDÄ…FtjHuç‰{a·Y±Ùm-F`£¤ôÒ_DoF5rÌ›KHHÀd2±jÕ*víÚÅœ9sóS^˜ÐÂñž F þå4owË%ûÍÈÈ **Ê1RT“"""ðõõuÚ6sæL—vÓ§OgΜ9|úé§|óÍ7DGGÓ¿ú÷ïïtÓâ£GÒ¦M§åä¡l¡“æÍ›“žž~Õ5T4aêë,øÇÿpdßNþ>u€î?$""r•4¢#"U’••E›6mxóÍ7¹÷Þ{ÉÍÍuZ "sIç r/ÛŸÅb©‘åã¯Eûöíyï½÷xæ™gèÞ½;;wîä7Þ`êÔ©?~ÜÑîJ—ÒÕÔqœ+È£¸ð v»­Fú¹™)èˆH•deeѨQ# ãÇwl+7gi6/ÏÛÇà_>NqáÖûéÉ›.Ù_£F8rä‹åŠû6 •†ââk¿´ËÛÛ›¡C‡òûßÿžÿûßÜwß}dggóÍ7ß8Ú˜L&Ž;æRƒÕjåèÑ£DFF^sß½ý,Y©4‰êÂŒí`ö’¬+¿IDDD*¥ #"Wd6›9uê”cŵ½{÷¸|Á÷ aô¯/\ž•}dß%ûìß¿?çÎcÞ¼y.¯](6lHVV–ÓöÅ‹³ÿþêÌeøøø8îÝuîÜ9Çö^½zQPPÀÚµkÚ¯X±‚³gÏ2dÈÙÿ‰£?pËÐñ„DD^ó\%‘›Y­ÎÑ ©ÍîE®(7'ÇÝ%ÜОxâ ºvíŠv»´´4Þzë-6oÞLhh(ãÆsy—Ÿãw›Õzɾ'L˜ÀŽ;øî»ïسgÑÑÑøúúrâÄ y÷ÝwmûöíK\\ï¿ÿ>½zõbÇŽlÚ´‰ððpNœ8qÕÇ÷ì³ÏÒ¶m[L&ÞÞÞœ;wŽ­[·b0ˆ‰‰q´›8q"›6mâÝwßeÏž=DFF’‘‘A||<:uª‘ØleçËèé]#ý‰ˆˆÜÌ´ˆ\R“&MضmgÏž 11‘ððpFÅĉ¯éþþþÌž=›ï¿ÿž-[¶°páB¬V+ 6¤C‡Nm|ðAŠŠŠˆgíÚµtíÚ•¿þõ¯|ðÁ×tÊWLËÏÏÇjµ@‡xä‘GèÖ­›£]Æ ™3g_|ñ»víbÆ „‡‡s×]w1qâD·Ï5W :"rI/¿ü2 .äóÏ?çóÏ?wYI¬2^>~˜KŠ(>WpÙv¾¾¾Lš4‰I“&]¶¿¿?¿ûÝï\¶¿òÊ+.Û.µ@BeþøÇ?V¹mxx8Ï<óL•ÚV§†r…g.,×í饑k¥9:rSò÷óÃÏÏ?_ß‹>øx{]òq³:rä5ªRȈl ÀöU_r,=Y÷ƒ¹ Ki §OþÌ’^tl oÖÖ‰ˆˆÔÑ‘+š>}zµÚzày>|á.NŸ8Æ?¦ÇºÌ¥T¼ÿ@óv·Ðºû­nªFDD¤þÐˆŽˆÔ¸¨®xbö÷´ï9_ÿ w—sÝóôòÆÔ´5CÆ?É#þƒAÿi¹VÑ‘ZѲS¦¼ú•»Ë¸îi¤KDD¤vÔyÐ)¿ÑàÅŒF#!!!tëÖû￟°°°«ê»o߾̜9óÊEDDDD¤ÞrˈN›6m¸ãŽ;œ¶•––²wï^Ö­[Gjj*ÿûß«<ñY¤º ‹Š°Û¬Øì6¬v 6›õüÃFI©ÙÝ剈ˆˆÈ5rKÐ cèС.Ûccc‰ŒŒäóÏ?gݺuüâ¿pCu"""""r£»îf¼Ž5 €}ûö¹¹¹Q]wAÇÓ³lÉjµ:¶?ž×^{Í¥ík¯½V霟U«VñÔSOq÷Ýw3uêT¾ÿþ{l6_|ñãÇ'55Õå}o¾ù&÷Þ{/%%%5u8"""""â×]ÐIHH mÛ«»a^rr2|ð½zõâñÇ'22’O?ý”wß}€aÆïô¾ââb¶mÛÆ€ðññ¹ú·sË‹ÅBAAÓ¶ÂÂB’““ùì³Ï0™LÄÄÄ\UßÅÅÅüîw¿cÈ!ÄÄÄðÏþ“Õ«W3zôhÚµkGÛ¶mÙ´iS¦LÁh4°uëVJJJAHDDDDDn\n :»ví⡇rÙn4éÝ»7“'O& àªúw„œrwÜqkÖ¬!!!víÚ1|øp>úè#’““‰ŽŽ`ýúõ„……Ñ­[·«Ú¯ˆˆˆˆˆ\?Üt:vìȤI“€²e¥·nÝÊš5k8p O<ñ~~~WÝwdd¤Ë¶fÍš]vc¾Áƒ3wî\âãã‰ŽŽæôéÓ$''sçwb0®zßrãð÷ós,)í¼¼´o/w—'""""×È-A'88˜=z8ž÷éÓ‡&MšðÅ_pâÄ ^}õUÇ¢—c·Û]¶UTÊÛyx”MI ¢W¯^$$$`6›Ù¸q#6›M—­‰ˆˆˆˆÔ×ÍbwÝuýúõ#55•/¾øÂé5ƒÁ€ÙìzÇüü|—myyy.ÛŽ9\Ù>|8………$&&²iÓ&¢¢¢hѢŵ†ˆˆˆˆˆ\®› ðÔSOÑ A/^Lzzºc{pp0X,ǶÌÌL§6å2228|ø°ã¹ÝnçÛo¿Å`0pë­·:¶÷îÝ›ÀÀ@Ö¬YCZZšFsDDDDDê‘ë*èóè£b³Ùxçw÷Ò¹õÖ[ÉËËã•W^aåʕ̛7^xÆ»ôÈ‹/¾È×_ͪU«xå•Wغu+÷ÜsÍ›7w´óôôdàÀ$$$`0\0‘—[æè\ÎÀ‰'!!Å‹3~üx~ó›ßàããC||<}ôÍš5ã±ÇãðáÃ,X°ÀéýC† !<<œ¥K—’——G³fÍøíoËðáÃ]ö5|øpâââèÑ£ 6¬«C”ë@aQv››ÝvÑb6JJ]/“‘K… ^±ÍŒ3œž{yyñÐC¹,I=hÐ î¿ÿþJû7nÜ÷S¾à.[©_®«K×êÚŠ+ ¤ÿþî.EDDDDDjÐuwéZm³Ûí¼õÖ[””Ľ÷Þ‹···»Ë‘tÓƒÁÀÑ£G9vì±±±Lœ8ÑÝ%‰ˆˆˆˆH »é‚Ào¼áîDDDDD¤ÝÔstDDDDD¤~º)GtDüýüKJ;//mÅÇÛËÝ剈ˆˆÈ5ÒˆŽˆˆˆˆˆÔ;µ:¢“——W›Ý‹ˆˆˆˆˆTJ#:"""""Rï(興ˆˆˆH½£Åä¦TXT„ÝfÅf·]´æðbê IDAT’R³»Ë‘k¤©wtDDDDD¤ÞQÐqbÇ`pw """"r­Ü2G'++‹+V’’B~~>>>>DFFÒ¯_?Œ‡Gõó×äÉ“‰ŽŽfÚ´iµP±Ü,lV+`ìî.EDDDD®AC‡ñúë¯È Aƒ £¸¸˜ÄÄD>ýôS’““™:u*ýY]ÜÀl-Åh0b±[Ü]Šˆˆˆˆ\ƒ::óçÏÇÛÛ›—^z‰   Çö˜˜>ùäâããIJJ"::º®K“›œÍn§Ä\ŒÑx>èhPGDDDä†Uçst>ûáëí…ÏE¹1ÔùˆNpp0éééäääШQ#§×š7oÎÇìòž‚‚.\HRRgÏž%$$„rûí·c4Únܸ‘¸¸8rrr âÖ[oeܸqxz^8Ô’’–,YÂöíÛ9uêÁÁÁôìÙ“_þò—8ÚMž<™Ûo¿ððpV®\INN 8ñãdzyófV¬XAvv6ÁÁÁÄÆÆ2zôh§zªº/q«ÍÊÙsy˜-%ŽmF£_JJ‹°Ùmn¬NDDDD®FQ£FñÕW_1kÖ,¢££¹å–[èܹ3ÁÁÁ•¶?sæ úÓŸÈÏÏgĈ4mÚ”}ûö±hÑ"rss™>>Žö?üð¹¹¹L›6Í1ogÈ!Øl66mÚÄwÞIXX‹…_|‘fÍš0pà@žþyAgÅŠ;vŒ—_~ÙÑ ::š×^{¥K—r÷Ýw;¶Ÿ>}šW^y…¦M›жm[fÍšEZZùË_0™LtêÔ‰?üáüøãŽ SÝ}IÝùæ³ùî.ADDDDj‘[–—1bC† !55•Ý»w“’’Bff&™™™ÄÇÇóÜsÏ @RRááá.‹Üwß}Œ7ކ :¶µlÙÒ)PF"##Ù½{·cÛŽ;ˆŠŠ"88˜3gÎ8¶7nܘˆˆvíÚå>"##!püÞºukGȈˆˆ °°ðª÷%ucʤ hwUï=‘} †«‘Úà– àééI·nÝèÖ­ÙÙÙ|ýõ×$&&òå—_2uêTNž}ú%모bË^_<¿¦|ûµìKDDDDDjFÓ^°`Æ s ²‘§Ÿ~š?üᤤ¤8¶×Æýt¢¢¢˜8qb•Ú^ëþ«³/©utâãã aäÈ‘.¯yxxæt™Whh(999.m333Y¾|9£G¦U«VUÞXX………tîÜÙ嵤¤¤J—½¾Zu¹/¹ Îï£Å’%KÈÎÎvy-33“8ÍÇ‰ŽŽ&;;Ûi”`íÚµlÛ¶­Ú«–õìÙ“ììl¶oßî´=--üã,[¶¬Zý]/û‘ ܲêÚ›o¾ÉK/½D¿~ýˆŠŠÂh4’‘‘ÁæÍ› q¬0vìXvîÜÉÛo¿MLL 5"--Í›7ãX ªÆŽË®]»øðÃIMM%**Ь¬,Ö®]‹ŸŸ_.P—û‘ ê<ètîÜ™3f°jÕ*RSSÙ²e &“‰˜˜ÆŒã4Ñ? €^xï¾ûŽøøxÎ;‡ÉdbÒ¤IÄÆÆV{ÿ~~~¼ð ,Y²„]»v¯¯/]ºtaâĉ4nܸƎµ.÷%"""""¸eÙ¯¶mÛÒ¶mÛ*·æá‡¾l›¹sçVº}Ú´i.Û˜4i“&Mºª>«³½ªû‘šSçstDDDDDDj›‚ŽˆˆˆˆˆÔ; :"""""Rï(興ˆˆˆH½£ #"""""õŽ‚ŽˆˆˆˆˆÔ; :"""""RïÔê}tBBBj³{‘+ÊÍÉqw """"âÑ‘zGAGDDDDDê©wtDDDDD¤ÞQБzGAGDDDDDêë2èŒ?ž×^{ÍÝeˆˆˆˆˆÈ êº :""""""×BAGDDDDDê©w<ëz‡V«•o¿ý–uëÖ‘““C@@=zôàþûï'""©íš5kX´hǧAƒ 6Œ_ýêWxzÖyÙ"""""r©óÄðÑG±råJÆŒCëÖ­ÉÉÉaÉ’%¤¥¥ñöÛoãåå@rr2{÷îå¶ÛnÃd2±iÓ&,X€Åbᡇªë²EDDDDäRçAgýúõtîÜ™G}Ô±Íd2±|ùrŽ?N‹-0›ÍÌ™3Çñ|Ĉ<þøãÄÇÇ+興ˆˆˆÈeÕùöïßÏâÅ‹9qâ±±±üýïw„€6mÚ8=7´jÕŠS§NÕuÉ"""""rƒ©ó óä“OâëëË'Ÿ|Âc=ÆôéÓùòË/9yò¤S»† º¼×h4b·ÛëªT¹AÕyÐéÖ­~ø!ÿû¿ÿËðáÃ9{ö,ß|ó Ó¦MãàÁƒu]ŽˆˆˆˆˆÔCu:GÇb±päÈ|||4hƒ `Ó¦MüíocùòåL:µ.K‘z¨NGtòòòxöÙgùàƒœ¶wîܹ¬ÝÖGDDDDD®]Žè„‡‡3xð`6lØÀœ9sèÙ³'f³™¸¸8¼¼¼=zt]–#"""""õT//=uêTÂÃÃÙ¸q#Û·oÇ××—:ðôÓOÓ¦M›º.GDDDDDê¡::^^^<ðÀ<ðÀ—l³páÂJ·Ïœ9³¶Ê‘zD“bDDDDD¤ÞQБzGAGDDDDDê©wtDDDDD¤ÞQБzGAGDDDDDêZ½N^^^mv/"""""R©:¿a¨ÈÍ&7'ÍÝ%ˆˆˆˆÜttDjÑ긻»‘›’‚ŽH-9úaw— """rÓÒb"""""Rï(興ˆˆˆH½£ #"""""õŽ[æèdee±bÅ RRRÈÏÏÇÇLJÈÈHúõëÇàÁƒñðpÍ_v»„„6nÜÈáÇ)..¦AƒtêԉѣGÓ¼ys—÷Lž<™èèh¦M›V‡%"""""׉::‡âõ×_'00AƒFqq1‰‰‰|úé§$''3uêT ƒã=ÅÅżýöÛìÝ»—:0vìX8yò$›7ofëÖ­Ü}÷ÝŒ5ª®GDDDDD®CutæÏŸ··7/½ôAAAŽí111|òÉ'ÄÇÇ“””Dtt´ãµýë_ìÛ·)S¦0pà@§þî¸ãæÎËW_}EÆ éÛ·o‹ˆˆˆˆˆ\Ÿê|ŽÎÁƒiÕª•SÈ)‹‡‡éééŽmûöícçÎŒ;Ö%äxzz2eÊš6mʼyó°Z­µZ¿ˆˆˆˆˆ\ÿê<蓞žNNNŽËkÍ›7çã?æ®»îrlÛ¸q#—½,Íh42jÔ(òóóINN®•ºEDDDDäÆQçAgÔ¨Q2kÖ,Þÿ}¶nÝJAAÁ%Û8p€fÍšpÙ~;uêäh/"""""7·:Ÿ£3jÔ(<==Y´hÛ¶mcÛ¶mŽU×Fމ£}^^;v¼b¿¡¡¡œ:uªv ‘†[–—1bC† !55•Ý»w“’’Bff&™™™ÄÇÇóÜsÏ9‚KUinŽˆˆˆˆˆ”sKвEºuëF·nÝÈÎÎæë¯¿&11‘/¿ü’©S§ÂéÓ§¯Ø_^^@¥‹ˆˆˆˆˆÈÍ¥Îçè,X°€“'Oºlˆˆàé§Ÿ¦Q£F¤¤¤8¶·k׎Ÿþ™3gÎ\¶ß´´4ZµjU£õŠˆˆˆˆÈ§ÎƒN||}:Û·ogÆ ,[¶Œ¢¢"éÑ£ÑÑѬY³†—^z‰Ñ£G3aÂÇ{Ož<ɺuë*­EAGêÂÖíI¬üoü5õ1*fýûD×PE""""õŸ[V]kÛ¶-mÛ¶­Ö{ }ûöuº¬­¢²qãF ÛæÎ{MuŠÔ„”½xꉧißþÊ÷ƒªüý),[ö½‚ŽˆˆˆH5¸myéšf0*½tMÄŠKJøùx6­[·Áb±`·Û°ÛíçvÇó²ß©ð»£Ñ“¶mÚr<+›â’|+ÜL·*y|†Ë6£ÑƒÀÀ¢ZE2dp_ºw»ºVÛy|·ôèÌÔ§Ü7òZ²³Oaªƒª®^MœSwgi©™Ïþó‰I)X,FŽÈ=w­ó:ªÃÑ€I¿Êçíd¹¹‘›O½ :"×£ÃGŽÑ´i<=½°XÌŽíƒò`Sþ¼<ø `·°Z-øûиqc9F‡v­«]C˖͈9Èñ¼´ÔLVÖ 6mÙAÒ{¹s\,wŒy G)«×læ›ËxÿÝÿsw)µÊÇ·j[éÓ»;]:·§y³Æu^ƒˆˆÜXtDjÑ¡Œ£ÜÚÐùQÃù Sö¼,ð8?¿8ðX,ô»•ƒ?]UÐ iØ€þý\/{‹‰ÈksÞcÉÒÕôéÕÆÃ¯æHÝ÷«ÕÝeÔ:wçÑ£ÇxøÁ»ðññvK ""rc©óûèˆÜLe¥cÇNçƒLYÈ)cp„ƒ—çpaT§CÇŽdddÖhm¡! ™tÏØl66mÙY£}‹Ô4«Õ #""U¦‘Zrö\!¹§ò Ãf³¡²séËÖ ì¹ÁPÖÀb±` '÷ÔiΞ+$0À¿ÆjŒ¾¥3~~¾8pÈi{QQ1K–®fç®ÝœÎ/ Ap0=£»0îŽüýýxõÿþɹ³ç˜óÚ…y@?¥föëïѵK{žùídÇöuë·òŸ/¿ç/=Ã_}‹±c†ƪÿÆ““KPPýûEsç¸X<ÆKÖ[•ºÊeeà‡¸uìÛ—N~þ0hÚ4‚Ã0h`o§¶gùîû$%í¥¸¤”Ö­[ð«*Îÿ¨8ê‘Çgðñ³ÏKJJYº| ;v$s*ï4ÁÁADßÒ™;Ç" B½<>£ÒsrkÿžüòÎQlÙº‹¸•ÈÎ>Ipp1#2*v°ÓûÇübá¦PV¬\Onn¡¡! ԇѣ†8Ý„ùbU=O5qœV«å+Ö²eë.rsóðóó£s§¶LøåhL¦Ð*ŸcÀ±ÿGŸÁ¨ØÁäå哘´—€?f>ÿ$&Sh•?/×zþ«bC¼?þ¿pö¤ø`2YùÕÝùüþù\<=íŽ6ÌyÝÄâ¥Aäž4Ò¬¹™»&œá™é¹øø\hW>÷çÅ?œ$%Ňe?lcÉ÷Gh×®´ÊýˆˆÔw :"µäPF&]ºtÁ`08Í»¹r\/c«lžŽÝnÃÃÃN;q(#“n]:ÔX4mÒˆìœ\Ƕââ^ÿÛ?žÃСýˆlÞ”#™ÇX»~ {SbæïŸÄÏÏ—Ý:²dÙjrrriÔ( (»´ ÊÍfs|ÁÞ½'pS¨c^E¶$JJÍŒ>€† ‚ØšÄ+ÖQZZʽ¿Wi­U­ ''—ÿ›ý 6€àà òNç¿¶oúôîÀ¹sEüeö;œ9{Ž˜ 3…˜´—¿¾ùa•Îá#“ŪÕ9|øLþ•c»ÙlfÎßÞçĉS ÚŸˆF&Žgå°nýVö¦þÄ 3žvÔ °5!‘R³…ÃÐ 8ˆµë¶°ì‡µd>ÊÏÇs1l~~¾¬[¿•¯,Ãd ¥gtÇûwìH&÷Ôi†éGddvïNãÛ…+8ž•Ãä‡ïMV®:ç©&Žó˯±!~Çõ§Ed3rsóXµz#áϯþ/žž•ÿ/éRû.·nýVš7kÂ}“Æq2÷&Shµ>/5qþ/gk‚?ß,h@ùU?ÿìÉßÿ_6»Y/œ ¨Èƒ;~Ù‚”” Ž:äÍ_ßcÛv?¾™ŸÉÅyõo‡RPP¶ÑÛÛNÛ¶¥WÕˆH}¥ #RKe¥oŸòEʨ<𔇜òÀSÞÆî²X,ôéÓÄÄ-5tüü)<|Ôñ¯¾ü;Ǽ [ôfÆ sؾ#ù’A§ªu¬Z½‘ÒÒRžýŸg mèè£O¯îüaÖ_ù19Õñ~åª œÌÍã™ßN¦k—ö Ô—?šÇ¶?^ñüõïÍŽ»9|ø˜Ó\¨¸Uñü|,›Y/þ–fM#ÛoéÑ™9}Ÿe?¬å® cÛOçðò¬é4mRÖ¶M›–¼üÊßIK;ÈŸÿô,¦°:vhË/¿AòîT§/Ú'Nžâ¡_O`𠾎c˜ûïoؼe'#†ßJ«–Í]j¯Îyª‰ãÜšH»v­¸oÒŽv!¡ X»v Ù9¹Nï¯Ê9.g³Ú˜6õ!‚/܃­:Ÿ—š8ÿ—“‘áÅåñðC§I?èÍ£7¡°Ðƒï¾ rwÞ !%ÅOO;³ÿ’ÃàA…lÞêÇïÁú þ,ø6˜{î.pê· Àƒ?½šÃÈç8~܃áêú©¯j5è„„„Ôf÷"W”›“ã¶}:|Œ»ïn}ÙSÕQ«ÕBë¨Ö,ü~A­ÔZñ/é»÷ڰ—Ã2ýúÞÂw W˜”ÂÄñ¿ UËæ²7õÆö§¤¤”ƒé‡™0á|³`9û÷"ªU$ûdPRRJî}µlÑÌiñ£ÑƒæÍ³'eÿ%k¬j]÷MǸÛGèhg·Û))-ÊVž+—˜´—ðð0GÈ)7*vp•‚Î¥ìܹ›¨¨H‚ƒ9söœc{ãÆá4jÆ®Ä=NA'²ySÇ—l€¦MÕº…ãK6àXÚùܹ"§ý5hÄ }œ!f›·ìdWâžJƒNuÎSMgƒA<˜ÉÊÿÆÓ«g7ÂB2dP_† ªüþhUÕ<²‰SÈê}^àÚÏÿåtìPŸÿTöߢ¶mK2¸qde_ø÷nñâ óõ1*ö,#‡ŸcàÀBÖ® à»ï]JTT)O>ž@ûv¥W݈H}¥¹é¬ˆ[Ù¼úªßß}÷V©]~~>žžÆËΨ‹ÕJ~~ÍA9sæ¬ÓÝœ§èÐ>ªÒ¶Mš4b_ÚA ,”uï֑Ĥìv;~ÊÀbµ}K6oÙžý=j{ö¤áççK‡ömýºôm4+¬N窪u•×VTTÂê5›ÉžƒÉtá2ž.Ûái4’²÷iûÒ±cÙ_;thͪÕÙ¹kYY'j䆤թ뫯—Ò€—gMÇ×÷Â_° κ¼?"ÂTi¿99'¯¹Þs……tîÔÎ嵓S ¼èR«k•}ÂeÛ±cÙ@ÙFeªsž.¥ªÇi±ZùùX6ÞÞ^ôíÝÃqIÙöÉ|ðÑ—¬Y·™‡¼«Êû­J]Uý¼\Z´4óÓOÞÄÄœã«/.Ì™Ë<ê…)ÌŠŸŸk¨ñòr LWÓˆH}¥ #7%›ÍŒ‡±z÷ã0›K®Ü¨‚Ñ1CyqÖ+ý9ë|x)3§[ ½û´ÂŽƒÛÓxçH?ž¾òe;‘Í"xøþ ÕªárrOæëËiÚ$‚^=/ŒEßÒ…V¬cûŽéSa~C¶$òòò–Õõññ¦}û(“R8rägF @‡ö­ñððà»ïã0=èZ (T§®¼¼|Z¶hêôåÝn·³dYÙ%‹Ö —dõîÝE‹W±mÇNó9V¯Ù\åÚ<<\G.Ô›ì˜Ð°ÿAþùΧôèÞ‰iO?Tå}\INN.»wï£[· £s+VnÀ`0ЧW÷JßSó×vœùùgøÓ_þI‡ö­yöu´kß®ìò²êþááJªóy¹Ü>ö oý¿0Ö¬ àýC3ú,»’|yêé&˜Í™’Çì¿\yÎaMõ#"R(èÈMÉ\Zˆ¯W•ÛÛlV,¥ç®Ü°‚¸ÿnàýwÞÁh4By̱ƒ;åcC‘wÂì‹^»ð»Ó/˜-fþòÚŸéݳz—°åÎgkB¢ãyi©™£Ç޳ek"F£‘g~{ŸÓ¥?cFeWâþ5÷k~J?ìX–wý†""LŒ3©ÿÝ;3oþbÇˆŽŸŸ/-Z4%#ã(íÛGà<ÏájT§®[ztbÇÎÝ|øÑ<:ujCQq ;wîædnþ;ÚŽŠÌλ™;÷k2¥iÓö¤¤±{OÞÞUûŒ”ZÄ­Ü@ÌÈAÜö‹a$&¥ðñܯؗ–N«VÍÉÎ>ɺõ[ñóó安c®Ðkõx¼÷áÄŒˆÉJbÒ^vïÞÇØ1Ã~¨¨:çéZ3,´!}ûô a[ï¾ÿºvmÅleý†­xzz2lH¿=Õý»Û´§O±lyxóâ¬F¼8ëÂ(\óff~7½òyVµÕˆH}  #7%si!FO_ŒžUÕ±S\t›ÍR­}X­V ‹ÎròTNÙ\›+ÍDZÛÎÿŽãwì^kÙ «õ àWâðác|>téÜŽñw޾dø¸Z]»v ]ÛV¬Y»™Óù4mÚ˜Éßíz^ò=Õ9O5qœ¿yè.²m{2?&ïÅÇLJ6­[ðЃwѲe³=Õý»[ƒ6–-9Âo„±ü‡²Ù‚ƒlÄÆžeÖ '‰ˆ¨Újª‘ú ²Ù—^£ïT ðÀÓ1l‹ßÀþä,¾øðã*uº:îߌý0a\/W?~|•‹[¸pa•Ú?ž¾}û2sæÌ*÷-7‡Üœ4Çç±Ü—_Îã׿~ƒÁ?ÿPæ~òâV®ryïèQ±<òÈo(.ÌÃb)ûËöçŸVåU×þò×wyâ‰'±ÊŠ#´ØÊÆm*ǃ aÇÎùy=ç_æÏŸÇž{ªÎŒÔ'<>ƒ[ztfêSº»‘uÿcо{Ù Çs³õ;ÒKRIDATÏ‘›}€¸E'E@áùǹ ¿Åu>¢óÌ3Ï8=_²d ééé.ÛEjSùèÌÙ3YÜ;évrsO°cg’ãõÞ½{rÿý8Sp {–Ø­Ìð!xÿý÷°Xª? SOO#Ç ¨‘¾DDDDê»::C‡uz¾yófÒÓÓ]¶‹Ô–²›rÚ“ŸÍ¥çxè×w›{’CG‰jÕŒïCѹ“=½0P~ß [µ– Ð/š•ÜÅ]Dê?Sĵ/ÀQ›Nf§¹»‘ZW³Ë܈Ü|}})-µàa0bµZ°Z-xyyñô“Ð¥s[ž~ò×xûø`·Û±XÌ€OJK-øúúº»|©‚ë~1‚Ó§O3oÞ<¶oßNAAaaa >œ»ï¾ûüjV"Õc2™ÈÍ=E“&e×{zx”}Ž‚ƒƒ˜>í7.í­63FOrsOa2™ê´V‘ªøøƒÙî.A.¢÷»®ƒNAAÏ?ÿ<§OŸf̘14oÞœ={ö0þ|Nœ8Á´iÓÜ]¢Ü€Ú´Žbÿþ4iÒªý+`³Z9pàmÛDÕru""""R®ë ³páBNœ8ÁÌ™3éÛ·/±±±Øl6Ö®]ˤI“¯Ù%Z¥þkÚ¬{÷¥qèPmÚ´©Ò{ÒÓÓ)5—Ò´YÍ.+""""µãº:Û·o'""ÂrÊM™2…{ÐÐP7U&7º[ôgÕªÿb·Aû—Ÿ4¼?-Ý{~$66¦Žª‘kU«A'7çÊ×(?6eM™PiÛW^švÉ~ü}àtîOÀ…ëÓ«²?FÆŒ`ÓÆÍ¢c¦ò£ #"""""u¡bÐ1WxTœ«S>¢c‡ËèØ( 3CNÅËÙJ) :—ZÐ@DDDDD¤¦”g‘ŠÓk*þ´Pa‰é+è@YЩ˜ Êçæ”‡©m×(;:è\î’3e!ÆÀ…PsñÏò×EDDDDDjSŃZ+ùYñF¢W )† KüTБÚVqŠMe?Ë@ÕBŠ¡Š?EDDDDDj‹½Š?øÿ¨¯ÿ²rÔIEND®B`‚scribes-0.4~r910/help/C/figures/scribes_document_switcher.png0000644000175000017500000015672211242100540024163 0ustar andreasandreas‰PNG  IHDR:ÎP-|’sBIT|dˆtEXtCREATORgnome-panel-screenshot—7w IDATxœìÝw|ç}àÿÏloØeÑ;{Ø‹$ŠET±U,ÉÖY–¬³å’8¶s¹Ë/Î9޹$÷K.Î9¿ø’sdŸ£Ø–%KŽ$J¢$R¢XÅÞv zmvwî–X`A$QH~ßxík™gfžyfñì~÷)B!„B!„B!„B!„B!„B!„Bˆ›¡Ü`úÑž…B!„âf©c|f,I4ˆÙüØÚÐøó&„B!„ã·m˾„þ_ÃD‚š¡ÏôŒè(›[¾uYB!„BˆñÛ¶eŸ“H€ò/è¹n ä|é['"¿B!„B1¢_ÿÓÇÑß·mÙ—N$À ÁA¿‡ˆmé1Љ9ßþ¯ÏdO¥£«åÖçZUÑv´ ën#¤7tºÀhE†ú!„B!"Ž;ÌmlÛ²/‡Hú¸ðÔº£a_ÑH#ÉžJkGãu¬ª*ÊxƒUE_w…üão‘e줱QÃÕ‚Ux—ß&Óøö%„B!„˜}}Aj«›‚dd§bK°ÜÐ~|^?u5-€JV® “É]WT\ t3‘§HÜ2ðè¶ÔxÑI´5çKßÚˆÍ숛‘PŸB²=›ÕªŠÇ×K{WhúFùV1V_¤èÂûd;zqׇhk7¢×8¿þ‹_<¦ÂB!„BL€?ÀáýgH0¦á°'r±²Œåkæ‘èL}ãAz{½Üsš× T ®é2+î]€ÕjަyãWÛikê`Û–}s?ô~B@x¤¨P8þ\=n•yÙsIKÎ@§Ó ÷Ñæ®çlåa‚ÚΑwV1UŸ§ rYI:kúhé°àÐõ‘l÷s²µ}náØJD!„B1%‚Á G÷Ÿ!+u_þ1ŒlûäÞýè·,¿g>ŽDÛ˜öãõø9¸û+KÖóôã_F^ùÝÏ9¸w«ï[ŒÁ¨·™‰kÍ+“ ž €xNL{L8?ÐћÜ¾´‡™Þådeä¢ÓéȘÖÌöƒ¿Áh³‘ªbª¹DÑÕä$tÑ[륮=‘Tƒ»‡¦ %9mÄc !„B!¦‡–†ŒŠƒ¯=÷],æÈ‡ÿ7<Ž¢Ñð·¿aéêy8’®ìxz}ù´œ%ëyæs_A«Õðŧ^¤í¥Vj«É/ÊŠ·éÀX—¡AÎÀCµE'kÄ`ÇÛëãèÁ³¬,ÙÀžx!ähN‹?¬Ž˜ˆ p&'Ðô?B£¶è„Fi]é {hi¯'7«€ÎÎN²\¹ì?éÇ–Ø?€HU17T2÷Ü;d§é¬í£®=‘ “—$K7M'ÇÓVã¹­F3ê1…b¢t´uRWÛ@oU½Ù²N§Å‘h';7³Å<¦¿ƒûŽšF£ÕäL$7?cü.â ‡Â4Ô5 h2³]Sœ#!„‡ÓΕ‹gùÕ/ñÂ3¿^y¿Ðh4l^ÿ(ïl•ÒsHpÄv÷òyý;p–U¥yúñçÑé"a‰ªª¨ªÊÛï¿ÆÅ«e,]5o¤ØÀHlÓhû ãnÑQB´a´[ªZ¬‰„B!E! ¢UL:á°TKC%s/@vjwC– ©N[/Mz'ÇSVÐ;cZ­fÄ$!„˜HáPˆË*q»»Y0{)˯#/»›ÅN(ÄÝÕÎ¥«gØ{h§Ÿ%+7ó¶þ@úÿí¸ËÎõbEîzƒSÇÊ™=¯[B¼þÈâf¨a•æ¦6j«êÑhµÜ»âAvì{‡ôÌԩΚBŒ‰V«aá’™œ<|—_#&ØÑjuÑnloðkJ–ÏŽ;^‡Î³jÉF¾ðÄ 1ANX óöÖר±ï]JVÌÆ`Ôè‰7ºA-×ZtÆ2F'tmEØ@ªµ$§ƒºæJ:=$[rÉr q»Ý8 V³ƒÞ`ÖºKÌ®ÝG¶3€»>HK»‡.@ŠÝK+ަ¬ ·xZs,!„˜L—ÎWâóùÆ—þ”y3KcÖétz\©Y¸R³X³t[?yí»ßD£UHKKž¢O ­VGrR«–l tþjþé—Åų,,™F«™êìÝQ*¯ÔàîèbÕÒ l¾ï) IìØ÷޼ !n+z½–EËfqòH$Øyîó_ÇdŒôzÐh4<¸þ1TUåÝm¯1¿¤½AÇécY½dc̘UU …‚¼ýþk|²ï]J–ÏÄl6\¯NÔp­gp€£a¬-:ƒg] õùÐ'˜[´‚Œ”"Î\8NZR¡P˜îîvîÜIBB›7o¦(w>§v¡¸õy‰½t×úhl·ãÔûIuxi 8”µ–îâhµšgwBˆ‰ÖÕÙMgg7_öO†9C)ŠÂg6ü<žöû˜¤$;šA}ŠoWï}‹ÙÆüÙK±Û0Í|å Ä_ýãwinj#5ýÎ ê¦Zwg/ÿá±ßcùâûb–Ëû¡âv£Õi˜_ZÌéãùõëðü3¿‡A¢( ›ïT•w¶½ŠF£°fÙ<ýøó1ANX G‚œOßc~i“a´ú0Ðô?4C–wÖ5•š†‹¤%æàLJ%'}&j8r§OŸ¦¦¦†`0ȃ>HqÞ\L)i8ÛZñÔy©nsâ2zIIè¥5lä`ÆZº æ£Q42ËšbJ5Ö·0wF óg-.ëìîà·ïü ®œÆd´°jéYÿLôæÈŸÝôEŽœÞK{['5UõÃö©ÑjPCáèË4ŠB‚ÃFVNzýµª×ÝÑESC ~¿ŸÁC‚ z=)®d’S“P8uüì°ãhµZÂáPt[E£äL$+'Í8näüÎG¯€¶¯ò§ð?I°Fî¡–hOfùâû8zz7É©ItuõÐØÐ‚×éžͳ¢`2qe¤àH´Çì¿£½“æ¦Vü¾ØóNƒ3ÙAZz*Z­6îyÌžWÄù3W†-OL´ãvwP6áèX+…Èu±Z¬x¼^‚Á൴…äÔ$22]Ð_nymÊNœÀ`0ÛîÄ‘r•Î¥£ÝMSC+*±cÆ´ºÈ8ªŒÌ44imBL-½N˼E…œ8yõÕ0ÿñÙo£ëë¢ÕjÙ¼á1†ŽŽVž~üËèuׯªªÊÛ[_eÇÞw™·¸“Ù8Öø@¹ÞcÜ÷Ññ«ì:ô.¹®9d¹ò0™L¨j˜¹sçàvw°hÑ"¬]Uøê`­;B_c€†î$2Í^’¬]4é’Øï\AwÑ|iÉBL —å%ëb–ýâ·OUÝ%Ò3]ü¶ï~‹ÉÊú5‘Á•f“•ù3—p±ê;æåäÙƒ>±‹M÷~Žìô|ú‚Î^:É–m¿äò…JŠg (êªpwtRº` «—l$;£“ÑŒÏ辰¥†#§öpàØº:»È-̉{œO>}—Ïnü"yYÅ„ÂAŽ—íçÍþ•zM™iã*‡ÙófpáÌeN”íçÞ•E—ÏŸµ”}G>"ÓXßLks;óf–rÏòÍäeÏÀd´àõõR]…ýG?æô¹Ã8S’¢c˜j«êqwt±lѽ¬,]OVz>&£™¾`€ÖöFÊ/ã“OßÅÝ^AáÌüaç ð?¯Ï+%‹ïçbÊàWÿþö9wù$ï~ô^ÿy sç`2šéìî`ÿÑØ¾çMîYñ ÷,ßLJ’‹^o‡NìbëŽ×P-)®ä ¿6ñÎqð²ïüùÓÔ×5ÑÒÔÆòÅëX½ti9˜ŒÂáî®vN=Ä;_ÇÓ[MAq.ãˆk…bBhõ‘`çäɃüë+ Ï}ᛘŒ‘Y µ-mx<&ýàîjíÙÂüÒ"ŒæQ[r l†}2‚!Ñ”V£ Z¼\¨9LgO ¹é³«aÜ]-,,™‡+ÉAç/Ÿ'ÃTCŸ×„_5‘iìF§ñQepqÒ¶€ÎÜ9hQ¤%G1=„Uò³gDÿlio¤²ú…9˜ûïÈÜèãЉ]Ñ@ 7«ˆSçÛ]QÞÍYmýÑë ,]¸–¼ìbþÇ?ÿ1-mèô::Ý]|és0¬ë’Ål¥0w6…¹³™?k)?ûÍßÒÖÒ>ì8Y®<¾ýÿßAߊY³l^_/ïíx—+e\Å QôF=-µÃŽƒªÒÑÞIks;O<øeî_ý™˜46«¹3J˜;£„}G¶óú»?Ãd2‡étwóüSßeéµ1Û &²ÒóÉJϧtÁþáçF]MÈùóûÆœÆ ‡÷ßÎråñG_ûktƒ¾1Lr$óȆgXK^V?yù/hkiÇ™œ8¦ý !ÄDÒj5Ì^Ï©²ƒ(¯G‚cœÖkˆLOýöû¯òñ¾÷˜½°ƒAKヺŽF«`OÖÓ¨æÜ(aÚzªÑkM¤Ø³HN[OŸ{?ÆÎj,/õmAÚ{´”,¦=?2 UfWBL*`»ö!±¥µEQ0šÑºÊátÐPݳ]‚Í·.K°:¨oªâråY–.º‹9rÿ€Tg:÷­z8òaZѰ²t}Ìéw¶ÿšãåûY8g9Ÿ{èæÍ,eÍÒM8ñɰã¤&g‡©oªÆ•’íë\º` ï|ôʸëÙp8ŒN«ÅëóÄ,·Z"åÒÔFéüÕ1AN ÏÏÑS{I°9X0{k—=ÀÕš‹œ8»UUY»ì˜ ÇÝկ鳇IJL‰n“êL牿Ìï½t½Žù\ì IýeS…+%;æÞ Yéùøü^ºzܤ%gD—¯X¼Ží{Þ¤µ©}¯ DÆE-œ³œ´”Ìèvï};ú»ŠÊ½+ŒþÝØR˹K'ÉÎÈgFÁ|Šòç²zÉF.T—÷U!Ä´¡Ói™17‡ãg>E}Må«_úΰ.¶‘)¤ËG{ÞaÖü\L&ý-¯ÇFïºv¨JÑ€W4Á;œB[wÖ¼¥Ôºf“àþ) ŒÔVº¨¿Ân#ÁÙCw–UšØ…ÓˆF¹VC‘±ƒë?…°¯>T‡-éõtóãŸýþ€3—Žó{Ï}?º®dÞ*¶ï~“bÍÒÑå ÍÕ|¼o »leùâûÈÎ(`ùâûØ{d[Ü|ÿúÍŸpôô>–.¼‡çŸú‰vç°üE$½:ì<Þœþ¾˜.m‘ãÿ/Nž‰´j=÷ä·Y¶è^îY¾™Ã§v°zÐyú>~ôÓïÑÕë6ß÷$Τ4Ú;šink¡óAD8¾Þêaþíwÿ?'Ê÷³xÞJ¾ò…ÿ]îñöò×?ù.Ý=¼ðùÿDéüÕ8Ó@…¾Pß„_›¤äDÞùøR’Ócw>z“ÙDRr"ínüÆþÙ‹š[ë)¿pŒ½‡?Ä•’Ewo'=½]ôôvawÚätBˆi%  …±˜­Ñƒ)Š‚ÕbC «ôBŒ·¾»¡Áôækï „Ès- '­˜½ÛßÇQ£ÅfQH5¥¡u©T]¨ÁÞãñ¹wAa­D;Bˆé¡«ÇM’#2«˜ÍjGUU‚ÁM¤žêíñ`³Ä°ïîéDÑh Ûuªªöþ€4W*—+ÏĬKhAP!#-7º<#-wÄ{Û¤§fÇ‹§8}þ«™š†Šè2Mÿªo¤E' c4˜b–_káQ£ðœ½x‚ÔôdÜí]œ¿|*èdºò¢yv¥dEÓWV_ «ÇM^QÝ=ì:ø.¡`E£`4±'&àõúâæ/TGÓ¤ìü¬V Í51Ë«ë¯ÐÝÓ‰N«¥¦þJ4Љ¶úLµq&'ÒÙ>|€¬œt:Ý]¼ùÁË<ÿÔwÑh4,œ³œ…s–D[«ÿ„}‡·Ñè“!Ä´á÷¸r¾Ž{—?ÈçŸørÜ@àû?K8b˶W)˜‘ÅfŠ›îFaŒÎØæóWC ÙÎyä¸f±c÷VTgîÅ ÙµSe^ ÄŒ4½žËõuØÞØOÒÆÅtÌK#h¼ý§eBÜÞªë.G쌌­m$§%¡ªaÚÛÜ,˜µ$f»šú =Þ!cD¢Ÿ{U•¡#Ä· ®ø}~/-mñǧ¨ûQ‡¢üØí‰q?l÷~,¡`@ @ª3=fysk= ý‡r5¬‚ªÆœÏàV¡ÁÝBá( †Âôù}¨ªŠR…¼„Ãñó¬( ½½½¤%%ù|‚Á>“¬Ãò QP4šxE=Þ€‰º6#šP0D8Æf³rüÌ~ꚪ(¿†¼ìb2]¹$Ú“Ñh4dgðô#_%91•-Û…ÓéaB1yþ W.ÔrïŠyúñç‡Í®¦ªjô}A£Ñ°y}dìë[ï¿BÁÌ ,ÖøãynÄMu]ƒHÝ®AG–sÉ ÙìÞ·°©k‚Õ–‚;´sŸ”£mj&75FÃÅÚZŒï&µ{!­¥Yø,ãùŽN!n-½ÁÀ‘S{X4w½‘Ç6?ÇïýœžÊTÌ& ®{*º?à£üÂQ, æÈ4˃ägÏÀh4ÓÜÜÆÌÂy1ë::[#¿(‘1-$o?ú—ïE§B6›,øüÞèßZ­–ÐK˜ÈÒ†oW¦ê«µè´zJú[8”]8ŠF9~]S93£ëæ/æô¹ÃÌ.^]^ßXý½µ½)Ú=« gVs5Uu¨*|ññßcÞÌ%¸»Ûèp·òÊ[ÿ9§p(Úú‘q5µ •Ì[lFŒ2@X_6¨ (#E9“sm@Ò £Õj©­®GoУÓ™?s)V‹ ÀËG{ÞâJÕ9¬–žþ̋і¨ÕK7ñö¶_I×5!Ä” øƒ\½TÏ=+7»hdâßÒánãùg¾½ÏŽV«ãÁ £hÞ|ïWä¥c¾EÁÎMw]#¬#3e‰– N–¯mÆb»6˜H_LÛº¹œÛQÍM¤§¤¢ÍÍå|]þOŽ“æñã^š‹Ûa¸nßl!„˜(¶+eçpþÊif-"ê sgq±â Fƒ‘ù³–’`»öùÖ¯áøpš†‹nµ$ðG_û+.V”Sº`M̺ò ÇÐh4(ŠÂÁãŸðÔ#_À™˜Êç?ó5Ž•ícFÁ|\÷áp˜î^7»låXù.:;»ãæ?Òª0|ùxº2=ºéYt:³ŠâtE—wõ¸ÙwxV«O¯—½‡>ˆ tž{òÛ9µGBRtb€=‡>D§×…Ùìcßü<™µì¿ù·œ>wWJ&sf,";¸;Ûôùhw·Æäã»_ù Z;šbfK‹‘Ê&².þr­F;9×F£Ðëí‰YþÜç¾Ïïåµwþ…Œ´4¾þìŸD×ù>Ž•í# 2£àZíé߇t]BL¥€?HuE#÷®|ˆ/<ñBÌ$0‘)¤_eÛ®-h4‘ÞÏ}þë˜úÇ j46ßÿjXåí_%;/ù–;ãž^:v¤ÏÅiË¢ìÜ1ºúê1۴öÑå'Ó|ïl”=77áJs¡ÍÍåLm- Ÿž&½Ç‡nE!­)F‰v„“Ëh0`Ðëø×ßþO¾þìŸP”7ˆŒ3ÉtåŤUU•÷ma×­8 #~ZÎHËçÐÖÑÌö=ob2Ñéôì;²=2%óÌRÖ,ÛÄše›¢éµZ-Ý=|ztFÃÈ7„ ‡Ãq› Æ3EçÆ{¶ÌëóðóWÿŽ@ŸŸ¤ä4 GOï£ g÷ôÏf4˜X»ì˜íöü€ceûHr:Ãì:°•‚œYÑ3gb*ëV=³MK{#¯¿û3t:ªæÐ‰<²á™èz£ÑLVz>5õädÆl;RÀ#—Íõ6´Ú¬“rmô:-—¯ž)¿Òk‡CüöÝ—hh®æÓ#Ek4˜X½dcÌ~TUå^A£‘[6!¦N_ HuE÷­z˜§.b tU{ûýר¾{ 9ù)hµZŽÞ À Ïü>z}¤kÛànlo¾ÿkròS1™ 7•¯qß04º<¦0½„ŒäBßKw_&›6Ò/;Î{‡RBc0û/nl '3 mN§jk¨:~Ž<ÿºY´§ÞÚAHB1§w{'ÿø‹²tá=,Y°†ìŒ‚þ‰ "S"WTŸgÏ¡©®½„ÕfÆd1Å­#ËÎ¥ªî+¯Ã™˜†ÇÛCù…£¼÷ñ«ø|½8S“P >Ÿ—~ó?¸oåC,Y°Wj½‘@ÀGs{§Îbçþ÷PÕ0&K"]Ý=qrŠÿƒöÜ9Ðç§¥­K•gعÿ=:»ZIt&VUŒ&f«™7¶þÎ_9ÍÚå—UŒÉhÆëóPUw™Ol§ìüQÌV3£Õ”ú‹ßþ=ËÝÇŠ’udºr±˜m„Ã!Ú:š9uî0ï}‹@ŸgJ"ö¾…V«cÕ’ Ø,v:»Û9^¾Ÿw½Áþì×1yÖh4‘±?ã(E£ ÕÅ€Lfã¤\“Ùĉòýdg°¢d6‹ÀG[G&£U óú{?£¦¡‚¥ ï!#-³É ¨t÷trµö;¼GEÕy‰v¹·bJAê®6sߪHKÎà '¬†y{ë«|¸óM²òSÑ"ë2sS8rr òÂ3ߊ;ƒ»±ýîÝ#+ïæ‚xÍ'úÍ­ |é[©¼0|¦ÖP˜±ˆ‚¬yìØõ>^¥ ³M7⌠ÂÁ0jE û.’çS).(à€>À©…”×pÌÎ¥ãÞ„Œ2fG15ü>?¯`04ìÐôX­túkõTKs[̬\'Ïä¯ý=C76 ØlÖAƒóU<^oX·#EÑ`61[M(ŠBKs[Ü<;“ios[žš–7ýHûL£Ñ`0FÎuè½þ½½^BÁêo¶t:«£ñÚ“ªBÀçÇãõ …†5¤(Š‚ÉdÄbµ Ñ(¨*xz=x½Þ˜´Š¢DÇÅ f4ñûýqÏc¤²1ô zzz<ÃÖEÊm⯪‚§Çƒ×çr^ Z­G¢> ZnC)Š‚^§Ãbµ 7Èû¦bò…Baê«Ú¸7Θœîj~ò6YyÉÃê©P0L]u ËßÓm`ûv¼Í›ï¿BVnúþ÷ÜóeÕ´5Eº oÛ²ïIÀ xú½ƒ~÷¾ñµè¨ ©ö˜â²sèønêk¨ª¿DjºUÿ}ጹE'ŒŸ+ Ç húP´‘±]ç>mc¢5^›õf¤Û„b:30–DZt„BÜ ’’­ø|­x:Zq¦YÑhÇß«AQ Ùe££7褸ì(Êͽ—Žï>:Jÿ8Téz.„B!„€˜YÕnæ¾^†Ù—U•pèæZ@nø>:B!„B1]¹EçüÉú ÏŒB!„B 6{qæ m7æ1:¯¼ôó:ˆB!„BŒ×³_ñ†ÇéÈ9…B!„w t„B!„w t„B!„w t„B!„w t„B!„w t„B!„w t„B!„w t„B!„w t„B!„w t„B!„wÝDíxǶ—'j×B!„BˆÛÔ†Í/LÊq&,ÐÉ; !„B!Äô7™!è$§ÍšèC!„B!¦¹¶æ “z¼ t`òOJ!„Bqw“É„B!„w t„ ¬! IDATB!„w tÄmÍÝQ'ãÀnr­„B1™$ÐB!„BÜq$ÐB!„BÜq$ÐB!„BÜq$ÐB!„BÜq&å>:×óâ7¾7jšŸÿËßDÓ.^4—?øýçãþ}+ò¢Ójùó|‡Ì ׈inå1Åä˜n¯³±ÈÓÝd<×j<ûï5—EQ0™Œd¤§rï=+X»fé¸ò1TSS+.Wʈù©¿„BˆXSèäåe±iÃÚ©ÎÁPˆ—ÿíßùÓ?ù=E™êìˆ[hº¼Î^üÊbþþhÇ>ªªê†-¿›M—k54áp˜ž;>ù”—ù;EaÍê%7´ïŸìçßmå§ÿü×·*»R !„ƒL‹@')ÑÁÊ%£¦[±|1ùùÙžŸŠÊj>Ú±6Þ3áÇ“gº¼Î†æáè±2ªªêÆ”·»ÅX¯ÕT壴dßÿó±k÷ÁtοL0ºÙ,#õ—B1-±úÚWŸ™ðcÌ(Χ±©•··l§dÑ\RS“'ü˜bz™Œ×™¸½¥¤8),Ì£ªªvª³Cê/!„âšÛ*ÐKÿr¿?À{ïÂÑ£§iïpc·'P²x.=úV‹yÔcX­žýñÓ—^á_ù;þø¾>jÆÆ>ض‹óç¯ÐÙÙ ŠBf¦‹õëVÅôáñß㑇î'55™>ÞKSs VV¯,åñÇàÀÁãlÛ¾‡¦¦Vìö6nXÛb¿•½Ù󣛌×ÙX½õö6¶~°“?ùão2£8?fÝK?•S§Ïñãý€ßÿöxèÁu¤¦8ùpûnÚÚ:p:“¸wí26?p/͵yGî¤×ÐH×êýó/9yê섎q2èu1å ã« ÿ>4ŸŸî?ÆööÐÔ܆=Áƪ•%|ö³Ñiµ×Í“Ô_B!Ä5Ó"Ð …Bt÷ôÆ]—`³Žy?}}}üí~JKK;ëî[‰+-…†Æfví>ÈÙs—ùþ÷¾…Ùlu?K—, ´d>ÇO”³{Ï!ÖÝ·rÄ´ÍÍmüõßü6›•û×­ÂnO ÃÝÉÞ½‡yù—¿Ãh4°léÂhúƒ‡Nè ²þþU8ì ìÜu€­ìäjU-õ ͬ_· ³ÙÄ®Ýyýw[IIqRZ2ï–žßtÒÒÚ΃Çyô3c–¿óÞǬZYJjŠó–kº½ÎÆbÕÊR¶~°“ÃGNÅ:~€“§Î²tÉ =Gž¦­ÝÍ}÷® ''ƒ²² üû[ÒÐØÌW^øü¤çýfܪk5Q|>?•Wk)Èω.O]ðâW¾0âØ¬sç/séR%ëï_M’ÓÁÑ£elý`'ÁPˆ§Ÿ|xÔ¼Iý%„BDL‹@§¬üÿé?ÿeÜuãùFvÛG{©¯kâö²2¯Í:´xÑ\þöï~ÊÖvòÔçÓ¾¾ôÅǹpñ ¿{ó.œ3)1nºvì#ð_þèIv^K³lÉBþëþŽS§ÏÅ|PpwvñÃ|7:+RQQ?ü‹sáBõ—ÿ…”ä$fÏ*âÏ~ø÷œ.;ý p+ÏoºpØ8z´Œ”d'«W•°ÿÀqŽ-ãÁî»¥ÇšŽ¯³Ñ¤§§’Ÿ—Í‘£§yæóŸE«´ ?QN ÐǪ•¥Ñ´-­í|ù¹ÏqÏÚåÜ»v9¿xù ö8ÆúûW“Ÿ—}Û¼†nÕµºYC®p(LCc3ï¼·¯×Çí‹®O]°rEɈc³‚Á ÿõ{ߊ^Ÿ5«–ò½ïÿ-‡œS R !„0Mâ¢<ýìÆÑŽâر2 r°Ûm1NÒÓSIKKæø‰ò1¿‘Úí6¾ðôgùÅ˯óË_½É~ç+qÓ}ñ™Gyô3HH°E—©ªŠ? è‹IŸ“3õkfF…¹Ñ @tÊÙÞ^ßta0èùæ7¾Èßýè%òó³xãw[ùãÿòõhKÅ­2_gc±zÕ~óÚοÌüy3È7ëIIfÏ*Цs8X»fY̶l\ËþÇ8~¢œü¼ìÛæ5t«®ÕÍ)àJJrðâW¾ÀœÙÅÑeã­ F’—›hµ²³3(/¿0æ|Ký%„BL“@Çf³2wÎŒ›ÞOcS+}}}#~ 7cº¾ÎF³|ù"~ûÆ»>r’ùófÒÕÕùóWx`Ó=1ã/²³Ò‡ÇHOO ¥¥}Jò~£nÕµºYC.½N‡Ãa'5Õ9¬¬Ç[ŒÄnO¶L«ÑÄÔc!õ—Bˆ»Ý´tnUU)ÈÏá‰Ç¸eû|îKŸã‡ñc~ûÆ»ÑoÓ;uúÿû§¿Æl13gV¥%óÉÌtQ\”Çïÿ–þfîm1ç7]¬^UʾýG£¿Og“}lV æÏæÄɳƒA=E8Žé¶ ¹ÎÅÁ<ïÔ×Ð`ã F2ž€k¼uÁdúK!ÄÝìŽ tRR’èõxâ~09uú¶ÄœìLäÉ'ä•W·ðëß¼=lýk¯¿GR’ƒþ໘LÆèò®®žqk4q~ÓÉ~û?NuÆd*®ÃêUK8yê,åg.rôèirr2cº745µ Û®®® €Œþ.FwÚkHQ‚Áà°åÝÝñ'2˜H“YŒ•Ô_B!îfšÑ“Ü>JÏ£¹¹#GOÇ,¿x±‚ŸüÓ¿ñþ;oh¿ëî[ÉÌ™…?Q>l]GG'v»-æC‚ªª¼»u¡1vW‹‰:¿éÂ`Ðßòq9a*®ÃÂ…³±ZÍ|ºÿW*ªYµrøM,››Û(+;³ìÃí{P…eKNYÞ'’Íf¥¦¶!æÆ›õ MTUOþýmÆ[h47Þ:2R !„¸[ÝQ-:?¸Ž'Ïðó_¼Æù WÈÏϦ©©•]»b6›xêÉèª( /<÷$?üoÿí»>`ñ¢9=VÆK?{•9sŠðúü;VFk[6«Ÿ×w+N ˜¸óã3×A§Õ²tÉBvï9„F£aåòáŽN«å¿ô 7¬!%Åɉ“g)+;Ï#Ý«s§½†–.YÀÎ]øñ?üV,_LGG';w 55™ÆÆá-\i¼uÕiÁض}7¬Î¨w«Iý%„ânuG:f³‰?ý~Ÿ­ïÂñåìûô&£‘ysgðÄc›£önDZZ2?º‰7þýý˜å_~îI,3'Nžå؉2v–”.à¾õe~õë79sö~£Ñp³§7¡ç'Ænª®ÃêUKؽçsçc·Û†­Ÿ?3Šóùdç~Ü]df¦ó•>3æéN{ }áéG0ô>rŠß¼º…ôôTžýâcÔÖ6²u’[Æ[Üß Î»Ä[oo£´d©©É–7©¿„BÜâõÐo~lmàKßÚÈὑîO7òÊK?óŽwl{™ ›_ 9mmÍcŸUˆñpwÔQ4ký]ñ«ªªã/ÿûOøÚWŸaÅòÅ1ë^üÆ÷X¼h.ðûÏOQîFw7]+!„BÄ7#ŒÕ³_‘™ Óhkꥭ©€m[ö= xOÿ£wÐï^ÀwGµèÜŒ¿ñ½qo3™7.w†ñ¾Î¿Æví>ˆÕjŽÞ€QLœ›¹NB!„˜$Ðé'TÄdïëLUU~þ‹ßÒÓÓË™³—xìÑMèõÓ†ÛÔB!ÄíO!¦1EQhhl¦±±…{×.çáïŸê, !„BÜ$ÐbšûóïgÔ4Ò!„B뎺ŽB!„BÀ$´èô<„ÃÃï\.Ä­`w¸hi<3ÕÙc ×J!„¸»i4“Û™lÂæém%ôOôa„B!„Ó˜Áp‡:½=­„$ÐB!„â®f0X'õxèœ:¶}¢!„B!„˜æ–¯~bR7á“x’µ,¾÷iy–gy–gy–gy–gy–gy¾‹Ÿ'›g™~óck_úÖFï-àâéF^yéçcÞñŽm/³aó `¶Q~uç­È«B!„â65ßµìZŒ0FÏ~ýEf.L ­©—¶¦n¶mÙ÷$à<ýÞA¿{ß„w]+»úÉDBÜÅNºÂ¢ES 1r­„Bˆ»×‚üûÁÛ;©Çœð@gAÞýœ¾ºc¢#îR — ªá©Î†¹VB!ÄÝët妯œÔcNüd•Oô!„B!„ÓØÂ‚ àóLê1'<ÐYX°Sì!„Bq·:Uñ1‹3WOê1'<Ð9YñÑDBÜÅÊW²`yÁTgCŒ\+!„âpÓ×¢³¨`ãuƒ£ÞÂ=óžAQ]x›.OÛDg‰M%_ ËÓÊ¡ [FL·zΓXM‰´tVqRZ¥®kSÉW§¤œæ/ËGUÕóª†ñ÷yiï©çJý1|}ã7Uç{;»Þµº΄LJ‹dWÙ¯¹ásÃÖ«j˜@ÐG—§…º¶‹´tVß²cÇ3ž×„ÅèÀãïœÐü \NÁP º\êÞ;ƒÔEBˆÛʼn+Û)ÍZ;©Çœð@çÄ•ëß04=)2 SX ‘éœEgï§¥(»%£ÞŠ/Ð3lÍ”ˆÕ”€ ·ôÚj:–S—§•ªæò˜eZŽD[:™Î$Z]8÷&¡ppÜûžŽç{7INÈ¢ÓÓL_Ð ¿ÖZ«)‘Ìä¤:ò¸ÜpŒŠ†š§±¼&rÓæ13kŸøÅ„æeÀÐr uïCÊIq;()züÞI=æ„:%Epüò‡#®ÏpÓãk'Ðç%ÃYÄ…Ú7ô¡s¼<þ.,F;iŽÜa„Òó }t&PU™-j,¦a9ù=Ô·]¶¼¦å,=Þvff-'ÃYLMËÙñï|žïÝ$ÙžMSGeôŒt­¯6fÅìÇ(J/¥±ý ½>÷Äej ¯ §-¢™´×ÎÐr uïDÊIq8~ùC–æÜ7©ÇÔLôŽ]þu„Ÿ‹“³“öîzš;«Ði ¸’ FL«~z¼íxü¤%Æ?ž+©¦ŽŠèyLtžn÷Ÿ©*§²#Wo8O5­‘à&ÑæºmÎ÷vþ¹ÞµïAo&Á줵«•ë_o ›s5ûQ…Ìä™v~c}MLækgh9 üHÝ{çüH9ÉüÈÏíòSZ¼ùÆŠ4á-:¥ÅrìÒq×e:gÐ쮦Ç×Áœœ5d§Ì¦¶õBLº‡–~“ŠÆxüݦ/ÂlHÀ衦å•M'£MöcM‘¦þÆŽ \‹ÑkM‚ךҬ& f'çj>%'u.C»XM‰¥—à´gaÔ[@UéñuPÕ\Nmëù˜|_i8ŽÇßEk!“ƒ@Ÿúö‹\ª;BxÐ7pcÝ'€AgfVö ÒóÑiõtõ¶r¾ö òï£ÇçŽiAÓjôg–’‘TŒÉ`Åßç¥É]É¥ú#1]YZúM*›NaÒÛp%åÓôsðüÛxü]îE¼teš2›×bÌÆ¼þ.jZÏsµéÔ„u«˜·4÷ºû¾^—ŽP(€‚ójr_Ö YZü ®Ä|>8úÓ˜}_ï|gf-§(£”ƒçߦ£§1f‹ 7’–˜ÇŽ“ÿ6)ߢO£]«ñHNȦ/äÇÝÛÝçõ®uSGÁP€$[zLš±þ(І¢Œ²’gb6$ÐòÓÖUÇźÃ1ÿ#ƒó ×™X1ëQ,ÆŽ\ÜJGO#-ýf4íƒK¾ózÒi g.%=©“Þ‚¿ÏCcG%—ëÒŠý_k=¯œ@ê^©{…bò½ôËsïŸÔcNx sôâûq—+ŠB†s}A?­]µ¨jwoI¶ ,Fǰî%éIE˜ T·œ¡ËÓJš#YÙ+°š9]ùɸÓJCû ÓKHKÌ£¦å\t+±@ÐG[W]4íÀ›…Õä`õœÏú¨j.'ÐçÁ¨·’›:—ùë†4´_‰î+Ó9­FÇÕæ2ü}^2“gP˜^‚FÑq¶z߸÷©ÕèY1û1,†®6¦×ßIzR!Ëg}U ÓãëˆæU«Ñ±bö£XªšÏÐësc3'‘—6d{6ûÏþ{ÌàäÜÔyt{Û8[µ³1^_üÁÒ#¥K±gE»£t{ÛIuä1;{%6S"§+wŽô™`êˆoô®Ä|ܽÍCÒÄÛ¦ÿÃô å£o]ëŠ2JÉpÓÞÝÝN«Ñ“–˜OCû‚¡¾[q’w­VóšIŠ#›¶®ZÂáÁÝuF¾ÖªªÒííÀjtÜÐÿǼÜ5ä¦Í£ª¹œÎÞ,F;ù®…$Z]ì.{•°ŠÉƒNk`ÙŒG¢AÎÀõ?U±ƒ|×BÖTNUìˆæE§Õ³rÖcXÍIT7Gê.‡5•¼´y¤Ø³Ùî͘rk=¯œ¤î•ºW!¦ÂÒCÀ7©Çœð@g錇8'ØI±ç`Ô›©i9G8ùPßv™D«‹œ”Ùœ«9“Þb´SV¹‹êþ±ÕÍgYT¸ì”YT5•áîmW:Tp÷4ã ôàJ, ºùÚô¤B;*®}8P¯}ÀÍO[ˆV£ã๷ñHÛÐ~™u Ÿ%-1Ÿú¶ËÑå&ƒ=e¯Ñãë ¦åë=G†³ˆ3U{ǽÏ|×l¦DŽ]ú€ÆŽÊè9–m"3yFl^]‹H0'³¯üuº½íÑý6uT²jÎe”r~P9+І#¶^ÿE8R:­Fω+QßviPÙ¯';e6UMå×Ê~i-z­1f™Nk$Å‘ÅìœU‘o›ÏÅ~@Vã´ ôÿ9´5`´óu÷6÷_ë}Ñ>ô®¤´u­äÛÖ~srW“›:VO_ÈOkg-íWèèmÂl°1#s)‡.¼MŸbÏáBÍÁÑ¯Û }Azkê ýd¥Ì¤­»žò«{¢é<þnò] °í×¶WA£èX6ólæD_ØJ{w}t›ÚÖ ¤'Ⱖƴž¤/&Á’̉ËÛ©oü¯×´œ££»‘ÅE)Ê(á|ÍÁhú±ÖsñÊIê^©{…b*¹¸••ù&õ˜>FçÈÅ­ôwèˆyd§Ì"o(Ëúßà³Rf¡(Ê ôàïóô¿¶ÊÆ“@äƒãxÓE¨4¶_!Å‘N«T,ÆÖÔAùº–TÊ«vóñÉ—ñº£Ë@«Ñ‘oòç»ÓÓL¯=ºLUCt{[1èÍ7´Ï g1çXÑ8x6©kiÝ=Møûz1èŒÑG·^Ÿ›ôhyDòÚíiíïF2üzž¼þîþÁàƒËþÔ²¿µ3Ǫ¯›×TG.›J¿ó¸ѳÌÏ»—¶®:œ{“¾/f›Áe8òò±o]ëy :3)ö¬hš¬ä™ø½´uÕNH™L×Çõ®UzR!çj>åèÅ­\mïý@8–n¬û´™“ú»uÄî³ÛÓ1,¯V“­FÇ¦Òø÷“‰ôSœWϰýÆ3RºÈ7§±ËÊÞ2¬ìoyKr¯»¾£§‘‹µ‡È‡–tg!Ù)³©o¿LùÕÝý]Çâåk¤¼z]á|ëÛ.37w-™É3ié¬Á¨·bϦ¢ñä°×éîz×joùëÑ®‡žS¼××µäñÖ^ÏÅ+'©{ûŸ¤îBˆIwgŽÑ™ùð°Yײ’#3þœ­þtø ãXT°GfcäÛ\ˆ|C6´²¶›“èõº£ëÆš”èïMîJ23±š$Z]\ª;:d×ÒÎÍ]ƒ?Ð˾³¯Ç $7ê-ÃÒÆÿ»ÿ$á†öÙëëÄjJ¶O›)iXZ¯¿½ÖóA@Zb o y'~:“Á:ly‚¥¿ìýî)z³ž×ŠÆ$ÚÒp%0+{%çkcÇ$hݰm ý×bðò±žo]ÛE\‰¤9rÉpÑåi¥Ç×!>n€N«'É–NEãɸÿW#•iº³­FG“»bÜÿEƒÍì$ÒØq…ÆŽÈàô g‹ 7‘çšOÙÕ]´vÕÒÖ]‡¿ÊËÚ¹O±°`ο5dìÐðÀÅëïÆfvÆÍ¿ÍìÄëïŽY7Z=§×â–“Ô½R÷ !ÄT9vyòg]›ð1:Ç/ˆ¢(чÅhÇ™I¯ƒê–rš;¯Æ>ÜW©o¿„‚BNÊœhm1:HKÌ‹ÙWAú"TT}xk:¢ë›:*ÑiõÌÍ]K_ÈO{O}tÝд&½ÐC(Œ9Fqæ’H*š·>úËæFöÙØq%r³½Äܘ´ù®ÃÏË}«ÉA†³8&mrB&KŠ¢(£tô¼yŒ” ÁœŒÝ’³¼(£ˆ Âmß7ò8s´zÜyU…3U{½ý3`¥E—‚^ì–d´mtY‚ىÒsÍÆs¾­Õô…üd¥Ì&ÑæŠ¼¾' ,¦ûãz×j¬d{6*ÐÑÓ0ækm1Ú™½Š_Mîk×e¬ÿFƒ•5sŸb^Þ=1é¦ ü-û@z}T6ÂaM#ßµpH^Õ˜×Ò@^Ì[´Åoà‘•<“ÁJKgu̹ŽVÏÅ+'©{©{å!yÈc Kg<Äd›ð%ÅÅÜ[`àÅÚ–óÑ.CÕ4Ÿ!'eY)³¸Òpˆôi^\¸‰ªær¼þ.ÒóIuäRÑp¯3º¯±¦ƒk]B:zé úHuäR×v!ÒÔ?$oGº!²¸p#m]uÑ>ïfC}A:­aÄm‡º‘}V5•‘éœÁâ¨n.Çãï"Å‘CŠ=gØ~+OâJÌgQÁz’2éò´b1:ÈIK0àbí¡Qóšéœ¯¯'fzä‘Ω/ägùÌG©j.‹tII*"ٞŕ†côúÜ#–ÃÍX°,Ô4qóôs®úSndAÞ}ýߺ‡iì¨$7u.Kgt„h踳|°_=$ÙÒIqDÞDZ»jp÷4’›:£ÞB¯ƒòªÝÃÆ:Œ5ýÑe„JsgYɳ¢ßøÆ”ölõ^‚¡i‰y¸ ðõyhvWrâÊvææÞCŠ=Ö@(Üç8×öyÿ>Ãjˆ#—ÞcFær²Sf£í¿iݱËï³|棄Õpt¿¡p‡/¼CaF i‰ùd§Ì&꣭»–ËõGñø;¯S& î§¹³*ö†—ñÎ hl¿Œ7ÐCnÚ|Œz Ÿ;~ÙO¦ò ‘n3Í%æ“ïZÈÕ¦S\¬;H8$ÃYÄœÜ5x|nÎÕìÇfN¢0½$f_ã9߆öËä¤Î¥½»Ž@Ð;uåq›K±çPÛz.nùÙ-),(¸Ö$‡ðz¨o»HeÓ)ü}ž˜íÆóÿq¦z¾@éIE¤9r …ƒ¸{›8S½—noÛµýz½©j˜sÕûX2ãaæçÝËÑK‘IYjZÏ’lÏbFÖrZ:«ðø»"y¹øE¥¤'›:Ÿ—ê–³T4'Œ«ž‹WNR÷"u¯BL¡’¢Íà÷ŽžðŠWê7?¶6ð¥omäðÞr.žnä•—~>æïØö26¿@ØhædÅG7•ÉM%_¥¥³Š“ß’t·3ƒÎD_(½'˽Îĺ¬7'x IDATÏRÝr† µGØZL»%…³£üê.:®Œ¾#˜ÌzNêÞk¤îBˆ›Wšµ6#ŒÕ³_‘™ Óhkꥭ)ÒCbÛ–}O^ÀÓÿèô»ðMx‹Î©ÊoÑ7J#3cénOÅ™ËÈp³ïìo ô]‹Š3Å@dŠØ;ùü‡*;\É‚åSQå¤Ì‰ÌÀÖUuW]ŸÁn—ku{˜ÌzNê^ºW!nÖâÂMàóLê1'<ÐY\¸‰S·è[¾±ö3¾“û#7¶_&Ó9ƒ%ESß~‘¾ »%™¬äYtyZiv_½£Ï¨…Ë §: ×5/ï> :#΄,*O Fïãq÷™î×êv3™¯#©{¥îBˆ›uªâcg®žÔcNx sºrÇ-ù–k`¶™[•îvÕéiædÅ6ò]‹(L_ŒFÑâëóPÝr–«M§ˆ{ï1e¬&£ƒúö‹T5—ɵ·ÄdÖsR÷FHÝ+„7gaÁ†;¯EgQÁFN_ÝqSûØyú߀ÑßDÇšîvçîmâdÅö¸ëîôs¿Ý½ô^Ìßr}ÄÍšÌzNêÞXR÷ !Ä+»ú Óÿ/{wÅ•/|üÛ,"«4È¢(‚€‚²È悆¸$jŒIL®Ñ$3cbfr³Ìbœw2f3ËÄ$cœ˜uœL’¹Ž^Í¢Q#!¸"²ï›(‚‚,M-*›Òï\j(»Án\p9Ÿçñi»êTÕ©ªCu:çw*ò†nóºWt *¢P\÷×õw¨¼´2&Ex v6ˆs%‚ w®@» õü Ýæu¯èzÄPX~ðzoF¸CExv‰s%‚ w®ÂòC¸„ÝÐm^÷¦–C¹[çEÃY•øŸâS|ŠOñ)>ŧøŸâóý¼Ñ®û{tšÎ™_“Œ B”Jå`gAAAèGWgÝ }ŽžAAá¶#*:Â-íÈ‘#ƒÁ@û÷_Ýè‹‚ ‚ Æá–6mÚ´Á΂` »ï¾{°³ ‚ ÂDTtAAA¸íˆŠŽ ‚ ‚ ·QÑni"FçÖ!btAA¸‘®û CõY¹r%&L`ùò僱ù«R__““Ó`gCø?†Äè\ºt‰ÄÄDRRR¨¬¬¤³³™7o²ôµµµÄÅÅQTTDSSŒ=šˆˆ¦OŸŽ‰‰ÉU¥¿S]ë£GòÁ°aÞ{î9ù¦¦¦ØØØ0vìX¢££™4iÒ5Ýþå–/_Npp0Ï?ÿüÓªÕj\\\®k~z\~œ ÍãÍæF3Aáö0([Õ‘#Gصkï½÷Þ`gE0Pss3ûÛߨ¬¬$,,ŒˆˆÌÌÌ(++#!!´´4V®\‰‡‡§Nâ½÷ÞÃÆÆ†iÓ¦áèèH[[999üë_ÿ"??Ÿçž{…B1 ôµSXXÈØ±c±²²ÀÃÃٳgKó;::P©T$%%‘““âE‹X¸pá`eW²oß>¾ùæ6nÜxC¶wùqºÝèc&‚ ÜDEÇ%%%\ºti°³!H«ÕòñÇS[[ËK/½Äرc¥yÑÑÑDFFòÁðùçŸóöÛocjjʶmÛ2d¯¾ú*¶¶¶RúY³fñÕW_‘˜˜Hnn.ÁÁÁF§®¢¢"BBB¤ïJ¥’¨(Ý·.Ï™3‡·ß~›]»vŽ««ë̦Žââb.^¼xöwùqºÝèc&‚ ÜDŸá–Ö_ŒNFF¥¥¥,^¼XVÉéáççÇÔ©S©¯¯çøñãœØgÌÞ¹sçx÷Ýwihhàø>>>²ëÌòåËùòË/¥ï­­­ìܹ“¬¬,Ξ=˰aà åþûï—u;[¾|9óæÍÃÉɉ¸¸8ptt$::š{î¹GfÈqª­­%66–ââbšššpss#&&†éÓ§°}ûv~üñG^zé%|||dËÿýï'77—?ü!C†µúâ…>úè#rrr¤cÓß1Ó§¹¹™;v››Ë¹sçP*•L:• `jj v>rÎA„›ËMQÑihhàÃ?ÄÚÚš©S§bkkËÙ³gIKK“ºʾ}ûÈÉÉ‘Ut:::(**bâĉ 2„ööv>ùäÔj5QQQ¸¹¹Q]]MRR%%%¼ð :Ô¨<.]º”ÇSUUÅÒ¥KûM{þüy>üðCZZZ˜:u*ÎÎΔ••Occ#K–,ºoRSS™:u*nnnœ9s†Ã‡SQQÁÿûÿ333ƒÒú:u 777YÅörvvv²ïsæÌaëÖ­¼òÊ+„¿¿¿Nº¦ú¦ÕjikkcèС:1MZ­V6­°°???ƒz011aäÈ‘ÔÕÕIÓ:;;Y»v-uuuÜu×]¸¸¸ R©8xð EEE¼òÊ+RÙÙ¼y3 ÄÄÄàîîŽF£!>>ž²²2Þ~ûmÌÍÍeÛkmmåƒ> ¡¡ßÿþ÷Rå`ÅŠìÝ»—òòrV¬X!¥okkcíÚµ¨T*fΜ‰»»;8p€¢¢"V¯^-+Çh4)m~~>ß}÷*•Š'Ÿ|Òàã¤V«yóÍ7±µµ%&&;;;9|ø0_}õC‡%,,Œ)S¦ðã?’––&«è´··“““CXX˜ô€É˜ý0D_ÇLŸ––Þ|óMšššˆ‰‰aäÈ‘;vŒ;w¢Ñh¤J“!çÓØs.‚ Ü|nŠ»äÇÓÑÑÁ‹/¾ˆR©”¦ñÎ;ïpôèQ‚‚‚pvvfôèÑäææ²hÑ"éÇ;??ŸŽŽ&Ož ÀÁƒ©©©áñÇ'((HZߘ1cؼy3û÷ïgþüùFå144”¼¼<ªªª í7íhlläW¿úDFFÒÕÕEff&sçÎE©T’ÍØ±cyà¤eíííIJJ¢¡¡WWWƒÒúµ´´0jÔ(£–™3gfffìܹ“ôôtÒÓÓ¤QÔî¾ûn,,,œ^ÐoÛ¶m$$$ÐÖÖ&=9Ÿ =ç‚ ÂÍ릨è( ÚÚÚHLLD¥R¡ÑhÐh4tvvÝq*=BBBعs'999Œ?ž––Nœ8ÁŒ3¤›ZF£7øº‘]OF§;tWZz­?üðÃüë_ÿb×®]ìÚµ WWWˆŠŠ’~ Is'ë/FG©TröìÙ­×ÌÌŒÀÀ@)ˆ[­VóÍ7ß““Ö-[tÞÛblú;Q1:¯¿þºÔ¥)((ˆE‹¡V«illÄÞÞ^ÖrYXXˆ«««¬Â---²úÚÚZ:;;ùío«7}ïJÑO<ÁgŸ}ÆÖ­[Ùºu+nnn„„„0cÆ Y%¶°°Pº•””\«««ë³R4bÄi°Œ£FÒ©Ä÷£žîy†'…BAkk+û÷ï§²²’úúzêêêô^{#""غu+iiiÐÜÜLqq1sçΕòbì~\k ²Jq;;;Ù¹7ä|zÎA„›×MQÑ)**â_ÿú–––x{{ˆ««+žžž¼ñƲ´VVVøùùQXXÈÅ‹ÉÍÍ¥««Kê¶ÝO$“¡­ÞÞÞ¼üòËS\\̉'Ø·o‰‰‰<û쳸¹¹”FÐoìØ±dddÐÚÚÚg\@EE[·nåî»ïfòäÉ|÷ÝwÌœ9“áÇËÒ¹¸¸ðì³Ïòç?ÿ™¢¢"iº±éýô½/ˆ,**Òi-½’ÎÎNªªªt^êééiP8???Þÿ}òòò¤V»Ý»wÏŸþô'ÆŒ€¹¹9¿ýíoùᇈ%,,Ìèî“—Ów=ëé:Ö[Ïu§§K¯!Ç)77—O?ý+++ÆOhh¨tÝé= € 'N$;;›_ü⤥¥ÑÕÕÅ”)S¼W“NC¯½†œOCϹ ‚póº)*:;wîÄÞÞž•+WÊâzw'é-,,Œ¢¢"Ž?Nnn.nnn²'¾² ãZ­–ÚÚZÙÓ8…B¡÷ý çÎðþ(•Jt¦×ÔÔpàÀf̘ÁÈ‘#©­­ÅÜÜœ   ©›]nn.›6mâÈ‘#,^¼øŠiþë¿þkÀù¼ÝEFF’ššJRR³fÍÒ›&11‘ãÇ3cÆ é»R©ÔÛú`bb‚£££¬\›^¸:mmm”––rï½÷µ\NN„……IÓ¹páþþþ:ésss¥Ö׋/R]]……áááR·¬ŒŒ >ûì3öïß/¹àïïϰaÃxýõ×ùòË/yùå—¯8h‚££#*•JgºV«¥¦¦F§UF­V뤭ªªº[N =N[·nE©T²fÍÙ-ÍÍÍzÓO™2…œœ ÈÈÈÀÝÝ]ö°Å˜ýP(RËQo}mÛ}]û+++‰eîܹŒ5êŠçó‰'ž0øœ ‚ 7¯›â=:MMMØØØÈ*9Z­–½{÷òîþþþXYY‘žžNEE…Îà466’››+›žMSS“ìÆÆÚÚ•J%{¨Z­¦²²R'Ÿ†Žð@CCƒN7äädrss±´´¤¹¹™õë×óý÷ßËÒôt¹3111(Í®¿÷¢âååÅöíÛõvWÌÏÏ'!!gggéØÓÓ“Ý»w뽑¬¬¬äĉ²þÿƦ¿“]‹÷è£P(¤ø½ñÆlÚ´I–®g}‡nnnÜ{ï½”——³oß>Ù<}éCBBÐh4Ò`=RSSillÔi‰R«Õäçç˦ÅÅÅ¡P(7ø8õ ©Ý»’£ÕjÙµk€Î ’'Mš„µµ5III”••é´æ³¶¶¶TVVÊ4ÕÔÔPQQ¡“OC¯uÁÁÁ¨ÕjVÔƒ’žžŽ¥¥¥Açs ç\A¸ùÜ-:&L //M›6áããC{{;yyy466beeE[[›,½©©)“&M"%%·~ÇÄÄPPPÀ–-[¤!†«««INNÆÉÉIöô}Ò¤I$%%ñ÷¿ÿΞ=KRRÇ×y2Øó^ƒ2cÆ éÇ.++ {{{¼¼¼¤íçççóõ×_3}út†NYY™™™L›6MêæLvv6_ý5ãÇçâÅ‹¤¤¤`ffFTTJ¥òŠiîtýÅè( žyæÞÿ}Ö®]ËäÉ“¥øcÇŽ‘‘‘µµ5Ï<óŒÔhΜ9|ðÁ¼úê«DDDàé鉩©)ååå$''£T*yä‘G¤m›þNv-Þ£SXXˆC† Ñ™×ØØHJJŠô½££ƒªª*’““133ã™gž‘ݠΟ?Ÿììl6nÜHqq1žžžÔÖÖrðàA,--¥‰ˆˆ 55•O>ù„ÀÀ@:;;9tèæææÌœ9So^.\Hzz:Û·o'88Xz÷JÏu$..ŽÙ³gcjjʼyóÈÊÊâ‹/¾ ´´”Ñ£Gsúôi:„‹‹ ,­ÛÌÌŒO?ý”Ù³gãääDvv6ùùù,X°WWWöîÝÛçqê-((ˆÌÌL>ÿüsüýýikk###ƒ††lllhmmÕÙnXX‡ÂÄÄDgPcöcòäÉ8p€>ø€ˆˆ9pàNNNÔÖÖÊÖ«ï˜A÷`ÒßõüùóÉÊÊâã?fÖ¬Y8;;süøq’““™5k–ÔòJçs ç\A¸¹èvôSïñî¯L Kõéî›}úÝ·ÐàŸ*Ëe¬wíº›ˆÇÙÙYzÒíëëË… 8vìùùù¨Õj|}}yì±ÇP©T”——3}útY¿tkkkÒÒÒðõõÕ¹á777'$$„ööv ÈÉÉ¡©©‰°°0–.]*{i—.]¢¬¬Œ¼¼<Ο?Ï‚ °¶¶æäÉ“Ì;WJkooÏñãÇ),,$44TZϺuë¸pá‚´?=]ÍΟ?Onn.¹¹¹´··3kÖ,Yி¿?Z­–’’rrr(//ÇÕÕ•%K–àîînpAŒGÏô©S§bffFII ©©©ÒpäQQQüú׿–Å899áïïÏ… 8qâäççsá¦M›ÆSO=%PÂØôÂÕÙ²e aaa:ƒ}ìܹ“³gÏ’-ý+**âüùó„……±bÅ ºš››Igg'yyy¤¥¥Q]]¿¿?¿ùÍo1b„”vÒ¤ItuuqôèQÒÒÒ8qânnn<ùä“Ò;½vîÜɈ#ˆˆˆþóîžÄÄDjjj¤Ö¥RIQQ999DEEamm-奭­ììlÒÓÓilldÚ´i¬X±BöòÒ;w2iÒ$¦NJbb"ééé 2„Å‹K׫þŽSï<pþüy ÉÌ̤¦¦† &ðë_ÿšêêjNœ8ÁìÙ³e3ØØØ˜˜È„ tnøÙ:;;9~ü8™™™´´´°xñblll())áþûï—Òê;f¯½ö.\ögÈ!DDDÐÒÒ"Ü×ÞÞÎ}÷ÝÇý÷ß/]{ 9Ÿ†¤AŒ£í:/Õ µ}÷.]ºGfn=ßIëùîAËŽŸþ¸têùw¸¨/rÓ|îýÓ:{v鉅”äײy£áoyßÿó×Ü=÷—4»>/U«ªªbýúõ,[¶L§EG¸óô~ÿ’ ÜΖ/_Npp0Ï?ÿü l¿¼¼œ7Þxƒ§Ÿ~Z s/‚ ¥«³Nª#jÙÓO1nbw,¾F}º;öùçGZ ÿ÷ï|¯ÿ·m·lGãääd¬¬¬¤á|…;S1:ÂÍåZÄèƒïàÁƒX[[_ñÅÉ‚ ‚0ØnŠCiµZ¶lÙÂùóç9~ü8÷Üsææ×§ÅH¸5ô£#Ü\®EŒŽ08´Z-ÿøÇ?hii¡¨¨ˆE‹‰k¯ ‚pÓ»¥*: …µZM}}=‘‘‘âÆIáP(¨T*T*ÑÑÑÌŸ?°³$‚ WtKUtþð‡? vAÍ—_~9(Û}íµ×e»‚ ‚0P·lŒŽ €ˆÑ¹•ˆAAn$QÑni"FçÖ!ºš ‚ ‚p#‰ŠŽ ‚ ‚ ·ë£#Þo"Ü¢œ ‚ ‚ ÜÜ4uu7t{¢EGAA„ÛŽ¨è·4à~ëˆì,‚ ‚pá–&ÜoóæÍì,‚ ‚pAAAn;¢¢#‚ ‚ ÂmGTt„[šˆÑ¹uˆAAn¤ë>¼´>Ë—/ÀÃÃW_}µÏt«W¯F¥RÌóÏ?? í tYáÖ`HŒÎ¥K—Ø·o ”——ÓÑÑÁðáà áÁdøðáz—Û¼y3©©©|ôÑGäååñú믳qãFœœœ®é~Ü ®uŒN~~>kÖ¬áþçxì±Çðòòâ¯ýkŸË<ÿüóTUUÎK/½tMó3P<ð€Î4SSSìììðññaöìÙLž>žÄÄD^ýu¼¼¼t–-++“M/++ÃÎÎNTrn999Œ7kkkiZYYõõõzÏQee%UUU72‹óòòâ¾û···S]]ÍHOOçÑGå‘GÄÞX¿ûÝïdßwïÞMYY™ÎôëeÏž=|ýõ×|ûí·:óD¹»}‰r'·ŸA«è8;;SWWGvv6³gÏÖ™Ÿ™™‰­­----ÞFdd$W‘KáV¦Õjy÷Ýw©©©á/ù ãÆ“æÍž=›èèhÖ¬YÃ_ÿúW>þøcLMMeË—••±xñbÙw}"apäææ)}wuu¥¶¶–´´4,X “>%%;;;š››od6 âèèÈŒ3t¦ßwß}üéObÛ¶mL:77·AÈÝwù±HNN¦¬¬Lï1ºòóó¹xñ¢Þy¢ÜݾD¹“‹ŽŽÆÛÛ{ÀË ÂÍ`ÐbtÜÜÜpqq!;;[ïüÌÌLBCC¯jO?ý4sæÌ¹ªu7·þbt’’’8vì?þ¸¬’Ó#00˜˜Ôj5………²yõõõ477ë´èˆŠÎÀ]ËÆÆFÊËË –¦¹»»3bÄRSSõ.“œœLTTÔ5ËÃ0|øpž|òIººº8pàÀ`gçŽ'Ê0«Üýþ÷¿—µø ­hP»®…††GKK ¶¶¶ÒtµZMUUK–,áСC:ËÕÖÖKqq1MMM@wÅ)&&†éÓ§Ké.ÑY¾|9 ,ÀÙÙ™Ÿþ™ºº:lllˆŠŠbÑ¢E˜™õ8š››Ù±c¹¹¹œ;w¥RÉÔ©SY°`ÔpéÒ%öìÙCJJ XYYáïïσ>(º<]ýÅè$&&bbbÒïÓ¸eË–ñØcaggèöÑ^½zµìûwß}Çwß}wÝúgßήeŒNnn.666:O£¢¢øá‡hnn–Î)€J¥¢¢¢‚åË—óóÏ?ë¬ïÂ… lÛ¶””Μ9ƒR©$22’%K–ȺŠ<ðÀ,^¼WWWvíÚ…J¥ÂÎÎŽ3fðè£Ê®!†®óJ"""°²²âèÑ£²émmm|ûí·$%%ÑÐЀ½½=<úè£ØØØ°qãF~úé'>ýôSFŒ![þå—_¦ººš/¾øSSSƒÖ×cŽßƒ>ˆ‹‹ ?üðuuu8991{öl-Z„‰ÉÀž½š÷K—.ñý÷ßsèÐ!êêê°¶¶fÒ¤I,[¶ )½óÛûo]”;QîŒ=pó•»êêj¶oßNAA( Fͼyód¿©—ÇèSõ9{ö,ÿû¿ÿKFFÍÍÍ8::r×]wñðÃËî¡®t¬Áƒ^щ%77WVAéé¶6~üxeÔj5o¾ù&¶¶¶ÄÄÄ`ggGcc#‡櫯¾bèС„……õ¹ÍÔÔT:::ˆ‰‰ÁÞÞžÔÔTbccéèè`éÒ¥}.×ÒÒ›o¾ISS111Œ9’cÇŽ±sçN44ÀÂæÍ›IHH &&www4 ñññ”••ñöÛocnn~GL0Fii)îîîXYYõ™fذa²ï=}±¨ªªbÙ²eœ:uŠ;wò›ßü†¡C‡^¿LßÁ´Z-­­­XZZ¢P(tæõž–““ÃĉufÜô? IDATnP¢¢¢Ø¾};éééÌš5KšžœœŒ:ÛmmmeõêÕTUU1wî\<==9yò$?ýôyyy¬]»VV†>L{{;óæÍC©Trøða¶oßN{{;O=õÔ€ÖÙF-‹Yìèè`õêÕÔÖÖrÏ=÷0räHªªªˆ‹‹#//÷Þ{+++fΜÉO?ýÄ‘#Gxøá‡¥å5 G•Òº>}ŒÝפ¤$êë르YYYlÚ´‰ªª*^x჎IoÆäýÿøñññÜ{l;–ºº:vïÞÍñãÇùøã177çw¿û]Ÿ±¢Ü‰rgì±€›«Ü©T*þøÇ?bggǽ÷Þ‹½½=†½{÷òñÇ3tèP¦NÚç~Rõinnæü#gÏžåÞ{ïeÔ¨Q²mÛ6êëë¥Ò†+A0Æ Vt<==qtt$++K§¢¬÷)ËÞ½{éèè`ÕªU²A ÂÂÂx饗ÈÍÍí·¢sæÌÞzë-\]]˜:u*üãIOOï·¢óÓO?¡Ñhxþùç¥æãèèhºººHJJâþûïÇÑÑ‘””Æ'Ý 888°ÿ~êêêÎ7ƒ¦¦&ÆŒcÔ2=­? øúúJß±³³cîܹ×<Ÿ|ýõ×ÄÇÇÓÚÚ*=Á‹ŠŠÂ××—úúz¾ùæ^ýu »Ò“——'<Ô›··7NNN¤¦¦êüðGDD车üðÔ——³råJ¦M›t·úúú²~ýz¾ÿþ{üq)}CC6lþ–cbbøõ¯MRR’ôCoì:¯ÄÆÆ†sçÎIßwîÜÉéÓ§Y·nîîîÒôððpþüç?óÝwßñÄO0nÜ8ÜÜÜHLL”Ýp&&&¢Õj™9s¦QëÓÇØ}U«Õü÷ÿ·›9{öl6lØÀÁƒ™7ožÑ1Æä=!!V¬X!¥>|8±±±¨T*ÜÝÝ™1c†ÞØ QîD¹ëíV-w»w尿½7ÞxCÖËdêÔ©ü÷ÿ7ýVt )‡úìØ±ƒúúz^zé%ÂÃÃîsÐÕÕÅÁƒY²d NNN+A0Æ ¿G'44”ââbÚÚÚ€îØˆŠŠ éárË–-cݺu²JŽV«¥££@úì˘1c¤Jt§9jÔ¨+z››‹“““¬,ÀÒ¥KyóÍ7±··ÀÞÞž²²2âããÑh4Rл¨ä\{ýÅ蘘˜è´ êÔ©SxzzJßOž<ÉØ±c´.¡[1:©©©üâ¿àÏþ3óçϧ¢¢‚uëÖñôÓO³zõjººº¤´'Ož¤¹¹™   ½ëŠŒŒ$??ŸÖÖV ûçäÉ“}þx§¦¦âää$Ý,õˆŽŽÆÉɉ´´4Ùt///Ùß²©©)cÆŒ‘ºÑd†èý$399ìííinn–þ¹¹¹éôÛŸ9s&•••”——KÓqww—Ê´1뻜±ûªT*e7e .”Öe,cò®T*)))a×®]Ô××Ý7[ëׯ¿â ”(w¢Üõv«–»+VðÏþSVÉÑjµ´··HŸ}1¤ê“‘‘‹‹‹Î½Ý“O>ɇ~ˆƒƒpuÇJôÔè®èÄÇÇ“ŸŸOxx8YYYØØØàëë«7½B¡ µµ•ýû÷SYYI}}=uuutvvÈnˆô¹¼«€™™Z­¶ßåðóóÓ™ngg'ëûÄOðÙgŸ±uëV¶nÝŠ››!!!̘1CúC®þbt9sæŒQëknn¦¥¥…³gÏâìì,XsòäI&Mš$}ï}ÎÃô£óÁHÝ<ÂÂÂxôÑGQ©Th4”J¥ì‡5''77·>cÞ¢¢¢Ø½{7YYYL›6””lmmõvã€î˜¿ &è×Ó½¢·ž‡½]~ 1vWÒÔÔ$»vÕÔÔÐÑÑÁ/~ñ ½é{÷•Ÿ9s&[¶l!11ª««9yò¤ìI¹1뻜±û:fÌ=ç·¶¶¶ÏíôŘ¼?óÌ3¼ÿþû|õÕW|õÕW¸»»Áœ9sú|ŸVQîD¹ëíV-w …‚ .°gÏÊËËQ«ÕÔÖÖJ‰¯teH9ÔG­V3qâD½ëë½Î«9V‚ Ï Wt¼½½±³³#++‹ððp©ÛÚåCýöÈÍÍåÓO?ÅÊÊŠñãÇŠ››ÞÞÞ¬\¹òŠÛè~C—óóóãý÷ß'//‚‚ŠŠŠØ½{7ñññüéO2º+•0pãÆ#))‰ .ôÙÏûäÉ“|ùå—Ì›7)S¦È~´Ö­['K[]]-µJˆÁ®-}çgĈ:ÌÐ} èëé&Àøñã¥ø»žþˆˆˆ>¯)ýý@ë›gȵÀØuö§³³“Ó§OË^Þ¨Õjñññ‘u‘íËðáà àÈ‘#<þøã>|…BAttô€Öw9c÷µ¯ó ((ܘ¼²qãF233ÉÎÎ&//o¿ý–Ý»wóöÛo÷Ûj+Ê(w—oãV,w¼÷Þ{X[[Hdd$îîîŒ?¾ß®g=®÷=ÔÕ+AÐgÐ+: …‚ÐÐPRRR¨««ãÔ©S,Z´¨Ïô[·nE©T²fÍYPøõ~Gƒƒuuu:Ó+++‰eîܹŒ5Šêêj,,,—šh322øì³ÏØ¿¿4hpýEGGsøða<Èüùóõ¦Ù·oEEEÒ0䯿þ:ûöíãØ±c<÷Üs@÷°Ò›6mbÕªUFZ$\{­­­;v¬ß7˜+ "##IHH ¶¶–'N°dÉ’>Ó;;;ë}±žV«¥²²ggg£óy-×™––FGGS¦L‘­ÿܹsLš4I'}FF†N‹ã]wÝņ 8q≉‰Lœ8QÖýרõõfì¾ÖÔÔè¤=}ú4Ðý$ÞX†æýâÅ‹œ>} ¦M›&uyJJJâ¯ý+±±±ÒßüåD¹ûÏúE¹ûÏöoÅr÷å—_âèèÈúõë±´´”¦Ÿ={Ö ý('''½////gûöí,\¸+AèË Çè@w÷µ¶¶6¶lÙ‚•••Þ.b=Μ9ƒ¬’£ÕjÙµkÐ=4áõŒZ­¦¨¨H6ýàÁƒ¤§§ciiISSo¼ñ›6m’¥éy‡Ë@‡°úÖ_ŒNHH¾¾¾lÞ¼™ãÇëÌÏÊÊ">>WWW©?ó¤I“8þ<ãÇgÒ¤ILš4 …B½½=S¦L‘¦ Æ»ïÑ)((@¡PôÙ-£GTT­­­|ñÅX[[ëí2Ñ#""‚úúzŽ9"›~øða4쉶¡®Õ:ëëëùúë¯=z´ì¨T*’’’dé‹ŠŠøË_þÂ÷ß/›ÅСCÙ¶m*•J èú®f_U*YYY²i?üð …¢ß èþ¶oHÞyñÅùûßÿ.Kçïïȯϗ_«E¹ûÏúE¹3.ï7[¹Óh4ØÛÛË*9Z­–o¾ù¸~÷Pááá¨T*rsseÓãââ8räÖÖÖF+A0Ô ·èøúúbccC~~>Ó§Oï·‰9((ˆÌÌL>ÿüsüýýikk###ƒ††lll¤€¼«•’’‚ƒƒƒ+4þ|²²²øøã™5kÎÎÎ?~œäädfÍš%ïAjj*Ÿ|ò tvvrèÐ!ÌÍÍu.òÂÕë/FG¡Pðâ‹/òꫯ²zõj¦L™"õé.,,$)) V­Z%+s'NœtâÄ ½/Œs-Þ£“““ƒŸŸý¦›0a¶¶¶deeq÷Ýw÷{MyðÁIMMåÃ?䨱cÒ0µ?ÿü3#GŽdñâÅFçÓØuj4¤ïíííTTTpèÐ!ÌÌÌxñÅe?ò=ôiii¬_¿ž‚‚¼½½©©©!..+++‘ª†Jdd$‡’þß›±ë»š}533ãý÷ßgÁ‚¸¸¸––FVV‹/Ѐ-†æÝÉɉéÓ§søðaÞ}÷]BBBèììäçŸÆÜÜ\6¢bÏ{Ý~øáî»ï>Qîþ(wÆçýf+waaa$''³nÝ:&NœHkk+ÉÉÉÔÕÕakkË… Œ>ú$$$0|øpé7÷¡‡"%%…wß}—ùóç3bÄ 9tèô0øX ‚¡nŠŠŽ©©)AAA9r„ÐÐÐ~ÓþêW¿ÂÚÚšœœ²²²°··'44”^xÿùŸÿ¡°°ööö+^®äÿøÁÁÁREÇÚÚšÕ«W³}ûv9þ<ÇgÉ’%Òp•ÐýRRGGGÒÓÓÉÍÍÅÂÂ///~õ«_áááqUyŒ7|øpþú׿òã?’’’BZZ—.]ÂÉɉyóæñÐC¡T*¥ô*•ŠsçÎÉ*6¥¥¥R×6apåäät.LMM gÿþýW|;¸µµ5k×®eëÖ­¤¦¦‡R©dÞ¼y<òÈ#W|iáµXgYYûÛß¤ïæææ8;;Ã< 3‰••k×®åÛo¿%55•}ûöaiiIPPË–-Ó{ãv×]wqèÐ!"##uÞ5õ t_CBBðóó#66–3gÎàîîÎ /¼À]wÝeðñhÞŸ{î9œœœ8rä :___ž}öY¼¼¼¤t÷ÜsyyylÞ¼™ÈÈHQîþ(wËûÍTîž}öYlllHKK“èFEEñç?ÿ™Ï>ûŒÜÜ\ÚÚÚ®ú}qûÛß—*:666¬]»–-[¶°ÿ~ZZZpvvæW¿ú÷ÝwŸ´œ¡ÇJ ¥/:Ì|îýÓ:{vé‰Ý#—”äײyã¯xÿÏ_s÷Ü_bbn|?cA0VïÊŠ 7§Ëß´.7‚(w‚póÐÔ—ê†ZöôSŒ›Øýjú<u÷+a~Þyä! ¸ðÿÎ÷ú+Ð&:< ·´þbt„›ËµˆÑAA0”¨è·´þbt„›ËµˆÑAA0”¨è‚ ‚ ‚pÛ¹)#AnâE»Â`åNî\¢EG¸¥‰[‡ˆÑAáFá–&btn"FGA„ITtAAA¸í\÷ÆÆÆë½ AAAÑ¢#‚ ‚ ÂmGTt„[Ú‘#G; ‚ÄÀ‚ ‚ ÜH¢¢#ÜÒ¦M›6ØY $ŽAáFAAAn;¢¢#‚ ‚ ÂmGTt„[šˆÑ¹uˆAAn¤A©è¬\¹’•+W²~ýú~Ó½÷Þ{¬\¹’/¿ürÀÛ1vÙÍ›7³råJêêêtæegg³råJV­ZE[[›Îü½{÷²råJŽ?>àí_ÉõXç­´ýË£óÑG±|ùò딡?×:FçèÑ£<õÔS\¸påË—ëü[±b¿ÿýïùè£ÈËË»¦ÛÖgùòå|ôÑG¥U«Õ×97ÿ¡ï8½ñÆý.³zõj£öçrYvãÆ,_¾œÚÚZy©©©Ò9mmmÕ™¿k×.–/_NQQÑ€·%×c·ÒöAnEƒÚ¢SUUÕç{vÔjõ ½èáíí @EE…μ’’LLLèêꢴ´TgþÉ“'133cìØ±×=Ÿ‚p§+,,dìØ±XYYàááÁŠ+¤=ö”””ðᇲk×®AÎq·}ûöñÊ+¯Ü°í]~œÊËËÑh4zÓ×ÔÔ R©nTö$~~~z¯­GÅÔÔ”K—.Q\\¬3¿¤¤sssÆwÝó)‚ Ü:­¢ãèètÿ듟ŸµµõUm#$$Dª¸ª'}yy¹Î¼’’‚‚‚033£¤¤D6¯««‹ŠŠ ÆŒƒ¹¹ù€·³»÷I¸51aÂé»R©$**Jú7cÆ –,Yš5kP*•ìÚµKokÁV\\ÌÅ‹oØö.?NÎÎÎ@w µ>™™™ØÚÚ^Õ6###ñõõ5j™žôeee:óŠŠŠ ÃÜÜœ£GÊæuuuqòäI¼¼¼¤kï@¶³»÷Iáz´ŠŽ««+ǧ  @ïü¼¼<&NœxUÛX¶lÑÑÑF-ãè舽½=§OŸ–MW«Õ455áç燇‡‡Ô=­‡J¥¢½½]öDq Û¿ÙÝlû$btn×2F§©©‰ÊÊJ¯˜ÖÁÁ¥K—ÒÕÕuÇ•}ÇÉÍÍ —~+:¡¡¡WµÝ§Ÿ~š9s浌³³3œ ‚ \ofƒ¹ñ‰'rèÐ!Ο?/k½ihh@¥Rqÿý÷“’’¢³\]] ´´”ææf ...L›6ððp)ÝÊ•+™0a‚“±råJfÍš…££# 444`mmMhh(÷Üs¦¦¦@w«NVV 2€'NàããÙ3gøé§Ÿ8sæ œ:uJšµÛhii!66–ÂÂB:::3f .Ô{ÛÚÚˆ'??Ÿ¦¦&ììì dîܹXZZðÁpáÂ^~ùei¹òòr>úè#|}}yúé§¥éÉÉÉ|ÿý÷¼øâ‹Œ1B¶­Ë÷ÉÐó±}ûv’’’x饗>|¸lŸ~ú)uuu¼ú꫘˜˜|~áÚ¼G§¶¶–ØØXŠ‹‹ijjºocbb˜>}:ÿþ÷¿9pàï¼ó...²åß}÷]T*ëÖ­ÃÔÔÔ õ݉®eŒNaa!ÖÖÖxxx”>88KKK–ØöövvïÞMFFgΜÁÎÎŽ-Z$»&]ºt‰={ö’’BCCVVVøûûóàƒâää¤w›çÎãÝwߥ¡¡?üáøøøÈþn–/_.‹wkmmeçÎdeeqöìY† Fhh(÷ß¿¬ÛÙòåË™7oNNNÄÅÅÑÐЀ££#ÑÑÑÜsÏ=˜˜üçùU_Ç)44”¸¸8ZZZd­7jµšªª*–,Y¡C‡töÉв½|ùr‚ƒƒyþùç¥ï ,ÀÙÙ™Ÿþ™ºº:lllˆŠŠbÑ¢E˜™uÿ?ž””ÚÛÛ±°°*6þþþ444°}ûv¤ëHOW7ÿ«Þ>@ss3ßÿ=999´µµáååÅý×é=džœ³5kÖpîÜ9Þÿ}i¹ÒÒRþò—¿ÀþðiúÁƒÙ´io¼ñ£F’mëò}2ô|ˆk— w²A¯è8p€ÂÂB"""¤éyyyX[[ãå女LCC~ø!ÖÖÖL:[[[Ξ=KZZÛ¶mcÈ!õ¹Íììl:::˜6m¶¶¶dggsàÀ:::xàðòò"33“Ó§OKÝ´Ž?Ž««+¶¶¶øøøðÓO?QRRBdd$Ð]ѱ°°`ôèÑýî³!Û¿pá6làüùóLŸ>¥RIaa!Ÿ~ú©ÎúÚÛÛùä“OP«ÕDEEáææFuu5III”””ð /0tèPüýýÙ»w¯ì¡§òV^^NWW—tƒtìØ1u*9úz>BCCIJJ"77—Y³fIË755qòäI¦OŸŽ‰‰ÉUŸ_c©ÕjÞ|óMlmm‰‰‰ÁÎÎŽÆÆF>ÌW_}ÅСC cÊ”)8p€ôôtî»ï>iùÆÆFJJJ˜={6¦¦¦¯OÐ¥ÕjikkcèС( y½§âçç'»©ï‰‰ #GŽ” 2ÒÙÙÉÚµk©««ã®»îÂÅÅ•JÅÁƒ)**â•W^‘lÞ¼™„„bbbpwwG£ÑOYYo¿ý¶ÔeªGkk+|ð üþ÷¿—€¬X±‚½{÷R^^Ί+¤ômmm¬]»•JÅÌ™3qww§¢¢‚PTTÄêÕ«¥¼ddd Ñh¤´ùùù|÷Ýw¨T*ž|òÉ+§ÐÐPbccÉÍÍ•ÝÀöt[?~¼Î1¼Ú²ššJGG111ØÛÛ“ššJll,,]ºèî¾–œœÌÉ“'¥š¢¢"ÜÜܰ³³ÃßߟíÛ·STTÄŒ3€îëØÐ¡C¯Xé5dûçÏŸç­·Þ¢¥¥…Ù³g3|øp²³³yï½÷tÖgè9›4i»víB­VKžîw¥¥¥²koAANNN:•}ĵKáʵ¢3zôh”J%:ÀÀ@½71‡¦££ƒ_|¥R)M âwÞáèÑ£ýÞŸ={–U«VIýÔÃÃÃyë­·ÈËË“*½ãt¼½½¥Ázò8zôhéép——×o¼ Ù~BBgΜáé§Ÿ–údGFF²iÓ&rsseë;xð 555<þøã²ý3f ›7ofÿþýÌŸ?_ªè”””È*:Æ £©©‰ªª*ÜÝݹxñ"¥¥¥ÿ z>ÆŒƒ³³3ÙÙÙ²ŠNNNZ­–É“'µ¾keïÞ½ttt°jÕ*)n ,,Œ—^z‰ÜÜ\ÂÂÂ;v,®®®¤¥¥ÉnÒÒÒÐjµDEEµ>AnÛ¶m$$$ÐÖÖ&µ–Lž<///4 »víâÅ_º+=G塇2jÖÖֲػ¸¸8ª««yíµ×pss“¦óÎ;ïðã?òðÃ’’¸qãX¶l™”ÎÁÁýû÷SWW'[¾½½õë×£R©øÝï~'ëÎEff&åååR™éÉKee%¿ùÍo¤VËiÓ¦áååÅÆÙ³g‹/–Ò×××óË_þRêFÍ?ÿùO’’’¸ûî»ñððè÷8yzzâèèHVV–NE'88XïuìjËö™3gxë­·puu`êÔ©üñ$==]ªhôTnÊÊÊðóóãÒ¥K;vLÚO¬¬¬t*:¾¾¾²ñnÿ矖Zà¤cûù矓žž.[Ÿ¡ç¬§¢sôèQ©¢S\\ŒR©¤±±‘ŠŠ <==éì줸¸Øà–qíA¸²AN`` 'Nœ ½½FCuu5“&MÒ›þàµ×^“ÝkµZ:::¤Ï¾Œ5Jªd@÷“Þ#FpîÜ9išƒƒJ¥Rº)*//§££Cºa111ÁËË‹'N Õjill¤©©IÖmíj¶_PP€£££NàéÌ™3uÖWPP€R©Ô¹ù ‘Z‚ »rfkk+uÝioo§¼¼œ3f P(¤~ñ'Ož¤½½]¼ÜcÎGhh(jµšššiZvv6®®®Ò¢±ç÷jc.–-[ƺuëd?ì}moÊ”)ÔÔÔPYY)MKKKÃÍÍ1cƽ¾;M1:ÙÙÙ<òÈ#¼ð ̚5‹ªª*>ÿüsV­ZÅÚµkÑjµRÚŠŠ ZZZ .£½õ™™‰§§'vvv´´´Hÿ\]]ubXìíí)++#>>^­,::š5kÖÈ*9lذÒÒRž{î9ƒƒÇ³²²pttÔ隉£££N<ͰaÃtnˆ{â7²²²€+§ÐÐPŠ‹‹¥¡òëë멨¨ÐÉC«-ÛcÆŒ‘*¦¦¦Œ5Š––iÚðáÃqtt”º£•••ÑÞÞ.uK311aüøñ;v ­V‹F£¡±±QŸs5ÛÏÎÎÆÙÙYªäô˜;w®Îú =gØÙÙI­8íí픕•1wî\ …ïÙó;hèƒqíA¸²AmÑîîk‡¦¸¸˜   °²²êsd/…BA[[‰‰‰¨T*4 †ÎÎN {žþèMÈÔÔTv#Ý­:=?L=ÃJ÷îJçããCaa¡ìÆÝ¡M Ù¾F£ÑÛm¯÷tï´} gíìì,`¤P(ðóó£°°­VKyy9—.]" €ÌÌLJKK™9s&ÇŽcèС¬fÌù˜ûŒ­[·²uëVÜÜÜ aÆŒRœ^OÞzºØ•””\«««ë³R4bÄÁOF¥Ó½¯çõtÏ»Òq •bûÂÃÃÉÊÊÂÆÆ¦Ï|\mÙ6l˜Î4333k¯ŸŸŸôÞ£ža¥{çÉÏÏììlÙ»!ÇÙí×××ëÝ}]É =g …‚I“&‘V«åĉ\¼x‘àà`’’’8vì÷ÜsùùùXZZ\9×.A„+ôŠŽ‡‡¶¶¶D~~~ŸÝÖ »¿ö¿þõ/,--ñöö&00WWW<==¯øL~~>uuuÌž=Ûà¼{>ÂÂÂøßÿý_NŸ>MNN>>>²'­×òü>û쳌7N6ªQgg§ì¦iëÖ­(•JÖ¬Y#›ÞÜܬwS¦LáŸÿü'§N"-- ???Y7;c×'§­­ÒÒRî½÷^£–ËÉÉ¡³³ScàèèÈ… d£uõÈÍÍ•Z_/^¼Huu5„‡‡K]•222øì³ÏØ¿¿4šZ@@þþþ 6Œ×_/¿ü’—_~ùŠõ¾¤S«ÕRSS£Ó*£ïeÊUUU@wk‚!ÇI¡PJJJ uuuœ:uŠE‹õ™þF•ížJJJ(//gþüù²ù®®®(•JNŸ>-´àZèârú®±Æœ³€€ÌÌÌ(,,äøñãRž}}}‰'++‹ÚÚÚ>GÖÔG\»A®lÐct ûiW{{;;vìÀÒÒ²ß.`MMMØØØÈn‚µZ-{÷î®]ózOkGZZ]]]zóäããÃéÓ§Q©TÅç*((ˆÆÆFuÒèM›MSS“ì&nÈ!xyyQXXHuuµTÑñööÆÄÄ„ØØX©¼¡Œ='NÄ‚øøxtÞ×aìúú‹Ñqrr¢ªªJZæÒ¥KTUUÉžþö )Üû‡]«Õ²k×.i™Þ&OžŒ……;wîD­V3eÊÙ|c×w'¹ïÑ)..F¡PUF5 Û¶mcäÈ‘²ò‚Z­&##C–þøñãlذ={öÝeò7Þ`Ó¦M²t½cö.çææÆ½÷ÞKyy9ûöí“ÍÓ—>$$F£ðžššJcc£NK”Z­&??_6-..…BAxx¸ÁÇ)44”¶¶6¶lÙ‚••U¿•†U¶{Z;¸té’ÞŠ¨¿¿?§N¢ªªJïü Ó{.?‡`Ü9³°°`ܸqäääPQQ!uOëi=ÿþûï1555è½P=ĵKáʽEº[¬¬¬(..&<<¼ß§Ÿ&L //M›6áããC{{;yyy466bee%Ö^«|¥§§3dȽC—úøø™™)ýÿZ‰ŽŽ&//-[¶púôi\]]9vìÇŽ“ÞëÓ#&&†‚‚¶lÙ©S§¤á¥“““qrrÒi‰š0a;vìþ3ºÜСCqss£²²R:=²²²¤.gú{>† B`` ™™™XXXèü°»¾þbt¦OŸÎÖ­[ùì³Ï˜8q"œ={–G}TJDff&Ÿþ9þþþ´µµI]mllhmm•­Ó‚ÐÐP’““¥ÿ÷fìúî$×â=:………øøøèü@÷p¹½ß»ÕÑÑAUUÉÉɘ™™ñÌ3ÏÈ®-=Ý'7nÜHqq1žžžÔÖÖrðàA,--¥øGGG"""HMMå“O>!00ÎÎN:„¹¹¹ÞAB.\Hzz:Û·o'88XzßNÏûyââ⤡}çÍ›GVV_|ñ¥¥¥Œ=šÓ§OsèÐ!\\\dqlÐ[òé§Ÿ2{ölœœœÈÎÎ&??Ÿ àêêÊÞ½{ûÓ§Oï·ÛÔ,Û=Ý×,,,ô^{ÆORRÀ5mÑ™;w.™™™|ñÅœlllàç燙3gŠöw é»ŒÐÐP¤¥¥!::FFF5j.\(ʹ ‚µµ5’’’ ‘H„ð¥K—6ûü}}},Y²_|ñ~úé'axì)S¦ ''„‡‡ììì`bb‚àà`áá“QQQèÝ»7¦M›†¹sçŠN€¦Ñ*]]]‰[·nÁÑÑË–-ƒ¯¯o«ít/===¸¹¹!&&FéÄ÷~¹o1111Í­8NÙÚÚ*=€¸- ñÎ;ïàСCHHH@ee%ú÷ïU«Váûï¿•Õô3;v,öîÝ ;;;ÑïÅðáÃñçŸÂÝÝ]T~ÇŽpwwo6Ð᱋ˆ¨uª2, fÌ÷«€ç_ IÑMÃ_Î,ží?¨½àÈ“»1mÆK¸}Ç õÂÔc¬^½£GÆK/½ÔÕU¹·¯9‘6 ‚»»;–/_ÞÕU¡NOOO¼þúë]]"¢ÖP'bu-~åo:¦é⣼ø/È‹›ò¶O‰Y  @åÿýýuÏÿ«Tw‹êÏ:êNWôÚúê<í‘£Cô0RtÙ½7†ˆˆZ×-º®Q÷'‘H„‡Šª3”kgiëst¨ó´GŽÑÃ&))IxÐ󀺸6DD= jUCC>Œªª*Œ=Zôì""ê Ø»w/ªªªàééÙìÀDD¤j•®®.Þÿý®®عsgWW:‰®®.¾úê«®®QÅêј£Ós0G‡ˆˆˆ:êј£Ós0G‡ˆˆˆ:"""""Ò:ž£Ãç›Pgà~FDDDÔ½Ée²N]ïè‘Öa C=Ü{Ž'Ntuˆˆˆè!Â@‡z4&¸÷³fÍêê*ÑC„i:DDDDD¤uèPÆžƒ9:DDDÔ™:|xiU‚‚‚ƒ »ï¾Ûl¹àà`H¥R¸»»cùòå¼¾ââbØÛÛ?ðüÍ ê¶u{X´”£¨4MGGÆÆÆèß¿?¦OŸþÀ9>………èׯŸh]^^^X»ví-ïaÐÞ9:™™™Ø¸q#~þùg<ÿüóJïëééÁ®®®À£>ڮ뿟&ûÀýûOGRÕNC† Á_|Ñì<Ë—/GAAA›÷éŽÚÎöø¾uæg@DD]£K…¼¼<ÈårX[[+½WXX©TÚæuDDDà×_ÅöíÛÛ¼¬öÖë¦-† ‚¹sç ¯P^^ŽãÇcÛ¶mÐÑÑÁÔ©S5ZæñãDZ{÷nüöÛoí]]Ò@zz:† SSSÊŸuMM nܸӧO#)) ‹-ÂÓO?ÝUÕtöþs;@nn.JJJ`kk«Tþúõë(((hóz»ó÷¤;׈ˆÚO—:vvvÉdHKKC@@€Òû)))077GEEE›ÖsáÂÔ××·i¥;×M[X[[cÒ¤IJÓ}||ðúë¯#,,Lã@'33“Ÿ[7 ‘Hàãã#¼n;w.Þyç„„„À××ŽŽŽYM%½ÿÜßN(**Bbb"æÌ™£T>>>(//oÓz»ó÷¤;׈ˆÚO—åè8::ÂÞÞiii*ßOII§§g'׊zšÍѱ··Ç°aÃpíÚµv®5§=stÊÊÊ——ww÷VËÚØØ`Ù²ehhhÀéÓ§Û­=ªvrrrBß¾}‘ rž¸¸8Œ?¾³ªHDDÔaº´ëš§§'ÂÂÂPQQsssazqq1 ðì³ÏâÌ™3JóÕÔÔ 44ÉÉɸyó&,,,àáá ˆºg(rÿß¹s§ðº¨¨'NœÀ… pûömMÁ×Ô©S1qâDÑúÊËËqàÀ¤§§£ººC† Á3Ï<£r›Ô]n{Õí~AAA˜5klmm†ÒÒRX[[Ãßß?þ8tuuqðàA;v k×®…«««hþï¿ÿ‰_ý5zõêÕ⺺ƒ¶+Úñä“OÂÁÁG…T*………&Mš„E‹‰–Ù´gŽŽD"™™\\\Ô*ïíí ää䈦WWWã·ß~Cll,JKKaii ooo,Z´fffB¹»wïâÀ8sæ d2LMM1vìX,^¼¸Ù»ŠŠ ¬_¿2™ ï¾û.FŒ!Ê»ÿÑd¿xâ‰'`ooÇC&“ÁÖÖX°`°O·ÔNãÇÇáÇQ^^ aºT*E~~>‚‚‚pòäI¥mR·½ZÚÎ7nààÁƒ8þ<ÊÊÊ ££ƒ`Ö¬YJßç[·náÿý¿ÿ‡¤¤$TWWcèСXºt©ÊöVw¹íU·û©ó¹¨{œ144lq]DD¤ž.tNœ8‰D":Wt[>|¸ÒüðC˜››cêÔ©°°°@YYÎ;‡]»vÁÈÈãÆüõ×_ø÷¿ÿŠŠ ÀÆÆiiiøì³Ï”ê¦ÉrÛ£nÍINN†\.ÇäÉ“áää„ÌÌLìß¿R©Ë–-Ä pìØ1$&&Ššš¤§§cܸq="Èi‹ªª*üñÇÂöOž<û÷ïGtt´è¤ººIII˜0a ±råJ„††"77+W®-333999˜5klll‹ýû÷£¾¾/¾ø¢°Þàà``ÆŒpvvÆÕ«Wñûï¿###›6m‚‰‰‰°ÌsçΡ¦¦³fÍ‚••Î;‡ƒ¢¦¦ûÛß:¡¥:Occ#ªªª`ll ¥÷î–žžŽ1cƈNê[¢««‹ˆòþjkkŒ¢¢"<þøãèׯ †ŒŒ |öÙgÂg±cÇ„‡‡cæÌ™üðCܸqëׯÇÈ‘#…÷šÛ4Ý/Š‹‹ñüCÈo ÀÖ­[…Y³fÁÅÅ¥Åvrqq­­-”ooo•Ç^MÚ«¹í EMM >øàÑ@¾¾¾øÇ?þääd!˜8räˆp7LÑõ. ›7oFLLŒ¨nš,·=êÖu>uŽ3DDÔ>ºü9:žžž¸p᪫«4¤çççÃËËKeù””8;;߃ƒC‹9?÷Z¼x16oÞ, $Q[[ ¿––;;;¥+œ3fÌhÓrÛ£nÍéÝ»·R·éÓ§h f€¦ \¸pA(+++¥.ÝYk9:iiixñÅ…¿   ¼ûî»(**ÂÊ•+1fÌ¡ì”)SP^^ŽÌÌLaÚÙ³gammÑ£G·Z—!C†ˆNõôô0hРܼyS˜–[[[ádVÁßß¶¶¶HLLTZæ½½žž(tiìIZÊÑIHHÀ‹/¾ˆuëÖaöìÙÈÏÏÇæÍ›ñÊ+¯ 88 BÙ«W¯¢¼¼nnn×áÞ;/qqqpuu…¥¥%ÊËË…?GGG¥+++\¾|GEII €¦“Ø-[¶ˆ>óºº:|üñǸxñ"Þ~ûmŒ5J­ziº_XYY‰˜7ož°, õvòññAff&ªªª4¤_½zµÙ“yMÚ«9/¿ü2~üñGQ ÑØØˆššþ€ÄÄD888(åaÍŸ?¿MËmº5GÏ¥­Ç""R_—wò÷ôôDxx8233áåå…ÔÔT˜™™aذa*Ë¡®®o¾ù¦Ê÷ÕÉ[ÐÑÑAUU"##qýúu”””@&“¡®®D'U%%%*ëÒ¿ÿ6-·=êÖœþýû+uýqppÈd2M9 ûöíCbb"yä”——ãÂ… ˜1c†Ò¼ÝYkýæ‡.Ê«100€••”¶sâĉعs'¢££áîîŽ[·n!33óçÏW«M,--•¦éé顱±Qx]TTÔìÉoÿþý‘••Õê2õõõEËì)ZÊÑùòË/…nOãÆÃ¢E‹ •J!—Ëaee% öÒÓÓáèè¨rhä–ܾ}½{÷^¢¶¶V¸Ûv¿{%¯½ö>ÿüsìÚµ »ví‚““¼½½1}útØØØˆê¦ØWrrrÔÆ4Ý/¨´O*Ú¨¨¨H¨KKí4~üx„††"55~~~ˆ‡¹¹¹Ênk€fíÕTVVâøñãÈËËCqq1ŠŠŠ„ 8÷ßŠŠŠTÖåÞÀòA–ÛukŽ:ŸK[3DD¤¾.t\\\`aaÔÔTxyy ÝÖ·ôUqvvº=‰D‚o¾ù&&&>|8<==…®K«W¯•mî„RÕ’&Ëmº5GUÛ)ê«è’bff†1cÆw<ÑÐЀ &¨µŽžÂÂÂcÇŽU«¬¹¹9<==‘˜˜ˆºº:ÄÄÄ ¡¡¡]»“´ ¨zïa9ñ¹7ÿD¡oß¾èÛ·¯Òt‰D¢ñÝœºº:\»vMôÐÐÆÆF¸ººbñâÅ­Î?zôhlß¾)))HKKCFF~ûí7„††â£>ÂàÁƒ4 p±nÝ:ìÛ·„¯¯/Øêò5Ý/Z:>*¾ã­µÓðáÃaii‰„„!ÐñöönvÙš´Ws’““ñÙgŸÁÔÔ£G†œœœ0|øp¥®˜Íµ‰ªnuš,·=êÖu>—Î8ÎQ“.ttttàé鉸øxÈd2üùçŸX°`A³å­­­QYY)ê÷® ‘HD£·5gß¾}°²²ÂÆadd$LWõÜÅ`÷SÜyÐå¶GÝšS\\¬4MñÀ{O'L˜€ôôtœ?ÉÉÉprrêògŒtµ)S¦ )) éé鈅³³³Ê+ÈÊÎÎNåÃqýúuØÙÙµÛº´QUU.^¼(9K‰‰‰¨­­òvvv¸sçŽÊ@899Y¬¾¾×®]ƒ¡¡!üüü„îe±±±øâ‹/pâÄ ¼ñÆ777Œ;VVVxë­·°mÛ6|úé§­š é~QXX¨TV1TzÿþýÕj'øøøàìÙ³(**Âü!ºû©ªŽê´WKvîÜ kkklÙ²E4h]í~ŠÁî§êx¬ÉrÛ£nÍiísQèèã 5éò ©ûZuu5öîÝ “sD<<Œ¹s綸¿Þï‰'ž@BB¾þúk\¼xQFøäÉ“èׯž|òÉvÛ–î¦=ž£“žžŽ#F¨‚W.—ãìÙ³ÂëššäççãÌ™3Ð××Çš5kD'¸ .Dbb"¶lÙ‚óçÏÃÅÅ……… ƒ‰‰‰0‚˜­­-&NœˆsçÎáÓO?…‡‡êêêpòäI¨˜ž~úiÄÄÄ`ïÞ½ðööž·£jÿÑt¿Ð××Ç矎9sæÀÞÞ‰‰‰HMMÅ“O> GGG;v¬Ùvº×¨Q£`nnŽÔÔTL›6­Å}YÝöRPµãÆC\\6oÞŒ1cÆ ªª qqqÉd077Gee¥0ÿ¼y󇯿þüñœœœ––†´´4¥íÒd¹íQ7 iQnUkŸË½åZ;ÎQÛu‹@Gq‚OOÏË#88¡¡¡HKKCtt4ŒŒŒ0jÔ(,\¸Pt"4uÈÉÉÁÁƒááá;;;,]º¦¦¦HOOGjj*,--áéé‰+VàçŸFVVjjj`hhCCC¼óÎ;8tèPYY‰þýûcÕªUJWx5Yn{Ô hz¾‡»»»(Ð=z4\]]‰[·nÁÑÑË–-S9𒝝/Μ9ƒ‘#GªÕõäa0eÊœ>>Jû\KLMM±iÓ&ìÛ·  ƒ••fÍš…§Ÿ~ZôÐER–žž.Œ x¿ÜÜ\|õÕWÂkØÙÙaêÔ© DŸ>}DåMLL°iÓ&üöÛoHHH@DDŒáææ†Å‹‹NLßxã ØÚÚ"&&ÉÉÉ022°aÃðúë¯cÈ!*ëc``€W_}ï¿ÿ>¾ùælܸ€êýGÓýÂÃÃ#FŒÀ‰'póæM899aÅŠ˜2eJ«ít/===xyy!22²Õaå5i¯æ¶óõ×_‡™™…‹4ãÇǺuëðí·ßB"‘ ººFFF022ÂG}„½{÷âܹs¸sç „ 6àË/¿­K“å¶GÝ૯¾‚———(Ðiís¹WkÇ""j;U™Î3æûÕÀó¯?†¤è¦Ñ~.gaÏöÔ^päÉݘ6ã%è0ç 3ÁÝÝË—/W«|^^>øà¼òÊ+=òŽŽ‚••U»-+77kÖ¬ÁªU«x¥•ºÀÀ@xyyaíÚµ]]º‡¦Ÿ 3Dô0’Ë. 1‚º¿ò7 ÓtQY^üäÅ€“Gb¨PùÝóÿ*ÕÝ"G‡ºNTTLMM[½“Ö]µwŽÐÔ•ÐÌ̬GªUä, IDAT~ÝQ{äèi gˆˆ:^·èºF«±±;vì@EE²³³±`Áу{’öÊÑillÄW_}…òòrH$,Z´H)‹Ú¦=rtˆz2gˆˆ:‡ŽŽ¤R)¤R)üýý1{öì®®R—ÓÑÑAAAnܸ€€€6=§‰ˆHgˆˆ:-³sçNµÊ½÷Þ{\“žgóæÍ]]¢V:t¨««@*¨û¹ð8CDÔy˜£C=ZGäèPÇ`Žu&:Ô£µ÷st¨ã0G‡ˆˆˆ:"""""Ò:ž£SVVÖÑ« """""á"""""Ò: t¨G‹‰‰éê*š8pu&:Ô£ùùùuuHM8‚ˆˆˆ:"""""Ò: tˆˆˆˆˆHë0С9:=stˆˆˆ¨3uøðÒeõêÕ5j‚‚‚ºº*m¦é¶”””ÀÖÖ¶ËÖß´”£www,_¾\í2š´ÁÎ;Eó 4ï¾ûn³åƒƒƒ!•J•Ö×ZµE{çèäääàË/¿ÄÖ­[ñÆo(½¯§§333 <þþþ;vl»®ÿ~š|–ÅÅŰ··ïÐú(ÜÛN&&&m^ž6í³šnK{nÚÔ–DDÝQ tV1118zô(>ûì³®®ŠVzùå—E¯O:…¼¼<¥éªäååA.—ÃÚÚZé½ÂÂBH¥Òv«'YYYhÐ ï×ÖÖB*•"66éééX°`æÍ›×UÕDDDà×_ÅöíÛ;e}÷·=˜Îþ܈ˆ¨íèô0—/_ÆÝ»w»ºZküøñ¢×)))ÈËËSš~?;;;Èd2¤¥¥‰N¶ï]޹¹9***Úµ¾³ììlxxx¯­¬¬T~NÓ§OÇG}„£GÂËË YM%.\@}}}§­ïþv¢ÓÙŸµst¨Gë.9:ŽŽŽ°··GZZšÊ÷SRRàééÙɵê^Ú3GçöíÛ¸~ý:FÝjÙ>}úà¹çžCCCC·Ù_:‹&íDDD¤mºäŽÎêÕ«1yòdܺu YYY011ÁòåËѧOÔÖÖâÔ©SÈÈÈ@YYÌÍÍ1zôh̘1£Õ®šÌ+“Épúôi\¹råååÐÑѽ½=üüüàåå%”khh@dd$RRRpóæMcèС˜5kúôéó@ënNrr2Μ9ƒÒÒR˜™™áÑGÅôéÓ¡§§'´Û½m¸yófáÿ=ö¬­­qöìY”––ÂÔÔãÆÃã?ŽÔÔTDEE¡¤¤æææ˜8q"&Ož¬Vº»îôOOO„……¡¢¢æææÂôââbàÙgŸÅ™3gº®‚]¬=st²²²`jjŠAƒ©UÞÝÝÆÆÆ¸|ù²hzMM BCC‘œœŒ›7oÂÂÂX°`LMM…rwïÞÅñãÇÒÒR˜˜˜`äÈ‘xâ‰'šÍ—»sç>ýôS”––â­·Þ‚«««(,((HÈ󀪪*9r©©©¸uëz÷î OOOÌŸ?_t ¬Y³`kk‹°°0”––ÂÚÚþþþxüñÇ¡«ûßëW÷·SPPf̘›7oB"‘ÀÄÄëÖ­ƒ­­­Úm¡Š&óáĉ¸pánß¾  éBÁÔ©S1qâDÛ¼-õVˆ‰‰ÁÉ“'!“É`nnŽ &`Þ¼yÐ××ÚMÕç„9sæÀÖÖáááÉd033ƒ¯¯/‡°°0Ø1c†Zu""¢¶ë²®kqqqèÛ·/qóæMôéÓuuuضmär9&L˜[[[Èd2ÄÅÅáòåËxóÍ7add¤ryšÌ[ZZН¿þ¦¦¦ðõõ…¹¹9nݺ…ÄÄD„„„ W¯^pss}ÙÙÙê4]‘ËåBÙÌÌLìß¿R©Ë–-k±¢¢¢Ð¿<÷Üs(--…­­­Fmq?Mæ-..Ƈ~sssL:(++ùsç°k×.aܸqj·y[ê­““ƒË—/cÚ´ièÓ§’’’pìØ1Ô××ãé§Ÿnñs€øøxÔÕÕaêÔ©èÝ»7NŸ>cÇŽáÏ?ÿDaa!¦M›cccDEE!$$666ýÝ]"¢ÎÒeÎÝ»w±lÙ2Ñ·³gÏ¢¨¨o½õ–¨ý¨Q£°mÛ6DDD`Μ9*—§É¼çÎCmm-Ö¬Y+++¡¬››>ùääääNZZŒÀÀ@¡œ¥¥%bccQZZ ‡6Õ[¡®®+V¬æ÷òò¿ÿýo¤§§ ާ§'222PPP ôCyûöm¬Y³FhРAøüóÏqåʼóÎ;ÂÝ'|úé§ÈÉÉy(óçÏãÍ7ßì”u9;;ÃÚÚ©©©JŽ»»»Ú'壜={ÕÕÕ•ûG}C† \.ÇÑ£G±fÍMAONN.\¨Ñ:LMM‘——'¼ Ã7ðÞ{ïÁÑÑQ˜îîîŽO>ùÇŽÃSO= édvèСX¼x±P®OŸ>ˆŒŒ„L&Í_SSƒ-[¶@*•båÊ•:t¨ðÞøñãUæ}………áúõëxõÕW…;Ê~~~2d¶oߎãÇãÉ'ŸÊ—””ॗ^‚¿¿?Àßß?þø#bcc1mÚ4 4¨ÙvjhhÀ›o¾)ºë¨I[ÜO“yO:…ÚÚZüóŸÿ Ú1nÜ8¬]»‰DtÔió¶Ô[¡¾¾ëׯæ÷õõÅ¿þõ/$&& NsŸܺu 7nD¿~ý4c7lØ€K—.áã?† `ĈX·n222èu’. túõë§Ô­ ##NNN077Ç_ý%L·³³ƒ Ο?ßlÀ É¼˜>}:ÌÌÌ„r¨­­á_077G~~>Ξ=‹1cÆÀÊÊ >>>ðññi—z+ 0@$)®@_¼x±Åù9" Šÿ8PÔÅNÑ売²R­åvw111-v_sqqÁ‚ š}ÿ‹/¾h×úxzz"**J¸3QRR‚üüüVO¶‘‘‘Ív_KKKÃÓO? KKKäåå!)) )))Âû#FŒþŸŸŸŠŠ Œ5Jã:(º"M¨³³3,,,Dwý„|+Åçfii‰ÜÜ\„‡‡ÃÓÓSè*¦4êêê°uëV\¹r«W¯Æ°aÃÔªWjj*¬­­EÝfÀÇÇ@ZZš(ÐéÝ»·(˜š]ˆEjj* Ôl; 0@ähÚ÷ÓdÞÅ‹cÞ¼y°°°Ê5wìU§ÍÛRo…Š‚$=== 0çÏŸoq>…Aáÿƒ‚à¿Çdm9öõ]èÜÿC 4]¥¬««köY$Š\U4™WGGÕÕÕˆŽŽ†T*…\.‡\.G]]€¦+ž O=õ~úé'=zG…ƒƒyäŒ?–––m®·‚ªöÐÕÕEccc«ó8(¶€R· Åtu—Ûݵ–£cnnŽ‘#GvRmšððpdffÂËË ©©©033Sû„W›µ”£óþûï ûª››,X€ââb”••ÁÒÒRt ++ *‡ñnIEE…è{RTT„ºººfïøÝ-Y²ß~û-öíÛ‡}ûöÁÑј4i’èBBVV–ð»|ù²ÚÁ˜L&kvéÛ·/.]º$šÖ¿¥î}Š6RtÏk®î?VšµE[æÕÑÑAUU"##qýúu”””@&“©<öªÓæm©·BïÞ½•¦ééé©}ŒTüÜ»”.äiÛ±—ˆ¨'è²@çþi éÀÉÉ 3gÎÔxyšÌ›Ÿ~ú ÆÆÆpqqÁèÑ£áààggg|ðÁ¢²...X¿~=.\¸€ .à?þ@DD¢££ñúë¯ÃÑѱMõ¾·þÔ󹸸À©©©ðòòº­©ì>ÌTåQØÛÛ«|8cvv6yä–_WW‡‚‚¥‡†:;;«ÕnĈøüóÏ‘‘‘óçÏ#;;¡¡¡Ç;# ðæ›oâðáÃ8qâÆ‡þýûkT×û©:6¨ÚŸÇTEÉæÚ©¹.”ê¶E[æ•H$øæ›o`bb‚áÇÃÓÓŽŽŽpqq ¶¨ßæm©w{Põ[FDDÝC·zŽNŸ>}PYY)êÓ®-êjÖ–y9KKK¬^½†††Âôû“ÖïÞ½‹¢¢"ÀÍÍMÈÛ‘H$øå—_ƒgžy¦Mõ&í¢££OOOÄÇÇC&“áÏ?ÿl±ëi¦ººW®\Ñø¢Bzz:êêê„ü°¶¶Fee¥Ê;~‰D¸ËZ__7nÀÐÐ^^^B÷²ääd|ûí·ˆŒŒFåzä‘G0räHôîÝï¿ÿ>vî܉õë×·šŸemm­ò²(,,Tº+S\\¬T¶  @Ó MÛIݶhë¼ûö탕•6nÜ( ¥¼¼\4ŸºmÞ–z‘öëVÙÑ<òJKK!‘HDÓsss±sçΟáɼ·o߆™™™(ÈillÄ©S§ü·ûDyy9¶lÙ‚ˆ–9xð`ÿ½2Ú–zkŠ íbÝñ¹(žžž¨®®ÆÞ½{abb"Ê/y˜µÇ÷àÂ… ÐÑÑÑh;¹\Žôë×O”îááââb$''‹Ê_ºt [·nÅñãÇ4/>øàüòË/¢rŠ ª¾“ŽŽŽ˜9s&òòò!zOUyÈår$%%‰¦'$$ ¬¬LéNTqq1233EÓ ££///ÛIݶh뼊áŸï rqôèQ†¬n›·¥Þšâ±—ˆ¨çéVwt¦M›†¬¬,ìÙ³W®\Á€PRR‚¸¸8aöìÙí2ï¨Q£‘‘_~ù®®®¨©©žcbb‚êêjMOZwwwGZZvïÞáÇ£¾¾ñññÐ××FßÑ´Þ©©©°´´Ä!C4n#E¿ï¨¨(Lš4é¡ÿñíNÏÑQ6lÌÌÌ™™‰‰'¶ÚmíúõëøùçŸU¾·dɒލb—hçèdeeÁÕÕ½zõRz¯¬¬ ñññÂëÚÚZ ..úúúxíµ×Dß—Ù³g#-- Û·oÇ… àì쌢¢"DEEÁØØXHb·¶¶†··7ð¿ÿû¿=z4êêêpæÌ4ûLªyóæ!)) „»»»0ˆâ;†€€èééaÖ¬YHMMÅ?ü C®]»†3gÎÀÞÞ^i0}}}|óÍ7€­­-ÒÒÒ™™‰9sæÀÁÁ§Nj¶TQ·-Ú:¯››RRRðÝwßaäÈ‘¨®®Frr²ðì°ªª*Ú\ÓzÇÇÇ£OŸ>”3§ês#"¢î­[:FFFX¾|9"""pþüy$&&ÂÈÈÆ ÃÌ™3agg×.ó>ýôÓ066FVV233Ñ»woŒ3Ë–-Ão¿ý†Ë—/£¶¶½zõÂ3Ï<+++¤§§#;;†††8p ž~úi¡ï½¦õÞ»w/Fõ@΄ pùòeüþûï3fŒÆ ÙÔñôôôàææ†˜˜µ†‘---möA¢Úè´‡¬¬,Lš4Iå{yyyرc‡ðZ__666ðóóÃÌ™3•’ÆŒÐÐP¤¥¥!::FFF5j.\(AÑM*)) ‰†††2d–.]ÚìCKõõõ±dÉ|ñÅøé§Ÿ„á±§L™‚œœzôh¸ºº"22·nÝ‚££#–-[__ßVÛIMÚ¢-ó.]º¦¦¦HOO.øxzzbÅŠøù矑••…ššªÕæšÖ{ÇŽpww @GÕçFDDÝ›ª,Jƒóýjàù×CRtàrfölÿAíGžÜi3^Âí;­&j£{Ÿ‡D¤Í‚‚‚àîîŽåË—wuUˆˆˆ4ÒP'bu-~åo:¦é•¼ø/È‹›rêO‰Y  @åÿýýuÏÿ«T?Üýž¨ÇëŽ9:¤Z{檵†õhÝ1G‡Tk""""u1Ð!"""""­Ó­# "¢–íܹ³««@DDÔ#ðŽõhÌÑé9˜£CDDD‰õhÌÑé9˜£CDDD‰iÏÑáóM¨3p?#"""êÞä2Y§®wtˆˆˆˆˆHë0С î=lj'ºº DDDôa C=Ü{ŽY³fuuˆˆˆè!Â@‡ˆˆˆˆˆ´"""""Ò: t¨GcŽNÏÁ"""êL>¼tKŠ‹‹aooß­×www,_¾¼]ʵ‡Îj·ž@»wï"""gÏžE^^jkkacc<ñݱ±é„šR{çèdffbãÆøùçŸñüóÏ+½¯§§ ¸ºº" >úh»®ÿ~ðòòÂÚµk[-[XXˆ~ýúuh}îm'SSÓN][Ö£n{jÒîmÕ™Ÿµ]—ÝщˆˆÀ† ´f=EÛ¶§£Ýºu o¿ý6vìØ[[[¼ð øûßÿŽÑ£G#<<«V­BnnnWW“@zz:†*œ¼2+W®þ^yåLœ8999øè£ð믿vq›?~o¾ùf§­ïþvê¬õwövv4mÛ"¢‡A—Ýѹpáêëëµf=>>>4hP‡¯§³¶G466âÓO?Eaa!>þøc :Tx/ þþþظq#¾øâ lÛ¶ zzz]X[Ò”D"ðÚÚÚ“&MR*7wî\¼óÎ; ¯¯/;³šJ233;õ;|;uÖú;k=þþþpqqéðõtöçFDDmÇvòÊ+¯`úôé]]‡NK9:±±±¸xñ"^xáQ£0zôhL:ÅÅÅÈÊÊêÈjÚ7G§¬¬ yyypwwoµ¬ –-[†††œ>}ºÝêÐhÒN=ÕªU«0wîÜ®®uC]rG'((Hôÿ;w ¯kjjŠäädܼyðððÀ‚ „®@SÞÅñãÇÒÒR˜˜˜`äÈ‘xâ‰'`kkÛêzªªªpäȤ¦¦âÖ­[èÝ»7<==1þ|˜˜˜(Õùܹsøý÷ß!—ËaccLŸ>ºººÂòïÏÑQw[ ¼¼‡‚D"Á;w`ee___Ì™3G¸ÓÐÒö¨¢Î2{º–rt¢££¡«««ò*¿ÂâÅ‹ñüóÏâ#ªG÷hωD333µ¯ä{{{ÃÄÄ999¢éÕÕÕøí·ß‹ÒÒRXZZÂÛÛ‹-‚™™™PîîÝ»8pàΜ9™LSSSŒ;‹/n6_®¢¢ëׯ‡L&ûヒ#F 00Px?00‡^WVV"$$ñññ¸yó&¬¬¬àããƒgŸ}Vt¼ ÄO<{{{>|2™ ¶¶¶À‚ „c’ªvjiýíÙí± §N¡C‡PRR{{{<öØc˜7ož°ªrtÔÝ ©{ëþó$''£¼¼ÖÖÖ˜2e žzê)á8ÙÒö¨¢Î2‰ˆ¨ãuI óòË/ãÔ©SÈËËÃË/¿,L¯««Ã¦M› “É0eÊØÛÛC*•"** ÙÙÙØ°aŒ{öìÁÙ³g1uêT899A.—#<<¹¹¹øè£```Ðìzª««±iÓ&H¥RLž<NNNÈÏÏÇéÓ§‘àà`a=““ƒÌÌLL:ýû÷Gff&~ýõWH¥R,]ºTå6j²-øðÃqûömL:ýúõÃÅ‹qäÈÈår!Àin{TQw™ÚìÊ•+prrR¸*ôîÝ»kD-illDUUŒ¡£££ôÞ½ÓÒÓÓ1fÌÑI}Ktuu1`ÀH¥RaZmm-‚ƒƒQTT„ÇýúõCAA‘‘Ï>ûLØwvìØððpÌœ9ƒ†L&Chh(.]º„mÛ¶ÁÀÀ@´¾ÊÊJlܸ2™ 6lÀˆ#+W®Dhh(rss±råJ¡|UU‚ƒƒQPP€3fÀÙÙW¯^Åï¿ÿŽŒŒ lÚ´I´ÇÆÆ¢¤¤D(›ššŠ_~ùX±bE³íÔÜúÛ»-Úk;333‘ššŠ™3gbàÀHMMÅO?ý„‚‚¼ñÆ*?kM¶¥¼¼ÿú׿pëÖ-Ìœ9ýû÷GVVBBBPRR"\¸jn{TQw™DDÔñº$Ð?~gM¶Eq§híÚµÂoA@@…gŸ}¶¶¶Ín*ê.“ˆˆ:^·ÊÑIII³³3,,,PQQ!ü988ÀÞÞiiiBYKKKäææ"<<r¹„äòÖ’SSSamm-ü)øøøÀÚÚZ´ )ÉùÞd^ Æýed[$ lmm•úÑ?÷ÜsøðÃaiiÙâö¨ÒËìŽZÊÑÑÕÕUº3@]§¥„„¼øâ‹X·nfÏžüü|lÞ¼¯¼ò ‚ƒƒÑÐÐ ”½zõ*ÊËËáææ¦qî½óWWWXZZ¢¼¼\østtDß¾}‘ ”µ²²ÂåË—qôèQ”””h:lÙ²Et2]WW‡?þ/^ÄÛo¿Q£F©U¯„„ØÚÚ 'ÿ þþþ°µµEbb¢hº••{ì1Ñ´yóæ Ë4k§Žh‹öØN[[[!ÈQPäãÜ_öA¶%99öööJ¿Ë–-Ã×_>}ú´¸=ªtÄ2‰ˆèÁtéstîWTT„ºººf‡ðÔ×ÿou—,Y‚o¿ýûöíþ}ûàèèLš4©Õ™L†aÆ©|¯oß¾¸té’hšªç&888€ðCß–m)--º¶ÜËÂÂâsG:b™ÝQK9:ÖÖÖ¸yóf'Ö†ZÒRŽÎ—_~)t'7n-Z©T ¹\+++ÑÅ‹ôôt8::j|UüöíÛ¢®Š………¨­­Å‹/¾¨²ü½ßÑ×^{ Ÿþ9víÚ…]»vÁÉÉ ÞÞÞ˜>}ºè9LéééBp““£v0VTTÔlP¤èút¯*ñŠ6***ê¢n;uD[¨¢év0@©œb;‹‹‹Û¼-ÅÅÅ3fŒRKK˾ÔË$"¢Ó­pvvÆÂ… [-7bÄ|þùçÈÈÈÀùóç‘ÐÐP„‡‡ãwÞyà.KJÓZº+ÐRŽ€ºÛÒwx':t(bccQYYÙlžÎÕ«W±sçNÌš5 &Lèä’‚ªÏ§oß¾èÛ·¯Òt‰D¢ñÝœºº:\»vMôÐÐÆÆF¸ººŠº¿6gôèÑØ¾};RRR––†ŒŒ üöÛo ÅG}„Áƒzõê…uëÖaß¾}8xð |}}Õ:©:î´ô^K íŠc’&íÔmÑÜz4yOÕqLQ®¹c¯&ÛÂc/‘vëV޵µ5*++E}Ú$ ÌÍÍõõõ¸qã áåå%tHNNÆ·ß~‹ÈÈÈ“í­­­EIÉ (,,TÊ]¹}û¶RÙ7nøïÝ )·H&“)•»~ý:Nœ83fhüŒžŽXfOãïïsçÎ!** ³gÏVY&""ÙÙÙ¼©X IDAT‡¨ªªÂÅ‹E£`©#11µµµ¢`ÖÎÎwîÜÁرc•Ê''' w>ëëëqíÚ5ÂÏÏOèv‹/¾ø'NœãÝÜÜ0vìXXYYá­·Þ¶mÛðé§Ÿ¶:h‚ ”¦766âúõë°³³M/,,T*{íÚ5MwF4m§Žh‹öØÎ²²²f·³¹.Êên ÐÔ5NÕoA^^<ˆyóæiüŒžŽX&=˜.ËÑQõÃïááââb$''‹¦_ºt [·nÅñãÇ4|ð~ùåQ9ųRî]vsë‘ËåHJJMOHH@YY™Òäõë×E?Î8~ü8ttt0nÜ8•Û§î¶M#;;[T6** III¢àÔeJ“eöd-åèxxx`ذaسgRwD )W+<<ðõõíÈjÚç9:çÏŸ‡ŽŽyäµç)))ÁîÝ»1`ÀÑ ÞÞÞJ¥ˆ•ÏÎÎÆÇŒh:Ù^³f ¾ÿþ{Q9ÅE UßI'''âÊ•+8vì˜è=Uå½½½QRR‚˜˜ÑôsçÎA.—‹îD€T*EjjªhÚáÇ¡££__ßÛ©¹õ·w[´Çvæåå!??_xÝØØˆ@GG§Ù;°ên Ð4@T*…D"• CLLŒh¸ku½š,“ˆˆ:–ªþz.Ã6À¯Á¸q­é®€¼øΧö‚ÿÌ•`°‹tôTÔsrrŸŸCCC8;;CWWÎÎÎHKKCtt4nݺ…òòr$%%aß¾}000Àk¯½sss˜˜˜ ¸¸‰¨®®Æ•+W°wï^TWWã…^úB«ZÏ AƒššŠØØXTTTàÖ­[ˆ‰‰Á¡C‡`gg‡¿ýíoèÕ«€¦|ÌÌ̃úúzcÿþýÈÌÌÄüùó…æ#GŽ oß¾ðööµ· „””DGG£¦¦r¹§NBtt4{ì1ÑÉ™ªíšF¡«¬¬úÈk²ÌžLÑMFUণ£777ÄÇÇ#44(//Gnn.Ž9‚={öÀÔÔÁÁÁZ?]w j„,M;v †††Â` !!!022‚¡¡!òóó‘ŸŸË—/ãôéÓøî»ïëׯåH¸ºº"11¸yó¦pصkzõê…5kÖÀ¦¦¦(,,Drr2òóóQUU…K—.áÇDee%þþ÷¿£OŸ> ££#&Nœ ©{mtt4’““1qâDáù-™™™¸zõ*ŒŒŒàêê ]]]¸¸¸ !!§OŸFyy9ÊÊʉ½{÷¢oß¾xóÍ7…cRHHôõõêêjã?ÿùñä“OÂ××·ÙvjnýíÝíµæææˆŒŒD}}= ñË/¿ 55Ï<óŒèÜßîên ¸¸¸ ..‘‘‘¨®®FII BCC‰Ù³g‹FXSµ=@Ó(týõ—p7J“e=lªþ’ 1‚º†…µ½ÙÿÍ_‡ª¿j¹—®ý  @Š¿zõ]èXYY!;;ééé?~pDÏoÙ¤ÕËWiâ„ñ) Žd´ösÚºs›®œ;]“§”Éqì‘RZ©œV.Ç«­;·© ÿFåæd§¤_‚2–ã8ªyëˆ ŸT^YJõf˜”W–ª®¶^5oÑœªª”Tu:ÈX±X\5o×jre!g˜M®,UÍ[µš1mº‚ÁÀ°÷GÐ@Æ2MK§5ëê)r4ô”5Û²•[½E%¯Üãû/þŸ´)µ›©+> ¶¥ËäñfÆ£-s ³Ô¸£Q¦i)þþ:È\†FexíóVt"‘¨*ž}J¹{¯Kþ ä J>¿dx%Ãl[²ã’•âQÉì”bç¤H{×¾Uж)·µMÖ³OéÔü«Î ¥èËŽ0#®h4*;E÷@tÑlÇQ$vNÿÐe†ŽsÊo>(½½Uò$O2<’Ç#É#ÉvƒŽcK¶)Y1É2ÝÐcFÝ÷fT2cR<¢üæÃê8סPxø§q4ÓŠ+¦ô™Dd<ÓŒ)ïTÀ7xu%¹ÿžmS²ä†Ã#y½’ IŽdY A'îîmS²­®c¦ä˜’lÉç¶9X%ɲ,m~î%mÙ¼Sµ5õŠÇLçkÞ‚ºåŽ•*,Îï¹ö¶U÷iþ5UúÒÚO]ÊŸåÒp¤ŽÎ³)¿Š €ŒçÈQGä¬|Ù~Fò{fl»kÊ•w÷K>%ÍXåIúÝ—¤Óu½AÇ6¥Qã¤ÛþÃ=ïñH¯<)­ÿg÷\W›Ž€ÖÓmúö×~ªÚšz-^>OK®}—¼>¯¿qTŸÝ¦­/¼¢¯~ûÓª˜Z6à{\n"±sŠ[±”÷KÐ@ÆsG–e©½£U9áQn¦ÿ5J:Ž-mû‰4aŽ4j¼{|þ]Òúµ]A§«‚sͽ’·kjÚé:iÓ¿¸ç,«§ÍþÏí±mGßYû 5kÔÚ?«©3Ê{Î]wýB-¹vžøÊOôïßü¥üÅWäMXÌàr{PÜŒª#Ú¦‘È_™±Ä0Çqä8ŽbñˆÚ#­rl§çXâ&©÷ž›h›ôÂCR¬Ó=>qTz•{.vN;C*_äž‹¶Iÿ}—T³O:zD:Vß§ßÄí¥-{tp­îü›÷iÊ“œŸ9gŠ–¯ºZ'Zôú«‡zÆå(ù˜Gj‹›1µwôý-S‰Š2^âŸðh´S¶e);œÛg[OµÄŠIŽW²½RÝiÇ#ÒÒϸç–ü[ñ‰wHË¿ÐÛÁÓ_”voMÒïÀŠÎÖͯÈãõhéuï´BsÛ'Vëö5×+wTvï5NߊNgGT¿}ìÚQ½W§›Ï*¿ O WéC]¥ìœpÏu¶mëwOlÖ–M;Õtò´²rš5oªnûÄ SRÐû»DbzêñÚ¾åU5Ÿ:£¼ü]½d–>ôÑUÊÉÍê3¾X,¢s‘vH)§ A¯ ˆÅ#2­¸²‚9òw­ÆÖ§¢ãñº DÛ¥õ_— +¤×»ÓØÞÿ ÷:Ãëî_û½ôüÏéw`¥ãÈ¡c*›T¢P80h$wTvß1¹ïzÞG:£Z{ÿÔðv£®»a‘Ê+Ç«¶¦AÏÿï6íÛ}PküœÂYî÷zäá§µù¹íZùþÅ*Ÿ2A§N4ë¹ßUëÐuúÎOï—ÏïS,×Úû¤ÆÍZñ¾kT2¡X u'µñ™µo÷!­}ð³ÊÊɶ-uDÛGßÉÏ>¬:ÈxÉnâ·lSmgä‹ù dõ.lE¥Žv©­Q:“â’~~³ôÝ®?÷ݧÛ#qWiKÚïÀ¾[O·©¬|ì/,ØÖ~ó‚êÞ:®Ï~ùn-z÷lIÒ»%U^Q¦ÿÛZ÷ëMº}Í ’Ü ÒU“õñO §­‚â|=ÿ‡m:ÞpJ¥“JôìÓÖ±£'ôÍ|^¥“Jz®›·h¦¾ñ?ÖÓOlÔ­w¿[ÑXä²Y{tñ†¾×$®öŽVµ¶7»Ÿª‘ŽIÍ]!ç/ê×°y¼ÉH~n°­«µž÷/oݧ¢1£µpYUŸë/Ÿ£Ââ|íÜözϱü‚<>P§çžþ³š[ä8¶–¯ž¯~øyM˜8FŽckû–WU1½L£ò³uöL›ÎœnUKs‹Fgi̸Ñzyë^uF;d;ö¿e*QÑÞ‰î?ê-ýÒWÒ'ŸL¸®«|Ó]Ùùä“ÒC7'­êœ:Ý #éslÔè,55¶èDÓÛ4¼h´³ç3'ZT1}|Ò6ŠJòTóF}Ϲ›?¾Dþp½ûÙ3zìgÏhì„U]5Y‹®½Rù9’¤ãõMŠÇL}úÎo&íÛë»üê'd<ÃH²žtDZeZ¦âæ Ï‚YyTÕ5í«å¨´é_Ý×ïýG©`’{nå=Òú÷é2ô=iJ‰öl?¬h$®P8´Ë†£MZ÷Xµ–¬˜¥ÙWWv‰ž¶Û9ï÷ê>7uf©¾úÐ'ô枣ڿ§V‡÷Ó¦ßïRõ†½úÌ×nÕ„IÅrlG+Çê†/¤5lÇ’×ð%]š{$tñŒ$ÿÎI–“Õõ Ðd×èŠ*é–ïö¾ô£Òîj÷uÃ>é¾-îë[¾+Õ¾$½ùÚ€~û·û®EÓôʶƒÚU}@KWÎN:ÞízC5oÖkÑò™}>ßýº 8O §´í8ŽNÔ·¨ 8O† Y¦­õÍò|š»pªæ.œ*IÚ³ý}xƒ¶>ÿšn¿ç:ç©£=ªiWN0–×w¿¥œÜ€,Ó’-K^Ÿ_^wÀu©vùÕ˜€3 OŸÍq™ñ¨lÇ‘ÑU)驎øÕ»_ó¤Êsßï}ª7äHîë½O¹¯CyŸ•ú´Ý½Í˜[®ISJôì“/ª®æä€óoî­Ó‹›÷©pÌ(Í[4­g\FB{UWUèts›öl?Üç³»_<¨Ö–vÍœW.Ã0Ôv¶CýÓ¯õÔý©Ïu•WL$y½†¡Yó+ÔtòŒ^ÝÑ·½#ôŸ=£MØåŽÃ0dY¦,Ë”!Ï€ß5•¨è ã%Nñ²mK¦w§‚%»&KR«¤;¾-©”Ì®{lž¸w`ÃOÜ+ͼÑ}=¦ÒýÌ£_vÛPo0é?–5Ÿ»Që·úÁ7~£¹ §jÊŒRIÒ¡ýÇ´gÇ!…³‚úä}7ÊëK¬œô¶µâóµoWÿÉU{è¸JË‹u¬ö”¶nÚ§âqùZy󆡂¢<Í»fš^Ùv@|ïYÍœS®xÜÔ‹›_“ÏçÕâëªd†VÜ´@¯ízK¿úÑ~£^e“ÇèÔ‰3Úºq¯Bá€nºcIßßбeÚqù}ɧޥA¯ûOºm»÷ã$«>ô çK­gÜÀòè—‡n¸¡Yº'<ðx8_Ò™A+£‹òtÿwëOëwkïˇµo×Y–­Ñ…¹Z¶rŽVÜ´@y£³û °wŒYÙa}áëwè¹ß¾¤½/ÒÖ{•7:GËVÎÑê.TVv¨çcwÞ»REyÚýÒ½þÊC•O§ÛïY¡² w)épvH÷}ý6ýñéÚ»ó°^ú¿×Î êŠÙåºñ#×hìøõç8Ž,+.ß…‚2žt™¶9è ü†aH¦¤¬Ñ’Îüef–Ì3I+:ÝÂYA]ÿÁEºþƒ‹ÎÛÜ÷ÿ€cÙ¹a}x͵úðšk‡ül à×Mw,ÕMw,òºìœ°nýØ{tëÇÞsÞñt³G¶mÉëM}ì è ã27MŽû.áQ] D•/Íœ{ñ«‹9’"†ê%òž> |þ®/¸¹ï?þÅ‹HjX–%¯ÇË=:@ª9rï+ÑË1ûƒ~mŸ>WfõNUØMÿOÚ”ŽxŠ´ëÊùòý}úüþÿüýE6zy3-K~jWb#è £y C¦c ùÌI g…ÔxÍ=:©Bíg;dYöEõçõz”“—¥±ã 5&+tÞ~Ó#G¶yRø] :È\Ž ëŒ)ú¯q0äרq…•Ÿ£xÌ”í8Õ¥Ç0äø ú3"èHR´3¦`0(OЦ°t±|>¯Æ«ít§ŠJò†¼Öëñ*ö* y’kmiÓ˜â1òùR3… €ŒøU9q²öÖ¼ªâq£Fz8iíTýYÍ®œ£@Àþ‹/‚2–aªœ\¡×ïWc}«Æ–æôÒÒÉcgäuüªœ\‘²©zd´œì,-]°Të_Ø Û¶5~RÑH)­4mRý‘]¿|µr²³RÖ/AÍ0 MW¢UËVèÏÛ«ÕØP£Òò"åd+òõyÎ ÎÏ‘£XÄÔÙ–s:VÛ$¯íתe+4a\IJ^ è ãù¼^M*+Õ-ù7é`Í!Õ¯SÍþE"Q9¹ºZ¦2 C¡PPE……šU1KÓ*§*77[ RÎãñhÔ¨\ÍŸ7O³¯¬’iZîCDqÁ<†G>ŸWÀÈ-ŸMІ¡`0 `p¤G‚¿DjëGi‡  ít¤‚€´CÐv:ÒA@Ú!èH;¾ ¹øî{ï®qÀ%3dÐùÕÃõ¾»çéоãš6»$Uc€>šO¶%¾uúm$›ºælXWÛý¦¥©USg»”c€‹²a]õ]]/û‡>Û`žTôâ†#’¤Â±¹ƒ\ ã_%Gr³Š­¾ÁÆîwLF’¶¼’‚’B«o^Ú>Ø=:ÝIÈ’›Žâê 5ÝY"è~ýƒNT}+;*:É‚Nb#¦Ü0ÓÀÓ}Ž `8õ:qõÆ–8}í¼«®uWtâJr:R!1èĶÄ{uº+:Ž4tEÇ–fCNât¶˜Ü 3Ø‚p©tg‘ÄÛk÷¦–˜>_EGrƒNb‚ê¾7§;ät ·ÄuºÃNâ¾OEg¨)g†Üc¨7ÔôßwŸ€á”ø`P+É>ñA¢ç )FÂædOÐ0Üo±I¶ïÞ$½³b¼Ã= çî%Iÿn›/r±ÇHoIEND®B`‚scribes-0.4~r910/help/C/figures/scribes_window.png0000644000175000017500000005520311242100540021734 0ustar andreasandreas‰PNG  IHDRDOÄYsBIT|dˆtEXtCREATORgnome-panel-screenshot—7w IDATxœì½wx×yïÿ™™í»hì½÷"ª’jV—eÙª±d;¶\¯ç—ı;‰oìëØNr}e'r"É’,[E5Š"E±W±€½€ z/»Ø>sÎïX  )q>ϳgÎ̼3söÌwÞóžwÀÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂâJF9Ïúçúkaaaaaaaq±‘üÛ‹˜¤ØY~×ÕÆàm³°°°°°°°~V¯Ü”ÖùU`ŠŸ3ÿv}à qt.A¤,¿ëj1t¦ZXXXXXXX ?«WnÊÂBÆûGgD)bè _½y8ìµ°°°°°°°2^ø÷’ßW¯Ü4S€Þã»Aªç¨_A”CÏü‘™žKk qØŒ·°°°°°°°*víÞÁÖÕe¬^¹©S é@‚na¤ÓÃ[dëg[I¡”™žKSk]Ÿ•ôP3z4€ÍéÃHÄPT U³‘ˆ±;Ó0ô8Š¢ jö”2GZ.Šæ’·°°°°°°Á0•§ë‰GãCº]»ÝFáÈ<ü™i}.O$tª*êÑã:ŹøÒ<絟h$Fue# )™ËÕ­)Æ›D€S%0õM×§k¸L²/QÒ;ô…¯ÞŒÏ‘²P)ÄC Hœ|ŽAªU²Ò%±8„¢ %¹‚ÊF¿O`•`˜dY†×Ü"ónlÞb.gš¦daaaaaq±ˆ„£lßpˆé“æáó¦é¶£±ûî`Î’ñ¤gøR–Åcqvl9Hš3Œt?ÇN•²pé4üY}‹§þ…"lÛ°Ÿ’ü H ºþ‹®×ëNÖyõù÷i®°z妩@ ˆ÷øt‰$ýyˆ’¢[¬H¡`„=xd.6›æÖf_;£/lfæ„IÔ×µS_^ÇüÛ®ãð}ÄäEãèèˆP[V•,;g4QNçâ hl®A ‹ó¤¶º‰QEyâᯡªên[JÉïÿh§âô~&MïöþèºÎ®-)ÊÀÓ~§ÃÉêuo²jÍ+,¼f:~ßY¶ÚM$cÛGûX<çF¸û1àÅ?þ–m7qÕu³q8í}­æ¢{ô«+˜ºg 5} ¢¯‘0º‘‘P°+nÒÒ|‚¤£s¹)Mï¡›eRH}”`gºÀíô‰Pí–—ÈÂÂÂÂÂâbÅÉpº†\ uár¹‰Å)¢±¶§’ÁS|Û ÀŠ›îFQUÞ|ï÷Ì¿j™gEáP”›°hκâ(É}¤ha i64UK–©ªÊò>ƒ‚·>øsNêWEBQvm;Äâ97ñÙ{OŠ!UQ°Ù4bBö§'\¤ ¡® kµócœÓCd=FÃíô2{ÖÒ|>¤¼ÇŒHê<¯gžàîÿe²^Ï:RJŽŸ8JiÙé”ýX|úÙ¶iw¯²ììL&L;¨:ÐÒÔÆ±#'{•/¾z^Ÿõû:¯g¢j*™Y~FŽ.ÆÙ·ûÙbˆ† ¶ºEU(,οÄY\ 1|‚¨ )eʽ=#+“Çñü«ÏòøCŽÝnö-ªª²üÆÏðæû/1wÑÒ2¼)ÛŠFbìÞzˆ%soæ»Åf³%÷!¥äw^æXy)ó—LëOO8IC @ëü( ÞC¤b·9p9]´¶¶‹Åz|ÿ÷¥Fóòòp»=Hayˆ®D~ù÷¯&¿ï=´^ûU¯v0:W:@ÙÓóäg¿“,ûú÷8ëyêy^{b:mŽ••òÞúWÙ·û“§Ç—æí³¾Åù#…¤¡¾™ªÓ5¨šÆµ‹V°vÓ›Œ(̽ԦY\\=ÔËC¤i*3çMdïŽmüîeRD‘¦Ù’Ãgo¼ûsNNŠ¢H8ÊžíGX2ïf>{Ïã)bHHÁo¿ÌÚM«˜³h2§­¿¾ÏŽ)‚l=>Ý¢Ä=¾«(h(ŠB,#‰ôyú¿”»ÍŽ4R÷cqe¢ëú9ÛÁ@ê\iD#QÈì]~>çIÓldgæ±dÞMÌ~ÿþ??âØ¡2fΙŒª O¬Á•Ê©“•´µX2ÿ&–_w?i™¬Ýô¦Õ¾-. Bׇ}ҽڳݮ1kÁ$öî4EÑ#>ËiÎ SU•7Þ…”’U«_fúœ±Ø6öï>ÆUónN‰2½O:o¼ó2ë6­bΉ¸Ý޳ý~Tº=B=…Ê@=D©³Ì$ *Š¢ …ýŸˆ>¦OžOºÏ€ÓéæÉÏ~›ýò4Ô7“;"{(̵è$Øâsw}……³¯K)·Ú·ÅÅ žÐQ{Äò 5Šb¶å¾Ú³fS™>w<û?ÞÆ €Gú »£s=…å7|¤äÍÕ/¡ª K,ã»MCB S m~‹ésÇáp9ÎõÛI ŸÎzFÙàf™IC$QAAyyyIãÎd ÃgõUÇYýÇŸ®-gùì›H47òÑö­xVÜ~¶ƒ²ø#K¶gç^eš¦!„AW3ST…Ì,?E%#P…Ö–6êk›ˆÇ]mÝëÚÌx™‚Â¼äŒ ]7¨«i ­5€0Œ^¯GV5• :…Eyœ:YI8”ê-U…é³&ÑÜØJMu}/{ÇOM"®S_ÛH,£çÏEAÁa·““ŸMvn&ñ‰†A]m#­ÍmgŒ‘+PÜû< ä\vñæšAßÚ—ø«¯ýÒ¼fþ1z6 g_Ç®ý‘kº¡êj‰„£ô4\Q\.'ù9døSóš´¶´ÓPßD,šz¬ `³©deg7"MÓØ÷ñ¡>mœÌ޵/Ðpº”ë—}Žé|Ϫ· o9ÆYc=!]Á ôÚŸ[´nó*î¼ùaFÇ:—náµwŸ£F­GUë›Y8ûz®šy%¸œ„0h ´°ïÐvÞýð„CŒ?! N=…Óîá®e0iÜL²3ó°Û$ô8mŽžØÇ{ëÿȱ#§@ï<ýŒ*ž`ƒ¡ó½z‚¶¶M-ܸôNî^þhÒÞýíßR_SI0b\5ïfŠ Æàrº‰Æ"Ô5V²sß¶î^K =Àȱ%aPv¬Uqð™[aÖÔEd¤eŠ9rb/5õç}.»˜¡HÛ÷¬çíµ/£(9ùÙTWÔÒÖÚ>àë3Ø6Ù×1ö,ûú÷°úA‹áE5ïÉ=);}œŸüòo°Ù7<é|é±o³tÑ É2£óAòlíX³›¢hïÞm<÷¢Â#Ÿý2.§9;^S5n½éî”ú=‡ÉÖlXÉô¹ãpºÏéêâLÔ‹sUw©. šTÑ4 )%S§NMØÓØ3¿wýmo©£âÄ^Nì[GkÍ~Fæ¹¹æ–)(úA*åÑ|p3‡Œã8gOÔ“­Å§‹ó¹öEù£xæ‰ôx‚p²tÁ-D¢!ÞZûRJî¼ùan¹öž”õºâen\z'£ŠÆñ«ßýæÆ ÝÀ¦:ùöSÿHNVꌇÝI^vyÙL8—ŸüÇÿ"®ÇؼsMRišIãfròt)ñx‚“$ׯ©?MYÅEá ÷~­×p‰ÇíeìÈÉŒ9™é“æó›ßÿ„æÆ±8ªâàÛOÿ˜üœîé>? g_?$çRUìN;uU)åEù£@JZ[ÚijhážqÃUw¤ÔñyÓ™:aS'ÌaÓÎ÷ùêßàr9BÐÞäÑû¿Áü™W§¬ãt¸(1𢣙;c)ÿúÛ¿¡º²¶_ûbÑ®xÈT ½wÌ@Qþ(¾ýÔ±õxªÌÌÈæö›bö´Å,O÷ù¹åš»‰Å#¬Ý´USio êúôµÿ³µÉ`õƒÉ4úŽªöx\Ìœ?~PÛ:´ÿTê¶{ÜÿÏÕŽ5MeòŒÑì+݆òS9ûðœ‚9mÿw^âƒMo1yæûþN>ËL*ØÐp8!¨­­M ªîoØ,n§¹æµ§>Fo=B^¦“é3²±ËªNî¡¶;ªi÷'pLœOöè±Ö,¢+˜ó¹ö¹Ù!¨©¯ ?§(éÅœ;cir(èÚE+’õë«8||/Å£™0f:ãFOåªy7s´âcñW/\–"†*ªOPVq”‚¼&› @vf‹æÜÀæÝïóñ-Üsëã¸]fVÖi“æQzd'^OcJ&%·³iÇû€Ââ¹7¦Ülß|ÿ>>°…™Srï­›Û˜8—¥óoaëžuHapûM§ˆ¡H4Ì®}ÈÉÁ”ñ³/ø\ !°i‘h8¥Üë1Sê7Ö73wúU)b(žˆ±kßFÒ|Iáwõ‚e”WcÏ¡-H)¹zÁ²1Ôhfÿ¡dús’ëäfàžñê[ÏžÍÂKzZfg›8M~NqJ¾’¢£‰Æ":ÚÈË.H–/š}=ïox¦ú–A_Ÿ39g›ÄŒÛš9e!y9…Éõ>ØøF÷ÑZý Å0ræpÙ@—õÅ™î–þòõ‡Í¦1aj ÜŒ|Yòg_øz¯„‘æÔúWX³áM&M‰Ëeòßȹ‡ÌŒnA„¢b³ÙR¢i¦8ê/V( pp×*Žn%ËbTA¹ãÜØe µ§)¯S°1bò-8GxÉN—Ø}@±r]ÁœóÚ+’¾~«/¼ö+víßÄü™×ðèý_ÀŸž•\‹GqvÎdhhªáÀÑÝlÜñù9ECít„t„¤g™ ÁŽ•à•UÏ’îËÄåt³òý ?·ˆ¿~¦{ÈfTñx6íXMBÆÙ¹oCRxM›`OŸ4/ùÃŽÅ"ìÜ·ÉÒù7'·QÛPÁ›V°~ëÛ,œ}ÅcX8û:6î\ fNY˜rÌÿóÇ_pðØ@òÄg¿ÍœiKw.ÏÀ¬o+ö¤Ëþx,‘2”ðÂkÿÆÞƒÛxä¾gX0ëZ®Y¸œû>àªÇ‹Gù鯿G Ô–_wY™y´´6ÐÐ\Û#ÛDq¶Å½øï?þ‚=¶ôJIŽ„øñ¯¾A°£Çüs§_@–?$$ŒÄà¯Oœ­MffûyóƒÉÉ‘"ˆÞ\ó".·‹Ìl¿ÕZ +ýå!’ÈA·½þ’<ž™‡èlèºa"C8©/ìöɤèâб=äŽÈ¦­%À‘û’‚¨0TÒîž^­SG t´1j\ ÁöÖo[…¡(ª‚Óå$ÝŸF$íÓ>C—çî°zPzd'^¯‡Ú†Ê”òŠš“;Ú±i•5'“‚(éE:Ïës&gk“YÙ~Ú[úž¥[T2°ÉÍ÷ÜG¬bõ'q "Nc$±Ó>Ãý×?DfN^_R œvWç»Î¬üWÑX$™Âãò!‘D#Q;­-íxÜ©éÛÛÍ(ªÒçÈI<#=ÝßçÍÉçóòñÁ-Tןfîô¥Œ*OaþHüéÙ¨ªJqÁ¸ýÏÈöç²òýçÑ4…ù£yìþoŸÛ}3GB||`KòÚ“ Õ•”UaìÈÉÌžº˜Éãg%ëlÚ¹¯×E¨#’òƒÆ"46÷;#¥4g=IÙ»Ó‘)Ì™RŠÒ;r°ùl ]'“›5"¥¼¡©¦[†žiÒ|?¡”)ÇÔÓËÔÓõmsÆj"'O ¥D1 #‚}ÛÜ•ê#/³„Ký ë ü™Þ^6†Ž¢€¢ªôwO8Ÿës&gk“}Í\LÚ§ôs?°°2Î ¨î±dð¹°ú)RâÜÛŠÇtN­âÚE+xàîG{Í&“R&ûž­_çEÆL,Àãí;Þè|ø™Pº0*„ ¢¢‚`0˜4ZA ­‘£»ß¦½j'×]¿”SGR~¬žê†,2 ¦0gÊõx3ò¨oÑØz‚éÓ§£iªjG©XODW M5Œ,À¸QS(ÊMue9ªª „dÅõ÷§Ô?VVŠÓî@×{'S'õ•UC*Ó'ÎÇëñ‹GX³áuNž>Œ×“Æw|1)p®š o¬~]×y侯%ÅPG(Àï^ýWN”Äawö!ˆÌ!d›ÝÎæk’‚èºÅ·aïÌ­Qvú5õŒ(Ì#ŠP×X•ô¶„#üôÿ}/)xÜ.ÑX$ù¿¦i ®©Š’‚î×–L7‹Gw0uBï¢Áº½+Ê«°ivæœq|¥Gw¡Ú4 àºþ4cJ&&—M?›ý‡w¤ˆ¿šºÓÉïM-õÉa¡1%“ðºÓ¨<]”ððÝ_aÚÄy´›imkâÅ×ÿ0ƒ'{æH)1šªÚSL[Ô×ëHú÷* Ùw›@‚¢ô§†üõé§Óï¯M†9üwæMIÓ4ª*jp¹de\üYX –~‡Ìäàû޾,ä9‡Ìâ1òã5\³xy¯¤‹fõ+´¶5óèC_Næ)êÎh­ðÚ[Ï3jÜÜC$ŠÍæ`Ò¸)ÁäŽ66íX×ë!аqû»)‚è‘ûžaç¾ d¤e¦ nØþ6» a¶ìþ ™vÀãöòÝ/ÿ„ý‡w’ŸSÈ”N!—æË ­½™xÂ|PK[SŠßxò‡4µÖ§Ìýµ sYßåçs}ÚÛƒƒÚ¿T…P6ðȽÏExùÍÿ‡?3cÀÇia1XÎ8=è!³3¶5 êxL§¢¬ŽkßÚëE­æÔú—X½~%ªjnÿÌŒÖËo¸ )$o¼÷Å£²‡D xÚ½4@ TUMŠ ¤X’US3q.£'ÌF³{Ø’¹l6N§§Ó‰ÃáHfw¡ ¢' TÍDW n‹5_gòøYIQä°;™?óš^u[Û›ø¯W~†Ö9dÛBˆ>Çk*ؼs Kܘӽ¯šwsJ)%o®y1é:t|/3&ÏÌÀéüËÿĦÙp:Ýèz"9Û¦Ù@J ]àr:i3ÚØ±w=×/éN.Ú °çà6ÒÒ½CàõyÙ´ó}sšz§Yºà–¤}` Ä`G;›w­ÅéPñøÜ|´ý]̾6ßârº¹fárÚ-dô"‡ÁMÛ¾ùš»{•E¢a~ûÒ¿OÄÈÌNCUUvíßĘ’I\Ó+åt¸¸zÁ²”õ6l{—Ý¥›ÈÌÊÀÐ뷾͘’IÌšº0ÆõKnKY§±¥Ž?¬úMgß Ø¾çCn¿©[|:nŠFŒ¦²¦Œ’ÂÔ—ûží¥Ýýµ‰³­x>×g°û†ÀnÓ8Q~(åüͱ! ^Yõ¬Ù'ªÖØÙ•‚®aô>ÒH\v›ôt7ª-µ!ö7d6©ò½×é«Téw[‰¸NEY=×-¹­ßµ¾ÿÑJJFç i»÷oè÷…°¯½ó%£sq¹½ö5œ˜Q]I÷pvvvòºè)”º¾w¡(JŸÓè:—ëØ– ºRðx=´FÛøÅþ-WÍ¿…“—S€×“ŽM³‰†il®åÐñ=|´ím¢±Y9þ^3 zÒW ˜âëoý†ÊÚ2æÏ¼†‚¼Ü./ v´S^uœ·¾EÙé#døÓ‰F£¼ðÚ¿q×ò/0cÒ‚ä´ó²Ê£|´õfNY˜œ95²h<šfŠE§ËÅækRѶ×!„Ói&s¹D£QžýýÿæºÅ·2oÆÕäçá°;‰Ç£4´Ô²ïÐv>ÜòR \?(EùÕs?äΛfúäùx\>ZÚر÷#[êxüo¦÷ù$ö‹'b46×rüÔA>Üòí&üY~„”8]Ü^7¯¾ýŸ9¹Ÿ«.cTÑx\N7‘h˜ÓÕ'ؼó}JìÂíuãp:3`ò¿^ù f]Ç¢9×S˜?ۇͭ ì;¼ƒ6¾N<#+ÇO8eÍÆ×Ñ4KæÝ„Ï“N{°…lá½õ¯òÓ¿y!ÅfUUÍØ¤A´ EUÐl}+¥ó¹>`GŸÛêoÿf;p±çÀŠ Æ°hÎõø<éÄâQš[ëq9ÝB 5¯ÎⓊ0§êÉñ2*¯è¬³-Kum%åe ”ŒÍKØ}u  ë‚“GkµxÌè#ºsÈìŒÅã:Õå \·äÖ~^Ôúï}øE£s±9Ìe…#sعw yü¡¯öñBX…?®úoŠF]˜(êë´Û—ßuuà _½™SGÍ`B#>9–Ï?üHŠ;,åðÏñvû¾ê«ªÊ¥¬ßþ&ž,K]IH ‘h”h8jÞÐÎl2 ¨ŠŠËåÄíq'Ì Í}n/+ÛOKs[¯òœÜlb‘áH¤ÏXEQ°Ûlx¼ìÓ{Ù ‹ÆS\Á Jgv×TCUU%+Û|…ƒa}Úàñºñz==žp8J$íåRVPP·Û‰ÛëJþÞ„tt„ˆÇâ½6úú½åæõýî±þÎß™ÇäpÚñz=½dâ±8¡PC7z¹Êm6¯§³»S’âÑîó¦©]¯üðx=¨ª‚”…‰D"©¯Ìèç8N'±X¬Ïãè¯M8v;á^ËÌó6¸ë3Ø6™›—mgG˜H4zÆq)hš†?3Ýò]!DÂqBm?ø‹ŸãÏÚØ±–Ö&þIf¾ ‡³ÛÃÞÜÐÎä± øÒcßJ–…ÂTTêÚY(*(!#½Ûö•ï¾Ì›ß ¿ »Ì05§›¹¶˜¡®a²÷Ö½AѨlìŽT¡ ª+Y0ûº”á³®õß]û¯½ó"E#3±ÛÍu”VÐ\og¯^¹é> „;?¡ß#@tÀ¢XÜ€X›Í–ò žô7UîlËÍÎV¡­-N ‡Ë~ÎíX|zp:)7ÏþHŒN!’•Ó‡Ñ×2!v— WÿÃm]tµwσÇç9GíÔ} Eé×¾3Ÿ”œ.'N×Ùǽ…”)þh¯Ïƒw€võç!:Ûù;“¾Rïkvéþ´AíÛæ´“î<ûùïy].ÏÀ§ÔzÓú?'gm/}œÿ.Ûs}Û&»öáòºpyû>ΞçÃâÓ®8.Ž òé §Ã‰ËíA7h¢Û+*¥™¾'^)g É~m6;R¤ö‘pŒÂcxà®Þ/j}ý—XýáŒ(ÎDµ©½û/ò‹³Ø¹w }¿ödùQʪKñg¥ÎP°ÍçªÐ5e.nkåðáýò]‡ƒêšj:‚!ì^;Šjf­´°°°°°¸è üÐ!„8c ¼èwväP‰F¤îSA$"a·;’^ß×ß~‰Õk_'¯0ͦô;U_U ¯ m{Ö#¤àÉ/„Õõ¡”óIÐÉÀ3*‚ö`36n±‚ɉ IDAT8¯Ü‰ýy}$’ÖÖfP ¤ÐB „å!²°°°°¸2PTt¨«¯&?¯ðÜ+ ‚šú*Úmd¹Ý)ÿsâ„EQÎ:2#ÏÈ3Ö5¤Öï}]J"‘:cÍá´ÑØVǯ~óÏ<óÔ_ârzXùÎ˼³îOäf ÙÕsÎpST…¼‚ ¶ïù…Gü( ÿùâ/)+?@^‘ÿ¼“šž3†èà3˪0$¡@œP †a1° ”pö¡4UU°Ù5;v›mHÊ,,,,,,.g¤”´6…@ØIó¥›·@3·áVîQïŒu$ ´¡Ø 2³½ôÌø©Ç Úš#LŸ<7ùZ#e@ï1ëY¯¯uzœCGöâNSqºS‡Ê¥47ÉN/$Í—NÙéÃdæù°Û72d‚æº %…æ,åÓ5ÇÉ‘¦uÇ/ÑwN«óÅ—eÃfsôŠGTm éYNŽU샳ÌÞ=_Üéìv­OÇIf¶—h´‰pkYy^TM´WGQ ;ßGk¨ €œütåÂ^y3à “oonmiãä‰#\³tcÆŒ¼´FZXXXX|âA´yË6oÞ1 ºñݯ ‡ â“bç§¶ÖjÆMºñ‚óX,+çsŸÇ“RÞÑÑÁ¸qã8tpRJÆŽuAû9“¡²ßÂäÓr>/·>är±çÓr}-®,†GmÞÁOþåWg­süøqbÑ(ï¾·ž[W\?fœ“OŠ©„:BØ4 EQ1„A"‘ ¥¥…ûøúÓ+H)7nô¥6µ_¤”´4µhkgԸѨêå9z-„àXÙ)²üäfg£(Cÿ&îO2—[r¹Ùs¾H)‰Åâ:|‚ŠÊZ@!+3… fát:úm‡RJNŸ®L)5ªäÝn à  ÑÖÖFKk±h §ËIV¦¿ßOZšMÓ.±¥Ÿ|†uÈ, ã°;¡³-J)B`è:ºžÀæ°sÛ÷óöªW¹íÖ†Ó”O…`·Û‘H„”(H³PJE!š¢èþ‡xã?å—¥(’RÒÜÔŒ‚Ц©èºŽÃá¸Ôfõ‰®ëØmBBCS3y9——(JD:8ýá+´ÚJ{Åô„Ž'#wV>ãç2îÖ?Ãæö»—[r¡öèºAÛ–ÿÁ#N#ÓFâ˜ù(vûÅ‹°H$¬ýp£ÇLæÁÏÞ‚Çã¡¡¡>`É¢¸Ý®^íPÁ‡ë73ªb ²³k8U|#BHÆŒyYµÛ ¥¤¥µ“e•”žSÙf£¾ÃF0ê Í%È÷5Pâ¯aÆ(ãÆ–•éÿÄçåݶp)$B Í $¥4?€ašê˜äBì‰'ÔýöæÜ±šÝÇ©,-%oÂØíiÃjsOtÝ ;+½{¶SSSÅÕW_Kqq1ËW|†׾ŒÅs°Ùº="BÖ­ÛHÑ©÷X”[Ñ},eq"EO „øDyP ઺–vUp ÎN{<ƒ¬4'£òí¸6¤„`8F{GœÍåqŽÖG˜^q˜ë椸¨àu¬—Ã*ˆtC§²¬šh4BFF¹¹¹É ewØihh`ýúõøý~æ/º–Önâæ›®N“>Ñv^(5µu,[ñ Øl6ìv;å/0Á}Ö/¯ø#Ú‘ç¬âäÛkwû_]d‹»iimãï~ø+ÚÛƒ|ñ)†a™!M‘±yófNž,Ãëõ0nÜxÖ­ßÍÿý¯Åßÿà²2ý—ìºÄÜ>_Ò³u¹£ª¦n·ç²EÇßþ ÛVrýâÉd䢸ýÈp Æ‘7pÆÃ¸Ü™¤™ÁÈ “Ø»þ÷´—ícÆã?6{úëCb±­m­ìرƒÒÒR|>™Y¹¼ú§·¹ëÎ[†Í3x¾öH)©ýÑ,æ=ý45»wS»{7Ç3¿I¦®‹ý¡i*ÅÅ#Bçèñ2N*Æëõ’™™I,Á`¿?EQ’b¨ðԻ̮xVÌ£ãÙÝD²sÐâñ¤Çè“€”’ÊÊjÞÛVžZn——‰ÅiØm*Rv‹[—ӆݦáóØihUØr*B8^ÁŠÅâ1L˜HèI¯£¼LúÂaD†äåç&ÿ'â0¿G"Qb±(+W¾A(fÖ¬Yx½Ö®ÛÄM7­Ø8}º’6líU¾wßËÊ΋A ÐAcc=^ov‡!ï­þ€ ãÇ1nÜÞ\õ£GÁãñ1µì_XøÈÔì>Lðp \BAGhjl"&ŸrEAQ”dáõú˜4in·‡D"Nzz³gÏdÛÖí¨Š¹K%ˆºÄàñz‘R‚ª¢ÐT׈ìþë’x `w:IKOÃãõœ}ãHG(Dk[»Ùî;;%Å´OUP5Í´WJÜn7‘H„†æfò.QLQ{ù!ª>z)£ý”–5Ѱù —›¢‘ÅL›v+JÅ&bõ'HÔV |%Ìžw3Û·n¡nÏ:F̹qXl:³‰Åc455QQQ–-[ÆÈ‘#‘RR^^N$áÅ—^çÎÛo&;;kÈÏãùØóßÏÿ‘[Êÿ>E m¯\Æø{–à¼HCºRJš›[inieô¨bÜ.'míAêëë™:uBòò (/¯bÖ¬t¤”I14§â |O›bÈ7o»w£ëÊeì=)%MM-¬ÛYÁÞn§‡‚l…9>&”dárÚ(ÊM£¹=BS[˜ÍûªˆÄd¦9il5Ø]!qhÜéõ’“3ôíj( vt•égÿþCÜsÿã<ò…øÁ÷¿Ëþý‡ø³§¿IKKßû‹¯óÔ¿pÑl6AdæESc#HsÓåBJªj艹yyLž<Pðx1¹\âñx‰F#hšÆˆ¸\.¢‘ð%ë’bȸ½^¤E‘H þìœõ€Na$¥ Ohm'“= )%uè ·ÇK†=5þ@ö¨×ýæùŒ^Q$¥`ïo¾‡Dr¬&ÄäÏþ%ÓÇÏBtP¹áO¬~o×Þt#Fs+±p3‰†JlúZf-¸‘­¿û!þÑÓqeæ ©MgöuÁ`P8L]]-Ó¦MgÊ”)c»æ9ÌÎÊbÞܹ¬_¿ŽÓuHÉÞ¼ÎÇžiS§rð›ž1´{÷<²¾u/…#p¹\CbÛ¹Ðuƒã'OÓÔa÷LJ(*ÌådY·,›E8Æçó1vì8Þ_ý:S§N`ãÆmýŠ¡·ÔÅœÊXĽ#‹¹ŒuA ºnpøh¥µ6TÍEv†›xÂ`ùâqL™•¬7¾Äü{ÃüÑüø¹MÔ5uàs;hé”ÖŒ?ZÆÆEû ¿ùí üÕ_ÿˆ_üüÇÔ74‰DYµj5?øþwyüÉg¨«oÄívñýܧE ¢‘(6»$dø3B&Ý]gZG3ÎòÍ8Ë¢m©ákx°ýábü䤑ެ³ïh躀vdÔÍ(P¾CàÏèö8àóùp»Ü躎:f,ííídggQXXtÁ6]JÌ dºŽËåbÜØQI1”H$°?7猧ÄÛàú —Öhzˆ!R E*ˆNAd³i¤g¤ãõxHè à ŠziÅÐnÇt '}@}®`ÆHØvôx‚¦†&ròr†ì¦)¥¤¶¾EÕHO7‡Pdj%Óa`Ñ—Òuî%±xœÆær‡ÁÃÑÁÊcªÉ0“ßú5ªÝ 0µ»}L¼û«ø DZûýÿföÌè»ÿÄÐ[*ðF›)*.¢nïzFßðàÚtf_çr»8qò$S§NeòäÉìÜwˆÊêFO$¨¬­gü¨®½îŽ;Ä‰ã¥ø|^Üµ§ìt%S×ÜÕK i_úãÇ%;'+%^g8ÂÀå´3rd.7Þøï¾û£ÇÀÈ‘#Y³f -ÍÍüùW¿J{0Æ»«×1±þ£>ÅÐ*e‡³¯âΛ®Åãñ\¶³8{"¥¤­­}e!Z¢ÙdÚ‰' TUaÓ¾Jv©åèéfšÚÂܼp w]7 ËβEcùÏ•{Ñ Ó¦R×áf_Y+S&µ_v^¢]»÷1mê$< À;ï~À]ŸY®ëÌ;‹Êª**«Ñ4öößùöW.ª}Ã(ˆ z‚–æ„aàp:HèÂÐQWÕ6²¾JzåFsa~2Õ”¾Vú6bòMK¾€»ä‚lé?6f>„:[3‡P`‹i§! ‚Á@Ÿž,)é€dD~>ŸŸ÷â R&‡D #AuM ±hŒñÆãøÝœ^cÆ·žÄ­¾¤&kªÚ@m^£.‘ÛU(…D ‘Bš$üi†AçèÚ%è»s¾ò³¤êIáÂTmz¦úZ2 ¦«Ü@¼öÙ3©;±†\u÷u†®ÓÔÜ„ËåbÊ”)ìØw@0ÄÂysÐ…$–Ðñ¤epìÄIB¡0W/šKMM% MŒ,)’›×`ì t„Ѓ{{ýæ›ïYÁõS'RX˜Ãn‚³40TUß‘κõ[p¹Ühš‰'‡9vìUUUlؾC[wp½±—9ye}‹¡œ¥Üqû2òòrp¹œ—•(è)%õõ T´«8m BHâº)ˆ¶èî%’·6gÂÈ,¦ŽÉ%'ÃCÂ0û)š"©hW©¯o ;;ó²9öÒÒC¬¸í³Lž4ž_þâyñ÷b„±Üs÷íì߈Ç{(Ò`>pþå'.ªÃ&ˆDg瞑ѻwœÞJúÞg±77Ÿ” ‰âÏCɇl<‰lkÔ#k¡£náE‘Ùy‡BAìvv‡Óœ†* C˜Þ…ž¬X[ímíÔU–'…(H!(*ÌAædcÔPUv’â±ãÎ۪Ʀ¶nû˜ÏÜqsJù›o}À’ÅsÉ͹pïXŸtÎȰÛìÚµ]×I{yq¯Ž±îÎûY>~Õ•á±å˜‚B' ‹Å@Q©®®ÁétuŠ)‚0oææôb™¼ÁÇb1„aЋ …‰ÇãØl¶‹úÄèñzhkmEAÁév÷86C×;EE§ÀëjoJgOg‘ª©„‚A¼>6Û…ýlºN{{€´ôtÓ#Ôé ÒuÝÐ{¬w›C[`‰Ð%^ÿðÆ7‰ÑÞÀøÛŸÂ‘Öÿo£øÚûhXûÚmr›zöu†apâäIfLŸŽ’ÓUµÌ5ƒ¨PÑ%$PH¨N>;÷îfé‚Ùä(¤ìxéͨ=¡hŒ=›?ä‰'žà¹ç`æîgÙ½{Á‡$Ó£P\TˆÓÙ[t'6›Ff¦ŸÓ'ðþêUÄâ’E‹ÓÐPOFF:¦.cå^᪺¸wZ Ï)†òósñxÜCò[¿}µ’ú†&Z£.lšÒéRQÕî¾À‚Žp©@I~kvœbïÑ:³ßCâv;qÙ\Ô741yòD.ç˜Ãé@Ó4**«™6u»¶¿ÏèÑ# …Â<þØC;:5’7_UUX¼xþE·qøÀ ïîG7ÌÀqEitÁ&34‚Ëc þ¤‰ãùùÏþ·ßYƒ¦Ùذq_úÊw)=p˜x<ž¬ç°ÛùÆ×Ÿþ” "Ã|úõ¥¥æ¸ñ^¯|= %»mÂ5pà=»µ`²ù7'mú Œã‘§Q¬E9zrîýçeKWž—æúzÊ7¼Æ#Ÿ};QiÃW·YU"ÔãÈDQôh·¢SרAú˜Âó²§ ‡ÃΗ¿ô0ÿòÓg=ÚŒKzõoóÝÿõ4ÇpvF’k®Y@4åõ×ÿÔë)ÑýoòàÌY„B‰¤7æRÐёફ–Ä,½újš›ZpºœØ4 U3§¢ à ¡ëÄcqbñ±XŒX,J8¡°°˜Å‹ÍøŒ /¾x˜`°ƒì¬Ìa·_Qìv;¾Î™bít=‘ôI!ªŠ¦ªH$zÜ 4UE³i¨±=`ÆAÅ£1Dš8ïŽ^A$ŦÙÐ S†y†4$Š¢âpØPP0„@(›¦CbÈçõ`·Û/ªK>{jjN)EÕ˜ûôÙþ³/á T3}É ¨ÎÎ>GJP4R£Ú¬xà1s‘¡s`ËZ¢Þ<æ>ýã ²©g_çˆÛ¡ëº A &ÞÔA›®ˆè6ƒ¡Ù@µ!…9¼›ÐH94³¡jOyM?~òIÊO~HãMyþGÈÎΦt?CfÏ`éòÙlvb±8ë>ÜFNVóçÏ$ q°¤€Ž.à{Ï>ŸC¿Ù㦴0‡§½iÈÅ\¤¾ZÊÎØAHèº!„bI1ÔÅÓ÷Ìå¡eÓhïˆñõŸ¾G{G,e3šf·0D÷ÓâeÂß»—‡?w/wÝó([·íJö)žQEáç¿ø5wß}+“z<Ô\ †WÍ--ÝÀëõÐu|Ç×wU@¶×ƒa`¿é %jÞ´©ËЦ-GÔ2—w^OõÄVÄy ¢X,(Ôœ:ÎXg;ŽCoa¨ÇjÛ˜0{1qÝ –H Ð!$mŠE2¢ $qPh¾œ„8XÚÀ´›Ïß;ÔEaA>Ü;¿üÕïxàþÛ),È¿àíž.ØÔØJccCgi÷Sbþ()èQ£8v¼¢ÿ ]t#Amm;íímTWU‹Å°ÛîdóFmŠ"nè7úD ‹’Hè44Ô‹e¢ë äEœŠÛK‚h€¢i %éi>œNBH‰º®‹Å’y:ÔÎá+EQ:‡×äy»Á…Ä œN‰DÜ'ß}Ä ùé [9p²1e¹ªªØíN—ÄÃ7žþòw’bÈ0ŒäµêÊ)e·Û±Ù4òòrϱ¥¡gcˆÌ'Ÿ´´îd›ÃAZÛ1ó%å¾ ðæ!ƒ ¨£Å6z1ÒáÆqÃ3èåÛ0Ž®Gñ—@¨nG­.=o[$ ¤Þ|¯ÄH€´9zÑyÕTÌG7´®IT PÌØ©J¤‘@„먌8Y’541>W-™Ë¦-»’߇›.A”“›I(àÉO‰ã'ÍfæÌYŒ5 —Ëeç\Bºnà‰„™êÔ©rÂá6›ÍÌ<Ü9”#D׌(a>uwZ' |>†aÆèèF¢Ïàæá¦·( @çup:Éi͆áÀWÜE8!‰`·+(ªŠ"%BrAnpÑge‘LW Aš×‡ÇãÆî°›Þ©žOl!³Í$â:éi¾ËJ u¡9Ý,úÎoÙüO_ÀqpcfÝAðã×±ŽdÅéÃ7ëNÜEcT°ô¯~‹ætŸe«£g_çv»ÉËÏçØÑcÌš5‹™“ÆP±µ”p{ iþ,À ¥¾[¸•›–ÌCɉ“GÈË˲LÚµÇëóQ0f<-M8õ07ÍŸ‚Ãár{ÎUUÉÊôãq{Ð4•­Ûv‘SÀ½÷}Žÿ󳟰ãÈAî<äc¢ÏÍãs&S}ô(uÿñ_|ØÔÂÒoßø¥N½k®¡Äkþ^'¹ãòFŒ®+–*9+ øIDATË4M{’Æ ÜìU箩ðÜóÏé‘GÑ'Ÿ|¢+/¿X<0;!³ÌR­žÎpGo¿½DiéÙMah[é÷ÍiJÏH×QGõ×²Ì ­}õ …ü~Mš8Q|ðv-]¦e?®Ð ?¹EC&œœðñD]Á4 ååõÖ°BC[÷U*œ‘¥ºº…#ûCÑÈÁ5ÄíJ:°»,”P0= \³\à ÝçJv¨=P(ä.ói~}ÖY§éñGïW^^Í®n‡. DNÔnꦌ¦…Qú'õ—rjª¥HƒŒA'ÉÞü›ޗoì…Š|ø’;Û&T gÃR©¡^²$»ÿèŽ×"CÕ¥›”©]U´¡Fj¬•½kŸ"Õ}F$ËçŽé0MÉ4ö7;’Û¤%Épd4T©ŸO¡¬,†!Ë2S& ¹k7¹‹FÚ¶»ív*#W#o~Tk»IcÆŒUÞ)—«bÛ—úxíÇ{ËYÙùŠD"2M+!ßÓïu–e©ÿbÕÖÖiÑ¢7´nÝ:wìqMcˆžþÛ‡’Ü–¡œPPÁ4¿‚fŠƒyìhef¤§Ô÷F5tè ¥§U_ß 3öÙcÛ¶¾wó¿éîÙ·iÛ¶2Ý~çÏôéºÏtËnÐé“'vk]öJÏÌÊlêÆ0 É1 Ž#ç˜ÉÒ†wìG¯¾’e)²è·2 GÈ,>^ѵ¯Ë.ûTÖ¨³eôê+g×I’=´3ëjüb¥2v¯W£OrLS†ß'†|þ€äsƒa™î1ÓL#6qÛ‘cK²mŽ­pMÒŸ%c×ÚDü˜ºÝ×&)Izø¥»eÈiî€dÛV¤Ñ]Ð-(v[ËŽ}ìaž±kÕîÛ«åË—ªººZ‘HX9½råóùmo4Ýj‹!ÛŽêã×iħ¿Ð'Ÿ©¦¦²ë ? Ã0Úµúoü Ͷm>K´¶ÃK{¸Ë”æ÷+ºÓéñ¦¹àzêØ€ÜuÄÜnSÛn Ff¨¯†^õ€þùÇÛ5to•6lø\#oøü¹ý‰4ƺ&9Ž%ŸÏêÔÇïu¶Ü¿„C¡,õ+î§-›6«äõÕÔì•$…B! 4H½s³5qÂxÍ;W×^{­æÌ™#I!©VÏ‘ŠoÖš–ž­é3.$Íyúq•nݬ1cFª  ¿iY(”©H3ÏÖ{Zý?o©o0¨ŒÓ'©~åjíÛV¦]¥eÊpT·­¶ÝQñ?”]¬‰cÊU÷Á69N‘êít¥‡Õµc³=]A¿2ƒ~e¦dù,9ѽ*ö—jâ˜" 8º8åZsãÃÎ;wšæ½ð²¢Ñ¨,ËR¿~…º{öm’¤ëoºMË—¯”azáÅ—¿hâÄñúÕ/ïiõX†êtŽo†7n’S]¦èê²+«eäÕÉÞþ©œHìòriõ9‘zÉ”ìgÊÞñM•¾k­²}aÙ –OòY*ÌñiËêw$Ÿ%Ãgº-D–)Y–dÆVÇsI¶µeØQÕV×kyú0Mœ8¾Ãõ$K¿¢B½ºàÚ¶½LÙ'µ5³¦å Ó9OÿBýŠ 5zTr‚Ñöí¥*YøE" 2T«W¯R8n÷/ºã8 3æDmØð™€Ž5Df’»ÚËŽÚ’m+*)«WV§e”ÜVŸìPHå»+UóÖ„žÁ‰³cSÉíØ z;Žì¨»O_n±\:[Ÿýõg:æÊ{ì;XQ{4 C†étj§íC½×¹Á-Ú4) /V_W¥ªÊ2ÍUú†¤÷žu·ç°$§z§œJwu|i"ö2sGÇ£yoW©!R/5¶õ"1Z\µú\¶­‚Â~êkšª­­m †®3nì(}¼vª«÷jñ’7õøïætèyžyö÷ øÃꓟ­‘Ç wWºNqQùü–ü,~ùÐ:ç÷ù”™‘.¿Ï§hl¤@ g"Ó4ck˜2 w¯'Ó´eÙ¦ŸÓ´…Aœ Ê4Ý!Ó4eY¦ÌØL¾®îØ+«Õ¨-ËrÑJ-BÈ”oLv·©ñ@=m±,KwÜö}…#aõî«©S&+ÊjóƒÞ²,õÊiðà ^0C•gLRFFºú*”JÙpÐÃ0Ô;/W£ÒŽUQa_}¹u›¶m/Sù®µª­­•$ede(¿Ooõ+¢£Šû)/¿·²²2S: Åͺä<ƒAÝñ÷ª¼¼B¦iÊgY G"špêÉšóÔÃI©«µŸš깓’tÅÍgiÅâI’ÖT¦¿<ýûÄž|ßnëÞ”¹á=™¥kdT•ÊÉé/»ÿè„ív|Y[[[ ±sâ­B¡P¦ÒÒzƦ=Y|×òò m-ÝÞá5„ ÃPqÿ"åççIRìC4u€ûºmLÛEšã¿ŽãH¦ä3;7–&Yâ­N|¦ØúJñßU÷bÆQêýDUQ±[›6mQÅî*äkØ1Cº­E&Õê G"ªª¬VeU•GÊe)'§W»¶‰‰F£jh«!–ßç‹MÛïÙ¯ëH$¢ºúÕÕÖ©®®^‘FwÅs¿Ï§ôô Ò3Ò•L‹-¦š:Ú£¾¾^Ï=ÿßzåÕ…ÊÎÎÒw¾}©&Ÿ6¡SßÃå×]£aÇJ’*vìSÅw¬\Éü%Jª“T»ìkv»NR}RZˆâœÌÞrÆ^Ôá¨Û#þa’••©ÌÌÄmDÙÓ^x=U| daa {ÎX€ÎŠÿ%¿ÝUçðù¬¦ÙS_ÏÍV©²oÓ‘ðû}ÊËë­`ÐS‘–––Ð÷ªžVϲ”“ÛK½z¹ëD±ÖƒöY˲”‘‘®ŒŒÎ/¸™lñ×u| ŽPVVSà= Öåk4ÿžÆçóëêï^¦«¿{Y²K‘”¤.³îÖS_,ð¶îzÍò»‘|~¿/i-B­If=¦i*b­xÉÿür$=/ðJªÍüãU<@<@<@<@<@<ÝWU–vE’“Û¿ÓÏqÄ('H%t™ÏëÐJÕ‹Jþ”à2:æÌ©Wuú9:¼uG"NЉj¤é{™å oÚo©|ǧI®|Õ0†xxxxx^Òf™566êEKõÊkoª¾¾A³.9Gß8sR²Ê–”@ôáª5ïÅWU^¾;§h¡Û»Ì6oÞª'žœ«òòÝ*,ìÓݧ8H·¢‹uTq‘Î?oªîžýÃî>=ÀA’Òeö“»¾'Ÿe%ãÔIÊ,3ÂH%L»žG žG žG ž—”Yf{öÔt_}}CÓýÙÙYÝ]𰤢ÝvßA÷Íy¡æ¿¼P’ôû§~ÙÝ%£Ë x^RZˆh©„"ày"ày"ày"ày"àyI™eÖŽã$»B*v®KØsÑB<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<@<Ï—ìÚ£bçºd—¾Â:ˆ•ü)e$O‡Ñ™S¯JpÉÃ"àyGÜBTUYÚutXNnÿN}ý¢!ÃÏèÔ ­³°Ž81ã |Õ0†xxx^X©’á¢Y7è䓯èŽÛnì¶s>øðS²m»[ÏÙ\G¾çd×üUvàÿ‹fÝ Ÿeé¡ÿSÅý‹Úõ5’´mÛ½¼`¡V´V••Õ ÓtôÑÅúÚ¤ñ:ãô 2MÚGø @ŠxíÞÒò«’]Æé‰5÷tѨâ9ŽÓ®Çoø|³n»óçúçêuúä ºþº+tÉÅ3e†ž|úY=øðSí~®¯2Zˆ ÉÇÑ /¾ªy/¾’ìRÚ­'ÖüUòÙ†MzåµEš9ã¬Ã>öÏs_RZ  _=ðe‡²šîŸ>ít=ñä3zó­wµòÃ5:iÜñ]YrÊ£…’쎻î×¼_iׇ[ªè‰5U;b¨²³Czþ¯óµcÇ®Ã>þ³õ5tèÀa(nÆô3eš¦Ö­ßØ¥ö(´@']4ë]xþ4õíÛG ^Y¨íe»Ô«WH_›4^—Îú¦|–uȯßS½W·Ýz½N¢¼úÆ»ªjþ:ïe­üpöìÙ«¼Þ¹š|Ú©ºàüiòùöŸ·®®^ó^xEï-[©ªê=ÊéÕK§Œ?A—\|Ž233Žø{îLÍ蜬¬L]sõ¥úõ#sôø“ÏèžÙ?’am>>'§—֭ߨ;v©oß>-Ž= ¿æ=ÿDW—Ü#ˆ /Y¡ú†°¦=Y¹9ÙZ¼ä}ý}~‰Âá°®¾jÖ!¿öwÝwØÐÔš={ktç]÷«zOΞršúê_ÿZ§y/¾¢]åºùÆïHrÃÐÎ~P¥¥eš2åëxôQÚ´ù •,|G«?úD÷ÿü¥§èÜ­‰1áÔqZúîZ¾b•^_øMrZ›1ã ýù™õƒÝ£SÆŸ¨“O:^£FWNNv7VœúDå•úÍC³Õ¿¡$iòitÓ÷¢¥ï~pØ@ÔÑ`1ÿå×U^Q©;o¿©iüÇYgL’ãHo¿³L—\öGý÷ßÿ¿.ÿÖyGtnÂPò]ûoßÒÇk×éÙçþ¦qãF+?¯w«›9ã,ü~ý¿y ´ôÝ÷µôÝ÷%Ée6ñdM;ût¥¥º³ô”Ä"H€Áƒ4…!Iòù, <ºX{öÔtÙ9?Xù‘ ò ûÝï\¬ß<<[½ss$IË–¨>ù½›…!××&W~^.³Äz¨œœl]õíKTWW¯§žþË!;uÊizú©t×ßÓôi§«¸‘¶lÙªgŸû›n½ý^•WìS µî˲ºt:ó޲]*nš×RÜ¿H–å¾ÅïØY¡ââÖ׬9ê¨~Ú¹³¢ËjDך|ÚÿÑ cŽÓª~¬·ßYvÈÇú,KcO¥«¯š¥G~ýS=öÈÏtòIcTV¶Kü¯yÝTqbUU–*¯`xBž‹@ p¨A­]xÒv=̶íCÏpÃõW*==¨?=3OUU{:þ—çÿ®»½EEºíÖëÕ·o­þhmw”špC†Ÿ‘°ç"@Õ§OomÛ¾ã û·|QªGýƒ6|¾Y’TP§/¿ÜvÐãÇÑÖÒ2äuu©èBùy¹ºâ²óUSS«9xþ ã‹Þ\ª•+×´úµ¦iªO~oY=tLXÅÎuªØ¹.!ÏE €*Þݱú£OZÜ_òú;ZúîÊÌp§Ó?ù•WT6 ¦[¼d…***5nìèn«]cÊ7¾®c=¦Õñ`C‡ÔK{MÛ·ï<èØ–/Jõé§tòIcº£Ì„hÞM–È.3f™À!lÙ²UOÍi}Àêõ×^ÞÍÕ´tÁùÓ´|ù*=øð“š>ítö-ÐÇk×ë,Óôi§«¨¨@’tþ¹Sµ|Å*=ö»?iÝúMÓî¾±XEEºðüéIý>Ðy†aè¦ë¯Ô­·ß§p8ÜâØÌgêÞŸ?ª[o¿O'ŒÓÐ!eY¦6núRo¿óžòòruåå$©ò#×¼›,‘]f"8„»*´ðÅ­Kv ÊÊÌÐ/î»CÏÿu¾Þ|ë]íÝ[£‚‚|}çÛéœég6=.3ö¸y/,вå«Tòú;ÊÍÉÑÙS&ë¢ g(+ëÈfDê)**Ð¥—ÌÔ3ϾÔâþÑ£FèÞ{~¬W_[¤5k>Õâ%+ä8Ž ò5cú™:wæ”õhÞE–¨î2IjmDž깓’tÅÍgiÅâI’ÖT¦¿<ýû„ =ª*K5døªØ¹®ÍÛ’tùu×hØñîÌËŠûT±c¯$©dþ’ %ÕIª]ö5»]'©ž1D ¥µÕMF—ðŒ¶ºÉÙeF H9mÍ&ëªYf"rÚÓMF—øJkO7]f D žwD]f—_wMWÕ4‡ DÏ>þ†f\~¢>[³½i¡#€T_”1Æ9àrֺ̜’ùKBñì.¯Ö1£‹Y#@·(™¿ä²ØÍCQ‹K[-DMéé½’’¤¼¾¡6 h’ÜLc«e²¸¯Õ½Ì,Ii’‚SÏTÑEõt©’ùK®”VË}Ìš_ê$ÕKjhk–™-É.™¿„¾2Ðã”Ì_ò-¹a¨!v‰]c—¨ö·µÚBdJòK H Æ.é±K°Ù% ·5Éhãy’!Þ•†ê›]ê´¿e¨>v<ÒÖ¢xbŠÊMQí?ñEE ©çÀ@Ô –-Eµµˆš?I£ÜÐÖÁa(~Œ@RÉ(¢–ÝgÍ»Í;Ë,ÞBQëaˆ@RQó@ivi>–(ÞBäH‡n!²å†žæa¨y7ZXn bûj♥ùðŸæ×j6õþp-D’ˆš'­øØ¡x"€TÓ|xÀ èòåìÿòåìDDõè¿ÿXžÌÌ€wß­ù´¢óëï¼xœ?Oö­Nüýkk²Q2*¼+dðÝ0ýû,’Ê´¿XÌÖNNlÀÖŽŽÕc ŸfëwÞ,-kþ­èüΜ ¼| ŒKö­N‚ƒË—ÉD5ÕÜ#Ÿ¾Ä¶_ö!?_ŠéÓÆ¡Eó¦"îAõÔXâ‿ÿf¿?ú¨æ_ÌÊÈï/¿ÿþ ØÙ‘} ¢ÞŠ»GÓF˜2y¾ÿæ3ôîÕ§Tûs8ÀÛo³ßãdzÿ§ObU²c “}úmÛêçõuÿææÍ…çsÏ o_ÀÊ àñØÃªkWàÖ-Ãvàp€À@àã[[Àܘ1£hŸkQùU¡T60?º±1ËÃë5ÂéÓ5y(ΫÚ,\ÈffÀ¤I@ffÙí R)°v-ЪË«ƒ0u*ðüyÙò0w.‹gfdgë¦î ‡ìÚUú²¢m§Ý»OO@(Ú·ΜÑÄ{ñàrYÜÕ«õÓ™6mkÞ\7Ý… õUXY“JE‹X¹)êZäçkÖ0Û›˜°7'àìÙŠ»ÆD52xToe²8B™,ŽPÜë«þ]˾Ÿ)G]èö×aÒSôRØ>›6)+©T©trbi8P²ãnÚd8Ÿ¾¾…ŸÏ±c…§Ý²¥~ü%KÊ—ßFôÓ42R*ïÝÓÄ]¶L©lÝš-ÅÙWµ½MýtçÎ-»}år¥rÈÃ6³³S*Ÿ=+}nÝÒ„ïÛ§{¼~`áffJefféË‹*]m›©€[…&®6ÙÙJ¥¹9Û¶fMéï Õ{ûâ¯E~¾RÙ§áô8¥r×®ò_c¢z©Q½ersÙ³ÙïèhößÊ è×ý.ªÖZÑ=Ê\BNNÀ[oUŒ_yÌVCÌÊ¢¢X®]»Â÷ gµÍÄD`Ö,¦rc”5¿/_²šyl,pý:`aÁjpëÖiâ|÷Æ–’|ñs«ùø°°cÇÊnßÝ»™}„BààA #ƒ5*::ÉÉÀW_•>]ºhìíç§»¯êÿøñì-©¬;¸¹1Wb³fL('L`áW¯jâŒÍ\&¯?döícë¡CggÍ=al ðùº÷‰öR;üù'[ ÌŸÏBmÚ[·²ðŒ Ý<—å$<¶ˆÅ€ 󯯲m66l[UÊ 6ŸÏħ¼,[ÆÖ€—ëñã'ŠÞoÀÍooo -ÍðÍTšüöè¡û¿Y³Š¹I{õÒüV‰µRYvû††²õo¿1°jYµªðü–$ï¼1_ÿÁƒºëáÁÚEÊC³fº½~<<Ø:1QfdÄòû÷ Û®z`©@•y-ÂÃÙº{wÝðÎußòÊz w5ª›÷Ú5öÚmbÂýV{51©úZûèÑ€‹KùÓ[¸ ûœ9ìfOIFæÍ+Y|>sQê.XžüªMMk–}_w ¼NY×ml˜ÝU¢®Tjj±Ó§Wü¹æä°µ™™á7ˆ¸8Ö }ð {à8:ÆUþ5Ë ‡+ºeŽ q¯6TM; TLzš×㢺ç©ÄEûfˆŒ,ºÆ¼cðä óǪjåeé™Q–üƹslÝ¡CÕ\¯’æWÕõÒ××p3baâTTÂzó&ð×_¬†ÊåVÎGTÿýgؾmÛݺ±ßhÞ"¦M3,ªÚ³üüòçËÍ­oßÖ ¿ySó»ukH÷ i™ŒÝdãÆéÖ¨.üõoæLæŸ|ú´bòñûï¬6ÛªkÈ-N|<`ëcÇ€íÛ wË\¸ÀÜLÙÙìæU½ÖÚÛWM~UÄÅ1gÄ€>w®¾‹LÛ&“é‡Uf~ß|“­·ne«b1«‹Å@PððaÙóàã£7Õ›Ó A@Æå/? s±¤¤+Wjº™~ð~\UÃê_i®ÃÌ™†ÓUùè6LƒDÂÜteË爺å6= ÑT’<=™ ‘¨½Tø‹—ßþãêß â$½°)“Gº¯XÌj °ÿññl­úoðx~Ì?@•õ³m[ÉjÁ£Gÿûžë×YÜɉ‰çë¬Z¥ñ¿ÎÊ•U“_ëÖéö¼˜»hâD]Ùë,^ÌÕq+;¿ß~ˈÑц}Ðß~ËeªÑpYÃé×_kUËÛªâÖ-ý¯©§MÓ4\k3isÙI$ìÏž@‹†Ó4‰X¿ò%KØ¢m×Òâë :Äìûá‡lQajÊÊ5—†¤š»6—ÿ»¡^ÒÒ2ôŠB%檞¯ÿ7Äøñ¬Vãí]þ¼_¼cm8AâNµ##¶nÝšõNQ}ÐD$îQÃ(M•ª#‰¨¿Pg'‚ w‚ ‚Ä ‚ q'‚ HÜ ‚ w‚ ÷zÏ‚ì“rÕP¬uŸ¢'÷ñaãê?{Fe¢¤]¥R6 \³flLss6Å•u¢ÖŠ»\®À¥Ë7ðÍ÷[ðἘ·`%¶þü;bãJ>Íσ¬ -_Îþ/_ÎþGDT¾1rrXAOO׌ì× §}éÒúY@üý/ OkWŸl0`›Š®$LŸÎFœŒŒdó§fg³Aд9~œ¥iiɆhØí÷âEÕœ•u÷Rñ¿]ûñçã°™cøPoôìÑ Ã#±vÝ/HIM/QªéÓœœØ:!­_Fµ2غ•MÜ®›P`Sáuè¬^­™x¡>1s&0d³¾ÌÆe/É$±©óöåiB›YL»ììÞ͆¸|™ ÷+“±±þÿMê’šJe¨aâÞ¿_Ì~oÌŸ‰¡oöÃä‰#1súxäääâ¿+7Ë,îAÉkMåáÓOÙé쬦uãF6Òßÿ•l2ŒºÆ/¿°¡‰U““E£=“Ñúõ¬Rbk ¼ñ†&ü»ïغgO6@Zšf”Ì„„âçÖ¥²NT¹¸7÷l¯nºó‰uhß›PìþðöÛì÷øñìÿéÓìÕ¶(¿pEbè8Uulmüü˜ XZ²™›ìì OÞœŸ¬Yæm31añ}|€³gõãæåßÏjk&&llô7 »Tç¬Z6o.Ú^áálìu;;6žù¤Ilb‰×IMfÏfo.Wÿ8†X²„åW{‚Šò^_íóÙ¼¹èë¾p¡~XaùÍÈÐü.ìm3&†­fcÕ[Y± =TðxUSÆjJY'j¸¢ € h$¬ùã™nØÀD).N3Yò¢EÌßüÆU÷ªúÞ{ì•Þߟ½¶ËålÚ¶«WuãI¥l<ð/¾Â˜xK$lRŒ7ßd¯ÿÚÖ†Êâffj&pÖ¦aC6¨UiæÐœ0‰dJ KóàAàóÏuã(Ìųs'{C+éx,[¶°üÖ†1àµçÔ-ŒîÝÙú§Ÿ4Óä}ý5[ÛØÃ‡×Ÿ²NÔbq¾Ë&mÙ£ظ¹¹¬V°ñ¿ssY­¦_?ö»²\š7øä6—¤§' 9¸wMKV¯ª~~Qž1ƒ½¶gf²†æuãþô|‡ùOSS™pwìÈ„sÑ" +K#ׯ³ß_~ÉüÀb±á¾ûŽ=,ÂÂJžï°0ö‹ÙC`ósjsᛆNuŒ´4Í,P\náóΟφÉýøãª½9TeN{ZBUØëå±4µü;˜;$)‰ùØ[´`bëìÌfóª dM(ëD-÷´´ >ú/lm¬Ð³G§bã3ârYË=ÇZóœØ6Õ8Ø¥E{ÂgC“?«05eµO++ï?.Žui[½ºìé–Õ$ÛÝ»»v±×vss6_¨¶pš ÄGŽdhm ´iÃËT.Um_ÕÈ7`«%ÚÚ²©Û,,*æZÇæ‰up`ó}ªÐžÄüÓO™UÓ *ú=JTüðÒ~¨Ú›CUæø|ý°ò”Ç–-þa®&¥’5Âì¡Ü¼œ““Õ¦²NÔRqÏÎÎÅ–Ÿö //sf¿ A1Ǫ́ ‹XÌ^M¥RÖƒ@õªZž‚dbbx)ŠÍ›Ù§=qtE¤[÷ï³õ°aÅû>ÃÃu_óUtî¬ùýò%[«zDôï_9×[{ÎMÕ¥~Ýíâ¡õò¦êÚª-è..µ÷F*M-ÿñcæoÏÍesɪæ“ýçvÝåòúQÖ‰Z(î99¹Ø´eââÅø`ÎÛhÚÄ­Ä…òÚ5æ201aÏÀ¶mõ§ ”]|Zn¯ž™·oë†kwÇS5Šªº–ªjòk|}ò¤ê®Cj*óñòùÌívâ;ÇÉ“YŸoÕ E¯³e ±uyQ½ i?##K¶öC²<øû³uŸ>š°>Ðü.Ï×Àµ©¬µHÜÕ‡÷gOA§ŽmJUxd2æo7ŽýWù”®?iüx@¿û.߬,Ö`ùº¸ÁÖÇŽ1_}z:Ï 4µa//]!9p€Å‰Œd½2¢¢ w‘i»Âd²òûYc5ÖÖ­YÃ\ÎUÿü“‰}a|õ³ªGIyPõ×ð@×vEak«û ‘HX¾ k.KK¶>x¹Ö22t»f6mJÂDÔ0q߸yž¿ˆ†g³&HIMÃù‹×t–â‹YJu£ÇdzuQ7~]cÉö• üñh‘ˆõcÿäݸ¾¾lâi…øðCÖ Ú¾=ë1cjÊzÝp_]áE‹X99™ÅiÖŒ5¶ê-cȧºxqùý¬Mš°õýûì­£m[¶ôí˺hj÷¯,TQïÞÍz©Œ§y«)ŒAƒØ5P]KKÖôz[GI™7­ïÝc åVV¬§Àl¡r]Dy¨Ð9TŸ¿ˆ„GD";n´²b=bV¬Ðí§Þ¥ pô(‘G˜ûgåJV“VuO¬l¼¼˜˜‡†²ÆrUƒ9À4aaÀß®¹/[¦o¨<¬_ÏÜCÿüÃÊ×ôéÌÞ©ˆÎ\¬ç²eÌV™™ìAÚªŒÇåËÙeÇàáCÖÎÒ¤ ûVÀ×·ê>b"ê6œÁ£z+ý~Ý ¸xv¼O¯²ƒÛ:4§+P;–=`† a. &l»vsç²FGš<š j`Í ŠâÔ)ÍÛIZs%$h|×õé H܉:Cÿþl̛Ç٢ó ÉÑ ¨EDù¡É:ˆ*㯿Xƒd‹ÌÃã1ß³jø[Õ qAPͨEXXkײ… ª¹A$îA‰;A‰;AAâNA¸A$îAD!Tx?wÿkA¸â±8RiÌÌLÑÌ£†éw÷†dq‚ ˆÚ(îñq‰p´·C‡ö­`$")97n#$ô|@OQÅ}â„áza]:·Åº ¿âò•˜á>ž¬NQÉT‰ÏÝ£©;@"É"‹AÔqWMâáÞˆ\2AUA¥ &•@’™…\ç/¢qøè¿pssÁ }ÈâAµUÜ<|ŒŸ·ÿ¡þod$Äð¡  ÈâAµUÜ›4vÃGs§B©²²²ñ$òþùäX[[cåʕՖq  MÑÛÂ:c[q ÷6ç#éŽ ï<²¬¶|¤§§ãåË—‹Å¤FDí÷‹—ùô%„B¤Ò‚í“ñL¡ö&£è²Ì\þ¸þ‰{TT¬¬¬ª5„ÈŽU Ñ›ukþÛ”09nȪ=öööxçwàèèHjDÔqOJNű¿Ï¢mÛÈY¢ý’ïjn¸.ËL`bÇ8zñéjU=¾7!#T2cÇŽ%#µGÜ÷þq<Ó¦ŒÁî=‡J¼Ÿ4Só[%ì†ø½q`Ø1s<=&ÅóK÷¡tÿÖžý]€Ì—rpصç¡Í#4èË×IÓ¹NÝùÝž¡ˆƒÞL}Q†'¤0²æ ï&pèRz³…††âСCxòä òòòô¶;v ô|£!!!zaª¸…qåÊüøãhܸ1¾þúk˜›—nBòkŸåâé©NXׯh5ÓÈàu(©ÍT׬ë cÌ9Ûž¬,=xèìk —7tíZÒëVšò Šgh_ï>/›fçÎ8}ú4öîÝ ‘H¤ÿ6š‘éÓ§cذa˜5k`Ë–-¸|ùr‰®ë˜1cЮ];|üñÇØ½{7îÞ½ ///Ì™3ÆÆÆê¸yyy8tè®_¿Žääd˜™™A&3ü†’——‡#GŽàêÕ«HNN†H$BçÎ1yòdØÚÚ–ù܈:,îþׂ‰éÓÆÁÚºt7ŠRQº®k‹s©iì‹<,…±-}YWçßɆø–¦€Ë󕈿.C|€ =ט Ù/9%Tq  –<¤EÈá??ÒL%¬ãöwyh<\¾)«ÙI%JtZl W>ŽÎB^ª]–²ZåñÁYH‹(½ïÿܹsP(øúë¯áææ5jæÎ‹äädŒ1BWû÷îÝ»agg§VwîÜÁÆѨQ£2 ;tüÔ?-üºè½m•ÒféåpèÂC¯u¦e+qvJ6¤J„ýš7¶š–麕´<¼ÁÊPÄÞ|Ü^•§V^qOLLD“&MœœŒ³gÏbøðá°´´T `ƒ Ôû´mÛmÛ¶U?‹÷ØØX :³f͇ÃÁˆ#0kÖ,ܼyS-îçÎCxx8æÏŸþýû«÷ŽŽFHHˆNz§OŸÆ“'O0{öl :TÞ¢E lß¾GŽÁÌ™3ËtnD͠»BþáÇ^-§M}«JNÀÕ[€îßšÀ؆÷¡¬Ñ/;VSs{öªqÖÕG€–Ó…Z²Z©×J“Wn %ÄAºâÓâ]!8 Ë¥¥FD,--!•J+Ä!!!X»v-ÜÜÜðÍ7ß”YØËJilfÖ€ ïÝf°pç¦5îÃØuK¼%/×u+Iyà±…Ã^˜j)OÍüýýqøða\»vM]ë''§2Û×ÝÝ]-ìÀçóáêêŠÔÔTuœÿþû:o‚…qõêUXXXè½z{{ÃÜÜ·oß®²s#jAÍ=èÖ}Ü Ç»Sß‚uézy”µFåÔSs—:÷âcò} €£[“ûŽ<ýT¯ÿ«Û‡[`Æ ,ôi™4i°iÓ&L™2&&&¸rå ž={†¾}ûVÀÛR:V¯^ >Ÿ•+WV¹°—Öf¹Š4ÉÂÕ1r“åºn%)•ƒƒx<žZÁåráïïaÆ!99<e>†………ZØÕ53.J¥ÆÆQQQpww׋gˆ˜˜4mÚ\®nýŽÇã¡aÆxúôi•Q Ä}ÿ066BZš'N^Ðò˱څ*lä½}U5¦×kT¥Ã„º[)7,0Ú¾}n%wÄQ5j=zôK–,Q‡wéÒsæÌ)wúVVVèܹ3Ž;†ƒböìÙµªÊr_=´\,qÝ •‡Ê€ÇãÁÞÞ‰‰‰HMMÅ“'O0xð`œ9sb±ÉÉÉj‘¬L Àç—¬0k? ;§štnD5‹{fV6ñS nW…÷JÖ\H^(ô>‚Jº«ùoÕ¬r æ©S§““???<}úpqq)¶o3‡Ã)ö&T1uêTÄÇÇãŸþµµ5ÆWk aÂMÖhjÝŠWe×M»r+—¼r~Ÿåì쌤¤$B$aÊ”)¸xñ"®]»†”””*q[ˆD"¤¥¥é ¾¡¤ììì ¥R©SÓ—Ë刉‰««k:7¢šÅ½°/P7lÚ‰ðˆÈ¡Z‘4ôàáÎ|D-À£}R4)@vœ·¾ÉS»ì:T®¸¿|ɾÐêF´’`ii‰—/_B*•B(û X°`–/_???ØØØ`À€eʯÜÀˆJ¹&¼,~iÁÉT"/E ÿ=_ý1Qó)Â*»nFÖwDøž|4[¥ŒÃ‡£S§NøôÓO±iÓ&ƒådíÚµðóóCpp0üýýaooqãÆaìØ±:>ôÒžQ3à Õ[é÷ëNÀų{à=xz•ÜÖ¡y½0ò† píÚ5üôÓOpqqÈd2¼xñ«V­‚\.Çï¿ÿ^çí ê3ïÜ‹AûÌèî#ˆJ„Æs¯ÙÃìÕ'Ýë§ìîî##£u]#‚ ·L £iÓ¦ˆˆˆ€¯¯/ºví ‘H„¬¬,"!!AgÈ‚ ÷ZÂÒ¥KqøðaܹsLJ\.‡¹¹9š5k†iÓ¦•©Ñ“ ‚Ľš‰D˜1cf̘Q¯íPÞ^6A”ò¹A¸A$îA‰;AAâNA¸A¸Aµ˜ ïç>ë}ßB·mÚ°"sS„ ¢Ö‰;8:Ú¡ßÝõÂMŒÈâAµUÜm¬­0л7Y— ¢š Ÿ;A‰{É(((@Jj:$’¬ÏJAT•â–‰|úŸÁæK hÓº9Þ=NNödq‚ ˆÚ(îÍ P*•ÈÉÉÃã'Ïtá‘ørù|ØÛÙÕ ‚ j›¸wìÐZçï^]к•'þ·ë.] ÀÄ ÃÉêA•L•4¨vîÔ˜L'‚¨+âž!ÉXˆè&‚ ˆ:!î …GtëÚ,NQT¸Ïý÷?ŽÂÎÎYYÙ¸{÷!â1h`´nÕŒ,NQÅýöäææÃá@$2ƒGÓFx{òH´láAÖ&‚¨­â¾uóJ²*AD5CÃA¸A$îA‰;AAâNA¿º3’ø¨Öíæ‹ Trˆ2ÑÝݧÄqmZÁj!)‰Ts'‚ HÜ ‚ w‚ w‚ ªIZ"r9¢‘‘WmÇæ×tãÜþt%R‚Cƒ/-WZ ™ Ï÷AÜ…+È'ÃçìQCôøe]ùž<tF[O˜‰ PÊ‘•›Žkþª±våqù+dÅÆój1 fF–¸ñ7rò%t·VI1ÏppýB¸z¶Ãˆ÷W‚Ëã‘QŠ 7×&&¹5:/ÃïàÈf_tì? ý'}\7Ä=++—.ß@HhĉÉÈˡP(ÀÏ[¾©Vc‡®Þ‚„K×429$ž–;ÝöM¼ÑÀV3â%Ã…¥YÍœ/ÖFÔž.Ý`-r¿·~)6¾­¨8.ì,]•ø€T¥HOŒÅÁõ ‘#IO`—CF)ÿ¾X¹r%z"/ϸFçU&͇R!Ç­s/4BŸ·f×nqú, [Úƒ¬ìœeèì¨Xµ°;|-æNx\d?‹*WºfÆVjaMy„ð¨(• ˆLjæ\±–fö°µp)qüè¤p˜‰ú””¥Hqì§eÈ‘¤Á½U ù8ò–Fpp'\¾Ü¿VäµiûžÊB˜2^:‰Ø3—‘/ßÌv];ÀcÆ$˜:;ê¿"ee««„½B Ȫ«„ýu†uûð0êž'Ü4vjVnì)~:èg½¸WBÿ„›}k¸Ø5ˇ8ý9BŸ_†L^ —¾‹­'ÜZÃÂÔ<®ò|då¦âFø1½t åK…*í›x£¡î4Úy.‡‡ÆNíáb×fF–P(åHÏNijø»Hʈ*×¹•„Ò¤+䣉sGØY4„™±5x\¤²<¤Hbñ86Ùyé:é&Kb"‰ESçNÉ¥¸ÿì¬ÜáæÐRY.î==ÔÌx;4´kSc ÈäR$eDáqLÁöŠÜl ncí2݇Oƒ™¥þÛ‡£lÚ´¬Yã‹/ÜѲe8Ö®ýC†œQÇMN¶ÃúõŸáâEoûŸ‹Çwü‘‘Š;Ž çˆi…–å#ÇÎàÂÅëäÓcF®9âʾÌjÓº9D"s(•ÊWÆ+Þ‡¨,(ÀíOW"-,BKì ‰«Pàî²ÕHº«+HÏ@üù+H º ¯íkõ^©TTÊÓ±$çV:y Ñqí4°i†Y>Â^\щ׮ñ¸Ú·Ô òa#jPæcçI³™› ź—¸¼ZŒÔ9<ØY4„EC„<¿„è¤ð2[eØLdj‹¦Îtö3˜¢m3ØY6Ä÷ýP Ï×uc‰ 37 ¦¶èè1|žY¹i°0µCK·Þ¸þà8à ‹çPØ[ºi]¸Ø6‡½e#\pHOàÞ8‚ü<ðFh×wx‘ç¶sç,ÞLÂÅ‹ÞxüØVVéziϘñÂÃ[ꘃC¢:­Ò¦{çNgøû÷EË–á i‡É“÷##Ã-[†ãþýöX´h#‚‚ºA¡àbÔ¨ã8sfˆzߤ${ìÛ÷Μ‚  nzB\¢JbÓ-Î_|±kÖøêzÒ­pûvÄÆº*î"k{4ïÒoœCÈ'Š÷ó®A&“áÜ…kå÷ uîÅ'$1C&§à«¯7aÎÜ¥xÿÃeøú»-ºu¿È}_9­ö¦Ó& ÿñßÑÿØo°l®?ƒSì¿‘t\>í¿üÞ§ö¡ÛßAhm i†O÷TÇ=Ûÿ-œíÿýü›^˜j)kmqX·Ôµoí0ÕRD&6ˆŒ»ƒóww#Y p²n¢WcW {tR8þ Ù‡³w~Å•ÐýxuM'î¿·Á¿·Axt€^˜jQñ(&þ¡ûếØ|º;¶U ûƒ—Wq.x'üC÷C’ÃÊB+·Þàó¥>·Ê²Y~A.¼¼ ÿ°8{çWœ¿»[ýðòM`oå¦_À3ÂãØ Ü{zNçQôMÜ{z`aj hhßö–nP(åŽ<‹³wþ‡áÇ_!ßž.Ýôòû<,àÖ¢C±¯ê´F¯^×ñø±'‚ƒ;ÁÚ: ¬_ÿ™:ŽƒC"~üñ„„´ƒDb±Ø3fü¦7m±Ó&<¼%æÎÝŽÄDÌšµð÷ߣ˜nzº¾þú+üùçÛê8«V-…Ÿßõƒ v3g†@(”âàÁ‰ÈȰ„¿_8:Š‘œl‡¯¾úZËåk‚Ü\¬[·X/Lµ¨(Mº¥±ÃÏ?³{z̘cˆ‰iˆ¬,sDE¹áÌ™!h×.¤ÈëçÙ©/ÖÝ59îE¡ñ¼ôŸÏ‡w¯rß*î™’,À‹1ˆC©TB¡P ::¿îÜÀ {…î÷ª±Ó¦c[x̘¡…B+KðÍLõãžc51ç}áЫ+¸>,[x áP6nGòí{µÞWŸúbnBZ‹¤Œhu S›FŽmØÍ”%FÈóKÈÎË€L^€¬ÜT=ŠB!‡B!×yƒQ…©–²ÐÀÖ N{ŽâÈò‘™›Š°WÕn+kó¥>·Ê²YVn*^ˆC™“™¼Ò‚\D%=Щm¿Î qˆú-¢’¨ÿs9ÌGÞЮ9«x$?†8ýù+×”Xýà°³tÕK71*`ïVüÜÂnnQ8}zš5{‚ŽïbÂæÎ¹zµ:N«V1þ´m ‘(‰xÿýšã%:L{Ĉ“ضíCØÛ'aܸì²õ²Q¹ÒýøãŸÀãiÊÔœ9¿ªÿççöîe5Ø)Sü0rä …Rtíz ï½·‹ÕbÏTïolœcã<ðù2½0Õ¢¢4é–ÆB!s%ˆÅŽˆu©i\]£1xðY4iò¬ÈëçÔXãæLŠ-<îø±CñËÏßaì˜!5Ëç®xUà;vhÑ£ÁÉÑññblùéw¤¦¥ãÌ9xuë`pßœèØWâÞ¦Øãd={ùª ±ÿ^ÒÛ.MËPÿxö»!ý‹G¿ü®VT5]wÇvhéÚS'¬"HËŠ/Ö¥$2±c…-ýEµ=„ÌM¬_å7A'<#'QýÛÔHTês«,›€“MS4²o 3{øFà€S¤›M&/…ÿW¹{ÀÕ¾¥ž›¬°‡Wn&se˜šY{nÍš=¥¥¦\{xDÖ#GÆbÇŽ÷Ü iiÖP(¸:î C  ¹‡¼½/"-ÍZÏŸ]ÚtE¢Ì"ÿ37n[Ào¿ÍÀo¿ÍÐÛ.;–Ñ=\¶t‹³Ã²eßcÑ¢è /¯@ØÚ¦ ÿ˘:õŒy¢ÈQÿï¿~€4.È©kÛ·ÏEÆ1¸{·#zõº^®s«¬tíì’‘à_ß5X½ú‹V&4œŸo#£ü I·¤ôèq=z°ëûäI3|ðÁ/¸tivíz[·Î+t¿Ì´$Í[ŒuÕ|àX¡U¿í[î݈ÛwB‘——ˆGOá•5µkWøøÔVmÙ«lÂ¥ëÈ|ö9± ^º ¹‰Ézqí½Xo‡¨£§óÏEHÓ2 Ï—Bš–Œˆ'Èz]£D]*Ë}åÂ`¯fNÖMàæØ¦ÜéÆ¿ú°ÈÊÜšøÀÌØ |ž"¸;¶3œ—oÒÝ©øø@ã ÌÎf²‰°µMAHH;,\¸©ÜçVYé¾ùæ¿€­[ça÷‘“c ±ØAAÝðða+½}lmSÔ¿·l™‰ÄiiÖ ô*Wº%aÙ²ïqá‚bc]m>_€yì퓊Ü762L}95nYh¼#ÇÎ`îÇ+pìï³5«æÞ¿_\ ¸„„$üò«ŸÎ6k+¼5ºðF‚ÆFA|%Ò Þ[¨·lîŒG‘º¯Ö3&#åvò’’ñ`ÝÏxý£x™“a>ÕµÆJBÚs¸Ù·‚«}K؈œajl‰|iŒ…åû˜áY|0­Üaaj»æpyÕ¨§â…X_4’$QÉ Àç ÐÒµ§º½Ðôs³ËzûiÇÕî—ÿ4.Î60š£ûhãþ†z›\!Ãýg— »$ª‰dI ­ÜÑÀ¶™úËâœ| dr©Î7 ¥åql ì,]a"4G»Æô¶?Š Däko0Í:öADÐ%¤ÆGAüò1yšþ­[]áè¨ûœ6m/&MÒ´ùø\ÀÉ“#°ÿdìß?™ÝWŸÃÂB‰Ä¢ÌçVYé~ûí \¸àƒèhWucçëÛ[µz¨6hÐ9ˆD™ÈÌaÉ’°dÉ×׫~îeI·$¬Zµ«V-5¸måÊ•EîÄüù®-:ÀÄLTh¼ÛÒÈHßÅà¾^°´ÇãÂÚÚoôõÂò¥ÃÒ²ð“²hÞ¿õ…¹»+8<.L:£Ýò…pòé£רÞ=]÷q#`êâ.Ÿ=£øf¦°n× –-š¡&u ©O!WÈ`$0ELRn=>]îteò<<ŠÇ±AÈÌMU·äæg"&9¢š{.#Ž#Y ™\ %”ÊòZÆ/j¥²\\p/Ã+Í‚R©€T–‹¸Ô'¸þàN#gM ôùeˆÓ_@®A&/@\Ê<>`i™.W[Ûôésµ\é–„ñãÁÃ#¦¦9àr°²JÇÀçñï¿oª»†"):ÏC™÷¢ËÀñE£"»Brê­ôû•õé¼xv¼O¯²ÍÖ¡9M³GÔ+^Ÿf/üæœü• ¨7î“5hÒ¾§ÖýÑBícöö¾ˆ |È€µíiö 9þ\õâž=„kó˜´äÇJûð±RkîQ!…RËç_ÜRÛiÙÝ-½¼™»kç÷HÇP¨C\Ü¿qÏÂÄL„7ßû¢Ê„¨ã¹õC>ÿÂÐöÿ×Úóá Iб‘aøkÃ"ÌZå_@¡–sëÌܽx|¡ÆÌ[+;窭$Ñ% ˆê…/4¸?À­e'ô›ð! {¡ew85nñ ס¡gûª/Wt ˆšF]¨—#SsLZ¼Y/\{¤C¢vane‡i+~­¶ãSÍ ¢.¾Vwlš×*ƒ©D´’"ˆÊÊXmÄÖ¡fäƒjîAuw‚ w‚ ‚Ä ‚ q'‚ *† í-3ë}ßbãìܱ†¬NQ›Ä}âÃ3¸+•J=vÆFB²8ADm÷Þ†'=ºu2™ >ÃÅ ‚ ª€J÷¹+•Jœ½º"<"_,ÿ»÷²/×ãîݘ8a8:ul]'(yö Í&MÂØ«WÑtÜ8@ôÅ‹êíÏŽEüµkà è½aÆÂgï^ÛÚ"?- ¡?ÿ¬Ž;18ƒƒÑñ³ÏôÂTKeçWEú“'h={6ÞºzN=z°x.”é˜]ºÜF»v!?¿):ÛTÿÇ?ssV)ppHÄ?~‚vH, ;bÆŒßIIö8sfH¥_×Ý»gâÌ™! ¥8xp"22,áïߎŽb$'Û᫯¾&!ꇸs¹\Lœ0-[x ?_Š€w––w÷†èоU5¢K¿~èºbŒllà6h ;.N½ýù‰÷áÃáÒ¿?¸lÛ´AÓ±cñê¸<##ðŒŒÀáñôÂTKeçW…Û Ah¿`Œmlàܳ' /%¥ÌÇUÕÞÏŸˆ¤$Ö&óàAkÜ¿ßÔâ ­Z=Äüù[жm(D¢L88$âý÷w¨·'&:TúuÝ»w`Ê?ŒyB¡]»ÞÒ9‚¨©ThƒjZZÖmüII©<¨/:wj‹‹—®#0è¾_õV,Ÿ[«:gDG//õo§îÝ1îæMa²Ò?f5øcÇðìØ1½ýË#˜•‘_v5n4ÿUQ)G»É;ïìÃ’%? ?ßNÄÇÿ¤®µ{xD¢o_øGŽŒÅŽï#8¸ÒÒ¬¡Ppu\&•Mhh[Ào¿ÍÀo¿ÍÐÛ.;’‚õ£æî·ÿ8Sðö¤‘?v(š4vÅì÷&aú´qÈÊÎÁÅ‹×ë¼A9<„""‘:¬ '§è}8œ•ßÊÂÆ&£FW»b”JþüómÀôé{tâ®^ýÆ;Œóç"%ŶJÄüu²²Ì‹¹n4$QOÄýÁÃ'X×Gmzöè€}àT1²¶f®†Y³ðöƒzËäÐÐ"_!•¦.zµé¬¨¨m •KãæÍîøë¯ xù²¸\Þ}÷wx7.x{_ÄãÇžÈÉ1Åõë½Êÿ0{%ÈÚ‹ÈHƒqíì’¾¾k TrôUßz‚¨óânbÂüÁ1± :á/£b¦&&õÒÈ úô<öóÃÓ£G‘—’Y^òRRŠŒ§OõV÷Õ£}ûP•©D‚”½‡FFd$ÖØùäàÁm Ÿ psc yó¶ :‡† u{ ©ºK:8$ÂÖ6!!í°pá&ƒiæå«2_/L[°<`ûÇŽÁöís ¦ûæ›ÿ¶n‡Ý»gB,vDNŽ)ÄbGuÃÇ­HAˆú!îƒöeµ®Í»°ÿà œ;ûžÀÆÍ»ÀápЭ[ûziävóæÁÔÉ ²Ü\®X£}ûâ¯Îq´o_œ4 ÑçÏëíãÔ«fLàînØ€C^^8Ü£ÎNž¬Žã:`àéÑ£85|8®-\c;»š]ภ^/€nCªöC`Ý$mmSнûM$%ÙÃÂBb R‘«^T,^¼N/ `ãЬ'L‹7î0œœ æõÛoWÀÕ5ÙÙfxï½]prJ€™Y6œœà刣Gß"!ꉸê‹æLA#7ܸy‡þ‹À ûhîÙ‹Í©Ó=fŠÂÔÑo:„Ó¦Aäæ®@˜›Ã¡sgضm«·± ìÚ§= ‰Àárade‡ÎÕq:.^ ×Á36FnRšŒ~ú«×4fÌøMíÑöÃk³cÇû1â$LLr!ebÒ¤èYîáÖ¯ÿ cljI.âã1}úœ:5Ü`\—XܹÓ n‚‡G$„Bæ³° OŸ«èÚõ)Qcá Õ[é÷ëNÀų{à=xz•ÜÖ«GE­Ÿ5¬u¼æNA¸A$îA‰;A‰;AQ—à“ ˆªz”ÕÜ ‚ w‚ ‚Ä ‚Ä ‚ q'‚ HÜ ‚ ˆÊàÿ¨™ë6ÍIDAT¨÷t"4€%IEND®B`‚scribes-0.4~r910/help/C/figures/scribes_test_template.png0000644000175000017500000002030711242100540023274 0ustar andreasandreas‰PNG  IHDR"ІGbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ   ²•Ó IDATxÚíwX××Ç¿K]:X¨‚Š ±¡hˆX°  ` ‰ ìDƒ5VÁˆF‘h°‚ ¬ˆ5¶øªH0v£±  iºçýƒ°².*ì.(x>ÏsŸg÷Ι;gνû[ffQá!†a˜Oˆ tsÿ®R¦_Ë™éO8ê_úé1„*Hf­>Ÿä¸Jz†a>5,D ð1 ð1 ÃBÄT<"‘<ÂÂÚGý^íÎ/7¯+ùK¢ü‚üº.¶-ìaÕ 16lÚR¦ý j›À ¶ :vé&‘Ÿ““S kÔ6GO®!œœ‚§N#;;»öì«6çuæb"ºx/‡Ã®ä*ŽŠ<;9ú;–, ÆÃ¤$™ö¸výþ½wÖVV€ƒ‡Ž //kFÔ©c†1£F"áâEŒ3ªÚœ×¥¿âTü?\Á_rèÚõ;a&%ÁÚÚJ¦2Z4·ƒºšöí{ÏIÔ®ÝèÔщkFÁ, X€ãG¡e‹æ ¦ú‘]3[4jØÓ~˜‚ÃöËT†®®.ºv킽ûÒ32ðÇ™ÿƒ÷°¡vîý¾Am\¿qSªŒ}1`PÛK–ÊäCñðÑ£Ç6|Ì,ëÁÂÚcÆODNNŽ„í¼‹Ð¥› Ì­ ¶‰9Z´v@À’¥(,,,µÌ-‘[amÓ ›Øáì¹óX¾uêÖGÛ¯:àÁÇoç8rs±0 Í[µ…¡©l[´†ÿŒÙÈÌÌ’»‚Í,뉇ÁµM0Økx©v"‘¿…o@ç®=`jašFf°¶iŒNÎÝ庿FÀ¯‡Ð¨×OP·Cǩ꿒3${ÇGCÐx4Vl9U‘§`Þy:„ÍǣϸP<ñªT[¿%QRyÅIJ–øÛL Ú£¯§BÝn<¾„‰É²õüËqn°lÃ1tòú5ü j;F_OÅ€Ékqë)Rå6êõ¶Åþ ƒ¶~°ì2o<À¢°CÐn5 §ãÌÅD™âPÙ¢ÂCHÖ;« ¡¦¦ °jÐ0gÖ øx{•j_òÎjƒÚ&èèÔü†ÀgÄh$\8‡S§N# p)þùû:ŒÍ,ÑÑ©öíŽÂž½ûà;j,ÆŒ‰% $Êì5‡Á¥„8XÕ­+“5hPYY/ÐЦœ»tÆÉS§qæÿÎb„ïp.Û6oÕ::Áª®%D$Âá#Çpñ¯K˜0n Ο+QfýzÖÈ~™÷ÞnX¾-šÛ!99îî½ñ[øŒ9‹¢  nýpãÆM ø-,ÌÍqíú ìÝ· ÚàÄÑCÐÐй‚×oØ„‚ÂB`Þ‚EèÕÓ[·l”²óŸ1ëÂ×£s§Žøª};…B¤§§ãö?w°cë–rW?=oÞˆÐsÔ/øýü-©íF5uñ×îY03Òÿ¨ q=©œoG„/ò’ø~ ºµÊåCɲkêk!#SòBdiZ‰GBUE¹ÜBTÖsûÐùÕÔ×BâÑE0ÐÕÛÖÔÁËœ|¼Ê+(e42Ç•Ûo§Jìm-‘=³Ìq¨’wV‹<¸tïMMM8‹½ûcÐÛÕêjj6®®½P£†¢wí–è}de½Àñ'оƒL"TLbâ]¸÷qÃþ=јY +q&r*ŒjêâiÆ ,X+µÏ­ÿ¥ O—æH>„žN¶€§¯IØä^YÜ+«<­¿T^q’ÇÈÈÌÁ>xüÇR„Í xœÿ+ÑÃ(/e97˜;Þ Ñ3‘ùç ¤ÿ¾ýÅ>=+9*HÍÈF¿î-1g¬kQ;»„†wÃÜñn€ëwˇ*!DŠ@CC½zº`ÛŽˆÿ3ú÷•²QWSÃwžß ãÙ39úvùyÿ(((ÄàAò=+gÛ´)–.^@ ؆ mšš*y¥úo{zF’’!9%ÆÆFHKO—*³~=kôõp‹uýzÖè××Cüýõë×€è]»Ñ¨aCâaR’8µkÛpî|\¥Ôƒ‰±1nÿs»÷ìÅ›7oRææ}E¾îÝ}º4‡šª2ÚØÖ…ï€¢Öá37¤ö15ÔGdLjë¡‹CC@Ú³—6BuUÕU¡R¢gRœWœäñz:ÙbKàp˜êÃË£ÝÛ‹ÖƒT™ãQ–s€yzÃÞÖz:¨e ‘ž$„ç]&uF }-ñ÷†wƒþ½¦ü‚×rÅ¡²PÁg@ÿ¾îص{ ÑákÇRm¼† Æš_×aëöèíÖ °k÷^hjj£Oo¹Ž_³f ±È£¬¬ ‘H$þ^XXˆÅAعϞ=ÿøÜŒ™™D™ï~_%oÿƒ¼¼<4oÕ¶Ôr2³²*¥V­\Ž¡Þ>1zügÌF—.Ы§ \{º@UU¶žïÄ¢«ñÆ=ç±qÏy©íÉiÒçÖØÚ:Z¢ÆùŸÐÉþ‚Y|€îŽMÄõ¥)TCÚùŸÚšê2ûRÖs‹9y¿î<ƒ‹7 #ó%D¢·6¢RìkéJ^Tjë),_”uéÜúúzèçá%¥Ò;i ÚÀ¡mœ8y ©©©‰D8w>ßz€––V…û8û§ùX¾=ºwC_÷>ÐÖÖ,YŒ›ÿ-s¹$¡aCÌ™9£ÔíF†µ+¥¾jßW.Æc×î½8tä(ÄBô®=¨_Ï»¢¶ÃÒÂB¦‰êvÇKfE£(jhWJ=,Ûp Ó‚w¶q¨ÖB¤¦¦Š{‰·?jçí5ñ&`gônqeðÀÊy…IÔ®]¨gmí‘›%z6¿­ß W¹fffÈÊz^={”ÚcªLttt0ÜÛ Ã½½““ƒ5¿®ÃâÀ /Gèªå.¯Ž±î=JÇô‘.Xò}_ÅÏ+”ˆW~Ák¨«©TºŠ&xÃ1€s»F›7uŒ pùÖC8 ’«ÜÏ=rÍ¥§§‹S1999RyŠÂý7ôôt±?梢w¡®¥%¾jß®R•——mm- ±8xè.þ%W¹ÎÎñäɬ߰é³jZZZéë#×ðеc3@è¶Óˆˆ¹€ôç/‘“›¤'ÏqìÜßrûXròKÄI¼x™‡ŒÌÄ]ù·Ò|P4Ù9E7óÖÔAM}-\»ó~Qr—+kæ/Z s+,ZøùöˆÚ´ï •·|Å/X¾âÀ½Ä[ uV(â›ý¾¾hùy†ÿ´JëE8uøÇ~?Ž‘cÆ£iãF8söâÿL€žž.^½z%s¹Sý&#æÀAL›>¿Ÿ8‰vmÛ@¨¡—/_âÒå+عYæ²ÃÖþ&þ\PP´¼{ïþ}qþØÑ#ß»¹ Es;˜™™A("33‚’’† ,Óñgé…½Ç/ãñÓLxùKß2P¼Ä.+Ý›ˆ—Ù\¶?.Û-UvEû hº¶oŒ§®aûÁl?˜¨oa]m!^¼”ý‰Yã¶ù [‹Ù3§Wï¡Yy6t0Â×o„ŠŠ †TiÇý%d~øq:>‚ÃGŽÂ©Ã×8yì0ügÎFJŠìo444ÄÉc‡±di0Nž>“§NCYI †F†°kf+—Ï3gÿ$•wëÖmq~I!ÒÓÓÑc¿###……¯¡¯¯‡6ööX¼Tæ^§q-]$DÏļÕpèÌ ¤¤eA$"˜À±U=¹ëDOG'7}Ë÷âüåñ"'ºšhRÏ´Ò|P4kçH“ñ·¡¢¬ŒÞí2Ývî ä"Yã0j¤/Ö…oÀ˜Q#*ô¼åº¡±¼(âU±‡Á`¯áøf@?¬ óyÂ¯Š­š|ª«T(55?Θ Ìœþ#·æ“—_ö׎”¼§‰©âB´80¹¹¹ˆÚµéééX»fêZZrí1ŸÊlû¹ÍA±ÉAðÏ!ÐÔÔDëV-±~]¾vüŠkŽaXˆ*—çi)\SÌg÷r¿*–a˜/¯G¤_˘£þ%PkÇ  ¢Ï="†axhÆ0 ÃBÄ0 Ã0 Ã0,D2ðúõklÚ7÷~hܬ%šµlƒ£ÇáÎDŽ,Ã0eF®åûÉ~SqèÈQ8up„kO>ˆÇ;wðý÷ßCUUUbN)77VVV¥–%ë>>زe """ààà îùúúJ؉D"4iÒ¥–#ëRú?ü€U«VÁÍÍ žžžÐÑÑÌ;×®]ãÖ̰½KûÖ€ôŒgÕ&XNNN¨W¯vìØeË–açÎppp@“&M$ìÌÍÍ‘™™ www…®NEFF¢Aƒˆ‰‰‘(wõêÕΉD"níÌgK…=â±#*Щ£Sµ –@ €2220þ|¤§§Kõ†ÀÅÅÉÉÉX³fBŸ—— Ú·o.\¸ðÁý qãÆ äææ*ÔŸ3f@SS³gÏæ_#ßo+*<„º¹'s³æÌ…tuu¡¤¤„ÌÌL\üëâÿL@o×^X±<JJEz§_KrHRòÂÒ–˜e½¹±d¹Åx”\Î.YnIÛâå{[[[±À¼ëÃãÇaii @555¯äädòðð ---ÒÖÖ¦>}úÐÍ›7?z‹Â«W¯ÈÏÏÌÌÌHYY™455ÉÖÖVîåû©S§’P($^fäBîQyx·GÄT½¡©¬"3Ì'™#b†a!b†…ˆa†…ˆa"†a"FáðŠÃBÄ0 Ã0 Ã0,D Ã0,D ð} ‘H„þžƒ`Õ 1¬4æÈ2 SùB´9"—._†P(ä¨2 SùB”ôè‚^Î:¢u«–U†a*_ˆfÌú ªª*XRMÞMÍ0Lå"÷;«wDEãÜù8ÀÈÈ#Ê0LåöˆRSS±80N¾Æ7ýûq4†©|!š9gˆ 9’ ÃT¾ˆ=ˆ'Oaæôab¯€eFvdž#š· ZZZxúô)Vüòöµ>LqÞ”I8Ê Ã|™_ž_Ö›ï%Þæ—ç3 £ÐQI)Éa>8w>î½Û†aÞ…Ÿ5c†…ˆaFEÑFnÞÀQe†{D ð1 ð1 ÃBÄ0 ÃBÄ0LÕB…CPUp˜Ï Åýá&÷ˆ†á¡Ã0 Ã0,D Ã0ÕRˆ† @ ‘>†H$‚‹‹ ôôô[ª@ @×®]«}£ÈÍÕ¨2¾¨aÞ¼yhÐ jjÐÖ~ {û‹Õ¢||6ÀØø T»z{¹WÍ>ô^¢Ä[ס¢òþC|L ˆd›•:t(ìííaaa¸sçÎG÷yôèŽ= ؾ};ÜÜܾ¸«Ò™3N˜7oΟÿ yyUãÿé† ÛŒ;Þ¾O«°PýÕºZÔÇÖ­ƒQP †ãÇ»¢AƒÄjUo "°¶ª‹ÁƒJå+++p¿ñg???ØØØ`ìØ±rûÓ£GôèÑ[&!²°°ÀäÉ“??¿/²{|éR+œ:Õ¹Êø{ûv#±õï¿!!~ÐÓËÂ;6Õ¢>¾ýv'ŽqA—.'«U½U˜™˜˜ÀÇÛ«ÜûM™2EBˆÌÍÍ%ò*›+Vð`½ ï þüË/“`jš Õfh¶e‹×S—ÉÃãÌûFFFBYY­ZµÂ³gÏÄù¯^½Â¬Y³`ee555XXX`Ò¤Ixþü¹\¾æç«# `5º uõ|¦bèЋ7låŠEV–žøs±•ƲeSÑ©ÓiÔ¨ñ ªª…02zŠváÖ­·Ó cdžA hiå 'Gëa{(+¿@@X¿ÞW"ÓѬÙuhhäBO/ ]»ÇÑ£=dŽC§N§¥b¿bÅ”÷LmTL½‰DJX³fâ¡­ý**¯alüÎÎ'*îGBÏÓRdNúúúäÜ¥3ݸòݹu2ž>~¯í‡@ÎÎΤhœ©hºéý„††RHH-]º”»»{™|ŒŽŽ&eeejÙ²%eddˆóóóó©}ûö¤©©IãÆ£   8p )))‘­­-åääÈp& ×¯•©[·cT22zB™ˆâüÆÿ–²õõ Û•´ýP*¶-%Ë®Y3]ÊÞÒò>¨JØ—'…„L‘ò¯´ô¾sªY3ž=3 "PB‚½8?2r°ÄþAAÓ ÒÒzIÙÙÚDÊÏW£ΔZ®@ ¢õë}dŠCÇŽ§¥¶‡„L)×yÉ[o~~Ë?Z^QR ¢’ÉÈȈú÷ëKñçÎT!*&;;»ÌBKªªªÔ¢E "" !eeeŠ‹‹“È_·n ÐÐP™„(,l Djjù´s§'eeéÒ™3ÈÈè D£F­-µ‘ö鳟’“M¨gÏC>•hP¹¹BÊÍRpðTñ>Åyũض<>¼ëÇ!ôø±©¸ €èĉ.å òü‰@sçΣ„{ÊÌÔ£´´Zäë.¶Û¾ý;±ÝUˆzö<$±óæW òöÞ(ÎûùçïÅ¢³rå$zöÌ€®_·¥–-/@¤§—)­òÄ!?_Mó QEÕ›¶v6D}ûî¡ÇM);[›îÞ­GÑÑ>_!Ú¹-’vn‹¤[#hݯ¡4j„/Õ®]›ÌÌÌèÊ_ñÕRˆŽ?NB¡°T""²··';;;ºwïžDºyó& OOO™„¨]»8ˆ†ß ÑØfÎ €ÈÜü¡TÃ75}L/^èÄ V ÉÜÃ(%ýèÙó‰D"åähŠóýut… Ñ»é±ÝÊ•“Äù+WN"€HE¥RSkèÆ¦bÛ?þpÛ¶n}‘"w÷}eŸ=ë(¶?t¨§\qø˜UT½÷ÚÚ·?OññmÅþJ§ÏHˆJK[6†“¾¾>ùMžT턨iÓ¦¤¥¥E:::”ššZª††¡è‰ÀRS·nÝd¢â+Õû’²òk©Fìì|¼Ì ¶, º<>|èÇ”–V‹ÒÒjI\µËšÊÓ íß߇zöÔª•.³Ba^Ñ’¯Êk©¼Ò&ª§M .S¹5j<ƒ»û~DEybëÖÁ?>Û¶ x{o’°}ó¦ô[SD¢·ë?%ý«ˆ8TT½ùù… ]» Ø´É'OvÁÝ»õ剨(OÌÂÌ™‹«ÆªYZZQp «å*[`` úõë‡Õ«WcñbéJ177Gff&ÜÝÝááá!•Úµk'ÓqëÔy˜>=D©TP &_c(Ñß×p+ÚE< àì|wîØàÕ+Mœ;çø^{_ßõ€ Ú!*ÊXBII„aÃ6KØYX<\¼h/‘áÂÛºmܸrþÛ¯"ê­}û8¬];‰‰ p÷n}ñ½LÅñüì…èÍ›7ú¹h9±?j)D°··Ç¬Y³°i“äÕÒÅÅÉÉÉX³fBëêz:C‘ž^ 99ZHJ2DZcÝp?XŠÄ}9/^è"#£&ââÚWšŠ&;[`h˜Šš53píšÄr÷»tíz\,2'õv»w?&þ!Ó»÷ÀÞ½}6™™ú¸vÍS¦Ý‹fmý/Úµ»Pnóò„âTÌë×*RyYosçÎÇ™3NxòÄ99ZjjíñΘ1ššš˜={vå/ß=’Σà¥Khºÿ4jÕª%Ð’E >ºj"NÈÆÆF"OVJ–accCÞ[nÉüâå{[[ÛRmßÇJII!sssRQQ¡ƒJ䛘˜ruu¥Å‹SHH-X°€z÷î-ët¥¤“™Ù£2MÐÊ2G”™©WêòrIûòøPžyŽŠZ¾ïÝ;FÊÇúõIW7ë½~Í;OÂ~çNO)›ÔÔÚdnþ°Ô…¹têT'™â Ë$¼¢ëíCÇŸ;wÞ{çˆÔÕÕ ihhTþdµ™™éëëS5¨~ýú4ð[OúýÈÁ2ÝGô¡ ݲN0¿oR¹¬å–×öÝ õ«W¯’ŽŽijjÒ… ÄùIIIäããCuêÔ!RWW'KKKòððYˆˆ@ÉÉ&4jÔZªS'‰”•_“@ " ‹4pà6¹…ˆtõªõêuôõŸ“’ÒªY3:t8#aSV>!JN6!W×XÒÐxE::/hР­ôô©¡xÙº4¿îß·$@DQ”—§^jÙ))Æ4fL™›?$UÕªU+ ˆ¦«WídŽƒ¬«Š¬·o¾‰¢úõIS3‡éêf‘£ãYÚ¼Ù냓ÕS§N%¡PHþþþånÝ‚¨ðêæþ]¥t“õkƒ‘y@È!`>3÷ªX~g5óÉ)Ïãï[cª6,DÌ'GC#·ì×`âžau„ze†{D ý†{ÒÚxWHIDATD Ãpˆ)s¿CÀpˆa†…ˆa"†a"†aXˆ†aXˆ†a!b†a!b†…ˆa†…ˆa"†a˜ŠâÿmHщá8IEND®B`‚scribes-0.4~r910/help/C/figures/scribes_popup_menu.png0000644000175000017500000011377111242100540022621 0ustar andreasandreas‰PNG  IHDRjµŒabKGDÿÿÿ ½§“ pHYs  šœtIME× 'ƒâ› IDATxÚìÝy\ÔuâÇñ×\ ÌpŸ¢‚ ¨€ (Þwfjš•µjýÒ²Ú¶ìØÍjÛv·¶{k·kµÌípË´ÃÊ#ï[‘ûC¼@î›f†™ùýŒŒ€âUŸçã1˜ï|¾Ç|ç;ïùÌg>ßïG¢ÓéÌf³³ÙŒÉdÀd2Yî·þÛºÜÅ÷«i-·ßAø­H$H$’6÷[ߤR©Õ´–ûòö·u@wÚí•ï(¨EH ‚ ÂúB ·Ô­ƒ¹å“É„T*mêÖAk4Û éöîwà-µò‹kÙ‚ ¿õ n]{n]‹nïoKXË/éÖ{ñý–i…÷¥j×-¡-‚ð[ éŽjÒtË}™L†¼%@; é–¿ßZO猪}©6kA„ßbmº£¾ø™L†T*Ål67ר/no¾8¤Fc»ÓÚ ðŽÚ¯[7‡‚ ü–´4s´×}q-ºu“GK`[ý˜Ø:€_ÿè<¼\(+­bT_±·A®±!á‹.Ô¨/®-{z»1€ô”&O¿_ì1A„kh×¶ÏhjjBzñ-a-‚ \ƒi{½6ŒF£Ø;‚ 7«õÅM ‚  Ôí…µ ‚pƒÕ¨[÷¥5jA„'¨åíµQwµF­×ë9yêL·6¢²²¹\ŽZm€_ßÞ(•Jñê‚ ´õÅÍ-'·tÅÉSg¸ó ŽÙ`hžh6‘2Ô9.ÁØØ€É ¦"‹¾> z÷ö¾°Sñ‰iüwÍ„…¯Ž `4/œðrq`wUTøpÖ½ÿ.¦ÊÒæœÖëÙðßOùËáÞÌœÿ<Ý@"¹™Û^eþ-jî¹cfs Á¨+e飝РÂE5êû1Ñl0`ª,ÅXVŒ±¬˜¦Ò"L5Uhì¡_o3~0Èúõ– q³ÙˆI_‰IW†I_ޱ!³±¶SëZºl|ôE—Êtfž+YßõZg‹ââ²N-sé²¼üêû—,÷âKï\Ѷ÷äóÔMÍý¨;àŠHÀ$•€¤ùüöÒ¢\Þ{õvJ‹Obljn1"Åh’4F".ÚÔM»v楿½Ûéò§OP^QÕîcç ‹),*;UzІï¶t;ߌF#R gºç™Œ˜u:Lçof]#ètȤ€IOFÌǼ÷î‹|òÞÃTUQS£Å¨oD‚³IÙl€«ÔQ‘¡ Ôïš¾8×j™Y94uòwwwW’’ÓÛ}Þ^ÈMJjê®^·¼¥ËVÄc.¶L««ÓòÝ÷¿œ’AC£Ž¾}|˜?oŸ¯ý/Ow«²-;zûŽý—”£Q;0jd³fMA.“]·u.]¶Âj}«W½~Ù}>|(Û¶ï§®NkU{.))'¿ ˆ»ïº­Ý nhhäçM»HHL£ªºG†áaÁÌž5;;•UÙšš:¾ßø ÉÉ4êôôëׇ»çÏlw{t:=›¶ì&>>•ŠÊ*45a¡AÌ™= û‹–+7³ä” Þ}o =²¸Í{¦SA}qHW ÀЧ~O£¶Ì`4øúK G³ŠÐh4T–– TʹѽœÈ;‹«+¥ÅhµZn›É°Þ ÎæftéS¦¶NÛí¦Óéyý­•”•U2eòh<<\IJÎàŸÿú™LŠ—§{›æ…'N2ib4Î.ŽÄǧ±y뚌Fî¼ãÖë¶Î¥ÜÍŽ]9}º€¥ÜÝ©íÂÖ_ö’”’ÁØÑ#,ÓãÒP;Ø3( msMc£Ž7ß^Eaa ãÇGÑÛׇ3g سï™9<÷ì#¨T¶hµ ¼úú‡ÔÖi™2i4®nÎ$%gðÖ;·Y®Á`à·WRZZÁ„ñ#ñôp£°¨„½ûbÈÈÌá…¿·,W~ ²³Oòæ??æ©'– Ñ8t½F}%#±˜MFôZôõu ‘`j2`jÒ³cÇžýÓŸ4[¥ ãGG1rä(\\]Ùµm3µzÿú迼øàdê;½¾´cÇyòé—»½³vî>DQQ)¿da¡ÁŒɪO¾&.>¥Mù¦¦&ž_ñ{zùx0zT+^xƒØ¸”NõÕXçȨ0âÒ8}º€‘QaÚ??_\]œHLJ·êÄTBCƒ-9¿¸íl~!=x‘!ç§Fп__>ùt[~ÙËso`ûŽý”•W²üñ`yžò5±=Ïm;p® ˜ÿü¸åy„†ñÆ[+Ù¼uóçÍïnáW%?¿Õk¾á©åK.[Öd2µ­QwÈ, H¤`5€£„êêjÔv¸¸8Ñd¨§A߈—6¶6ôêÓ—“§ (È/âlQ9zCçkòú÷eö¬)>þο>½äüqñ©¸¹¹X³ÅŒéãÛ Í¾}zY‰L&Å××›cÇŽwz›¯Ç:;2æííAÖñ¼VeËÜNo—^½<Ûî“â2 C‡ßŽ:jÿ„›U@€—Ú¨Ífó…Ám¯tÚãÇóö?ßÅ k ˜FÒ32õZ-:ŽâÒ2¤ Õ Zššš¨­×QQVNqißn‹!÷lé5Ýa×£ßöÒW|@ÿ¾h4$%¥BBâ1ÂBƒ‘ɤ]Þî6uPVÒN“ŠÙlÆß¯7soŸ&ÞÁ¯^hHЕõúhÝüÑŽ.î„FN¨Ó5/§É@c‰*' ORTXÀ }Ð8Øa2QÈåœ>{Ž}‡ã6b,jÿ( y?]³æéáJQ;gó•þªÖÙaC•DÂð°!ÄM¢´´œ“§Î^²)ÉÍÍ™ÂÂ’vƒö\a nnΞ§§[»eKJÊÚ]®¶¾¾ÝoG)©™¢O·ð«1::œûÝÑîo@—«ÜI[ó•4}øz{qÇ”IÜ>&š¹ãF3gl4ÃýúÐ/È÷@â’ˆO%.áÉ©ŽM!¿¤’‚üB‚‡fÜä…8¹ô¹f;-"bee¤]ÔÞ»{÷á›nR©¤[ó…Bc£Ž¯¾ù;;[è°lXh0åUmÚÒÆ&SYYͰ¡ƒ­žgyEU›öè]í<ϰÐ`JJʉ‹OµšžÇû~Ζ­{Ä;\¸éMŸ6ŽûÏïrHÃEmÔWÌdÆdhîé!‘H0š0›Ð¸hˆž1 /OV½¾ “Þ€ÉlÂ$‘àÛ·?QcoÁÍÝ¥Ý5ÝqÓ¦Œåhl2ÿYµ–É“š»Ê¥¥e‘v,ÛRã¼YÖioß\ëܶ}?S&é°ù¢M[ÙÀ~8ØÛ‘––ŘÑ—œoÆôñ$&ãÓ5ëÉÉ=méž·oÿQ<=ݘ9c’ÕóLHHcÍšõœ:™'ÇÒ“vì866Ö_ùn½eIÉé¬^³Ž¬ã¹øùùR\\ÆÞ}1¨T¶Ì¿Cü(Üü:Û3¬#=ÔȤH¤²æ^2‰¹L޳³¿¿šå?ÞÜ´"• PÚ`¯väÉgžaöÜEH%®eó­Rißž^Æ÷áàÁ8uøõíÅÓO.åõ7ÿƒB.¿iÖ9q|™™'øaã6†‡[N¿™LJhhÅ6ä’eíìT<÷ì£üôó“ÒÙ»/G†I¢¹mædìíUÖÏó™elüi;1±IÔkðõõfùþ?]gµ\•Ê–çþô(›·ì&1éÅa«T4¹s¦ãåå.ÞåÂož$''Çl0Ðëõèõzt::Ž˜¬„D  =%‡%sîp!dzsxã°ú•¿ÒP\ÔÜZ¯ç›/¿ ÁOÆÂîâûO7RQXNc޼¸3Pç“kod2¸ëîGÛå?ÿz„Þ^pM®G]W§E¥Rµ©EÖÖiyòé—™<)š{îž}Ó¯S„›×®mŸQRÝ«çjÔ‰))<¼âyŒZms[·ÉÈ©¼“”g(8sö `Æl}ƒÚ*-2} 2EMM:þ»úu9rîLeº³Ú;­úû¶qøHo¾þœÕÙAGbèçßóíå×c‚ Üüz$¨ýúö濟½×Kº›AººÝ1jÔpŽçÍ®bìèØÛÛqúLûů¯/áÃz|g_u ‚ ‚¥RyÓ Ÿ5p€O-_Âæ-{øyó. .ÎNL2–ÛnÔéänôu ‚ ‚ú¦6xPêÿ«_§ 77Q…AA-‚ ˆ AA-‚ \/Wüc¢¾¡–œ˜ï8¾ÿKtµ޹—™ËÅžA¸Q‚:}÷j*sc1nR“Žø˜Ÿqô„_˜¸Fƒ BO¸â¦“G 0l4õ§va¨ÊehØ87¾ŽÉØ$ö® ÂÔÍã#6!•ÙPW˜Š½½NÎîœ8¼ž¢S{8ôã"Ú‚ WàŠ›>úEÞNzâ>B£&Q_˜LÍ™X†Fsà-|0ꩯÍÇÁɯG7¼¨¨”í;ž‘Muu-J¥ ¾¾ÞDE†2ftD·®û*‚ð«¬Q‡ÞºÁã8´ó;äÎ(]ü8Sr§¾ÌþÝÃøôLuÙñÝè“§Îòò«ï“ž‘Íèè-œÇìYS‘H$|±ö{>Z¹ö†òJaÃw[®(“®ür‰„ЙOâÜ+˜ÃëÿŒS?9w{¦Nž‹Ì¬ÅîÇZÎnzÃÂ8üþñçyÒë¿Ý‚BÁŸ_øêVC5MžÍg_|ËÁCñ¤¤f$ŽA®»mÛ÷SW§íÖP\=R£náÞ/u€ n¾¶„ ¦ál±·üö•èî͹µë8“µ±GÚ«OæÁÏÏ×*¤[L™<©TJnÞqt‚pÃ8t8V®Å`0\‡5P^˜ÈÑ-Ë䃯¿UqÙœ}ê,Þ¶Î8ÙÛq¬è,ŽP”ó)™±ï0$úz ˜Þíõi4jróÎPZZÞf4ß^^|üŸW­¦-]¶‚·LÀÝÍ…_¶ï£¼¼gÆÁôiã¬>ኊJÙºm/YY¹TWׂD‚'“&ŒbÌè«åÖÔÔ±ñ§í¤¤fRW§ÅÙÉ‘èQá̼èJx:žM[vŸJEeš°Ð æÌž†}«!ãF[~ÙјDÊË+Q©T`ÞíÓqssGº Üä’S2x÷½5<öÈbìZ½÷/GöøãÿÕd2a4­nùeYxù¸PZ\ÁðÁ.$õÀ_©«>ƒÉlKÅ–ÓTþ£„A.>˜L&²*ŠèóF~÷øÒ?h ^½|ȈÿšÓ™?ãæ…­c—Ÿ¬3É)ìÛKÁ¹bŒF#µJ¥M»åÚ´“ꪎÆ&3""„1cFÐØ c÷Þ#”WT @II9¯¼öµuõL?’ÈÈPúôñ!7ç‡cñöö —'Ð<*Ë?^ý€œÜÓŒ=‚èèpL&3»÷¦²²Ê²LƒÁÀëo­$#ãÑÑáD ÇÑQ̓qÄ'¤1jäpŠæÏËÿ}½‘í;¸1Qxz¸q$&‘ø„4&Œ)~ „›ÔO›v^¨Ø–W‘–žÍð°!f–¥õ 7­NÓ35ê‘·®¢¡®ˆÚʧiª/¥±)Gõp¦Í{€‚SYÜø;ü†üŽa"•Ê:½¾iSÆ¢ËùéçÄŧXFÆöõõ&jD“&F·Ù¥eÜ·hcÇD0nL$k>ÛÀá# Lš___vì:ˆ^¯ç™§–ãêâd™wDø0žñ-RR3Ñ|qÿ_¶í£¼¢ŠÇ]li 7&“ÉÌá#‰Ìž5W'¶í8À¹‚b^üóã– â·V²yëæÏk>9(æhúqï‚9–rÎ.ŽìÙs„â’r«ùA¸yåç²zÍ7<µ|ɵkúP9x¡rðBÿÀ}÷Æù3ð§Úšæ–HÌuÇOѧO8Þ Ÿ$9î »¾šÆ€Ð‡è8©Ì¦Së›8acÇF’™™Ã±ôãddäŸ_H~~!ÅñÌSââ|!lÕŒ=â¢ÀÃá# $&ï¯/÷.˜ÍìÛ&£V_&Ël6£ÓëÐë/´-¥¤fâææÒæË{îžÅ¬Û&áä¨ !! ÿÞh4ÔÖi-å¼¼Üñðp%1é˜%¨ÕäåeûÎ„Š«‹ãÆD2îü‡‹ ¿¾¾Þ,}àîN—ïñ|Ÿ|„ÛˆX0mÙ—˜MZ ¥[ЉĦ& }2¶ŠSŒFPH$iq;ùå³wèraKÊ”—ßx™Œ¡C1tHó ¼ÅÅeløn É)|½îg~ÿÈ¢ ÛÕË ‰Db5Ë×¥¥ç?H$44èØµû0gó )+« ¤´ÂÒøo2™,ó–•VØvØ0ÆÁj<Ä¢â2 O>ýr‡Ï¡Åâ…óX¹ê¬ß°™õ6ÓËÇ“°Ð`Æ‹´úÐáæàßå6ê«2‹£õuåÈl¼þòO22OX=&•uÜ´Òà)©™ügåZTv*õgxØ||<п/\ñÚÅ3uj_˜Ífüýz3÷öi—-;xPÞxm)i™;–MFæ 6mÙÍŽ]yö™‡éÓÇGå‚p bÙƒ÷ P(º4ßU jï¾S(+:oŸ45æÑdhÂFa”›Œ(•Z$vƒ¨ªÈÁÉÍ)f¤2r3vâ7ø¶ËÖ¦ŒÃÙÉ‘IGµyL*•âêâD]«f†æÚvi›²ÅÍÛëíÀºõ›pvv䥟ÀÖöÂ6ÔÔÔµ™×ÕՉ⒲6ÓÏæ²õ—½L›:¿¾¾¸¹9£­¯'(p`›²)©™8œïbØd4r® ‘!DF„ŸÊªO¾b÷ÞÃÜ¿x¾8Òá&5::üú÷£¶ ê~ÓÈËÎB¡ @"±Ål6¡×7a6›1šÔ4h«°UI±ÕQRXQ1–ã©GÉ?ÏÑ—?)Æß¿7›¶ì¢¤¤¼Ý ÌÉ9Õ¦í¸¤¤œ´´,«i¿lßD"aÄùÑ¿++«Ñh¬BÚl6óóæ][5}„†QRRNz†uÍ}ï¾ââS±S5­ ¦¤¤œ¸øT«rÙÙy¼ÿáçlÙº€êêZ^~õ}Ö~µÑúkÒ@ÿóxÑãCnVÓ§ãþÅó»Ýs«Gºçµf2™È9—·•­{#&C¦&RLØiúÑXWƒÄT‹K$M¦^¤ÅþDnö¢g}Ž­æ²ëpÔ8°ÿ@,ûÄRZZNuu-góϱÿ@,_óNN–=x¯¥çÇO›v"—ÉHH:†N¯§´¬‚?í )9™3&Zzrä’žq‚¢¢Rê8žÇ†o7“›w…\ŽÊViéKíççKBBÇ£Óé(/¯bÇ®ƒ<ÏäIÑŒŒ kþPñó%)9ƒ‡â¨ªª¡¦¶Ž¸øT¾Ù°…BÁ²‡îEí`Ê–ââ2RR3É/(¢¡±‘ÜÜ3¬ûæ't,º÷vœœ4∄›PpÐÀ6¿‘uFK÷¼ j“ÉD]–êꪪªAÞ‹Séß1pÈTšt§‘Û8ÒXW‹×Q”•#µéÇ‘}[(«´¥oø?0£Äl6cc£¸ä“rws!0p œ8qŠø„TRÓ²¨ohdttÜjõ…³Ú´“aÉÎÁƒqÄŧ P(˜?oÓ¦Žmµ3ÐjëIKÏ&!1Âs%ðàÒ‘“{š)“F#—˰Q(ˆB]­–ØøâRiÔé˜yë$朿î€B!'*2Œ¦&#©©™ÄÆ%s® ˜ À<´ô¼½<,ë6“ÙDFf±qÉä䞦—'Üþ~¾âh„ߘ– –äää˜ z½½^N§C§Ó“µ‘ˆæÞé)9,™óp‡ 3›ÍhµõhµõÔÕi-ËsßÀ¿·‘ÁacÑ–oF!wGßP‡ï ETçàέ4ÊGàÔg!ØÛÛáà`ƒƒ=ööv=öd—.[AhH=ºX¼ò‚ Ü4vmûŒ’ê^=óc¢D"±Ô ›ÿoî¡ô\JNö˨rðî= EéÄîù‚'J09þµkX«yš—acc#^!A„óz¬×‡½½r¹ ©TŠL.CacƒJ¥B«ú+)±Ï£´›Š¾á(©qÉHíÂpø4¶* ¶¶¶ØªlQ©lqrÔàà`L&¯Œ BO5€R©ÄÝ]‰ÉdÂ`0ÐØ¨Ã`ð¦ÒíßÄîy ·`ü†¿†£Ç0r9 ¶J%666Èå²n5¶ ‚ ˆ î©TŠR©D©lîæææÍÀÀÄëö$W¯z]¼Ò‚ Ü´Dç\AÔ‚ ‚jAÔ‚ ÂMÔÇJް|ÛD–o›È±’#b¯ ‚ ÜhA½.ýM¾\tŽç¦®g]ú›b¯ ‚ ÜhA QtPìMA„« GúQ/þ¯í¸ €¥a¯vXÎl6c2ƒL&m¾Êˆ“\A®EPñÅ¿¦ï¹l9Á& ;%ú±½‚ëz&Š#æhgó 1 ¸8;1dÈ fÜ2^ _%‚ê®jlУ´u©3zt Ýêšš:þýÁÉÏ/$"|‘#BÉeœÌ;ËþG‰Kæ©'–Ò·o/ñ* ‚p]møn óçÍèv Bõ±’#¬Nzhnúâ1ªÝruuõØ9¸Rd2ZmNŽ]^ŸÙl棕_R\\Ƴ|„~þ½-ITT(ïþûSV~ò¯üíid2Ñ Q„ëgÛöýÔÕi¯ïP\íõQUS‹ÂÆ–&“ ¹ŠÊªšn­/.!•œÜÓÜ1÷«n1xPFŠ ¬¬‚ãÙ¹â(áº;t8V®Å`0\¿¦Îôú¨¨¬ÁÖÆŽÊÚ2œÔ®Tt3¨ccSJ¥–á®Ú3÷öiÌ›;Ý2x,@QQ)[·í%++—êêZHðññdÒ„Q–!¶ ¹í{Ë/{8“Hyy%*•Š ÀÌ»}:nn.–r:žM[vŸJEeš°Ð æÌž†}†‚á·!9%ƒwß[Ãc,Æ® qÍz}46ê0ØØÚ¢-lÀÃM…Ñh¤±Qg5˜lgœ:'*•m‡eÔjë&•’’rþñú‡88Ø3qÂ(45•UÕ8Ëg_|‹Ric;ñ«u?²ÿ@,'Œ¤Oï^”—W²c×AòòÎðÊߟF.—c0xãí•”–V0aüH<=Ü(,*aï¾22sxaÅï/¹}‚ ü6egŸäÍ~ÌSO,A£é\Óï5ëõQWW³ÙL“© 0cg§¦®®¾ËA][[‡o/¯.ͳc×Aôz=Ï<µW— ½AF„ãùß"%5ÓÔ1G“8Ð{̱”svqdÏž#—”ÓËÇ“m;p® ˜ÿü8½|<-åBC‚xã­•lÞº‡ùófˆ£R„6òó Y½æžZ¾äÚ6}\NUM-j5zƒ½AƒZMUM-nnÎ]Z–D"íò¯§÷.˜ÍìÛ&[Õ´Íf3:ýùíÑ_h7rtT“—w–í;>|(®.NŒɸ1‘–2 iøû÷F£q ¶Nk™îå厇‡+‰IÇDP ‚Ð.__o–>p÷µmúh¯×GQQ›¶í³*wÛm³ÐëuçƒQ‡««›6ýÌÞqÊL——Û%×çììØå"% :ví>ÌÙüBÊÊ*()­°4ì›L&KÙÅ ç±rÕÿX¿a3ë7l¦—'a¡ÁŒié›]T\†Á`àɧ_nÇŠáÄAhG@€ÿõi£néõ‘Qt÷÷=Ä+?àååÆmÓdzco î¾/OoŒÆ&rO ¼¢ŒÁÿq(EÅ…¬ûæ+¦NyÙèçß›ø„T;l>s¦€u61iB4áCIIÍä?+×¢²S8¨?ÃÆàããÉ€þ}ùãŠ×¬æ<¨?o¼¶‚”´LŽË&#ó›¶ìfÇ®ƒ<ûÌÃôéãƒÙlÆß¯7soŸ&Ž•UŸ|Å¹ñ|ÜÜœÑÖ×8°ÍºSR3­z›‚ ŒŽ¿¾ý¨[z}¼¶ã.ÿ©MXOÉ_~†^§§·R©”Þ>~èuz¾øò3&‹ìtH 2ˆþýúðÃÛÈÍ;Óæñ´´,ö8Š»»+áÍ?VVV£Ñ8X…´ÙlæçÍ»0žoú¨®®ååWßgíW­¿® ô?߄ҼËÂBƒ)))'.>Õª\vvïø9[¶îG¦ LŸ6ŽûÏïVH÷Xúr½><=]™86‚¯¾^˽÷,$(`eå¥|õõZ&ŽÀÓÓµKë“H$,{è^Þ~çÞ|{%áÇ2( YÇóˆOHÅÞNÅ#Ýk9+14$ø„4>þäkûÓШ#!!²òJìíhlhÀÕʼnÈ!M棕k2$€&ƒ‘}ûcËåL×\C¿õ– $%§³zÍ:²ŽçâççKqq{÷Å RÙ2ÿñC¢ Íî¼ãÖ+š_öøãÿÕd2a4­nùeYxù4×rK‹+>8¢Ë o^–‰¦¦&l•J\œ5lÞºµ?þ´‘1#CpsuÆd2a6˜;ý‰£RÙ=*¹BNö‰“M&5-ÞÀȨPZzžžjéÁAhµõ¤¥g“˜FṂƒxpé ŠÈÉ=Í”I£‘Ëe„ ŒÉl"#3‡Ø¸drrOÓËÇ“î¿ ?_ 9Q‘a45IMÍ$6.™sÅà¡¥÷àíå!ŽNA®ÈÉÜd´: ’œœ³Á`@¯×£×ëÑétèt:b²61€ô”–Ìy¸Ã…]Üë#Ø}$F£ “©9¨F#&“ £ÉDiiû'2.z8îî.ȤR¤R)2™ ™LŠTÚüW\þT„ߺ]Û>£¤º×Õéõñò„ïÛ”17W™quqdÖŒñÈÏ7I´LﬥËVtyûV¯z]¼â‚ Ü´®J¯‰Dr¾V H$H¥d2Ys‡\޲U9©TŠT*A"•Zj×—ªM‹ÐAu7´w­æ°–!“ÉšGv±´C[“H¸l8 ‚ ˆ ¾B—ëõÑÚ‚ B׉+ê ‚ ˆ ADP ‚ ˆ ADP ‚ "¨ADP ‚ =îª ÅU]ßÄÒ¥S[ßvhtµ‚Õ˃q´“‹W@ázõæØR¢‚}Y:k –³Mføj{›cK¹w‚w·—_TTÊöHÏȦºº¥Ò__o¢"C3:¢Û×}]ºl¡!A<öè⫾ó‹‹Ë¬®ðw-×-ÂÍãª4}MðsL ÓGö#)¯’ ‡ÎòÎw©|µï4Û“ŠàÅÏ1%MÝ[þÉSgyùÕ÷IÏÈftt‹Îcö¬©H$¾Xû=­\Ûå‹=]k»v楿½+Ž@Aø ØðÝ–+ʤ«R£>”Q‰¯§#NvÄåœã̹JbSO2<ØFƒ#j•'‡2*7ĹËË_ÿíl þüÂP·òjò¤h>ûâ[Š'%5“Рö…ËÌÊ¡Éh´šŠßùë] ‚ðë±mû~êê´×w(®‹}{°˜é#’STG£ÁÄ™‚RÆq&¿¨C“‰ÜB-...¬?PܽuÞüü|­BºÅ”ÉcJ¥íÑu£{pɦN#ŽjAø:t8V®Å`0\ÿuî9-5z†ø»²%¡ò*- üñ޽™BUM=:[[¤ [ΕՓ{NKŸ® «Ñ¨ÉÍ;Cii9îîÖÃxùöòâãÿ¼ÚfNϦ-»‰O¥¢² FMXhsfOÃþ2öweÞšš:6þ´”ÔLêê´8;9=*œ™·N² ÖúšÚK—­°\ºµ½6ꆆF~Þ´‹„Ä4ªªkpÔhÌìYS¬†›_ºl3gLÄÝÝ•;P\RŽZmÏȨ0æÌžŠ\\K®»ä” Þ}o =²Øêý{9=>×'[ÎäÊΖãùuää0}¸#aÑ7IÍ­ÆÞAC“ MFŠËj;Ä¥KOÖŒ™ä” öí¥à\1F£Ú¥Ò¦Ýòƒ×ßZIFÆ ¢£Ã‰Ž££šãˆOHcÔÈá(ÍŸY?mÚ‰——;‘#Bº¥¹6íëMÔˆ&MŒ¶ÚÛvà\A1/þùqzùxZ¦‡†ñÆ[+Ù¼uóçµ?mWæýeÛ>Ê+ªxìÑÅ–öñqc"1™Ì>’ÈìYSquqbdTñ iœ>]ÀȨ°K¶kÍ/ä¡ï!2"äüÔú÷ëË'Ÿ®cË/{¹cî-–ò•Õüý¥'ñòr zT+^xƒ¸øTî¹{¶x· "?¿Õk¾á©åK:U¾GÛ¨7)dÔ°¾TÔ(¬l$¿ ˜è@gK;Ú)èLii†&&¤Ø;8ðó‘Â.¯kâ„Q¼õæó<ñ‡ÿcò¤h¼½<ÈÏ/ä»~áo¯ü›ŠÊ*KÙ„„4üý{£Ñ8P[§µÜ¼¼Üñðp%1éX‡ëéʼ)©™¸¹¹´ùóž»gñ·—–ãä¨éÒsLL:Ö<*º%¤›EE†âêâDRrºÕô¾}zYB@&“âÛË‹ÚZ­xg Ä××›¥ÜÝéò=V£6Íü°ÿ,Kïš@ê©j MfêµuìÌ)egBUYwwW F7ŒF36ö.|¿/{&ôF&ëÚ(/r™Œ¡CY¾Ö—±á»-$§dðõºŸùý#‹(*.Ã`0ðäÓ/w¸œŽteÞ²Ò ´)£Ñ8 Ñ8tyŸ–”V0(À¿ÝǼ½=È:ž×f=mڶΰ#Â! À¿ËmÔ=ÔÒJpsQƒDNAE ö6ræN ÇV!C©ak#ÅÖF†êüíû䪙-f©‚i%LõìÔº¾ûáÆ‹ÂÍÕºkŸ§§>¼þòO22OX¦›Ífüýz3÷öi]~^]𷇇»TÀ¶÷˜ÎLnl¡!A,{ð E—æë± þz÷)Ìñ‚:ô3 :=ÅU:Œ&3M&3F££ Œ–ÿ͘ÎgÌÎÿí<Õé >p0g'G&MÕ¶-G*ÅÕʼnºº _÷ÝÜœÑÖ×8°Mù”ÔL:îuÒ•y]](.)kSîl~![ÙË´©cñëÛù~ÒnnΖ´Òç KpssG¾ Ü$FG‡_ß~Ô'ò«)®hÀÎACI•Žêêbwd?‰GwôÄCd%âDêaòÒPp"}cs˜ªœ((­ãD~u§Öçïß›M[vQRRÞn(æäœ²j' ¦¤¤œ¸øT«²ÙÙy¼ÿáçlÙÚñx]™74$ˆ’’rÒ3NX•Ý»/†¸øTìTªV(—¯ý†…S^Qeù±´ÅÑØd*+«6t°8úá&0}Ú8î_<¿Û—¶è‘õºÝ§ððô¡¨R‡®ÉDIa>‹¦`ñôÎóŶ¾;Rˆí@‚RíÁ×»Nñ—ûB.»¾iSÆðî¿×ðÒßÿEäˆaøûõF&“rêtGbqvväÎ;nµ”¿õ– $%§³zÍ:²ŽçâççKqq{÷Å RÙ2ÿŽ®«+óÞ:c"‰‰Çøhå—Lž‡»dzó8“Ø|ßãBŸo{ûæšø¶íû™2yŒ¥uk3¦'1韮YONîizûúpælûöÅÓÓ™3&‰w€ ÜZçÑu ê¼³•äž;EVV&¶ Æ÷¥´´¼¹_¶Éh¹(“D2©ŒÑ|½=›Ó¥z|äJ1›Í—mk <€?=³Œ]»‘••KÌѤóM.Lž4š[¦ÇÞþBíU¥²å¹?=Êæ-»IL:ÆÁCqØ*• dîœéV=%.Ö•yííT<÷ì£lüq;Å£ÕÖãêêÌ]wÎlsÆáÄñQdfžà‡ÛܿĻóËûéç$&¥³w_ Ž “&DsÛÌÉVÏQ„_/INNŽÙ`0 ×ëÑëõèt:t:1Y ‰hîM‘ž’Ã’9wjf³¹Õ­å~««/I$H ‘HJ%–P?„ ‚ XÛµí3Jª{õü)ä‰ä† ÝÖ§k_N˩܂ 7’_ý•ûEø ‚p³Cq ‚ ˆ ADP ‚ ˆ ADP ‚ "¨ADPF£‘ŒÌ¸yÆËwGc©®®Ao0`2™ÄA¸žAm4É:žÇŒ9÷ñá׳ÿà!fκ—²² ´ÚzŒF“¸6² Âõ j“ÉDÖñn½ý>žýÛÛ,œ7G;µqñÉÔÖÖa0DP ‚ \ 6™Ldfàö¿ç…WÞá÷Ï£¼¼LFþ»f5=¾‚ÚšZE­Z¡‹®øò–ž5ÿ!ž}éuYt;e¥¥TVVb2™èÛ§Ž®df@­Q£²µE&“Š‹0 ‚ \‹ n é;~÷?ûW»oùùùhµZlmm©®®ÆÎÎŽ×^û;?ú{öïý {{;ä 9rÚ¿b^g¼½ -I¥RÕ dά©8;;^õ·tÙ BC‚xìÑÅ7ô‹|³l§ W!¨³Žçp×ýäÉáÑÅó(..Æd2¡×ë‘ËåÍ×¢6 èçÚÙ¬¬Ø©l‘J¥Ø(V£H$Ía+•Ê:UãîÛ·—Õ5ž ……¥ì?Kff/þùqìíÄ+,Âu·á»-ÌŸ7£Û- WÔã&Ìæ¯ï¬ä‘Es)).F¯×c41™LFT*555ÔÖ7òЃÿǪO¾"!!¡Ír\]]XòÀ½Œ3’ÀÀTv*rù%Ÿ”³“##£ÂÚLð烾`÷žÃ̾mŠ8BA¸î¶mßO]¶Ûc&^QPOœ³ˆÐÀ4 èt:ÊËËÑh4–€V©Tšš8™_ÂÔI“P¤aâÿ-Be«¤àôiýûk„‡‡pçó<<Üq¤ööÈå².oÓà€v…A¸^N@«m¸ö£ïùñKüüû3:bf³¹\N]]J¥½^ Eµx8;ðõKÏr‡¬ªOòSƒ- ÞZI¿þihÔQQQÁø “ùÃc2qÂT*[T*[ ëA]RÚ<à­—§õðZ ü¼i ‰iTU×à¨Ñ0<,˜Ù³¦`g§êvÙÖê´õ¼õö*ÊÊ+Yþø àÇÒe+˜9c"îî®ìØy€â’rÔj{¢Gçö9Ó8“ȶíû)..C£Q3eòh¦MkµÜ¢¢R¶nÛKVV.ÕÕµ ‘àããɤ £3:ÂRné²L›:–ÊÊj’’3°·WñÜŸéÔv ‚põ%§dðî{kxì‘Å—Ì’ êM?®å/ÿÚÀW?nç®™“hll¤¦¦™L†½½=E¥eh«+Ù¸v OØÖƒÔޤ=ÑO¼Àرc1™ÌHpæÌivÅ¥£Ñ¨ill¤é|óÉ¥Fjë´–û&£‰Â¢Ö­ß„³³#'Œ²<ÖØ¨ãÍ·WQXXÂøñQ–Ab÷ì;BFfÏ=ûÈù†®•½8Üßý÷§Íá÷‡ÿ³ ¿˜£Iè MLš8 Gš={°yëNÎç\a “&ŒB¥²eï¾Ö»77†‡7ð””ó×?ÄÁÁž‰F¡Ñ¨©¬ªæÀX>ûâ[”JFD ³¬kï¾|{ysï‚Ù”•WàææÒéíáêËÎ>É›ÿü˜§žX‚Fãpõƒ:`Ð÷üȰa!Ü}ÛdŒF#2™Œºº:j´lün=·™+0 ¤Vj‰zúï„Ý: N‡­­-EÅÅMÊàЮ­,{p1r™ ™ôò?&¦;ΓO¿ÜfºD"á¡¥÷Xí€mÛ÷s6¿‡¼‡Èˆ–QÎ#è߯/Ÿ|ºŽ-¿ì厹·t¹l NÏ¿ßÿ/EE¥<ñØý èoõxUu /½ø>Þžôïß——þö.ÇçñÊËÏàæê ÀàAýùóKÿ$5-ÓÔ;vD¯×óÌSËquq²,sDø0žñ-RR3­‚Úd4ñ‡ÇîCí`ßfß\n;A¸6òó Y½æžZ¾¤Så¯è„[¥’ßNzz:ßlÞIïÞ½‘ÉdÍMå|ùé*nW¹ÝUA‘΄óè)Œš·¥R‰R©Äd4røp %åTç3th ö(m•H¥—nöп/O-_b¹=ñØýÜ5&NN>^ý5)©™–²‰IÇpuqj¼Í¢"Cquq")9½[ešššxÿÃÏÉÉ=Í£/"  _›mííëc ioüûõ±„4€§§ZmƒeÚ½ fóöÏ[…´ÙlF§× ×¬ÖåÛÛ»ÝîÌv ‚pmøúz³ô»¯MÓ‡B¡ 00€¸ßÄü[&P^VÊšW±fT?ä)‡ØVTKå {û?(6˜ÍfdR ¹§NS^ÛÈ'¼Ã‹Ï/G­v@£Qc«T"•^ºFíà`OPà@«iC‡&<|(/¼ø6?oÚEȰÀææƒÒ ´_{ôöö ëxžå~WÊK϶ÔþOœ8IpÐÀ6ó9:ªÛÔúì/j£j™ÞúÌM‰DBCƒŽ]»s6¿²² JJ+0šúâ&"ºý¯RÙNA®¾€ÿ.·Q_QZ&“¢²µeã÷Ÿ“Í—·àããÿÞÿ̇<ù ©•õÔ ÍÖ|Cãùž!R‰½¾‰Œìަ§º¬ÿ>89jpp°Ga£èVW'ôïK~~¡U ´#?Ö•²-VO>±„ýû²uÛ^ò ŠÚmŽé®”ÔLþò×wØw ¥ ÃÆðÀýwòÖëϵÿ‚v°ß:³‚ \]¡!A<ùø] é+j©Tj©UÙú ™ÙgYºt Ëÿ}ã·a6›Ií=Œþ½¥R‰F­ÆÕÕ‰TBqY•u|ÿùüí¥?¡Ñ¨ÑhÔ¨T*ä2Ù…›ÙlF©´±Üwssn·»žÙlæ\a nnÎÝ* 4 À,Z8€Ï>ÿ¶G/çÚòãèk¯ü‘‡¼‡9³§2"b2Y×zÄ\ííáÒFG‡óèà »Ü5úâZõ¡½;‰Šˤ?Üþö1¯Ø à–gÿŽ“£#uµµè‘J%˜Œ&róN³m_õµUøû÷ÁQ£ÆÁÁ¹B~E!]SSGÞɳµújLyEqñ)VeÆ&SYYͰ¡ƒ»U¶µ^>žÜ2m<§Nç³s÷¡{q++«Ñh°µUZ}hü¼yÆ.†íÕÚNA:6}Ú8î_<¿Û-W|Q¦Öµêœ”Ãd…¥bËz4r 'ju¨]}º€Õk¾±ÚFÍ €~Ì|d"Þ^–ÇììT<÷ì£üôó“ÒÙ»/G†I¢¹mædìíUÝ*ÛfgÊå,úÝí¼ó¯OùâËïyúÉ¥W¼oï[tvv*’’3HHJÃÉQCøð¡<öûûørí÷¤gœ@§Ó[5õ\öE¿ Û)ÂÕ#ÉÉÉ1 ôz=z½N‡N§#&k#!ƒHOÉaÉœ‡/¹ ƒ¡‰:­–·ßþGU¨N¤s¸Q©%xôĈ±Ø(mÐ×£ÙÌëÏÿž¿ÿíYB‡ ¡—¯7în®ØÚ*»ýÕ@á×f×¶Ï(©îÕ35êæZš {{;2³N`{Çx¨©`”ÙLï3 Œ3{=Gb“¯@[[Í+/?Gàฺ9£V; P(º}‰ÓKY½êuñj ‚pSë± –H$(är”¶J”'Ž1'­’‰ƒúr_ø þw$Ž÷ÿý“'¥¡¡“É„R©ÄÙÙg'ìíTL@¯ "¨¯0¬¿^»’©Óïäí7ÿÊÐ!A$§Ãû½ññöD§Ó£Óë1›Í(ärT**•…B!š<A®EP·Ø±mƒåÿðáÃøü¿ïc2™QÙ©0›šÇLl$@*•ˆA¸ÖA}q-["‘МÅ2±ÇAºHTeADP ‚ "¨ADP ‚ ×Kü˜¸ÿP"Ù9'{dƒø3nôpñÊ‚ ôdPgçœäÙ?>ß#ôö;oˆ Aèé n¡Ó5v{ÞækHÛŠWDájuwºyà³x5A®UPþù]*¿páï.9ÖÅ–.[AhH=º¸GÊ ‚ üæ‚ú¾ûw¢}áf2™»Ô‚ 7“ ßmaþ¼Ý½êšvÏke“%˜/ÜL˜Í=?~_Td(ƒõG‰ ×Õ¶íûùì‹îSzÕÚ¨;Ûü±`ÁK`÷´—,Gˆ 7„C‡ÐjXöà=]àöªõÂ…¿³Ô¢­o´ æ–ÚôÕ ê‹Û¨—.[ÁÌqwweÇΗ”£VÛ32*Œ9³§"o5²·N§gÓ–ÝÄǧRQY…F£&,4ˆ9³§aßj¨w£ÑÄ–_öp$&‘òòJT*A˜wûtÜÄX„‚ ´’œ’Á»ï­á±Gcg§ºþA-•J[…¯‰äâ°³YbÕ r-MF§70iâ(œÕÄMfë/{ÑëõÜs÷l o¼½’ÒÒ &Œ‰§‡…E%ìÝCFf/¬ø=*UsW¯ÖýÈþ±Lœ0’>½{Q^^ÉŽ]ÉË;Ã+¹\.ŽNA,²³Oòæ??æ©'– Ñ8\Ÿ n \³ÙÌ—_®½dÙùó矯U·tÑ»ú**«ùûKOâåå@ô¨V¼ðqñ©– Þ¶ãç ŠyñÏÓËÇÓ2ohHo¼µ’Í[÷0Þ bŽ&1p ÷.˜c)çìâÈž=G(.)·š_ ?¿Õk¾á©åK®}P_ÜÌqï½÷´ÓÔÑñíZèÛ§—%¤¡yôrß^^K϶LKHHÃß¿7µuZËt//w<<\IL:f jGG5yygÙ¾óáÇâêâĸ1‘Œ)ŽFAÚåëëÍÒî¾>M&“ÉÌí‡2ôµ êö¾jÈd2«õ—a0xòé—Ûßi­Ú²/œÇÊUÿcý†Í¬ß°™^>ž„…3n\$.ÎNâˆÁJ@€ÿõm£n Þ¯¾úºKóÍž=›kufbgú1šÍfüýz3÷öi—-;xPÞxm)i™;–MFæ 6mÙÍŽ]yö™‡éÓÇG™‚ Íͧ׽×GKzþüùíÔª;ªM_ø{£pssF[_OPàÀ6¥¤fâà`@“Ñȹ‚bllDF„@\|*«>ùŠÝ{sÿâùâèÑÑáÜ·èŽnÛ£'¼´œ¼Ò<`­‰DÚê&i5~¢©TŠL&=¿ÑWç„—î ¦¤¤œ¸øT«éÙÙy¼ÿáçlÙº€êêZ^~õ}Ö~µÑú«Í@ÿóµwq¹oA`ú´qÜ¿x~·òîáµumù»ï¾»dùY³fZ.ÈÔÕ6êüüB¾üßí>¶èws¯èyÜzË’’ÓY½fYÇsñó󥸸Œ½ûbP©l™Gó‰®.NDŽáhl2­\Ë!4ŒìÛƒ\.g¸(q„ ‚ÀwÜzEó÷pµÉª©cîܹí4sÀÅ?4v'¨ËÊ+Ù·ÿèU j•Ê–çþô(›·ì&1éÅa«T4¹s¦[õù¿ûæãêêDl\*)©(•Jú÷ëÃ}‹çÓ·o/q„ ‚pÅ®jºm¯Ž¶ÁÜ ^½êõn•ëh¾ö®®go¯â®;gr×3/½åræÝ~ ón¿EM‚ ÜøAíìì|Eów¦GÆÒe+z4ÌA~AíïçË{¼Û#ÔÇ×[° BOõ„1#ÐÖ×ÓÐÐ@C}# Ô74¢ÕÖ£ÕÖS__O]CSJìíí°··ÃÎîü_•-*• {{;Ôj;Ìfs·¯Û*‚ ‚º2™ÚÚAìQA„&:ú ‚ ˆ ADP ‚ ˆ A®—ù1qÿ¡D²sNöÈ ðgÜèáâ•AèÉ ÎÎ9ɳ|¾G6èíwÞA-‚ÐÓAÝB§kìö¼f³¥ÒV¼"‚ W3¨»Ð-jA®QPþù]*¿páïº|õ¼¥ËVÔëj,³#ÅÅexzºõè2®åö ‚p“õ}÷-îD-ú­åª{¿»vf÷›YùÑ?®ë2A¸66|·…ùóftûÒ×´{^s(›Ú¹ê5ÂËÕo§VW IDAT–™•C“ÑØãËˆŠ eР~â]!7˜mÛ÷óÙßb2u/ç®Zug›?,X`uÝj¡û\²@ìA¸A:œ€VÛpý·mmáÂßYjÑÖ7.ÙÅÔ#A½tÙ fΘˆ»»+;v ¸¤µÚž‘QaÌ™=¹Lf)[SSÇ÷!99ƒFž~ýúp÷üöÐéôlÚ²›øøT**«ÐhÔ„…1gö4ì[ ÷ÞÙõ·¾žöÒe+¬.ÛúÿìÝw|W÷ñÏÌíE½˪–»Ü{ìıFB!,e z',ð°°», [€'ÈÃBØlB;Á‰K—Ø–{•‹ºt¥+éêö6óü!ûZ×’5;Žý{¿¢—£Ñ™sf掾÷èÜ33mm¼¸aGžÄãñ‚¢PX˜ÇÊë³l鼤õ«c°1ê`0ÄóÝÈî=èñô’–šÊœÙÓX{ûª¤ÇÕäø !Fgï¾Ã<òó™?œôû÷¶µªªýÂWAQ. kÐu%id¬vìÜK8eå ‹IOKaû޽¼¸~‘H„{ïY €ßäû?ø9^ŸŸU+—’•AíÞÃ<üÓÇÔFùᥣ£‹ëW,"/7›Ö6›6oçð‘:¾ùЧ±Ù¬#jÿþûîáå¯Q_ßÌý÷Ý“X×åró/?ø9N§ƒ®_Ljj Ý=¶nÝÉoŸø,3óçͼh …ÂüèÇ¿¤µÕÅŠ ™P\HCc3¯nÞÆá#u|ãëŽxû…csüøi~ô“ÇøÒç?Fjêðî8:îAÝÿ[¿ûÝï/Zöî»ïæüóÇÞvW·‡ï}狉g.Y<‡¾ùCÞܵ?4/½¼…Nw7_øÜ}LŸ6 €åËðدþÈÎ]û’Ç•^ÞJKs;ßþÖç(*ÌK,ŸU3•>ü(/¼ø*w¿ç–µ¿hálví>@}}3‹ÎN¬ûòÆ×ˆD"|åK_ +3=±|þÜ™ü÷fßþ#‰ ªŽÁÆÅ›ZùÄÇïeÁ¼š³KçQQ>‘_ýæIÖ­ßÄ]wÞ<¢íBŒ]SS+¿~üO|é »üA}á0Ç>pï CCÕÄ’¢¤Ï *ÅEùô¯c†îÏäñgB\Z³j¦¾ý³>Îõ¨ï¾ûîAzÕCõ¦Ïÿ{9äåeÓÚêØûtuX–?`ꔪAƒÕétŒÛv=ùÔ_ÉÈHã;ßþA8Áb1YÇ…ìvßøú§xîù—ÙS{ˆM›·“–šÊÊë—ð®ÛnÄá°ÉoïJ]]F‰D"D"Âá0áp˜íGŸ¥f^5‡öÕñ±;>9d%¿þ¯§ùúWÿ·Ûý³:sÿï‹‹'ò“G~ÄG?ønye„×¼~‹ËS4¾=ꌌ±}85ÚYý/©¾˜þ—k !Ä;ŸuYi1ÿñ³GÆeƒJŠ F¼Ž°B‚ú-\¿l>þ@€`0H0" †ðûøý>ŸŸh,†ÅlÆá°ãpرÛÏþk³b³Ùp8줤ØÑu]æô !ÄxµÁ ’šâ$5Å)GT!Æ™*‡@!$¨…BHP !„µB j!„ÔBñ4¦éy=ÝÍr…b”Ò3Š.}PWTËÝׄb4Ü®c—§G=’†„BŒŽŒQ !„µB j!„ B!A-„B‚Z!$¨…BHP !„µB j!„WPP‡Ãa”L&ËÑBˆ+-¨Ãá0ޝÔ`LÇ;nõÞÿÀCüìOŒ¹Ì¥hW!Þ1A‡q~µÛû¿†â„ô¨…bTŒ—¢Òs!m¹ë³ „QPõø…¨s"ñüÙħ¬@™·ƒÁ ¯‚B\ΠN„ôí )˜®ÿ=†9ЉÞÛ@¼öa¼§ö»é~ ¹(Š"¯†B\ê ‡Ã8¾XƒùÖ{€Šn]]%Ž¢ÄÀn{!¦¬LÒZ^£gƒFôî‡0›L—tGïà!n»årr²xùo[iw¹IIq°hálîX»c¿ž}o¯¿<»ž½{ G(//áž»o´Þ`0ÄóÝÈî=èñô’–šÊœÙÓX{û*ìv›œaBˆ++¨=/ÐB Ñ5µ¯§¬è GУ]íX/zÜj ‘æúÛfbXú®K> ²cç^‘(+oXLzZ ÛwìåÅõ›ˆD"Ü{ÏZüþ ßÿÁÏñúü¬Z¹”¬ì j÷æáŸ>6 ¾P(Ì~üKZ[]¬X± Å…446óêæm>RÇ7¾þ 6›UÎ2!Ä•5ôñÜm?ãÝ›>ƒyù­(hèDvBÌ šÅèûÓ†,0Õ½JdþMØl—6¨»º=|ï;_$??€%‹çñÐ7È›»ö'‚ú¥—·Ðéîæ Ÿ»éÓ&°|ÙûÕÙ¹k_R}^ÚBcS+Ÿøø½,˜Wsvé<*Ê'ò«ß<ɺõ›¸ëΛå,BŒÉ¸ÎúHKK¡ª²œ?-þ ±ëКv¢uîB÷œAïñ¢÷€îb ¨ XAq€3v€`(4î;wá¸÷Ä’¢DH *ÅEùx½þIJڽ‡ÉÉÉJ„ô9kV_7 þ=µÉÊLïÒ}.˜EVf:µ{É&„¸²zÔ‹…’’¾§êþ‘ŸðÃ_F-è æŸ›ÿ³ÙLº·®TåïÂR蘭mD‘a·c0¨èº>äÏãq-Q®¿ÔTç u’êru¸™\]> \QQÞ€e®Ž.ª'• º ¹=vJÎ0!Ä•7ôÑ?¬ÿÀOø»S_F1Áô9SÈÎÊ  qÒ5 ó>Õ/"ñâZ|ØmØíö‹öÀÀÙr¶‹ö°5Ä€¢ªƒÕ/R.g—âÊú¸0¬§O›Â—ÿ<››MII1•¥L®®¤­ìzÐAQ 7Z…AþøtQa­-.4Môçgê›Ï–Ëñ¶çåeÓÚêØ{vuX–1hY]×iiu‘!g˜âÊ ê Ãzó-Âj± ª*f³™ŒŒ423ÒQT ¨âNŸ‹ÙbvÝsçLÇëó³á¥-~‹ÇÙðÒŒ³gOñvÏ›7wWÏ€7¾òÆ€²³gMÃÝÕÛ”ݱs/ÝÝfΘ,g˜âÊú,¬C¡0V«%égí;PìÐxúzº–¯ Â:üil˯[Èî=yú™õ;~ŠéÓ«±Z,t÷xxóÍý´¶¹ø»{ï 3#}ÄÛ¼fÕuìÞ}€ÇŠ3§›(,Ìãà¡c8x ³9y®÷-7­`OíA~óøSÔ¬OLÏÛ¼eyyÙÜvËJ9ÄWvPŸ k‹%9¤ƒÁ0%½ëhî\ÍáIwPš—; /Æ`Pùâç?Æ«›·±cÇ^žyvÑh »ÝFeÅD>ø;˜4©|”Ûkæk_y€gŸ{‰í;k øƒð…Ï~”Ç~ódRY»ÝÆ7¾þ)ž{þeöÔbÓæí¤¥¦²òú%¼ë¶q8ä‚!ÄØ)uuuz4%‰‰D‡Ã„Ãa¶}–šyÕÚWÇÇîøä¸5ÚÝãáÌ™b±8E…ùdçd]ò+…âfã†ßâò]úõ`2ÒÓȘ5cTëÞÿÀC#^ç׿ü¼âBˆw,ã;mƒ%t…×y—BHP !„ B j!„ÔB!$¨…B‚Z!„µBHP !„¸vƒZÓ49:ä}¤…B tY/!ÅbFŽŸ<ŤŠrTutïë6ìü]GU°˜Íde¥0©²«Õ<îû°nÃNòr3˜;»JÎ!ÄÕÔš¦a4HOϤîÌ*KKGÖYYYLžœ|cþx<ŽËåâÔ©Sôx‚\·dŠ2þ½w³ÅIJZ^O³œABˆwvP÷x<ø|ÂÑq-Žªª  #=ƒSõ ”O,UXÛívJJ º“–æ§àtÚØ¿ÿÝ1r³Œèº µ!$¨“DcQ\n¢Ñ(«•4› Õpö™ˆºŽŽŽ‚BZZg)0aTa­Åc„C½–çf÷=¨ÀíîbBQ%¡`¼ÒB êst]§ÝՉނ3%5ñäoPúþÓé{ª-’’B}S‹‹G= r!ÃÙz4MÃh²ÁÙ ŽÇ5Nœl¦­­‹P8‚Ùl"/7ªÊb̦äCG9v¢—«‡X\#=ÝÉ”Im/‹Sw²…Ö67áH‹Ù|¶Þ"L&£œeBˆ++¨»zükkïúƱAI„ö¶‡ ÂTV”‘‘‘…§×ËñãÇéî °xáT gß'¢Ñ8Ûv&‰R=©’Ô´ ›Ø¹ûø !½}ç|þ å¥deåÐÝãáĉtuûY¼p ƒ"gšâÊjMÓðú|˜Î>Q\×uâZM×Ð5-1ä¡(}=ktˆë³mTm…#"ÑØùÐŒÆpwy9z¼»ÍJee%±ˆ€SgÚðù‚Ü|ój23s{ÈÏK%7'M›·ÑØÜKYI:º®qêt `˜•7¬ °¨˜P ›‚üTvïQhhhJÚŽÓgÚèõXºdåå•„B=ä§‘žfgÇÎZšZ|”–¤É8¹âÊêx\#`6›‰Æ"ĵ¾´B_ÇVUUTUEQûz˜qMćÎÑ8²Minn¦¹yଠE‚ü\,\ŒÑ â;;ìÑÖÖEfF:NGí§ˆÇÃ}À‡ÆÆf¦N© àë ÝÕƒÓa§¨¸„Þž&¢? Óu[{v»òŠ*¼½-DBÞ¾Þ|† »ÍJcS3S¦”ðuÈÙ&„xûƒZ×5t]'¡kš¦k˜ F F-¦ƒ¥o(DÓ4 ºBjj V«eÄãÓ999ÔÔÔœ}ƒˆÓÐÐÀÉ“')--cáÂèZOOC¢'ëó‡Ð¼žúóŸ­OUUÌ'_`˜¼¼\âñh"¤RRöüý¾²Z<šés ]ݾD½BqµŽ¢ÐâqPtM'#-‹ÙŒÁ` ‰à„úÊÅuHX­Vr²Ó ø;˜1m"v»™Žàõö2N%Š¢'­“ͬY³†¬Ó šÎ튢¢Å#»ëƒP•ø…e“Þä ëBˆ+$¨Eé7Ëv;)NF£±oÈCo(€ª«c és4-N4H|?¡0·;––vN7dQ^šz_XÛlfÂá09Ùü _¸1›ôzbg{ÂV<Ï€öЀe6›yв^_»Ý&g™bLÆõ^Š¢bµšÑΆ£ÉhL„ô¹á…«}\Bz(S'a±X8vìáÈùžl~^&^¯—Ʀf¢‘@⫽­;pâD#úÙíÎÏÏÄï÷ÓÔÔ–T÷™úöíååf Z¶¹¥“P(Bqq1š•3Mqeô¨ •Tg ®N7(:¡p8¹1£‡Ãª*—$¤Ì&#Ó¦NdOíqj÷fé¢iÄãa*Ê èèèåõ×·Q:±§ÓŒß¢¡Ñ…Ñh`ÁÂ%ج¼žfÊK hwyxcÛvÊË‹±Y tº=¸:z0 IíU”ÐÑÙËÛ¶SVZ„ÃnÂÓ룱©§ÓÎÌ™5DÂ>9Ó„WFP«ªŠÅj!-ʼn×  kI=jõ2ܯ/?7‚üZÛ:hlñP˜gÃh4°hÁdš{ijjáL½“ÉH^^sæÌ#55Ow}â gÑüÉœiè¡¡±‰H$BZª“+–²}ûnú.Þéc2Y´` õ=45µ ±Y-TT”1gÎ< ðyºäLB\A}n¸#%ʼnÑhBU/Í…·Þ´€¬Üê‹öTg×”±|ù²ÄŒ‹`  £Q¥¢4‹Ó&a¶8Q FtM# àéªOú@ÐhT©ªÈ¦¦f2fK ªb  ³zå|œi…Ä¢¡~û¬RU‘CÍ̳eÕ¾T#a/>]Ë™&„¸r‚ZQ, ‹å’lðù[œîQ°Ÿ£ëqü>~Ÿë-×Óu ¿×…ß›\¶»óäÀ²Z|вBqÅõ¥v®7=Rn×1yµ…Ô—‹„®âZ"ÏLB j!„ÔB!A-„B‚Z!„µBHP !„wcšGÝÓÝ,GP!F)=£èÒuEõJ9ÒB1 #¹pÏx¹B1:2F-„ÔB!$¨…B‚Z!„µB j!„ B!A-„ÔB!$¨…B\A …inéÀåêð³îž^ZZ;åè !Ä0\²§»»<”L(¡­½Ÿ/€Óiïâ²²2éèì!';}ÔmhšNSs-­nz½4MÃj1“““NyY>6«eÔuûý!«œ!Bˆ«·G­i:`€Üœ<"‘Xby8Ål6‹Å‰„#£®?‰±mça9ƒÃádVÍL,XHaÑ›:xíÃôúB£ªûL};[_?€Á`–3DqõµªªATƒH4ŠÏ ³£»ÝA8Â`0Œªn]×Ù]{¿?ÄêÕ7rý 7R^^Ba~*3¦—±|Ù"b±ûöŸFUGÞ«vwõ¢é:陥r†!®Þ ÎÎJÇçó …((($ŽÒÝãÅát°ÛG7´ÐÚÞEwY53ÉÍÍÇÓ݈¯·•P°‡pЃÝ£dB>^¯—@Ø(£Û E‘3DqõµÅbÂh4à÷ûQU•P(œ‰„ÃXmRS£ êÖ.E¡²ªš€¯ƒX48 LUE>wÜ~EE0™m¬Û°“ݵ'”Û]{‚uv&¾_·a'íg?ýÝï~'gˆâê j€¬Ì4¼^/‘H˜‰%%èºN,Ãëõ’šâu½=ii©˜L&¡ÞA˘Í&â±^º;ëˆFú†]Ì')iƒ?ú&+·€šådee°téÒÄr!„¸*ƒÚl6átXñû|ÄâqL&#¡P»Ã†Ùlu½‘H›ÍN,F×µ!ËiZM‹¨î¢ÂlÌæ¾ÃR^^ޝ·UÎ!ÄÕÔ}C <½½}C ·§Ã6¦:EEUUt-vI¶Y‹÷›¥2D]!.㥬¼¥©…ÎŽ.¢‘AŸŸ^›Å±ÃÇÉÎɤ ¨`TõZ­f€¼zB êÑjouÑÜØŒÝjÅh0  ˜Œj¢ûnRUz:»ikn£´²ŒŒÌ‘]ô’žæ ­½›X\²Lo¯ŸÃǘ8!‚üÌ!Ëéº.gâŠ6îCÝ]=456c³Z1˜hñ8ÑXŒ²Ê2jæÍBQbñ8F««ÕÊ©ºÓ¸Z]#j£¨ MÓ¨¯oDQß…ÆæNºº¼X환-)ÄãÇ«û_Œ#„×DP·4µà°ÙÈÈΤjr£ƒÚ׌Á  …0TUW’™Ãj¥£cd÷ýÈÉI'3#½{÷á ìwtôÐÐØŽÓé ¼¼ EQ0›Mtww'õ }þ ž^߀õeú´âªúˆE¢¨f3ù…y454£VÛùíNh:M Í—ÑÕÙM,:ò^mÍÌRÞÜ}’-[wRXCFzß½DÜ]^ÚÚ»0™L¬X±]y)ÈϤ¾¡M›ß /ÇA(¡¾¡‡Ý†ÏŸ<Ûdꛑrøðar³ ÜBˆ«+¨M3Eåè£èšFL‹SY]™øùIJN;‰ÏãåÈþ# ëŒ#ß ›Õ²%ÓhnõÓÔÔL[{#º®c³Y©¬,£¦fV‹™ÞžF@gJõ,V'MM­tvvâtÚ™={@”&Õ=qB]Ý>jkkY½j€Œe !®’ .(* ©¡-GQª&Wb³ŸïQÛì6&L,¦ÃÕI0Ä`P©¨*ݸ¢SRädRÕ"Ì– 3ŠñxŒhÄGOW ÚÙ)|ªªRUžÍÌ“±XSQñx„`ÀMõ¤’¤zSSÜxý\RÒŠPU#=]§‰Ç£r¶!®Ž ÎÈLËYÃ)3\º®ô» úÝÃ(«ðuðu\ð/gÒ¥äýÝzÓ9S„WOP¿“ÝzÓ‚!/w»ŽÉBHP_ $…Wyf¢BHP !„ B j!„ÔB!$¨…B‚Z!„µB\kÆõ‚—P(B8VY³Ù„Íf‘W@!.gPG"Q233‡U¶««kÌA­i:MÍ´´ºéõÐ4 «ÅLNN:åeùجòF „ "@µAq¥œ½±³ªŽ}Ä%‰ñæžcôöú).* ¼¼£ÉBgg'§N¢¥µ‹… ¦ê´Ê«,„ L4Åãé% Y¦×{þé*v›¬¬´aÕ­ë:»kã÷‡X½úFòò ‡¼Ä¢A òS(.ÌeóÖmìÛšËf¡iay¥…Ô2›Í„B!***‡UþäÉ:²^P·¶wÑÝãcÞÜÙäææãén$ ö }(™O}C+°«IAnü/„ 04áÜèG4zñ›îŸ{ôÕpµ¶v¡( •UÕ|I!}NUE>³jf’šžKoO#ÑH€X,NÝÉZÛÜ„#Q,f3y¹éTUa2?ë6줼¬‡ÝÊÉÓ-„B¬V в)/+@QŽoääéV-˜BfFJRÛµûêpuô°ê†9 2±Fq…µÉdJzÖ Ïç´œÓéqÝ=ii©˜L&¼=½CôèMÄc½twö¢iqb±8ÛwÁçRQ^JVVÝ=Nœ8AW·ŸÅ §`0œß`W‡¿¿²²brròiiiãØ‰FBi“‹(*ÌæäéVº=¹¹¶Ä›E<®áêèa„brò«éî<‰®kr¦ !®¬ Öu=©G=Ú@º·%3ÓN,¾hjZ<ñÿ§Ï´Ñë °tÉ"ÊË+ …z(ÈO#=ÍÎŽµ4µø(-IKÔçóùX¸`>“ª' öPXŽAU8Sß@UUN'¤§9©¯¯gÆôªDP·µwkTVN"öJH !Æì’ý]n6›ô¨/ü-EQQU]þÓËÛÚ»°Ûm”WTáõ¶â÷º‡¥ÅU”dNDÅ0þAí‰ôðêÎõè:”M¬¤¬t‹• nñ!„âºápˆî7µ‡v²WÙÉ n&Íœ>~AÝñðÂæ¿PQ6‰’ eçGC&=!Ä[3[Ìäå—W@Cãi^ØüÞµâ.RÍicj]×xu×*+ª).,‘'˜!ÄM(žˆ¢*¼ºkk—ÜrÁLJ#ê–žfE¡¨ XBZ!ÆIQA1mí-´u·PQ<¶ >rj/…EhÃi]×yæw›8}"ù&EeU…Üù¡ëܳZ!®eùù:UKÁÜ1uKG yÅ…Cö¦ë¶n`ïÓöûÐWÁß±xñ4Tµ/”5MgÛ¶Cüþã·¢G sïùe‹W{î^õÙËTUÁbµ0¡´€Õ·-ᆛ]òƒÚÒ䢰8WÎ.!ĸ0[Œ´t ¼û戃: ×"hZ|ÀÓUt-NíŸãÎEÎDgñFÏTO —ËŸè=÷ÝöÔ@lÊ},NÛG±ZÇ ÿý(ެ‡]^5ÛÞsýù¶Þn/ëžÝÌÏþo®_³ð’ПÝÌ¿|–?¾øˆœ]Bˆ1‹Åc Ç cj]×Ñ´Þ@N{òT’H0z‹ÑÀ6÷l¾ûÏÐÝÝ͉'’ÊÝw_™™™|ë›_à£ù§‰„½Ä£aT“yØÛ‘™Æ²çX>Ù ¾ðÑaÃó¯±|õüKvP÷ï9F,ÖB¼U®zÝhhƒÞ/È8ÚJ#Ñþ`/v«³ßòó¡å«¤¦¦¢ëóçÏPGJJ á˜B\WëŽôÃÉÁÊçäeP5¥”ÓuM—åÃNù@U1ÆÁôG‡,2Š Ö½È`ØG<ÅaKAQÔDh]øŽ°åõ7’¾¿nÉâAÃ$¡§3ty³Å„¢(I?oirñÜŸ^åоôtyQT…¢ ¹Ü|Çu¬Xs¾ç­iÏþq#[6½ ‡ÓÆôÙ“¸çïo!7?€{oþJ¢üûoú\ÿãÄ÷áP„¿üáe¶oÙ»£›Ôt' –Îäî­Á™b—“Rq>ot Ÿ¿‡XÒÃFÆ¡G­_Äáhˆh,‚ÅbGÕâƒ>ËeùÒ%ý9>èP4]ƒ‘ôNu}Ða‡P0Lݱ*ª'$~ÞÖÒÉ·>÷襤9Y}ûÒÒSèêôðêú<úÓ?a²Y´¼€Çþ^Y·ƒÕ·/¡´¢ˆŽ67/>û'ŽÔóã_}£Éȃ_}?ëŸÙÊéºfüêûíDÂQ¾û•_àju³ê¶ÅäåÐÒØÎßþºµÇùî#ŸÁî°ÊÙ)„ uŽEB:œú¸ô¨õîÇu@°—x(„>H3çzÔº®ƒ¦±xÑüA‡FÒ£ŽÅâôzÎ߆4‹ÑÚÔÉÓÿý2Aˆµï»>Qßúg· Gùæ>NVÎùqõ…Ëgðå=Ìž‡YxÝ ^߸‡ÉÓËøð'oO”ËÌIãåç·ÑÚÜAñÄ<–Þ0‹[÷sº®™¥7ÌJ´³î/›i:ÓÆ?ÿçç(ž˜—XöÂ)üÓWåŸÜÈûï»EÎR!®¥PFï1Ð4bñ±X„h<2ô½ëõqú`Èâñø \·d1š¦¡iºÇãñ““Ÿ´am(Æáoξ]Çxðýß°<-ÃÁ½¬"³ÈLkG«ïšÅ’5“‰ÐKkGo_“šN[kßý£=žžDYgšGëùÓïŸgæ¼ Ò³œLž›Ïä¹wáD¹p¸ï“Ùsß¼öên&”çÒ<Ô>ÿ\Eƒ²óÒØ¾u/+nŸ&g®×åì=TUEUÅ0¢û"GÙ쀷€X‘½õÙ{š‡šøÛs»ØºaŸþÖ{(*ÍéŸÓIÛ¬k:%yÜr÷ÐÛŒd…W¯¸G‹ë˜Læäœ2A­œí¡žë-Çâñ¾F¥ï}àpˆ¦iôözèìè`Íš[‡¨XpÍ[õê‡[þÿé™)|åûÀb5%–÷öø“êŠÇ4Z›Ü˜-Ff/šÄìE“Ø»ý8Oül=¯ÿí÷||UROºÿ6dæ¤ô‡©ž1qà›ÅžÓ8Sm#ÚG!ÄÕ/b4™PÏfƒ2>CJb*^,MŒ½Ð/À“{Ô}cÒí®v4íü‡…ŸüÔý|²ø™Ä·‹½;N$BàäÑf~óÓç™6§œû¿|»œ™Bˆ :´1T“ålP î §X,–x8Gíwk>»I£«»‹¼¼"òòŠ˜4i*Oº®ñà§?Á'‹ŸÀ ôuÁUEPß[%õpËOŸ[Níöã<ñŸ/2iz áP„½;NÐÝÙ‹Ýi%ˆ **YÙiÌYRÍî×òÿþí¦Î*%‰óÆ+û1 ,½±&Ѧ3ÅÀ¦öpý­sQU…Õkpp×)~ÿóõœ<ÒLIY®¶n^{yV›™µ÷.á> !®Z<ŽÉhôg#úPtM´m´ZÑ1à i,O}“ýîWÄ^~cæ.N&ô h§1Z-Œ&Fò1¨Âð{Ô÷~b 6»…»N²oç Ò3S¨YPÅ_}7Oþúo݆h$†Ùbâ¬!3;•=ÛŽqp÷I,63eU¼ÿã«))??ånÙêY;ÐÀ_Ÿzš“ÈÎKÃî°òÅ⦅ ÙÁþ7ëØöÊlv Sf–rÛû–’W”)g£bPº®>x®)uuuz4%‰‰D‡Ã„Ãa¶}–šyÕÚWÇÇîø$O¬ÿ%Ue‡˜J×òæëÔ½ð ±p`Xg´:¨ºýn æ,”WJqÄ©;~Šßü7ü—§hä=꼬|>?éƒ?Û«xÁ2Š,»d;òé{QùŸÿé«òê !Þz½> r Ç>ôQ=q*Ûn!#óíù3þO}]^M!ÄU©ÓÝÅÒš•cê Ù¥lc n·›ììl9²B1!ÝÙ @qfÉØƒÚ š¸qþ­üuËÓè:äæÊN„b,\.---¼kù]¨ŠaìA ›RÀmËïä•ëp»Ýäçãt:1›ÌÈÒBñtˆD#ø|>ZÛÚPÛ–ßInJÁ Å£m'/¥ˆ÷®üÇZsºé8M MÃ!y„bl+™YYÌš2Ÿê‚©Õ¡ŸpeKCFÕÌ´¢YL+š%G]!.¹LN!$¨…BHP !„µBˆ·‹ñRTÚÑÙC(4¼ V«•œìty%„âru(bâÄÒ¤ûOõœÅ¦¦Æ׿nÃΨ &“‘ô4'ŠsÈÍ}ø¯Û°“¼Ü æÎ®u~‡-#øDó©“'°kÏ1ššÝ”OÌxûzµŠ\O/„¸Bƒ:sìxÝ Áuyv*';£ÑˆËåbÊäR¾¾Þz<®qâd3mm]„ÂÌfy¹éTUc6]üP wÝþãç¿ûÝï¸õ¦#®C!.yP§§g¼­;¥( )N+^¯“©ïÙ†š¦±mça0•edddáéõrüøqº{,^8ÃA#Y·fF9M-Ün7K—.%+··ëؘÚBHPP§¥¾ý;f2é  úntrêL>_›o^Mff¡`ùy©ä椱ió6›{)+Iï{nÙF²nQa6®N/åååøz[ÇܾB‚z܃Á•·Ùl—dçTUMÌ.ikë"3#§#ŽöSÄãá¾`‡ÃFcc3S§T$†IúéºZ<–X÷ÜúXÚBHP§ÓΩS§G½îxŠD¢X,–Äô@Ÿ?„æ ðÔŸÿØËÏËÄëõÒØÔL4H|µ·µ±cçNœhò*Ê‘®;Øôé±´/„õ¸êîñžíA:0=„B!EÁd2c4ªF¬V+ªªb2ÃØm#ì@ À™úBî³Ã:½^?Í-n ªÊòå+ÐâQ"á¾í©(+ ££—×_ßFéÄBœN3~ˆ†FF£ —`³½d|¤ëšL}C‡&7Ë€¢Œ­}!„õ¸ øƒ”––ÒÔØˆÑd$‹a00hš†Çã ¹¹™²²RZ[[GÔn··ÛøÞ`P±Ù¬”•–0³f6V«•Þžó7|2 ,Z0™†æ^ššZ8SïÇd2’——Ü9óHMMÁÓ]?øAáº'äÐÕí£¶¶–Õ«–a <¦ö…×6¥®®NF£D""‘Hâ^Û>Kͼjí«ãcw|rØ=ê`0ŒÕj%3à @KkFƒ…Üœ¾‹aBá(nw7N‡´´”oxVnõ€eº®£iQ¢a?Á@š6pÌWQ ØY˜-NTƒ]ÓˆF|I—šgåV û’z¸Ã]·/Ü-¤¤¡ªFzºNGG\‡âÚ¶qÃoqyŠÆ¿G‘žBFzrðrW<«ÅDQaîˆë?‰öÎa¯Óÿ2n]ã÷¹ðû\ï±»Ž òF0¼ub±0ÝîScªC!.ÉÐÇ¥vëM íM¿åPÉ Á+„Ô—ˆ„®âZ"·B j!„ÔB!A-„B‚Z!„µBHP !„wcšGÝÓ-7BˆÑJÏ(ºôA]Q½RŽ´BŒÂH.Ü3^®†„BŒŽŒQ !„µB j!„ B!A-„B‚Z!$¨…BHP !„µB j!„Ã7î·Ýþæ>>¢u¦OÄ¢ù3äÕBˆËÔç«_~EQÐuý-ÿýŸ=2â nkëॗ·rèðq</‹™ââ.˜Å²¥óPÕÑý±pÿ1«f*ŸùÔ‡/ùÁooï$//{Xe=/_}è_Ñ4ÿóÍÏQRRø–Û~9÷Eñ êsžÚt4ÖþÛßí 'ޏîÓgùñO…Óagé’ydee …©Ý{ˆ'~ÿö8ʧüРí])6¾òþŸxôÿ2¼¿TvÔö½`F#[^ÛÉ?ðn9{… =EQP…£G&-Ÿ6m‡Jú~Toÿ³³ÉÄ·¾ùYRœŽÄòW.á·Oü¯½¾‹}û0«fê{à­#»ü¶í{(,Ì#5ÅÁŽ{¹ç½·a2™ä âpI>LÔu}ÐÞ¬¢(LŸ>=ñ5ÚïéS ”–'…ô9«n\†ªªœ<ÕpÕ¼H-45·1yR953§ †xs×~9{…õ¥Ñ?œ¯«NU©©)œ<Õ@G‡›œœ¬¤ŸåóØÿýþ€uÂá]÷ »ví§«»‡ÔÔfÏšÊk×à°Û.ÚÞHÖííõñìs/±oÿ|>?éi,Y<—Ûn]‰ÁÐ÷¾xÿ%ÊßÿÀCüú—?x‹Þtß°ÇŒ“)(ÈázŽ­¯ïbÉâ¹r !A=þ=ê0sæÌQ÷¨W­ZÊS~oÿã#Ìž5Y5S˜2¹’ÔTç å£Ñ(?üñ£tttqýŠEäåfÓÚæbÓæí>RÇ7ú46›uÌëz}~þå_†§×ÇÊë“_ñc§xî¯ÃÝÕÍG?òÞ¾p¾ï^ÞøõõÍÜß=ÝWMÓØ¾³‡ÝÆäê •ò²Nœ8=¢#…Ôƒ†ò´iÓãÕçB¹¦¦æü¸Ë(gf¬Yu&£‘çžÿoîÚÇ›»öõõ¦‹ X8¿†•7,Áb1'Êoxy+-Íí|û[Ÿ£¨0/±|VÍT~øð£¼ðâ«Üýž[mk$ë®ß°wWŸùÔ‡ããË—-@ÓtÞØ¶‡µ·¯&+3E g³k÷êë›Y´pöE÷õÐáôöúX¶t^¢G>oÞ Nn`Ëk;yï]·ÊY,ÄUî’^ðraH÷ÿWQ”Q5À ×/æáýŸÿìG¹qå òsijjåégÖóÝþwºº{ewï>@YÙRSx}þÄW~~¹¹Yì©=8d;#Ywßþ#dggøóÞ{nç»ßùéi©#ÞÏ7¶íé ç¹3ËæÏíûkdÛö=ÄãšœÅBHztC€³gÏFUÕDÙQm¼ÁÀŒéÕ̘^ ôÍKþóÓëØ»ï0|òy>ýà‡hkï$òÅ/ÿÓõ e$ëvvt1eJå€2©©Î!‡e.& ±wßa,3¹9Ytº»?+*ʧ©©•}û0gö49“… ]ozÆŒI=êw/)ç¹ígX»¨”çwÔºGýô3ëY±|!ÙYIËóò²ùÔ'?È7ÿÏO8|äDÒGYéî|÷šQ½é {Ýqž·½kÏ¢Ñ(ÿðí‡-³õµÔBHP¾G}apŸ i¿ß?¦‹Q¶¾ö&éi¬¼añÀ±U%+3ŸÏŸX–?`ꔪå÷í?‚si~£Y7++vWç€rM­¼¸~kV_GéÄâaïç¶í{ά%33í‚c ¿ùâà¡ãtw{ÈÈH“³Yˆ«Ô%›G}nèãÀìß¿Ÿ}ûö%…©ªª£ë²² üuÝF\.÷ ¡XWw&iœxö¬i¸\îs?Åþü¿X÷â«CÑŒ`ÝY5Sq¹Ü:|"©ì¦ÍÛys×~ì6[¿cpñ}wwõpâÄ ò¸qåfÏš–ô5gö4.˜…®ë¼öÆ.9“…õ蜻¨¥ÿðGÿöP½ï·²fÕ2ù÷ÇùÎ÷þógRV:ƒAåL}3Û¶ï!##-i6Ä­7_OíÞCüúñ'9zì$¥¥Å´·w²ióvl6+wßuËmdÝ[o¹={ò‹GÇ+—›“Í±ã§Ø¶}Oß÷¹çç|;}=ñ /maÕË3:ú÷¦u]çºëæ¹m+oX–­;yýõ]¼ëÖ•r6 !A=²õmó' XnµZ …B‰ûöHL™\É×¾ò_y£GO&É+—róš8ç{¯6›•o|íS¼°îöÔäµ×ßÄj±0mjwÞqùù9C¶5’uvßøú§xö_âµ×wá÷ÈÊÊà}ï½Õ7.Kª÷† 9räÏ<»9³§ ¸pgÛö=Æ‹^ÔR\”OUU'Nœæð‘:9›…¸J)uuuz4%‰‰D‡Ã„Ãa¶}–šy}³)í«ãcw|rXŽæ6§3¦Mbá<¹Í©Bô·qÃoqyŠÆ¿G½hþ ¹·ô8è™ùp¼ÕeèBúãL‚WqŽ<ŠK!$¨…BHP !„µB j!„ÔB!A-„B‚Z!®5cºà¥§»YŽ BŒRzFÑ¥êŠj¹c›BŒ†Ûuìòô¨GÒBˆÑ‘1j!„ B!A-„ÔB!$¨…BHP !„µB j!„ B!A-„B‚Z!$¨ßn÷?ð?ûÅWÌö´·wk›ïà!þéûÿyÑrßþÎOÇeÿ.ܦË}Ì®´×H êkØÆWÞà;ß}dØåëë›qwõ ú³–ÖvZÛ\—}›„—ΟŸ^‡®ëÔo§#GëˆÅãÃ*›““@íÞCƒþ|÷žƒ8ŽËºMBˆKkÃK[øíÿƒ¦iÔïE…yäæf±§öààA½ûsçL—%ÄUæõ7vó‹GO4ñºÆ«å ÜÿÀCÜvË äädñòß¶Òîr“’â`ÑÂÙܱv5Fƒ!Qî–›¯'';“õ/mÆíî&33ƒåËæsӚ娪š(7«f*ŸùÔ‡“ÚùÙ/ž`ï¾Ãüú—?H”ë¿ ç–_ÌÜ93ØðÒ|>RïÙårÓÔÜÆ=ï{›·ì°^8á¯ë^a×®ýtu÷ššÂìYS¹cív[Òv\l›^c7/½¼…v—›Ô'‹ÍæöÛW%Ž@0âù¿nd÷žôxzIKMeÎìi¬½}ö~môöúøË³ëÙ»÷0¡p„òòî¹û¶Ûk¬[ÿ*Û¶ïÁíîÆf³1uJ%ïy÷MdggÊo²¸êíÝw˜Gþãq>óà‡ü]A °cç^‘(+oXLzZ ÛwìåÅõ›ˆD"Ü{ÏÚD¹]»öãîêaÅò…L˜PÀÇxú™õ´¶¹¸ïïß7²7ˆûîáå¯Q_ßÌý÷Ý3¬uæÎžÎ‹ë7Q»ï0×-~»v Åé zRù€u¢Ñ(?üñ£tttqýŠEäåfÓÚæbÓæí>RÇ7ú46›õ-·éÈÑ:Nœ8ÍÊ–‘™Æ®]xáÅW‰Åã¼÷®[…ÂüèÇ¿¤µÕÅŠ ™P\HCc3¯nÞÆá#u|ãë&Úòûƒ|ÿ?Çëó³jåR²²3¨Ý{˜‡úØ€}øÃ“ÿË–­;¹áúE”L(Âíîæå¯qêTÿü½/c4å7Y\õŽ?Í~ò_úüÇHMu^{C]ݾþ•¸ý¶¹nÙ¾ô…ûÉÈHãÍ]û“Êutvñ¡¿{7wï,_¶€O?ø!–,žËÛöp¦¾iDm.Z8›Œô´ÄÿGii1Y™éì©M§Þµg?³fMKôê“Æ¸^ÞJKs;}íAîºóf–-Ç{ﺕ/|î>ÚÚ:xáÅW‡µM±XŒ¯}õ“ܱv5Ë—-àóŸý(iì|s_ÒxZcS+÷Ý÷>î½g-Ë–Îãᅢûþþ}´´¶³ný¦DÙ—^ÞB§»›ø w¾û¦¾:?ó÷Ìœ>yÀ>lßQKUU)xÿ,[:;Ö®æ}ï½ ›ÍJ»Ë-¿ÁâšÑÔÔʯÿÓ°Ë_UA=±¤ˆüüœÄ÷ƒJqQ>^¯?©\ZZ ËúõdÖ¬Z0äØñx›3{:GŽÔ …o -ÌŸ7sÐò»w ¬l©©N¼>â+??ç¢cÞƒ£¢Â¼äcT\@OOobÙžÚƒde¦³`^MÒº Ì"+3=éƒÐÚ½‡ÉÉÉbú´IÉÇsõuÚNKKáÔ©F^úÛÖĬ—åËðo>i›„¸Ú û/ð«nèc°?# Ài1ÅEù(Š’´ì\Àwtt]x¤pVIDATž ž3—7¾ÆþƒGY0¯†={âtØöhkï$òÅ/ÿÓà/d¿ñå‹£”ÇHU“Ž‘«£‹êIeƒ®_PËÑc§ú•u3¹zà6 Þð=<úËÿæ©?¿ÀS~¢Âþtá‘'Ù°n¥ÉâŽ5=Èõ¿ZaðT§ƒË¾0µº„ŒŒ\½e‡D£P(˜â×Ú¶oïÑÔ×5‹¹¹9sfÊÑ,îX-—¾v9gõÅ y{{1jäPÂ#NRV^»»+7!´ôl,--1|0ë×­dÈ9š…è€"??¿©®®­V‹V«¥¶¶–ÚÚZbs÷2Éß €¬´|]öÄÑàŽî8BˆÞ&,ôsÔåÈ­`·ñ¢«Œ¹-]qç’D}›H²Bt•œjBQËÈV!dD-„’¨…BH¢B!‰Z!$Q !„D-„’¨…BH¢Ba¼_ì /¿”W***ÆÅEÕí¶tµ½?wœnÕú9~"ظ.RWW‡£ƒ=ÞÞ^,º{öm{´—1û÷VÆÌ”8Ü)?Hv+b.#ê>,,ü$¯¾ö¾¢‡UTTòÆÛ²k÷w8:Ú³bùÝ<´ö>Æx úX¯½þ7Ο¿tÇïßÞ9¦:÷õ7»õ?ùQ¦[('7_ï 1?‡À†õ¼cbÚÔÔÄGÛþEQQ1/üáI†»K÷Ú¬úðþß¶³íÓ]üéµß›ôÀ„_ÒþíMqèkÇTW„‰¦²²JÅ% {ìÑÕÌŸ7ãŽiOBR:ùgγbùÝzɩůLŸæOqq)§NŸ¹c÷«Äá—çÄÉ$>Ú¶“ººº¾;¢Þ´y+‹ÍÅÙÙ‰£?£H]ÂÀ6L ôeÙÒù˜ÿôäñ††FŽ &6™’ VVVŒ;’ûï[ˆJ娫¯¶VËþƒá$&¦Sª)ÃÖv ¾>ãX¶t6­ó¾ióVÌŸ‰FSNJj666V¼øü“l}ù½2=ýcPƶ×мdEE%{÷!-=‡ÊÊ*ìíšæÇâ{‚õF^ÕÕ5|¿?Œ¤ä ÊÊ+°³µe²ïx–. i÷¨ûŠŠJþ³÷0©©ÙÔÔj>|0«V.6¸íÆÆÖøø4ÌÌ̘èÛa™å÷-àþå õøkl[L‰«¡ýÛQP©MŠggº‡–„qäh4Eêl`ÚT_–, ѵ àÊ•« $7÷ åå×@¡ÀÝÝ…à9Ó˜1Ý¿Óþ¯R9]‡±}²£˜÷ÄñÚúØ¿•RÓ²yÿvðÔ“ëLÚçwÔÔG\|*µÚ:‚çNÃÞn ±q©:‰V«eͪ¥ìÚýÑÇâ™;g*ƒïò ¤DÃѰãœ={?ýñ÷˜››SWWÇÛïmãêÕRæÌžŠË …WÔDFÅ’“ÏË[•UÝz#£bñôpcí꥗”¢R9²iã*ކçüùKlÚ¸êgko[×*«øó›§¼¢’à9ÓpusæÔ©³ìÛÿ%¥Yÿ55µ¼óÞǪ™=;P÷ÜĈ¨²sòyñ…'u1¨ªªæ·>äZe!ÁÓqR9’šÍ»ù¤ÝúMm[?žo~.ãÍÊ 8@ïÿ¦´ÅظÞlÿê¦nCgº‡–©ƒ¼¼sÏ ÂÁÑŽÄÄ Š ¾¡A÷\?µº„?¿õ!Ø0wÎ4lm¢)+çØ±x>ÿâÿ°´´`ŠÿÄ›¶×”:Œí“ż'Ž×Ûéôés¼óߟð»gÅÖv@ßKÔ¥šrþøêouÏ šæÏÖ—ß&!1]w€ÅÆ¥0jÔPÖ®^¦{Ÿƒ£1©Kðpw!ôè1._*â•ÿú î.ºr>“Æñö»Û8p(‚•÷ßx˜lcC#O?µž­F.S}ILÊàüùK7õÜêö¶u84Š’Ò2žÚ²ŸIãtsšMœŒIfé’ù89Úz$š‹…<þØü'ýônF §Ûwsðp$+–ß À‘£Ñ—hxö7ñ?ZWç'Ÿ~Ùîé䦯¶Ý͵J<=\Mž4¶-ÆÆõfû×P0u:Ó•8Ô××óÒÖ_ëb?ý§¶Å'¤éõѰãhµZžûݳ89Þ¸jdŠßD^zå]ÒÒsôµ¡öšR‡±}²£˜÷Äñz»òÙŽ¯øÝ³ö½9ê!ƒ=ôòªTšáéáʵkUºevv9{ö"G~8FIi™®S¼úÊ3ºœ””Á°awak;€k•Uº?®®Î äDrJ¦Þz=ïr»-;]¡P˜ÜÞ¶ÒÒsP©uD‹5«–ðÚ«Ïbog @rJfó“ÃuI¥Y`€NŽö¤¤fé–¥¤fãìì¤KÒ-ÌŸÙný¦Æ¶} ÌÚÅ¡3¦´¥«qí¬?˜º ÷ÓãÐÒ¶ÖÉL©4ÃÓÓ²² ݲµ«—òÞÛ/é%ئ¦&jµZ´ÚºNÛkJÆöÉŽôÖãõ¦}ÄÓͤoÚwÔˆÚÐ×¥R©wY̺‡ïgÛÇÿfÏרóõ<Ü]ðõϬYºkN¯SWWÇoÿºá µšË°8 [Û­TšÝôÒ††F]9SÛÛVñÕRÆŽi0v­ëS_-Åkô0ƒu¸¹ "÷ÔÙVeKã5¼]9—vËLm[vhZ%c˜Ò–®Æµ³þ`ê6t¦+qhnÛÀöm3Óï …‚êêZÂÂOr± ââRÔWKu'Á;m¯)uÛ';r»×î=zXßž£6f„1Æko¿¹•´Œ23O““Çþƒá ;Î Ï=ÁàÁî4551lè],¿oq_K̺÷ÅÄÚÚšêšš_¿~ýúOå¬Ln¯ UìfI©Ýk”Uˆ‹©±mkø°»HLJ§ºº¦ÃùÙ .±ûëýÏ Âßo‚iméj\;é¦n툃±ÒÒsøÇ¶XY[1Ök“}½qwwaäˆ!üaë›Fµ×¤:ºïÛ}¼v‡Ï¤ql~l ýúõ3é}}ê:êú†._*¢þ“t_CÓùøÓ]„Gždú•¨TT]¿Î¸±£ vÀ=üµÉÃÝ…K—®ÐØØh°ýøÓM î®Ý^—““=EêâvË/rèp$ æÏdèOT* ÕŠË…jT*Ý2•Á²jëénl§øŸÊɘdæ,sìD"§OŸcöÌ@Ý:mË­ÒÓÛЕ8k÷žý88Øñê+Ïп¿¥nyEEå-©ÃØ>y³ØÞÎ㵫¦ùÉuÔÆ(/¿Æëo|ÀÎ]{õ¿ŠŒ¦›÷ðõZ]BBbº^¹Ó§ÏòÁ‡ÿäà¡#?¹)øMöæZe¡G¢ ~¸„‰Æ\©Ä×w\|¢«Õ%deçé-ŒŠ%!1k++] JJËHhs20.>¦œ‰Æè–ùûO¤¤´¬Ý‰Ã°ð“íÖßÝØz{{1bø`¾ý.”3g/´{=##—ècq8;;áï7Ñ䶘6r6~$ØÓÛЕ8K£)ÇÖv€^‚mjjâûaÍSqm¦>º[‡±}²£˜÷Ôñz+-\0‹ ëVvy4ß§FÔNŽöL™D\|*mÛ‰·÷hê눊ŽÅÜÜœ9³šG÷Ü=‡”Ô,>Û±›ÜSg:Ô“¢¢b"£b±²êÏÊ‹ŒZŸMó'yè‘hBæÍèðî°Y3IJÎä›osêôY¼½½èoi‰¦¬œ„„t ¯¨yhͲùýŠ{Í%99“¶ý‹yÁA rVqêôYbb›Gfƒ9°hál’S2Ù¾cùgÎë.'‹ŠŽÃÅEÅâEÁº:„Ì$))ƒ;öðã¹æËÆ2³N‘‘y ý¯xÝ­B¡`óãkyï/ŸòÎ{Ûð›<¯ÑÍóã¹§Î’˜”޵O>¾VoSÚb c÷ï­Ø†®ÄÁøó±$&eðɧ_2vìªkjIJÊ ¸DÃkjªkz´cûdG1ï©ãõVj¹¢¦«úÜ-ä¬_‰““=ñ 餥gciiɈáƒY¿n%C†x`eÕŸŸßƒá$§drüDý--?nË—-Ô»"àfæÎ$''o÷†2Ùw<ÎÎNË)•füö™G‰ˆŠ!..•o÷†RWWµµ#G ááµË=zx´ßÆÚŠ_ØÂÞïŽpüD"UU×qrràÁëÝÁhýS¹}ß%9%‹È¨Xìlm žĽ‹çacsc”ciiÁóÏmfï¾#ÄÆ§p½ªOO7ž}ú>Ù¾[oý=[G{^yéi~?ARr&)©Ù466àèè@ðÜiÜs÷\ììv©-¦0vÿÞªm05ÆZÿ«X[[‘’šMRJöv¶øMžÀS¿^Ï¿vþ‡¬ì GëùåöÐhºyÚc„1¸¹9óåWû8v"‘ i~Ë;Ï¡Ð(JKÊP9;2súæ‡ÌÀÌìÆçUuu ßï#)9ƒ²ò ìlm™ì;ž¥KB°¶¶Ò•Û´y+>“ÆñÔ–uzëøûG_š–Íg¿¥+×ú=-Ë…âgQkµZ"£w¡rƒçÔå313S„Êe *—1üþM—ëoll$6>k+ÆxÀÑÁžáÓ—wÎà‰»œÜ|vîÚËDï1<ôÐ}¸»¹ðõ7ùbçZ} ÔòÎ{qŸqüê¡ûññKDT o½³êê“·sÓÆU â¡û·BôšDmaaÁÊþHYÍlÊjfcaÙ¼ªQ£ûQV3›¢²™¬^ór—ëÏÊΣ¢¢_ßñ(•ÍuûûO0xR±¶VËÆ ²zÕfNŸÂ–'fzÇO$rîÇæé˜Ð#Ñ\,(dãÆY³j)3¦û³võ26nxË…E<iòvN ôÅÁÞN÷o!„è5‰ 9áöý£Ú-¯ªlÀÅþ—/v}>ùdLrsrö›¨[6Åo" …‚˜ØdõÊ;9Úࣷlþ¼¤¤f5ooJ&NŽöøOÒ+àƒ“£½®œBÜ1‰zðàÁ?M)è'ÍØ“•ºQwWTWך–¥¥ƒœ(.ÑP\¢¡¡±W***IKÏÑ{»»K»z\](¾ª@}µ7·A×éæ6ˆâbô!Ämw[N&öïoF}]ªÑhªg3l¤E·êKLÎÐ]†÷Ò+ï,sìx<“}ÇßX P´+ÓÔÔÔü’™Bïÿ†Üìµ®”B£µ¢US(( ½« zBÌñ…ÄqøÀN¬&)3°{õÅ6O{¬YµGG»6‰¶ÿïWdfF£)ÇÁ¡ùõòòŠvõ\º\¤7²V©(,TL¾— Õ¨Tz±ª¯¯oWöÚµ*éUBˆž›ö03kNÔ-ZPOúxÛŸXò_ºKòŠ‹rQ¹Œá»owt©¾’Ò2òò~ÄÝÍ…yÁAËdfù},žã'Y²xW(¸tOW]ò=x(…B¿_óIH_Ÿñ:IBbSZÍSÇŧ¢Ñ”³`þLݲl¸XPH}CæJ%— ‹8¡À@ ÒÛ„]¢P(š§>Z'ëÖI»'¬X¾’ËWê-ëÎuÔ1±É4551sæ”ËÏ "úX<'N$rï=ÁX[[ñî{2{»$$f“ÇÒ{Cpsmž—^´p6É)™lß±‡ü3ç¹ËÓ /‡‹‹ŠÅ‹‚uëð÷›@Dd ïÿu;>h4åDDÆàììÄ•+Wõ¶ÇÆÆh¾ª$dÞ ÝU*BÑ¥RycŽºu’îé©F‰MÆÜܼÛZ<=\5jyyçÈÎÉ`j€ŽNö„… ¼ü®®ÎlÜð AÓ&ëÞgmmÅ‹/laß÷GINÉ"2*;[[‚çqïâyØØÜ¸áeÕ‹±°èG|B»¾üWWgZ»Œ‚‚+8¡·=sg’““Ç·{C™ì;gg'é}B£GÔŠsçÎ5ÕÕÕ¡Õjiù[«Õ¾‡Iþ^d¥åóè²'$bBq……~Î5íÈsÔfff·d꣧µ¾%Ûr˶â—LïdbËÛÌ̬WO}HâBô%J¥³Ö#êÖ£j!„½,Q·MØB!zI¢ý)IÔBÑËuÛ)Þ~yžBô¹DÝvÊCFÔBÑ{˜››ëÏQK¢BˆÞ—¨ÍÛ&h¥RIcc£DG!z¥R‰¹™™ºyê–„}µHCvú®^)%,ôs‰˜Bü #êÿÍô—þˆÙIEND®B`‚scribes-0.4~r910/help/C/figures/scribes_completion.png0000644000175000017500000021317111242100540022576 0ustar andreasandreas‰PNG  IHDRžxýƒù‘bKGDÿÿÿ ½§“ pHYs  šœtIME× .16L· IDATxÚì½wX”Wú¸S†Þ¥ ‚‚бDQ,¨1ãf-‰ÑMŒu“5ÑÝèÇè×Õ¸ùí&YwcVÝ$jŠQ7¶Å(]@,  ‚ 5t:ÃóûcdpufKòÞ×ÅuÁáyÏ{ÎsÚsžS^qIš<ìÌ7.âI¤—ý@ž~t(ˆ imi!  &Ź‚ÃSàÉeú—+yæ“WØ{1XígÒËòXü/&ï\ÎðO_ÅÇ2>üþ‰ÌŸT* ù)ÕoqN*Ÿ¯žÆ®è`|NXø~@n¡Xåï_ «?üž¹þœÂÒÊGþîß‚~{ ™LÆêÕ«ùøãù»o_‹aÛ[9¹{“Pj£ÿ0ÖÖVÎÇ^æ§g©ªªa÷u*'—Ë9KTtbq%–føúcfP"‘HkY_’†ŠªÅx;ôS뙫…é,?ôÒf™J<::O^þV­Z…µµ5ï¿ÿ¾PØO™~Ë‹røjãj%bô ŒÐÑýíÍɯ¥åÒÜÒÊ¥ëÙÌšb-T¸§¥_•HÈÍÍ¥¤¤äѽÒZ[[ˆ9þ"Ccÿ°^(®ž‰I×9vü ÅÅeèûljŠN`ð OÆIúíNŽ$?¿˜wV.ÒZVà×ÃÍ’,åïÞö}*/GΖ3_"m–1ÄɃ¦ÿ' ;Äuôuõž¸üåååaee%ôS¦ßæ&)ßý}µ1žÃ&2oõgèèüö Ï ÿa‹«˜4ÊK¨lOvvv,\¸‡GþnïÑÓ˜ýÎ6m{›ðþ›çp™.Š€v†çíÌ\vþ÷{¬­-YôÚ.$$‘v+³SÙ̬<¢¢õì3¬X6€ç=_"þB"))iøøxi,+ðë"µ$' [¬ŒÍ*ŸRt›¬ò|Þ\Ž{/Wܬe tá‡þEqN*&æV¼üîtõô“zX³8H¨ O)³gÏ~lï9eé‰\<Ʊkq:#s¡P47<=ú÷aÁüYŒó{ ¯Þ7’ØØËÌš9U%|¸g‰¿È…‹W•Ƥ&²‡ŸoÅs,%‚Ô’lªëééaofú)‹˜à>\E¶¤¦‚]q‡‰ÉJ¢²¡ ¦ðå ¯`"2R‘½yÇðô¶Wo™=1?M1£7³ÆÓ¶w—ó%—Ë9sæ aaaäçç#•J111ÁÎÎŽ-[¶`aa¡”•J¥9r„èèhÊË˱¶¶fôèѼòÊ+˜›·wª/½ô’Ê;’““;„ýøãZ¥÷¥—^bèС¬\¹’ýû÷“””DCCÞÞÞ,_¾—²ëׯçÀDEE!“ÉðóócÅŠ*[X9zô(111ˆÅbÌÍÍ9r$óçϧW¯^Z§A]i’^Mô»iÓ&RRRضmýú©Ö±¸¸8¶nÝÊܹsyõÕW•áõ5•Äÿ€ÉóVcnm¯uýúôëS»‚‘ˆ»ÞÅȰ]çeÕÌYµV¹œuK_à…IŠv$knáÐéNÇ\£°¬ScCFûôgéœI8Ù©zwÛö<~±e1gÎ's.þM²f&ûâÝE304hïÎOG_#$ê*·)¡¡¡ cC\¬ùË3ðvwVÊýã‹`NÇ\SyÏÛ §1oºo§y”ÉZø!ôgc¯“_RH_/wg^ Ëè¡ý;¤õû¾Ipx"gÎ'#mjf܈üßÒ012xbú»¼¼r¹\)×ÜÜÌæÍ›ÉÊÊbÊ”)8::’Mhh(ÉÉÉlݺUÙù.^¼XùÜÞ½{qvvfúôî[jª¨¨`ݺu˜˜˜„D"áÌ™3¼ÿþû|þùç*ƒ@CC7n¤©©‰™3g’ššJXXÖÖÖ,X°àŽá cÓ¦Mܾ}› &È/¿üBDDW¯^åÓO?ÅÒÒRã4h¢3MÒ«‰~§M›FJJ ááá,Y²DåQQQL™2E%<)ò(Mõˆ Œ¸ð¾åóý_•¿÷q¶Uù» IÃ9v…Æ&Ñ—Ó˜6ÎGù¿sñ7h•Ë120f0­r9ë·ý@BrûJ’DVÏϱ)$$gòÕß–t0>ÛŒÅÜB±Š‘imaÊ›¯( ÓÂùþD¬Ê3µõ¤e!®¬Q ·³1§Ÿ«¢/ÎÎð–*Ys þè{®ÝÊS†5Éš¹r#›Ä›Ù¬[:“ ÿa*ÏlÚ~”¬üRåßan`nfÄ»‹fh¬ßž¢wïÞxzz’ššJii)ööí“’’ÒÒÒ1b„Òè쩺®I0yòdT\7xâÄ î3Yм͗——³nÝ:\]]yùå—IJJ"""–.]Úá–½œð7“¤ˆ#\ ýN0<´7<ÕE\^‰«‹£rÆv*4’Ÿ‚Ïâêꈙ© •’*­d-M-2¾»t€±}‡²aêbìM­©—IÉ­,Äʸ}¶]Q_ÍêãŸP+­gº—o›‹‰_ÆÿÈw—O“•¨wucU¥õxnù!©çU=êÙ×xæ“WÚÞ"hÐ󆞞}ôѱ>}šôôt¶lÙ‚O»ñ0dÈvîÜɹsçxá…˜9s¦Šadkk«ÖUòóó™8q"o¿ý6úúŠæjccÃþýû‰ŠŠ"00P)›‘‘Áˆ#xï½÷‰D477³dÉbcc•ƒ[HH,[¶Œ3Ú///víÚÅÑ£GUŒ=uÓ ‰Î4I¯&úõõõÅÜÜœèèh-Z„žžbp]]‰‰‰x{{ãèè¨:¹¹€»_——½ú9Ñ¿·™y%œ»®bxþ›¢0|a|ÇÛw*ê* É™ˆôõØøæïðÚŸÛy%lÚ~„Šª:öbãguxOn¡˜ßMÉ’ßOâ‹CᜌL"æò-¥áyìì%&>ëÅê×§cnbDum9e¸:ڨĵlîd–ͬ⥼ÇÎ^âÚ­²2éÛ·/«V­R|ãÇWèêÖ-YÖ®]«°ôõõñòòRÉkLL ¼†˜™™qùòe­Ò ÎÔI¯&ˆD"&OžLuu5—.]R†ÇÅÅÑÜÜL@@@‡gвnàä>¤[Êë…;¿K׳T×+=‰·ó'Žƒ&¶{Cc’xÎχñ# Ò×ÃÛÝ™ Å2ü¥”¬Nß1nÄÞ]4+ &ö ¸\Ò®}…Á]QU‹¸¢Cö½,=´?ÎöÚŸV?wýÎû2'p4æ¦F¸»Úóç×u©®^ªâ ˜4Ú›åó¦`maÊhÅR|euí×÷?CCC"##;xÊ---5jT—úu뺺}”&hÛæÛŒÎ¶ôº¹¹QQQqß÷¸z¶×íâÜ4a@èY§qy%ü};UÕµ,zmãÇ={ÇÐlÂÀ@¤•¬À£E¤§ÏbßYü7î¡iqDe^alß¡¼:|:£zV‘ M‹àFq&¾Ÿ½®:›ÑÑá­ñsUÂn+Ñ^&–Ø™Ýð;ø‡ —CZi6¯PÜ wtÑVܬÚ=U†úÚÕ‘U«VññÇóí·ßrøða†Θ1c3fŒŠQ•——GSS+V¬è4žºººGV&èÞsµbiT"‘tÜî]â[¿~}ïeÿþý;Ä©§§‡««+™™™Z¥A©“^mßÿ3×3òY¾y–fÆ Ô—ÀñC?b€ÖyË-P,ïöpQösj78Ī+V>ÜîªcŠ:tÏŠñ‰‰ ~~~DDDžžÎ€HOO§°°_|Qé=ï麮n¥ Ú¶y{î¬ÓÕÕí°Ü7wﮯ®Tž5<­¬,()cg׋ÿ÷Þ[¸º¶wDâòJìlm´’xô¼é7'_=K|n á—ϸÄÿMy#žW 5×”«xJD8˜÷b˜óæ {ŽÁŽý;õx>ìþN=…Q™Z’£èÌ Méoëª2°jË€صkñññ\¸p+W®‹ƒƒ›7oÆÉÉéÎÀ(ÇÍÍMe Lµ¾?Þ+“ÚÌ;ï¼£ôæÕÖÖ2zôè³þ ::í仃¬,…÷¸woÍ]ÙÚÚRPP€\.WÉ[KK ùùù¸¹¹i•mu¦ êêwÚ´i¤¥¥©ôÒÜ{¨Hi(Ú8RQœKeI÷}ö/hÒpÂnrãvá 7(W¡«£Ãó†ªÈYš™PQUË™ãXñò”nÕÕOW†x*®Ë/®`ëÞoæp2*IkÃÓ¡—%ùŤe©„߼ݾ·°¯‹Ý#ë§¢££IJJbÞ¼yZd÷2hÐ 9þ­ÌMUd›dÍÊŸvƒ¤µCÀ¸áŠeú˜Ëi?w…ÚúF2óJølŸ¢ »9öb‡Ë#ë³víÚEdd$;vì趉M@@555üïÿ£ºººƒ·óQÕõ‡õQºÍ«5†¤^¾£G]\=‡ ƒªÀ}y ÇsÿÁökuŠKÊ:„-˜¯8q9ÔÇ /ââ©©­g€G_n¥gqýF:“'¥_ßö•&²޲ÚJ> ÿ¦ó–ú¶ßh$2ä%Ÿ)¾v–“7c8y3FE~íä×è3RuÆëjeOjI6_]8ÆÉ›1”×WÑ(“âãäÁüá*²’†ò$Å vRÏð>žÝ»wsåÊ „¡¡!R©”ÜÜ\æÌ™CŸ>}:ÄïççÇ©S§Ø°acÇŽE.—SXX¨•—¢ŒŒ vî܉³³3 ÄÇÇ“ŸŸÏâÅ‹qvvÖ8¾Ù³gËÎ;¹~ý:nnnää䃷··rÓ4 ÚêLÔÕ¯'NäôéÓÌ›7゙©Ácž'9æ'ÊòoS™ŒKÿ¡]ŸÍëè0Ãÿ¾>­<`4ãžk†–ÎÄåY”–WóÑW':þÎ$­<ˆû‚ϳ/ø|§ÿ[<[ÕÈxãÃ2;žcçÁs #ó®kÎGÄÅ›”–Wóé7§øô›vÃËÈ@Äúå3Ñ}„ß²õôô$%%…ôôôn‹sòäÉþøcöïßObb"ÑÑÑØÙÙ1gÎfÏž}ßý^Kƒ¶:ÓMô;mÚ4NŸ>®®n§^+eý÷§ö:QU^DÄ¡ÏX¸~O·´§‡ñÍÑÈåíû>ïÅÎÚœ=,c߉óÄ%fPR^…¬¹ScC”••±|ùrüüüX»v­ ÇDkk »Ö¾@Þ­D܇ø±üÃc=¶Ï[à×® '™”º¦N¥ÆrèêY¦ð# 1‰„Ý»w#‰T>y?†Mú=Ãü[I~ضqa– Ä'˜‚‚¢££Ù²e &&&j•±@ÏüåFòn%bbnÅÜ?&E_P òe '…}—CØw9¤Óÿ][ó¿§J¿wï½zÝùå£ßD*•EUUo¿ý¶Ú§ç¼ó/*KóÉM½Äî¿ÎcÍãÐJ}Y¹r% ¸zhÍš5¸¸¸JyLDÛIüɽˆ ymã·Ø8ô”" žOíÇ ÏîåСCáééÉ_þò—{â„ÈИÅï໼ÁØ‹£ó ¦í>ËîØ?-Ð5†Mú=×b~"hñfú #(D@-„=ža§€€€€€€€€€`x †§€€€€€€€€€€`x †§€€€€€€€€€`x ü¶‘ˆ imi!  &Ź‚ÃSàÉeú—+yæ“WØ{1XígÒËòXü/&ï\ÎðO_ÅÇ2>üþ‰ÌŸT* ù)ÕoqN*Ÿ¯žÆ®è`|NXø~@n¡XåïGAÛû…&ôØ;Vø=sÿü9…¥•ê•ESs·çïqé·'y饗ؼysÅ/“ÉX½z5üñ#oC·¯Å°í­‰œÜ½IèœÔæ¡È·¶¶r>ö2?8KUU »¿ø¨S9¹\ιðX¢¢‹+±´0Ã×w3ƒ‰DZÇ+ðëAÒPCQµo‡~j=sµ0å‡>@Ú,S‰çIü*ÛªU«°¶¶æý÷ß û)ÓoyQ_mœC­DŒ¾:º¿½9ùµ´\š[Z¹t=›YS¬ —ÇÞcQ¤düBø×„Šù¸ûU‰„ÜÜ\JJJy’Ihmm!æøˆ üÃz¡@ºfx&&]çØñ3—=4¢ï'*:Áƒ<7v$é·s8u:’üübÞY¹Hëx~=Ü,iÿ¶·}߇ÊË‘³åÌ—H›e qòàƒéÄÉÂq}]½'.yyyXYY ý”é·¹IÊw_D­DŒç°‰Ì[ý::¿=Ã3ÈÅâ*&òz Ü­œ"oæò ÁÎÎŽ… ªõ%§înCÞ£§1ûmÚö6á?ü7Ïá 3](í ÏÛ™¹ìüï÷X[[²èµ9\HH"íVf§²™YyDE'0êÙgX±l>Ï{¾>Dü…DRRÒðññÒ8^_©%Ù8YØbelþPù”¢Ûd•çð~àrÜ{¹àf%|*O û?ô/ŠsR11·âåww «÷Ûü’ðšÅABexJ™={öc{÷È)óHOŒàjä1ŽíX‹ûÐq™˜ …" ¹áéÑ¿ æÏbœß³ˆH¸xõ¾‘ÄÆ^`ÖÌ©*áÆ=Kü…D.\¼ª4<5‰Wàñðó­xŽ¥DZ’Muc"==ìÍlX7e܇«È–ÔT°+î01YIT6Ô`cbÁÔ¾¼3áLDF*²7ïžÞöê-³'æ§)fôfÖxÚöîr¾är9gΜ!,,Œüü|¤R)&&&ØÙÙ±eË,,,”²R©”#GŽMyy9ÖÖÖŒ=šW^ysóöNõ¥—^RyGrrr‡°üQ«ô¾ôÒK :”•+W²ÿ~’’’hhhÀÛÛ›åË—ãââÒAvýúõ8p€¨¨(d2~~~¬X±Be»Kcc#G%&&±XŒ¹¹9#GŽdþüùôêÕKë4¨«3MÒ«‰~7mÚDJJ Û¶m£_?Õ:ÇÖ­[™;w.¯¾úª2¼¾¦’˜ã_0yÞjÌ­íµ®_ó×ì ¿¸‚¿¾ù;¦ëøøoŽÇ°çH$3&cýò™Èš[8t:Ó1×(,«ÄÔØÑ>ýY:gNvx¦äð¿S8zöå’ú»Úóæü©ŒÔWEìtô5B¢®rû—š016ÄÕÁš¿¼1owg¥Ü?¾ætÌ5•gß^8yÓ};¼º³=—÷†Å|ÿWåïçí1±{÷nBBBøî»ï:ÔS€ªª*-ZDPPK—.Õ¸®+ûÊ’öïßϵk×hllT¶!ggg­ú¨íÛ·ñоFÓ>J›¼Íxc×ãB¨©,%6x7¯üYH47<&O«V$™Y¹XYYàèh§ K»•É_ 7¯@«x=ŸÅdoÂO*aÒæV~‘”P\#V ¿Z˜ÎŸŽ~D­´^VV[ÉÁÄPÊëªØ:s•Š|›ÇÓË¡¯Zi¹UšÀ»ÞÝ’·={ö‚»»;³fÍÂØØ˜êêjòóó‘ËåJ¹ææf6oÞLVVS¦LÁÑÑ‘ììlBCCINNfëÖ­)ŒêÅ‹+ŸÛ»w/ÎÎÎLŸÞ}KM¬[·‚‚‚H$œ9s†÷ߟÏ?ÿ\™€††6nÜHSS3gÎ$55•°°0¬­­Y°`ÂÉØ´i·oßf„ òË/¿ÁÕ«WùôÓO±´´Ô8 šèL“ôj¢ßiÓ¦‘’’Bxx8K–,Qù_TTS¦LQ OŠ‹}gñ߸#„¦Å•y…±}‡òêðéŒê=XE64-€Å™ø~öºêlFG‡·ÆÏU »Y¬hz™XbgvÿÁïàþ\i¥Ù¼v@q7ÜÑE[q³j÷TêkWŸV­ZÅÇÌ·ß~ËáÇ>|8cÆŒa̘1*B^^MMM¬X±¢ÓxêêêY™XXX {ÏÕ>vvŠ¥Q‰DÒÁ»wlýúõ¼—ýû÷ï§žž®®®dffj•mt¦Nz5eêÔ©Ƙ1c”ƶ¡¡!~~~ÓU­0*LÍ­»\VÎw<žÅeUÔÕK¹|]1ÙŠ¸˜ÊÊ…Ó(«¸cxÞ1þ2Q¬œŠ¾Ê©èŽ{Ý+«k;„ ötUìﱕUí²¯ÍšÀçûæzF>Ë7ïÁÒ̘áƒú8~(ãG x$õV›¼=.ìííÑÓÓSž èêêMPPb±===ìííµ®ëê¶cuû¨ž¢+}ßÝû£ë«+„U g O++ JJÄØÙõâÿ½÷®®NÊÿ‰Ë+±³µ4ý”ð¦ß|œ<8|õ,ñ¹)„g\"<ãÿ7åuŒx^ÑQ6ÔP\S®â)5à`Þ‹aΘ7ì9;öïÔãù°û; ôFejIŽ¢334¥¿­+:týâΰk×.âãã¹páW®\!666oÞ¬ô|ÈårÜÜܔ˽ëûã=Ñæ 144ÔøÙ{÷‰ÝKÛò´¦ixRtæææ†——IIIH$Z[[¹~ý:þþþwo»¯³¹¹ëÞ%×;†gIy±IéÈš[Ð×ÓE\YÃÕÔ\$Õu˜›anª0¶¤MŒO:ß(m+‡öÉØ¼ç}äáÂé˜k$ÞÈ!¿¤‚È‹©D^Leös£XýzÏ_wÓy{TèééaggGii)dddHhh(%%%ˆÅb¥qÚu½³v¬nÕSt%oòÖÖvÃBdˆ€@ž}û¸RR"fŲù*FgQq)ÕÕµ 6XÐôSÄø~ÃßoµÒzVû'Ii|{é„Òð¬¹ë0Ño|Š{/—‡Æ™^ªX ôRs™<¹(CááqtïÖAÊÀÀüýý‘J¥sàÀ>Ì;ï¼£ôDÔÖÖ2zôht4¸©^GG硆]w•¥ð÷î­ù¡+[[[ Ëå*ykii!??777­Ò ­Î4A]ýN›6´´4"##ÑÕÕE.—w8T¤ôDÙ8RQœKeI×?ûçloŽŽâ4÷©hÅIñßOÅ¡Ó >s‘V¹\é¡°43¡¢ª–…3DZâå)Z½óbŠÂCíÙGuïêOW†ÜñŽæW°uo‰7s8•ÔeÃóîò•ÉZ‰:NVº#o#::š¤¤$æÍ›×eƒÌÉɉ²²2077gÁ‚„……qþüyÊËËUöwW]o[]èÓ§Æ}TOµ¡®ä­ª¼°½üm¸ݲÇÓw´boGxDœJøÉÅÆý¶ew'—ÜÊ"&†r³$‹ªÆZdRò$Å”×)–Ì MÚ;'S+åî{ŽST-¦Q&E\'!¹(ƒÜÊ¢ñ‹ëÌôî<×*o%© ƒIg:MOJ¡Âðrçô~ìÛ·—_~™ýû÷«gCCCž^aLß½„4räH*++9uê”F:´´´$77—¦¦¦+§ææf~øátuuñ÷÷×øù‘#GR]]Ýá–ÐÐPjkk™8q¢ViÐVg=¡ßqãÆajjJ\\QQQØÛÛ3dHç{8Ûö¥eßèú§( DúØZ)(%Þ̦·S/æÏ‹ŽÄ%¦+ŒS‡ö%ý1Ïxpäç‹„D]¥¢ªŽÆ&Uu¤f’SÐñ”¹¸²†ºz)å’Z¶ï;Ãõ Å=·¿ ©”ùòP—¯gSVYC£T†žž.úwö}Z™›ªÄ×$kVþ´OBZ;„©•ížã#?_¤®AJM]#73 º”7MÙµk‘‘‘ìØ±£Ëq999!‹IHHÀ××333FŒ¡4<ï¾ò¨;êzKK ‡zh;¾_ÕSm¨+yËM½|ǸÕÅÕs¸0¨ Ü—z<÷l¿V§¸¤¬CØ‚ùŠS‰C}¼ðññ".>‘šÚzxôåVz×o¤3yÒXúõuÓ*^GGYm%…Óù,–ú¶ßûf$2ä%Ÿ)¾v–“7c8y3FE~íä×è3RuÆëjeOjI6_]8ÆÉ›1”×WÑ(“âãäÁüá*²’†ò$Å §“z†ç‰'Édßw™hÍš5xxx`kk{ç0\.\@GG‡©SÛï 3gñññìÞ½›+W®0hÐ ‘J¥äææ2gΜ^ ???N:ņ ;v,r¹œÂÂÂ.y)222عs'ÎÎÎ444O~~>‹/V ÕeöìÙÄÆÆ²sçN®_¿Ž››999ÄÄÄàíí­ä4Mƒ¶:Óuõk``Àĉ9}ú4óæÍ»¯÷fð˜çIŽù‰²üÛd&ãÒh×¼žÖ”UÖ —ÄgbkmÎ`W¥èr×ឥs'qùF¥åÕ|ôÕ‰q-3‰¾.v*aCâ9¯ö┌i_UÚ|ž}Áç;MßâÙª‹€7>ì ³óà9å©õή5å㎉‘õM*²wËk“7Mñôô$%%…ôôôn1<«««¹~ý:7nTN`¶mÛ†®®®ŠGU›ºž‘‘ÁŽ;pqq¡¡¡ .——Ço¼¡·º}T[Ÿ§œÜ9ywXg'×Ö†ºÒޝEÀ}¨&æÂÜ´4<#"ãv·øÖŠütâ ¯’z3[;^yy&“ýº¯À£ÁÖÔŠgÝ‘SQˆ¤¡†V¹ |œ‰ÜǾË!8Yغü?¿Y=´}ÝgË–-¿é4hÃÅ‹ùðÃ?~<ï¾ûîe¯Fãà'oðÆæïñõœÐŸÊÊÊX¾|9~~~¬]»VPÈc¢µµ…]k_ ïV"îCüXþá±Ûç-ðë@WPÀ“@ƒLJ]S§Rc9tõ,Sø ŠÐ‰DÂîÝ»‰D*ŸÇ¼Ã&ýžaþŠ­$?l[‰¸0KPâLAAÑÑÑlÙ²µÊX çþr#y·11·bîŸ?ŒN‡¢/¨@Pù2Г¾Ë!ì»Òéÿ®­ùßS¥ß»÷^=ŒîüòÑo‰ƒ"•J‰ŠŠ¢ªªŠ·ß~[íÓÎsÞù•¥ùä¦^b÷_ç±æ¿qè‹ ¥>¬\¹P\=´fÍ\\\¥<&¢í$þä^D†Æ¼¶ñ[lz J O'Îöc †g÷rèÐ!ŒŒŒðôôä/ùK‡=qBdhÌâ÷ðÝ?Þ`ìŒE‚ÑùÓvŸewìŸèÃ&ýžk1?´x3ý" ÂOG‚°ÇS@@@@@@@@@0<ÃS@@@@@@@@@@0<ÃS@@@@@@@@@0<~ÛHÄ…´¶4 ŠЈŠâ\A j"Üã)ðH™þåJŠªÅ¬šø*‹G¿¨Ö3éey|”+ù©Hj±02åÅÁþ¼;iá—?©TÚ-ߎxôú-ÎIå«sé7Ø—Wÿï tõÚ»Ç ? æû¿’[(fáÿíRþý(h{ÿÛ §1ozÏ|Ñkõ‡ßSPZÉgëâloýð²hjÆÐàÑ!ëÿuˆóWn©„u‡NzJ¿š¦÷q׳ž¤§?¿+“ÉX»v-NNN¬[·î‘ö%·¯ÅðÍ–…Œ™ñ:/,ý›ÐQwÕðlmmå|ìe~:q–ªªvñQ§rr¹œsá±DE' Wbia†¯ï0f ‰”r--­DE'p>îÅÅeèéé1À³¿i:.ÎÂ…À¿f$ 5U‹ðvè§Ö3W ÓY~è¤Í2•xžÄ¯²­Zµ kkkÞÿ}¡°Ÿ2ý–åðÕÆ9ÔJÄè¡£ûÛ[ º––KsK+—®g3kŠõäòØ{,Š”Œ_ÿzƒP1žŒñE"!77—’’’GޗȤ ´¶¶sü D†Æþa½P Úž‰I×9vü ÅÅeèûljŠN`ð OÆIúíNŽ$?¿˜wV.RÊ}µç —¯¤0dðž1”ªêj¢c.‘qû¿lþë*zÙX ¥ò+åfIû7°½íû>T^Žœ-g¾DÚ,cˆ“Lÿ#Nvˆë$èëê=qùËËËÃÊJ¨¿O›~››¤|÷÷EÔJÄx›È¼ÕŸ¡£óÛ3<ƒü‡Q,®bÒ(¯ÊÝÊ)"ñfÎcIãïÌ¡µµ€€7>|âuú´¥÷iÆÎÎŽ… ªõE«îîK¼GOcö;Û8´ímÂø7nžÃ4fºP(šž·3sÙùßï±¶¶dÑks¸DÚ­ÌNe3³òˆŠN`ԳϰbÙ|žö|}ˆø ‰¤¤¤áã£èÌ&OËðaƒñ=Lù¼Gÿ¾|ñÕ"£.0û%¡°~­¤–dàda‹•±ùCåSŠn“UžÀûËqïå €›•àè>Âý‹âœTLÌ­xùÝ*Kì¿%Ö,zò,=]Ð{z&O[zŸvfÏžýØÞ=rÊ<Ò#¸yŒc;Öâ>tF&æB¡hbxzôïÂù³ç÷,".^½o$±±—˜5sªJø„qÏ!‘ ¯* ÏÜ;R©ìììØ²e JY©TÊ‘#GˆŽŽ¦¼¼kkkFÍ+¯¼‚¹y{gòÒK/©¼#99¹CØ?þ¨UzÛöD­\¹’ýû÷“””DCCÞÞÞ,_¾—²ëׯçÀDEE!“ÉðóócÅŠ*Û]9zô(111ˆÅbÌÍÍ9r$óçϧW¯^Z§A]i’^Mô»iÓ&RRRضmýú©Ö±¸¸8¶nÝÊܹsyõÕW•áõ5•ÄÿB1)ž·sk{­ë×ü5;È/®à¯oþŽiã:~'þ›ã1ì9ÉŒ‰ÃX¿|&²æNàtÌ5 Ë*156d´O–Ι„“]'9üïÔŽž½D¹¤†þ®ö¼9*#õU;}¨«Üþ¥„††&LŒ qu°æ/oÌÀÛÝY)÷/‚9sMåÙûíAlÛø °»÷"jœ·n¦ª¦žƒ§â¹r=›¼¢r¤²f¬ÌMæÝ‡¥³'áêh£µ~wÞz‚Ý»wÂwß}ס½TUU±hÑ"‚‚‚Xºt©Æm^9f””°ÿ~®]»Fcc£²/qvvÖª¯Þ¾};ís5í«µÉÛŒ76q=.„šÊRbƒwðÊŸƒBóÍ;©™Y¹XYYàèh§ K»•É_ 7¯àÏËdŠS¤†"¡D3ŸÅdoÂO*aÒæV~‘”P\#V ¿Z˜ÎŸŽ~D­´^VV[ÉÁÄPÊëªØ:s•Š|›ÇÓË¡¯Zi¹UšÀ»ÞÝ’·={ö‚»»;³fÍÂØØ˜êêjòóó‘ËåJ¹ææf6oÞLVVS¦LÁÑÑ‘ììlBCCINNfëÖ­)ŒêÅ‹+ŸÛ»w/ÎÎÎLŸÞ}^ûŠŠ Ö­[‡‰‰ AAAH$Μ9Ãûï¿Ï矮L@CC7n¤©©‰™3g’ššJXXÖÖÖ,X°àN[“±iÓ&n߾̈́  ä—_~!""‚«W¯òé§Ÿbii©q4Ñ™&éÕD¿Ó¦M#%%…ððp–,Y¢ò¿¨¨(¦L™¢žy”¦ÆzDFŒ¼ÿaµ» ª>ζöp±·&¿¸‚bqU§qˆ+ªpuTìŸl•ËY¿í’ÛW’$²z~ŽM!!9“¯þ¶¤ƒsøL‚JüiÙE¬Ùz€/·,Á£·b%à‹ÂùþD¬Êsµõ¤e!®¬Q ·³1§Ÿ«¢ßÎÎ/ë¶z«MÞº›¬ü2öŸˆS +—Ôƒ+7²9øÉŸ031ÒX¿=™7uêYOáää¤èÃËÊ:5¬Äb±Šœ6m¾¼¼œuëÖaff¦Ò—lÞ¼Y¥?S·¯˜úè#ཛྷ>}šôôt¶lÙ‚O»çjÈ!ìܹ“sçÎñ /0sæL•ÎÌÖÖV%¬«äçç3qâDÞ~ûmôõÍÕÆÆ†ýû÷E`` R6##ƒ#FðÞ{ï!‰hnnfÉ’%ÄÆÆ* ¹222X¶l3fÌP>ëååÅ®]»8zô¨J­n4Ñ™&éÕD¿¾¾¾˜››Í¢E‹ÐÓS쮫«#11oooU'7WÂp÷ñëò²˜‹ƒÂ ,*“(<;åU”ˆ«éíÔ + Ä’Zå‰ñSQWIHÎD¤¯ÇÆ7‡ïÐþÜÎ+aÓö#TTÕ±çhÿ8KåÅâ*žŸø ËçN¦X\Åš ®AÊÁxþúæï8vöŸõbõëÓ171¢º¶œ‚²^¾es'³lîäûz4UÚÏ׊G¾Ä΃çTÂîE›¼u7Ö&¬úC #õÅÑÎ i“Œÿþ/œSÑW‘Tדp-“€±ƒ5Öï“·ž4"}ôîÚ³ØÖöÓ†¦yk’5wúÓ¥¶ãbÇœÀѸ»Ùcbd€µ…)³ÚǘÊê:­ô«M¹=M†gYY™²M9r„óçÏ+½•€rò¦M›W·?S·¯î)º2¸z¶Ÿ_)ÎM ‹žòxˆ—WòÁß·SU]Ë¢×æ0~ܳwŒÒ& ^W×Àöÿ|Cc£”·ÿôúCg6=‹HOŸÅ¾³øoÜBÓâˆÊ¼ÂؾCyuøtFõVõ „¦)–°ngâûÙ몳Þ?W%ìf±¢3îeb‰Ùý¿ƒør9¤•fóÚM Ë¢­¸Yµ{ª õµ«'«V­âã?æÛo¿åðáà >œ1cÆ0fÌ•Ž0//¦¦&V¬XqŸz[÷ÈÊÄÂÂÝ{®ö±³S,J$’†Ü½Ë?ëׯïà½ìß¿‡8õôôpuu%33S«4h£3uÒ«)S§N%88˜°°0ÆŒ£4¶ ñóó똮jÅ`jjnÝå²r¾ãñ,.«¢®^ÊåëŠÉVÄÅTV.œFYÅÃóŽñ—ù‹bàTôUNEwÜC_Y]Û!l°§«ê wLj­¬j—}mÖ>ßÿ3×3òY¾y–fÆ Ô—ÀñC?bÀ#©·šæí~'¾»ºÔu)•ŸÂIÏ)¢¦®‘Ö»–i[ïY²UW¿Ú”ÛÓ€½½=zzzJÃ3!!]]]¢££ B,£§§‡½½½Öm^ÝþLݾº§èÊp÷>ñúê Á°è)ÃÓÊÊ‚’1vv½øï½…««“òâòJìl;n⮯oà_Û÷PXT›+Òß½·POoúÍÁÇɃÃWÏŸ›BxÆ%Â3.ñS^gÁˆçDC Å5å*žR#‘æ½æ<€yÞc°cÿN=ž»¿Ó@OaT¦–ä(±¡)ým]Ñ¡ëw0€]»vÏ… ¸rå ±±±888°yófåŒ_.—ãææ¦\îíXßïá6€6—Ë;lï5@µIÓ¢3777¼¼¼HJJB"‘ÐÚÚÊõë×ñ÷÷ÇØØ¸ƒ|Û}ÍÍ]÷ª¸Þ1nnnZ¥A[i‚ºú6miiiDFF¢««‹\.ïp¨Hé±q¤¢8—Ê’®îÎÙÞʼnçSÑŠ“⿟6ŠC§8|æ"­r¹Òƒ`ifBEU- gŽcÅËS´zçÅ…‡Ú³êÞÕ!ž® ¹ã½Ë/®`ëÞoæp2*©Ë†çÝå+“µ uœ¬hš·ž8DóÃé ŒÜ5oÌÀÎÆ‚ŒÜbÞÜòu—ôÛåÖDGG“””ļyóºl999QVVFBBæææ,X°€°°0Ο?Oyy¹Êéîjóm«,}úôѸ¯î©¾¤+y«*/l¯+¶Nt¤[öx¶ÝÉ¡z‚ðdˆb¶Ù¶ìÞÑè\ÀˆáC„RxÈ­,â`b(7K²¨j¬¥A&%ORLybùÃÌФ½QšZ)/pß“pœ¢j12)â: ÉEäVuˆ_\§8`¦wç¹Vy+IiL:ÓizR †ç{<§÷õnìÛÇË/¿ÌþýûÕγ¡¡!Ï?¯0¦ï^:9r$•••œ:uJ#ZZZ’››KSSS•Sss3?ü𺺺øûûküüÈ‘#©®®îpýHhh(µµµLœ8Q«4h«³žÐï¸qã055%..ލ¨(ìíí2¤ó~¦m?Vö„®OjDúØZ)(%Þ̦·S/æÏ‹ŽÄ%¦+ŒS‡ö%ý1Ï(Sùù"!QW©¨ª£±IFEU©™…ätßiúÏVXt¶·rçÁsÊSëy"Gù¸cbd@}c“ŠìÝòÚäM4Iï³C܉ýÿÙ;ï°¨®¼f`†ÞA@PQ@±`¯`7ÑMÔ˜bLL1ÆX6nÊ&›lʦùî›Mòf“ÝìnzÙ$¶Ä{‰A±Š ÒA¤÷> 3óþ12Ìe†ªQÐóyžyÎ=÷Ü3¿sνßû;-6™CÑç9}^/¬<œ±³±¢¦Ne6ýŽØ·3¿­+öí,$$$œœ|]„gee%çÏŸç7Þ0¼È}üñÇÈår‰Gµ+m>%%…O?ýêêê8qâÙÙÙ<ùä“’´;z¯nº÷^®Î¼737s½½{ɵÜÏÎFl`ÀðlÄNvžaG£Û kž«W=ÊŽ]‡ˆ9OâÅÜ=\yø¡ùÌš!П‘y€Ä¤T“RMÒÂóæànçÌØ>CÈ,Í¥¼® ­N‡«­#ÁÞ<6ænÆö‘‡xuÖR<\Ù}ñ9åÈd2Üíœ pïÃP/ÓMÞš½‚¿úޤÂLŠkÊðrpg”oóÍ,‹”×\/‚½:¶ÄÖܹsÙ³gsç¶¾ûJӬ튊 4 vvv 4ˆåË—K–ÌpttäÃ?dÓ¦Mœ9s†sçÎÂûöíkvý6€'žxKKK"##Ù°a …¢CÛ·µGLL UUUØÙÙÈòåË>¼kÉÙÙ™>ø€õë×KDD,\¸x Õ1žíå¡«6ë ±ïìٳٷor¹ÜäAeLpè<ö~çMEIa›>á±×¾½¦<úôrålR6SÆègÀN?¸Yxy<=\øö¯+X»ë8Q±)”T nÔ`gcE@_OÉBïKïB\b™¹ÅTÕÔa­TÐÏ“3ǘ,V?cÂR2ó).«¢A݈­ƒôæ¡»'2a¸ÿ5—ƒ‹£ÿ|íq¾Ú|„Äô\êêp°³–ÉÎü¶ßŠ—¯îÄtú|:r9“FòÜc³yòõ¯L„ggìÛ~›1O?ý4«W¯îÒ˜osÂÀÆÆÆpO7nJ¥’††IW{gÛüO÷Ê sÈJ<Å7o.â¥/¢°T(…QÝ–gžyÐ/=ôÒK/áãã#Œr“ˆØöÑ»¿CaeÃ’7~ÀÕS,)„§@p“17IÏë˦M›°¶¶&00_|Ñd,X[(¬lXöÎ~üÛ“Lº{©‚nOÓz–×c¹àÚ9ý~ÎÛÁÜeoÓèDavc<@ 71ÆS @ „§@ @O@ @O@ ž@ !<àö¦¼8­¦QB t Jó³„ð®…ß}õ #þþ0ßÜÙás’‹²yiç?˜ñÙJF}ôÓ>]ÁGG×uËß§R©D!÷Pûæg&òï?ÎfÃÿ­2ŸSû+Sû+Y¹Å’ÿ[ãï­ãÁþMna™(¸›DWÊ­'æAÕÐxÓl»iÌM/ß›™‡Î–EgêCêÙc|¼z*»¿yë–j—í. ¯Õj9yš»RQQÅ7_¾o6žN§ãБHÂ#b(..ÃÉÑž F2î, …$nÄñ“„GÄPPPLCƒ;;[úq÷ïfàçç+î–·(åuUäU0س‡Î‰ÏMf妿¢jTKÒ鎻‘=ÿü󸸸ðÎ;ïˆÂîaö-ÉËäë7R]^Œ¥Ò™üÚßÉÏ&eѨÑrê| fºˆ\wÎ&eóݶpR.s俯 ƒÜbe¡VÕ¡Õj8¶ýKV6Ìyüµ[_xÆÆgÛöä絛к Û ˆaè@B'!95“½ûŽ’““ÏsÏ,•ÄÍË-ÄÓÑ#†`¥TRT\Jô‰XÎ%\âÕ—/Äç-ÊÅ‚æ=°÷òk7¾k|…ªQÍ0ïþú»ßãíèAqM9–r‹n÷û²³³qvvÝÃìÛØ âÇw—R]^LàÈ©,úã'Èd×.<çNI~qÓljÂü&\ÊÌ#öb¦0Ä-ZƒÇÏæç>fÓÇÏräçÒ'pC&þîÖž©iY|öÅ:\\œXºd!'bâHº”f6nZz6á1Œ;‚U+pðí7}"–„„$‚ƒ›o¾-šg’ÆØ1Á|øÑW„…Gó¤ßƒ¢ß‚$dàí莳C»ñòRI/Éà9+à¦!éã,¶ˆ\?Žlúù™‰Ø:8óП>Enq}v~iÙ\a\@pMŒ™¹ˆäØ0âncÛ§/3`x(Ö¶=ú7µz‡ ðïÇ£‹2¥RAÌÉøV‰Œ< À‚ùwH§„Ž%úD,'NÆK„§ùëùPYY-jÚMæ×KÑlK#± ƒÊúô²wå•™K™2`”$nAU)ŸGmæXzeuU¸Ú:rÇÀ <7åalÖ’¸¯ ÏÁ½:ÖÍ›“€‡½ î}¯ùwét:8ÀáÇÉÉÉA¥Rakk‹‡‡kÖ¬ÁÑÑÑW¥R±eË"""())ÁÅÅ…ñãÇóðÃãàÐÜèï»ï>É5Î;göË/¿t)¿÷ÝwÇç™gžaýúõÄÅÅQWWÇàÁƒY¹r%>>>&q_{í56lØ@xx8jµšV­Z%îR__ÏÖ­[9vìÅÅÅ8880fÌ/^Œ››[—óÐQ›u&¿±ï[o½EBBü1ýûKëXTT~ø!>ø <òˆ!¼¶ªŒcÛ¿`Æ¢?âàÒëšêØß¾Üɾcg%aÏ>6›E¿›Ðz{‹L`gX,©YÔ©p°µÆÏǃÿ¼ù„$žZ­áçý'8yžœ‚R– èÍ#s'1~¸ó}÷êx±uÿ÷4;Äràø9T „ŽÈŸ—ÏÃÖºkûÐw&ÝŠªZ6îæÌù ²óJP©qv°eäà~,`:¾^®’tÇ íÏè!~¬Û‰oü~‘±Éì ‹ÃÉÁ–·VßÇðA}ôvhÔ°i_ ûŽ%·¨ ;+Æû³|át¼=zvþˆ³ì 'õruu ØÚXáëé‹OÞÍà½MÊÂ\ù4qlÝ›®;­“-ùçûÙúë)d2øës ™6np§mЙºÓ|s‡Ÿöž`ëÁS””WáïÛ‹§ßÁè!~×Ô†ŒÛî¦ý1ü{ݯ&¶ílYt…»Ÿ|‹óQ{¨*+$rç7Ìzø…[Sx̘>©C‰¤¥gáì숗—‡!,éR_~½€¬ì+í¦‘‘y¿~¢›ýfòɱ|³C¦jÔr¹¼€üªbIx|n2Øú>ÕªZCXQuc÷SRSÁ‡óŸ—Äoòxyúu(/— 3èÑ÷ºü¶o¿ý–={ö0`À,X€ •••äää Óé ñyûí·IOOgæÌ™xyy‘‘‘Áþýû9wî~ø!ÖÖzQ½lÙ2Ãyß}÷½{÷æw¿»~]!¥¥¥¼òÊ+ØÚÚ2wî\ÊËË9pàï¼óÿþ÷¿ ù¨««ã7Þ ¡¡ùó瓘˜ÈáÇqqqáÑG½zãUóÖ[o‘ššÊ”)S˜3g—/_&,,Œøøx>úè#œœœ:‡Îج3ùíŒ}gÏžMBBGŽá©§ž’ `æÌ™’ð¸£[i¨¯E¡´füœÇZ-ãG¿Þî­>H<\èï«¿fä´?Déý¯w±'\úR_Q]ÇÙKÙÒf£†Þ_' oP7ræB±3xeù|æN)9ç­m%=§Ððÿáp°·æOKᆭ:Ù‘tÓsŠX¿+Jr^Iy5‡£/pæBÿþìm›ëÃ¥Œ<Î&eÑÏǃ´ìÞùt5µ*úõv'5»€ÿ¬ÿ•¯þç)´:¯}ü31çš{ßÊÕµü™@̹4¾þŸ§$â³£åö[ÒÑ<|ùóÖ튔„U×Ö“”‘GqYU—¯ßÙºÓÑ:i"še믧xúá;º$:»Rw6ˆ!¿¸¢YdäñÒ‡øjÍSôõìrº™õÁ'7o‚Cç¶…“û¼µ…gG).)Ã×ÇËàUÚ»ÿ(;vÄ×× {;[ÊÊ+LÎihPSYUV£%#ó2[¶í£o_fß9E¨¿›DƒFͧv0Éo8¯ß±Œ^v.ÔªUd•åâlÓì,­­äÛÿNµª–ß…°:ôA\mù*ú~<½›cé±’´+ëk¸RQØ®Çóõ=ÿaOâq©G=ã,#þþp³Wéî?0wHçëÉáDZ°°àý÷ß7™ð&¹îÛGrr2kÖ¬!88Ø>lØ0>ûì3:ļyúá"óçÏ—#wwwIص’““ÃÔ©SyöÙg±´Ô7WWWWÖ¯_Oxx8sæÌ1ÄMIIaôèѼúê«( yê©§ˆŒŒ4¹={ö’’Š+¸ûîf¡ÄçŸÎÖ­[%b¯£yèŒÍ:“ßÎØw„ 888ÁÒ¥K±°Ð®©©!66–Áƒãåå%}¹9s€Á!×¥ûjŃ3XñàŒV=!-½JMø»§Žäñ¡¸9ÙSPRÁÉsé’¸Ûžâì¥ld2xî±9Ì™<œ¢²Jþ÷‹¤dæóïõ¿2sÂlŒ¼Žé9…<~O(þnÿóÙ/œ>ŸAÄ©K×,<;’®‹£-Ï?>‡ÑCüðòpFÕ æ‹ŸŽ°7"žòÊZbΦ1kÒP‰ÀZ¹h&“GdÉ«_P^Y˹“ ÃýYòê¤^.`ox<1çÒPXZðÆÓ÷2a¸?©Ù¼õ¯-”VÔðíÖpÞøý‚yÿÝvP/Ú¦Ž âOü[k*«ëȼRdâå;ü_ý$“­¿žâ³‡$aæÒíhÝéL4&)#¿·€{gañÜI]¶Cgë@~qwMÁÊg_\ÁKÿ·š:÷DóæÓ÷v¹ uè¹Ò‰²¸†Mº›¸°-”çR} Ͼƒz¬Ö¸.Ë)54¨Q*•ÔÔÔñ¯Oà—í4†×_Y““ j“s.\LæÕ×?àõ7?äëo¢¶¶ŽiSÆ£P*„¼IÈ!¿:©ÂÉÚ;¬V¸Ú:2Ê'ˆþ®Í]=?œÚEYm%C½üY3g®¶Ž\©("·Rïåñ°“ÎâM,Ì0|okFû¥¢ö×,Ô‰IæpuuE£Ñ°gÏÔju«ñ"""èÝ»7žžž>AAúá"‰‰‰7¬Lüüüxþùç ‚`òäÉz[]º$‰ëééÉË/¿lÕ–––I~ë±cÇptt4ñΚ5 {{{NŸ>Ý¥¡oO‡,$Ø;€Íñ‰ÎJàHÊ)ޤœâÏ3ŸàÑÑú7Ùòº*ò«J$žRk…O7FöÈ¢‘w2ÔË߬dz½õ;•zQ™X©olVvø»û"ãÚofäóÏ?'::š'NpæÌ"##ñôôäí·ßÆÛÛûêCTGŸ>} ݽ¦õýæN`hòZYYuú\9…ÐB€v%ÝÅf}úô!((ˆ¸¸8ÊËËÑjµœ?žiÓ¦accc¿i½ÎÆFõ /ÇF¦Ãq5:­Ùpㇰ¥E÷ÙdíÎH¾Út产[§jhóøõ¸OÜ,Ý5!>ì;v–Ø ™ä”rôd"GO&òÀãøã];Þ™ºÓ™:ÙÄ´qƒ9z*‘ú5kwgõâ;nzÝ©W5ÝŸ=¶ ™Ü»µÍù·TXÑ“¹.ÂÓ¯Ÿ/ŬZ±X":óò ©¬¬–̶hšÙ^UUƒàæ1¹ÿH&÷Iµª–g¶ýqW’øáÔ.ƒð¬2šLôË“1ÀͧÝ4“ õ]Aì&?——¢;õp]&J¥’iÓ¦1mÚ4T*;wîdÆ lÞ¼™çž{ÎàÍ«®®füøñÈ:±R½L&kWØ]ÒÓõÞã¾};?éÊÝÝ+W® Óé$¿M£Ñ““CŸ>}º”‡®Ú¬3tÔ¾³gÏ&))‰£G"—ËÑét&“Ššptõ¢4?‹²‚¿-]o²r‹‰ŽOaÉ‚)mz˜<ÝœÈÉ/%)=O~1µy⦟G—òñ[L¸ùyß Æ íÏKOÞ‡«#)Yù<½æ¿×”®“½-¥Õ<6?”UÍüMÊ%""‚¸¸8-Zdx½Q ôeØUï]N~)~·‡Ø‹™ì3+<ÛšZ­A¡°¸¦ºÓ™:ÙÄü|=øvËQ6î‰fˆ¿ÓǾ©uçd‚¾ç&°ŸW—ì “é½øÆ÷›+¥íÞŸÚ+‹k¡¢$·¹¸{Ó“¹.ò~Âxý؃#aÒ™h»÷èßZšºÝÛãHX2™Œ©SÆ õwƒÉ*Ëccì~.¤SQ_MZEvy>%5ú®T{+[C\;gÃî߯l'¯²˜zµŠâšrÎå¥U–g’~q¾ ÃâêyZ–¸+IlŒ;`6? ¹zá9ÌË¿coÉk×òÐC±~ýúÿf+++îºK/¦»‚ÇŒCYY{÷îíÜCÑɉ¬¬,~;/Yc#?ÿü3r¹œiÓ¦uúü1cÆPYYIXX˜$|ÿþýTWW3uêÔ.å¡«6û-ìŠQQQ„‡‡Ó«W/† 3?†³iÜTÆ…ë³åž¹1’Öì¸ÉWÎR¯ðî—;ÈÉ/¥®¾ôœB¶8)ýM£ô]­ÇN'±ýЪkëIË.à“µúöÓÇË!>Ýæ~RÕ3éâh‡£½ i— ø×ºלîÄlùõ${Âã)­¨¡¾AMiE ‰i¹d^)ºæk|þùç=z”O?ýô†Úì«Maœ>ŸAQYõ*5r,¯Žûtv°kEˆ7{ñ·üz’š:U5õ\L»Ò¥ºÓ™:iÌ’{&–»úÛW;ÉÊ-¾¡u§¸¬ŠšZ%åÕükíΧè×¾wÖ˜.ÙÁÉAÿ¼kZ™"âê9m¿µ_×ôŒN<}UàÊñ uëz<×ol^V'¿ È$ìÑÅúكÃ"*:–ªêZøq)9ó’™1}ýýú˜¤ëää€R©@§ÕQQYEÒ¥4r¯ðÄã0lè@7–¢ê2Þ?ò½ù79d,ŸÐ<ôÁZaÅ}Á3Ù|ö »/c÷Åc’ø/ÏXB¿1Ò72_ç^$dðõ‰mì¾xŒ’Ú êÕ*‚½XãüùóôéÓ‡ÌÌLŽ;ÆàÁƒ B¼³yèªÍ:CGí«T*™:u*ûöí`Ñ¢E­za‡N¼‹sÇvP”“Ê•´søø¿¦<š/ùÙÆC†Ù®ÆÞÅGæ…—BJV>ŽŸãÀñs’óÎi~l~(a'/R ­Ú£ IDATXRÉGßïå£ï›¾µRÁk+ç#ïFûÈŽ6€ÈØdEŸçP´~R‡·‡3v6VÔÔ©ºœîò§súB:…%•¼ÿõ.Óã §wÙóÛD`` $''ßP›­Ýyœµ;›=¶ìó/„ã‚`k­¤¶¾ARÏŒëZgêNgê¤Äƒ%—ñæÓ÷±ôõ/©©Uñú?6ñõ_—wiÍØ®Ô{¢Ù¸'ZvÏÌÑÌš8´Kmhʘ v…Ų'<ž„äËää—âêlßæ²V)‹kálÄv ÁÖ¡g¯WÛ¦ð ;ÝfX“ðX½êQvì:DÌÉx/¦àîáÊÃÍgÖ ÓýÑ'b©¯W]õ:)qws!(ȟ߯x”^½Ü„ ¼ ¸Û93¶Ï2Ks)¯«B«ÓájëH°w¹›±}†Hâ¿:k)ž®ì¾xŒœòd2îvθ÷a¨×“ôßš½‚¿úޤÂLŠkÊðrpg”oóÍ,‹”—jøìСüÏ;—={ö0wnë»Å4ÍÚ®¨¨@£Ñ`ggÇ AƒX¾|¹d GGG>üðC6mÚÄ™3g8wîœ!¼oß¾&bšxâ‰'°´´$22’ 6 P(ðô¼ö]–bbb¨ªªÂÎÎŽÀÀ@–/_Îðá]HÎÎÎ|ðÁ¬_¿žØØX"""ððð`áÂ…<ðÀ­Žñl/]µYgèŒ}gϞ;}ûËå’—Š–‡ÎcïwÞT”ä¶é{íÛÖæl¬•|öÖR6î‰æèÉDr JÑjµ¸»:2j°T¤;;Úòõÿ<Å·EŸBiy5öv֌ҟ'îbX;´»ðòÕ]›NŸOÇB.gÒ¨@ž{l6O¾þÕ5 O¾ýë Öî:NTl %¨5ØÙXÐ×S²ÈzWyúé§Y½zu—ÆP_ 3& !%3Ÿâ²*ÔØÚX1x@oº{"†›wq´ãŸ¯=ÎW›˜žK]]vÖñÝ™ºÓ™:Ù/w'^~r.ï|ºì¼ÞýbïþñÁß´î,½w q‰YdæSUS‡µRA@?OÌÃìÐà.·¡?­­Û™µcogv~õÙ—b±upæÁ>éñ¢®Ó¬vAÏÇxg îÂÚÓ{X{zÙcg_ú©GÙw×®]Ž{=w>ºØ¸q#*•Šððp***xöÙg;<+yásÿ ¬0‡¬ÄS|óæ"^ú" K…Rõ6â™gžôË®½ôÒKøøø£\Z['Ö7cKÓîLĶψÞý +–¼ñ®ž}o‰ß%„§@pøî»ï„ðüÙ´iÖÖÖòâ‹/JÆí¶‡ÂʆeïlàÇ¿=ɤ»— ÑyÒ´–ïõ—-\FN¿Ÿ³Çv0wÙÛô:ñ–ù]bŒ§@ à† Æx @ n=¢«½¤ð’()AÅÝ3€â‚$a @ ÜÖ§@ @O@ ž@ ž@ ‚î‡XÇSpCY¼õc j*X1úN›Ü¡sÒÊ Xwî(g ²¨TÕá ´f¶ÿHž;§Ûý¾†5J¥B´@ ž:Éî½G¨¯WñТyÜ9«u±t)ýÂIϸŒZ݈··3¦Mdrè¸V·yúþÇ-½= ™4†Í[÷ŠÒè&Í<ÏÞÔXRJò¨j¨ÇR.ÇÝÖ‘gÇÝÅß’¸E5•üp6ŒW’©PÕâlmÇÔ~CX>êl,¥û]'—ê=ž®ëfO(ÈÀÍÖÎ×¾²N§#<"†ã‘§ÉË/¤¡A5n®Î¼øÂrìí qÔìÙ{„˜“ñ”•WàäèÈÈ‘ƒ¹gþØÛ5‹æå«^•Šå¤T“0@ mO€¿¼þ –ëÎLº”@ð°AÑYWWϺ Û©­­ %5Ó_¥j`ë/ûXüð=\ÎÉ%ÑMø:îŽIÂ4Zr«J)¬­„Ÿ/ºÌk‡×QÓPo+©­â—ÄÊêjxkꃒøMÏ7¯å%µTßßÅóºü¶Ÿ6íâð‘(úöíÍœ;§bmmEUu yy… Óâ5j4|ô¯ÉÊÎ%4d ½<ÜȾœËÑðÓxãõg°²Ò‹ê‡Í3œ÷ó¦Ýxzº3}ÚDÉu·oß.*–@ m ÏŽŠN€ÂÂ@ß-š–Å7ßþDqI2™ NGYY¥!þÞ}a”•U0nìp‚ù áÙMPkÙ|!€±½ýy~Â<Üm¨klàre1NVÍÁòúÞ ÛHMC=3ü‚yrä œ­mY{.‚Í£8‘#Ýæ´JUO^uÛðxþíØVeœ“„¼’ÊÌß6üÿúäû¹cÀˆNÿ¾ã‘§±°óú+«±´l}^]ØÑhÒ3.ó§–4Èß4h?¬ÝƱÈSÜ13@2ÙîçM»quqnsž1:#±Û•ãAOEÖÎì@Ywœ=(~[áÙTª” ;wb÷ž#hµZ&‡ŽÅÍÍ…;¢Ñh(*.åÀÁc(• \x·(îõ8@†Ðâ ´ÅÍÆ+KV– œ­í$1¾IE} ƒÜ|øsÈÔÚFò«Ë)¨)ÀÍF:É&¥Ìxb‘w«9H+Ëo7—þmœßÎÎŽsøH³f†´*>cNÆãé鎻»+Å%eÍ×½:T$55Ó <;#µZm‡â™Ó›B„ n-±©»f>޹ún|¾¦Ám.<•Jõõ*vî>„JÕ€½½K—<ÀÈCعû€¡ ~ó–=466rß½spuq%ÐPÈ-x$x ?œ #,3èœ$Æöàþ  Œôê/‰–q€K%W¸kÃÿJŽÉe2ž5S–\¬ž.Öv¸Ù¶>óû‹y«Ðé ¥4g÷}À·÷ü£ EJ‹®UÛ§ž\Äg_¬cóÖ½ìÞ{„aC2zÔPF&ñð_¹R€Z­æÕ×?0›Nmm}»‚Ó܃³)¬éÙ8èÚV BŒ zœÈ4S›Žëô¯»¦‚T&‰ÖÔsf\÷›ã*ÜvÂÓÅÙ‰¼üBTªFŽÂ߃ƒ=€~üàÙËÐ/ÓðËöü²ý€IZM3Äzž7‡'FL'È݇]—Nq:/ãÙ‰ÏNäãïâ ýØÅ U­d¼§ V––xØ91Ì£÷ Ç 7Iº)WÇklgýN…\_%›ÆƒÚ+mðsöhñpêú÷å½ÿ}™3±ç‰;Ϲ„$N>‡»»+/>ÿ½z¹j½½=¹ïÞÙfÓ1·dR³¨Ô™< ›ÐjuRiâéÔ™ˆÓ¶„¦ž‚ž"<͉CcQÙò¸2d†vзu¯¨ Ám$<üû‘—_ˆ••’O=l˜xQWWÏù É  ¬ÝC˜àÈŸ@jêyýÈ ³Øt!Ò <'ýwÁ3ôsòh7ͦ.ô—ŽM,ºXœÀ ·Þ×Et„­BÁÄ £˜8a j~=tŒí;~e÷ÞÃ,[º77gjjk9bH‡fRÁ(j$6›âétæÓi)f…ÐÜ BÔœ—²¥ð4ˆKcµiè%h:Þ|®q»âS èÁ³²²Ú$¬¾^ewt´7„O™2žc‘§P©øö¿›Xôà\ÖoØN]]=J¥‚iÓ&ð¯¼m’îÑð¶mßßêqÁoONe §®¤2´W¼\PÊ-¹RUJi]v +C\7,årµZ6$cÙ¨Y8[ÙR£V‘_SŽ£Ò_G7Iú¥u5†…ßµ:-Š.“ZZÀ}AãMò“Xt€ îp´õ—ý:Éì;&sß½ÛJS©T0cÚ$¶ïøUÒ}>|XçHX4³f†tXt:8Ø‘s%Ÿ†µaü¨q×¹N«•ˆMs‚Uú?¦i*è¡bš»Õ=—MÂSú¿¾æ·&BõTv5ŽÔ*ħ@ÐC…ç‹/ÿ¯IØŽÙ±ó í пwΚÌÁÃljÓwcß|{ä>ÃxN[[S/”²9æŽ ~{Jêªø÷)ók©Êñhð4ÃÿV– î îäSL?ËÁô³’ø«ÇýŽ…Ž“$aÞΤ”Ô±.!œƒég)­¯FÕ¨f°»¯‰ð¬PÕr¥J¿cÖ Ÿåÿà¡ã466òë¡ã­ Ï¿þíßøõóÅÕÕ…Â’ºÚzbãÎ#“ɘ2yœ!ÞÜ»gp&ö<ÞIÂù$û£T*hhP“““ÏÜ»gàëãeâ¡3zaGOð}Éè‘ÃÐê´Žkµ:‰À”~š¦$]3žQ!<=Ix6ÿ/‘±‰ÌpÜô2™^`Ê®¾ˆÉdò«m@ˆOà–žå¡EóèÝ»aá1äæ PXÒßÏ—»ïš!Y’FÐ=qµ¶g„§—+‹©TÕ¢Õ³µ-ƒÝ}Y8d#<ý$ñŸ7vŽL?K^U)2d¸ÚØãçâÉ 3^Ê?M¼‡OböZšGI]½ìœöìÇìþ¦Ë"%å¾vóíPþgÍ 1ÌVo ;[[Î%$QUYF«ÅÖÖšú±øá{$uÔÞÞŽ7^†]{“DbRª!ܧ·—a(IK!øÀ}wa!·àtl;vÄÂBŽ»›‹‘ðÔ{<µFžOFžNcÚ†7ZLBº£ðÄ´;ÝÔËÙ,F aF"T.—›  5ê‚—ŠO@ÐÍï ÅIºÃ¾gÖœ¥Ý2ƒn½QRxI”ÔmÄç§°ùbžvNl|àÅn™GsÝâ:Î0ŽS/0õÇûø =å”>\'›-=¡MË.éE©yáI+3ç‚nñ`1îSæUQ*–2är©•Â冿úódÍ‚•"ó–A÷ÀR˜@ШoT£Õi‰ÎIfÇ¥SLí7´Ûç»-ÑÙR,jµ:´º«ÞN­®…ôªÐl kÏ*twñÙž‡S®Ó„¨\.G«m™ “ËÑÉdÈeúµ…ÓÒjA.¿êëÔ;<žO@OAÂxg îÂæ‹Ql¾eöØ‘%knºà4ùnFt6mœ Ñj N­VÛ,:»ß[ RÖ ZE§ž‚ž"<›„ \~õ¯¬Ù{©•i5y3u:ä2Z­¹\Ž\§?G#Ó¡CŽüê v‹«kî‹O®3ë)¨@ „§@pK MµfE§ñÚZVâáÔ6 Ó–b”æt´Z­‘çS'Y¢IˆOAwÍâÓÈû)é6—¼ÉéÕ§F«1|oò|ÄgS÷¼®1ŸA7ž-»×eW»Í ¢Óhܦ\.ÃBn¡™:Z¹Üà5Fßß,>eFžNýP㥖žÁ-%<›¿4‰Bã.t½ç²yö&Ñ©Ñh ÞÏ&Á©Ñh$BT«ÓJ¼ž’‰HWÅlk{¿ 7›&/¥Þ£i4¦ÓÈÛ)—É ¢S&—£µÐ P: XX€Ñp•¦´›ÚZóÿ:£.wÓ=àžÂ­× QR‚nCÓOÒmÞâ£÷xêÿæææ¢´¨†:@A±¹\Ž………ɧ)ÜøoËtö»\T ÂS èù´¶|kâ a3 #466Æy¶…ñ8Rs;‰îv@Oà¶ ÆžÐ&ñÙÄÑK;…Ñ· ÓÝÓj»ÈÊÊ"++“¢âbêëô[ÒZÛXãáîN¿~~ôë×Ϭ8T«Õ’Ùë-…&4õÔšˆN!8!<‚[Vp¶Ÿ’%’ZˆÏ&ܽ…ñ·4ÕÕÕ‹8†ÂÊŠ‘£Bðòîƒ555äç]&>.ŠÄ‹‰L™:{{{Éù&mÌXx‹Î¦¿MÔ¸M *á)ÜrâÓܶ–æÆ{Î[] najkj8xð cÇMaXðãÆè·­õ÷„¿ÿ Î'œáàÁƒÌ™=Û«ÂÔXx6‰M™L†F£1|7›ÆOãv(D§@ „§@`@S_…µu›-…f{c=»Úu:1]pëÉ„‰S <NÓfÜ¡ÃFba!#22’;gÏ6+<ŧq{jš@ÔVlj§B„ =LxjµZŽGžfÇ®ƒTTTñÍ—ï·ú@>t$’ðˆŠ‹Ëpr´g„‘ÌŸ; …B!‰»|Õ«­^iƒ½(™[ÂÓ§IøôSŠâãy8.î–øMmñ”L.B.®Á­Æ•œ, ŠVÛØ¡s‘”Ï•œ||}%ÂSÖb ¦¦ïÆÐÝnN| ‚,}ÚŽñxÎæš=M‚ÓœÇS ô`áàßG/ 4d,J¥‚˜“ñ­&©¿i,˜‡$|JèX¢OÄrâd¼‰ðtO6  ÀœÉع“̽{Ñ64ÐwÎƽù¦dl¦V­&éÇIß¾êœööx‡†2ü™g°¿ê½0NÓÜušxäÂIøèW^!hÉ’~ü‘Ø>Äël~›âÍÛµ‹ÔÍ›ÉØ¹M}=>3f0~ÍvÞÑ™qžÆçÜ(ÊKjpvÃV„mn õ*J…MU•ùXZÚŸIii%%%œ<ÀÈà>¨ê« ã• êU*C:ÆÏ–ÉÎ`íŒï=Lx̘>©C‰¤¥gáì숗—‡!,éR_~½€¬ì+&ç¨ÕjJJËQXZâà`'ºDºÑù •éé†ÿÓ·oÇÚÍ‘/¾¨PZ-áÏü0Ãÿðâ?ù„´-[¸|ø°AÈ¥oÛFÞñãÈ BÞïÉ“)»t‰ã/¼@}I Ÿ~ʤ÷Þà¡ØX’7l îï—„ݨü6Qž’ÂÐ+´d Qþ3ùÑÑ\>t¨S³½1ž-Š7cV{NzZVÌ¢¶¹¡Èå–€uƒŠ€þnŒ?G/“xU•ùT•_A.7ÝÒK£Ñ`aaaèZ7æ^îZšB| ·°ðlhP£T*©©©ã›ÿþLBBSBÇñè# øç¿þKAa±$þž~Üpc¨­­'9%˜“ñ$&¥òÖÏááî*Jæ&ã3}ºAŒõ=›´-[¨ÉÍ5ÏØ©ßÇoÞ<|fÌÀmØ0üx€ _}E^T”!®ÅÕ 2£H,¬¬nh~›è;{6#þøG¼CBÈŽ¦¾¤¤Ëž–ž–¦ÿ[õxÞà1žbL©°Íž¨Õõ ¹Ì‚ò’LÊK2ÛŒßR|6‹nÍÓi,8[kàžJ¥‚â’2þú¨¬fé’…L{U”6 TJ—S5R:¾orèX†È×ßþÄ‘#Q<´hž(™›Œç„ †ï^'²ðÄ ŒC”''þË/¤ÿò‹Éù]s¿U~›p5Êð]fiÙ¤ »$6z-€-½2mya´ZñQé¤$äRU^‡ÒÚßþˆƒ³!žºAC\dé ¨®¬ÃÆÎ ¿A½;-+ëæ6öÕ» ß¿üßý¬üËœNÛó«w02¤?ζœ;‘AUyöN6ôeÄ$?C—êWï`øD?ª+êÉJ)ÄÊZÁ‚'&ààlCƒª‘3ÇÒÈH* ¶ª[{+üy2vjJkËN_«³60—¯ŸF˜ØæÔÑâ"Ó¹gÉx¼ú¸Hìpdû9²R yü3°TXˆC» Df”A«Õ`iieVx¶&:ÛZ³Ó\ûø‚[Px:;;RPPŒ‡‡yu5¾¾ÍÛ—”uȃ9fô0¾þò[xG7™…JI˜º¶¶ísnâÍÞ\~óçm‹‡_kÝ€æ„gäþ‹$Å_aȘ>¸y:P]QOÂÉ, rÊypU(–r4Zv®¡ª¬ŽÁ£ûàäjKyI ‰±—ÉÉ(áÞ¥PZé›óŒ{‚I8™Eq~%3î î²(íb>Õõ í‹›§—S‹9–LYq5Óç3Ä»xæ2®½ì ¹3ˆªŠ:ì¬iP©Ùõã)ÊJjM«CXZZ¶Ú¶DÙ·™ðôëçKAA1«V,–ˆÎ¼üB*+«M<œæ¨¨¬ÀÑAÌ4í X¹¸P_\ÌåËù „FbTÛЀ\©4Iï4zTggwßm;»¦tÄã™z!Ï>ÎLºs!ÌÖÁŠ‹g.SQZƒ‹‡=gOdRVTÃ}ONÀÅ£yoë~ìZ{ЏÈtÆÏÀ¨é‰ùçë¿wõ¡\U^Ç”»†0h¤ƒFø¾û) ¹ ÓwoÇ«^+³ŽÄÚViøgOdRRXÅÌÁ Ò<ƯWo'Âv&•θéºVglÐZ¾ÌÙÆÑÕwoGÒó™xÇ är}=͸T@£ZCà0o!l:úÒ‡¹¼ÓÈDx‹Ë&ÑÙV»˜T$ôä×#‘ ãGp$,J¾{ÏC·{khµZ¶ý²€ñãFŠRéôž2€äõëIÛ¶ú’ëë©/)¡$!Š4Ó5_­œ›½I—Ö­C]]MCe%%çÎI-@Ej*—"å矻ØlO€š›uÛäßiù±±SRt¥‚„“™TWÔ:‚Föæþ§&àâaèÈH*ÀÃÛ;õµ*ÃÇÉÕG2/´H·õëuì¶öV Ñ[<¾¯A”5Åsëeµ­B/óR!öŽÖ â) ÷ꉽ“5YÉE¾Vçl`>_­Ùf`°7õµjr3K a©çó°s°¦w?—k°ã­þiñ@‘É ã6;ú‘µÓ‘®usái§ ›{<×oÜaøž_Pdöèâ "88ˆ¨èXªªkàÇ¥ätÎ_HfÆôIô÷ë#I÷‡µÛpwwA¡°¤ºº†¸¸‹äå2ûÎ) (J¥0üÙgÉŽ¦6?Ÿ33‡?û,Nþþ’0¯ÐPvv¨kjˆûè#â>úÈp¬i}Î>3g’ºe iÛ¶QGUVÖîîÔv[o§9ñiîÿ&ŸPK&ß5„ÿœ#æp 1‡Spñ°Ço A#}±sÔ¯CZQZƒ¦Q˺O"Ì¿AZÈͦm>¬c¸xØC‹!N®veSÚ6vJ“ëT–ÕâÝ×ÅìõÝìÈË.“ëȵ:ksùjÍ6þC¼9q(™´‹øp§®¦ÜÌR‚'ô3É— uÖmØpÍi4u­›Û ¬½ö%¼žAžaG£Û kž«W=ÊŽ]‡ô³Ó/¦àîáÊÃÍgÖŒ“4NŸ9G]]=2™ ;÷|—7 IDATüûñÈâ{ J¤‡`ëéÉ]›7sá믹rô(5yyhÕjöö¸ „[p°É9Ö®®Ìüö[Î~ò %çÏÓXSƒÒÑQ"PG½ü2ªŠ r£®¨ˆ÷ÞËÀGaßÂ…ÝÖíy@»ÚÍ}õñscñ¦’ZDNZ19™%ÄEfpþT6ó›—~¼ªGo'ÆMk½HÒ–µ~½Žba!79_vµZ&—Žo3OÆŽÆÇ:z­ÎØ Õ|™±µ­’>îd%¢Õ!=±NÇÀàÞbrJ)©+dÑÓ¨Q£n¨§N]ƒJU‹V«1´ýºœhuZÕjµètZbÃMÚNGÄg{íP ô0áùÍ—ïw8!…BÁÂûïbáýí/Êüï¾#,ßMi¹3P[X¹º2ú•WýÊ+>Ç-8˜™ß|Óz=²·gÊ?ÿÙá|u4¿æâ-YbØéz ÑÖº[Š­FKiQ5– †z0T?F:=1ŸCÛÎráL6Óæ ÃÁÉUßî&×ËJ)ÄÚVÙ"mÙ5 ÏŠÒ“óË‹jpq³7:f*ðœl(/©5 ×ét”×ààd#9Ö‘kuÅæ¿yÛ îCVrWÒKHOÌÇÍÓ×^â¦Ð dȰY SXcai‰ÒBIeM©¤üëëkiÔ6¶šF“àl­K]Œçz6raàú ÍÖfÛïA-“ɨ­ià—ïNp|ÿEI¸w_ýJM^;¿AžT–Õ’žX ‰—Ÿ]ÆMqÄGe´ØßZfözýèÅ`-—ÓŠ%ágOd€ ü‡z7{<Í\Ço'Õu&ùM»OMU=ý{uúZ±AkùjË6~½°²Qpé\.WÊ8ܧËö»]>íz6,•ØÛ8þoP«ÚMm¦µMÄÄ" çc)L t]lš oGÒÕÞbÌ¡£“-C½I9ŸË¯[âéëïŽF£åâ™l,,å Ý2F‡ú“y©€#ÛÏ’›YB¯ÞΔ—ÔpáL6J+K&Î$IÛÚF?“ûltÃ'ô7ˆ­N½•ZÈ9¸5žàñ~8:Ûq©€ìÔ"F‡úãâfoâé2fTÈ2’ 8²ãù—Ëp÷t¤8¿’‹±Ù8¹Ú1:Ô_rNG®ÕY˜ËW[¶±°°À°c/#“É8ÌÇìù‚N>d,•(V¨Tµh´švã‹NãYì]žLˆP@O@Ð$„Ìx‰fÜ3'R/ä‘•\€Bi‰§¯3Óç§WoýJVÖ î2„3ÇSIOÊ')>…Ò’>þîL˜1g7é2dCÇö%'£˜“GSð죋m§óÚ7Àï>.œ?•EMU=®½˜¹`ƒ†û´üQ&¿ËÚFÉýËB8žLæ¥.žÉÆÖÞšaãü;%+E§¯ÕYЊW®-ÛèÃÅØËôàŽ­½•¨°¤¶®VƒV§E£k¼:¾SƒV££¦¾m„§@ ÂS \7ái:ºÅÒRÎÄYƒ™8kp›çZÛZ:{(¡³Û_·—· ?7ëÚò Œ `THë“yV¿Õú.c6¶VL½+˜©w_—kuÆmå«-ÛXXêwÜ4Ü×lY ºø ‘+Ðyþžà†ÏžÔu+»ù•u Û\8…•‚C¼ÅlöëüÂ¥Ct !<‚-ånÊu/ËépÜAÃ}oJ~o–mt:‰£¾VEvZf¡°·Æë¬<… žÁþÞœðÁ_b;7hDŸ«BðÆåWvm#“É(+®¢¬¸š¡cú1vÊ@áí!<!<»ÊskîýMãßȼý,þý Q9@OàVžbŠ@ „ð7BxŠu!·0¶66†%”$Ë)i5X)Â@@OàFR\ž'Œ ¸uð&×YxjµZŽGžfÇ®ƒTTTµº»N§ãБHÂ#b(..ÃÉÑž F2î, Ó7ÝúzaG£‰‹¿@~A1uuõøèË«~Z”Šà–eæ°å‚[­ºPA \?áwžmÛŸ_ÔnBë6l'<"†¡C 4†äÔLöî;JNN>Ï=³T·  ˜ÿù eå• À¬!ØØZãêâ,JD àvž©iY|öÅ:\\œXºd!'bâHº”f6nZz6á1Œ;‚U+pðí7}"–„„$‚ƒƒÐh´|úùZ´:o½ñ¾>^¢@ ngáàßG/ 4d,J¥‚˜“ñ­&y€óï„O Kô‰XNœŒ7Ï“§âÉÍ+à…矢S n!ZÝ«]«EÕ mwµÏ˜>©C‰¤¥gáì숗—‡!,éR_~½€¬ì+†ðظ ØÛÛ1dp:ŽÊÊj,–ØÙÚˆÒ@ ¸]…gG).)3x/u:{÷eÇ΃øúzaogKYy…!nvölm­ù滟‰?{•ªo¯^<´hÆ¥"@p r]V³nhP£T*©©©ã_ŸþÀ/Û:i ¯¿²''ŒºX**«),,¡ °˜{æÝÁïW>Ê}÷Ρ¢²Šÿ|ö#yùb–¤@ Á­Èuñx*• ŠKÊøë»ÿ¢¢²š¥K29tìUQÚ€Òhá`­VK€?“e“úúzóɾ'"â$-š'JF ¸F ðôìÙ -.[¶ŒQ£Fñì³ÏÞÐs@ðÛp]<žÎÎŽ• “ËùË«« ¢ôÝðÿ­­­hP7š¤1xpù…Å¢T‚käСC¼ùæ›Â@ ¸õ„§_?_V­XŒ¯¯·!‰þ~} çÌœBı“¬ß¸ÌÌ<=ÝÉʾ©Óç1|0cÇ ¥"¸­Ðh4ìÙ³‡èèhŠ‹‹±µµeÈ!Üÿýxx4/Q¦R©Øµk§N¢´´GGGFͽ÷Þ‹!Þ²eË$ß¿ûî»NçiÙ²eÌ›7~ýõW ±··'44”û¨(öïßOAAŽŽŽÜyçÌ™3G’F]];vìàÌ™3”——ãääĘ1cX°`¶¶¶’¸•••lݺ•¸¸8êëëñ÷÷硇2›·üü|öîÝKbb"ú3|||˜9s&S¦L¹.er=~GË«#åßÑ:ÒÛTUU±eËâã㩯¯§oß¾<øàƒ|ÿý÷x{{KÆÆ¶ö[/ºS4`@pý„gØÑè6Ú„'ÀêU²c×!bNÆ“x1wW~h>³f„Hη³³á•—ÏÖmû‰;O}½ wWî¿w³ïœŠL&¥"¸­X¿~=áááÌœ9“¾}ûRRR¯¿þJZZï¾û. …µZÍûï¿Oaa!3fÌÀÓÓ“¼¼<¸páo¾ù&66úµpW¬XÁÁƒÉÌÌdÅŠ]ÎWtt4jµš™3gâääÄ‘#Gؽ{7äææ2kÖ,lll ãçŸÆÝÝ1cÆü?{÷Õ•>pü; 3C/" ‚ÝØ,XÐØ[Œ-Æh61d]5SLÌnz\7k#)ÆÄ_cIL3šØ¢ˆbQ¤ŠØKĵÓ"2ý÷2:‚:( êûy†Ã™3§Ü;óν÷ÜCII aaa¤§§Ó»wo4hÀÉ“'Ùºu+`êÔ©Öú^¸p>úˆÂÂB @íÚµIIIáÓO?-W§ÌÌL>üðCÜÝÝéÛ·/äååâE‹prr¢S§NU2.·ÒþÊŒ—=ãoOžÊôN§cæÌ™hµZ €¿¿?)))Ìš5 êÖ½|ÉÔõÚ"§¢JÏ…óÂì.H¥R1ê‰AŒzbÐ óÖöñ¶.­)Äý...ŽæÍ›jM«U«[¶l!++‹€€"##9{ö,ï¿ÿ>Ö|íÛ·gæÌ™¬]»–'Ÿ|€®]»’œœÌ‰'èÚµëM×ëüùóLŸ>zõêЬY3¦M›Æ‘#Gøøã©]»6­Zµâ½÷ÞcÏž=ÖÀ+22’Ó§Oó /йsgºwïNÓ¦M™?>Œ5 € 6 Õjù׿þÅC=@Ïž=ùî»ïHLL´©Ó¦M›Ðëõ¼ùæ›øøøXÓ;uêÄ»ï¾Kjjj•ž·Ú~{ÇËžñ·'OeúfÓ¦Mddd0yòd‚ƒƒ¯Ûç×k‹BT–ƒtÕËËË‹´´46nÜHNNŽ5˜>}ºõƒ>99™ÆãááAaa¡õ§N:Ö£UU­~ýúÖ  °>nÒ¤‰5謷l*..¶¦íÚµ kÐY¦K—.øøøØÔ7%%???kÐYæêSס¡¡Ìš5Ë&°²X,èõ¥“Ë~Wwû+3^öŒ¿=y*Ó7IIIøúúZƒÎ2ƒ•?pp½¶!De9JQ½ÆŒÃܹsYºt)K—.% €àà`zõêE­Z¥·"ËÈÈÀ`00eÊ”ŠwdǪߕ½¼¼lþ.» æÊë¯L·X,Ö´¬¬,Z´hQa¹uëÖåÈ‘#Ö¿³³³+ÌX.M¡PpñâE¶lÙÂéÓ§ÉÎÎ&++ ƒ¡t‘ ³Ù\#Ú_™ñ²güíÉS™¾ÉÈÈ eË–åêue mO[®>+&kµ !$ð¢†kÕªŸ}ö{öìaß¾}8p€ððp6nÜÈ;ï¼CÆ hܸ1#G޼cõº]×[_ Uô÷õ^?55•o¿ýZ¶lI‡ Y³f¼þúë5ªýöŽ—=ãoOžÊöMEý~­6ßémO!§â60œ={FCçέ§¦“’’˜;w.[¶laüøñøøøP\\LëÖ­+ ÆÜÝÝkT»|||HOO¯0Ø9wîœÍéà²É*WËÊ*¿|îÒ¥Kñööfúôé89]¾çoAAAk¿=ãeÏø3Æ®m¤2}ãççGfff¹ôŠÆázm1d‰c!DåÈ5žBT£üü|>øà~ùå›ôæÍ›—î ¥»hpp0™™™$%%Ùä;räsæÌ!""ÂvÇv¨Þ];88˜œœœrUâããÉËË£mÛ¶Ö´N:U˜wóæÍåÊ-»•Ï••ÅbaÍš5@ém‡j{ÇËžñ·w©LßtêÔ‰ììlöíÛwÃ>¿^[„¢²äˆ§ÕÈÇLJâããùæ›o Â`0J¥¢wïÞ 2„””æÏŸÏ¡C‡hܸ1DEEáììl!]¦ì:ÄÈÈH €R©¼£í³bÅ vîÜÉçŸއ‡‡5=.®teº&MšÜT¹.ÎÎÖ`Ó6ð4ÉšìB <…¸_”ö¸•ÕŽ¤ýw‡nݺ±cÇÂÂÂèÙ³'®®®œ÷ññ'Ö®å¹s8¨Tx4i£üqÛÛ1bÄÚ´iÃôéÓïÚ±xÿý÷Ù»w/«V­ªðÿƒ7ß|“ºuëòöÛoßµí\°`Á}xÝïí¿Ú<À믿NDDkÖ¬Á`0P«V-yä† vÇ'£ !$ð¼ؘÍìˆMfuø&òó ¯¹~»ÅbaóÖX¶Å$ ÕæáéáFHH;† é‡JuùË„IïܰR•Y#þ~÷Þ{œ\·îòxäÞb0+.;þ<'Ož¬ðž‡w“~øá¾Çû½ýiÕª­Zµ’ŽBÔœÀ3e÷~Vþ¹ŒŒìôëo²-&[?@·®8zìëÖGsæL¯NkÍ÷Ô߆^3p]¹jNµŒŠ þ÷?kÐÙhØ0‚ß|…RIþ_IçT___ž}öYëzÜB!„¸ ç±´“|ûݯx{{2vÌ(âvsøHZ…yÓŽŸb[L:¶eÒÄÑ ¾_ôqñ)ìÛw˜  Òuôë^a‰I{0ôÒWFÅNÚK÷Ü~óMœ.­ã'×gU)Y*PûÈZíBˆ›<›5mHèèát{¸#jµŠ„ÄÔk› ÀðaýmÒ{tëH\| ñ‰©ÖÀ³"‹…ðµ[pvv¢oï{ëú*“NÇáädd$…'Oâàèˆå««˜ ÿü3Çÿü“¢3gP¹¹Q·[7ÚLžŒ[``¹ü†ÂBëc§+– ¼‹… 6°eËΜ9ƒN§ÃÅÅ___¦OŸn3¶ÌÙ³gY´h{÷îE£ÑððÃóÜsÏÙÜü»¤¤ÄzÏ@­V‹»»;:t`ôèÑÖå.\HDD?ÿüs…K@æçç3vìX† „ *ݶ’’–-[Fll,Z­WWWŒFc…yçÌ™CTT”MZEײtéRŽ9Bff&ƒooo‚ƒƒéÙ³§¼Ã!„öž}ì ÓŽŸÄË˃:u|­i‡¤1oÁNž:{Ýç'%ï%=#‹!ƒúàââ|Ït®Y¯gësÏ‘½{·M ZaÀg6³mòdÒwì°¦érs9NúŽ \º´\ði1›«¼Îßÿ=4iÒ„áÇãììLAAgΜÁb±”ËŸ••ÅÛo¿Mƒ =z4{öìaãÆ8991nܸÒÙ`à?ÿùÇŽ£G 8Ó§OEjj*³fÍÂÓÓ“ºuë]aà©Õj¬ù*õÀdâƒ>àèÑ£ôìÙ“  ÕjË—Öm¿OZ´(½‡lxx8gÏV¼ gggsøðaš5kF§N0 ìÞ½›õë×sáÂú÷·ý2æíí-ï:âž‘“%kµ !ª0ð´—6'À€Ò•8, ë"£Y½fupsu!ï|þ5Ÿk±XX³v3jµŠþý»ßS{ä×_­AçC/¾H‹gŸ- 0_|‘œýûmò_¹’ô;pP©x8,ŒºÝ»“wä;þùOJrrØ÷Í7t9€ß*X1äê´›-¿eË”J%aaa6“®%##ƒðâ‹/¢P(6l&L 66ÖxFDDð×_1qâDl}nË–-™;w.+V¬`üøñÖ€2++‹&Mš ÕjÙ°aC‡ÅÓÓÓxÖ«W¯ÒíÚ¸q#‡âÕW_¥OŸ>ÖôÓ§O[— ¼RPPAAAìܹóšgãÆ ³¹|ïÞ½ùïÿKrrr¹ÀS!„¸ŸUÉ’z½µZÍ… ™óÍO¬úsݺvཷ_ÂÓÓýu®íILÚCFF6½{vÁÝÍõžêÜ—&þø‡„Ðfòd4^^8Õª…ÊÍ­\Þÿ­Y@£¡C èÓ• Ÿ‡¢é¥ë Ówî¼#u®U«&“‰ˆˆ †_“Õ¨Q#kÐ àèèHýúõÉÍ͵æÙ¾};<úè£6Ïíׯnnn$'—^ªqåO€˜˜–/_ÎŽKGsrrÊ-ièèh<<<¬ëZW•+×´.**"77—óçÏãááAQQ‘¼Ã!„W¨’#žjµ mNΘC~AcÇŒ¢{·Ž—‚R=êk¬Xa±XØ‚££# èqÏunብgçÎ7Ì{þèQޝZÅñ ®%,¹t<•’ÀÑß~c÷çŸÛ¤Ýª)S¦ðÉ'ŸðÓO?±lÙ2Ú·oO—.]èÒ¥‹ÍúÍe<<÷æL_ß8¹~=ç¥ðÔ)¶½ôÒÓËå­×£ôRƒ£‹“¶r%%99KJ(ÉÉ!gß>òÓÒª¥ †AƒpáÂ…›*£C‡”›AIQQ‘Ím‡êÖ­‹V«%!!ÜÜܶž73±Jäž;wŽs—¾X,¾ýöÛ[<õz=NNN6õÞ½{9YÁ— !„â~wÝ#ž‹—¬¶>ÎÈÌ.—:z8m‚ZÔ’q)Ó¼Y#Ž=ÎþGéÓ»+Õ·)×l6±…BÁàGûܳÛjìXNmØ€./u#FXÓ}z¨Ü¬ö6¯¼BF\Å$L›V®¬6¯¼‚gÓ¦·½Îo¼ñÍš5£víÚ—&Œ] >>…BqÓ3´GŽIll,ß~û-û÷ï§~ýúœ8q‚íÛ·ÓªU+k`[x°ÿ~þýïЭ[7¾øâ nêT?À£>Jbb"}ôýúõ#55•¼¼<š7oÎÑK××^)<<Üú¸l6}xx8‹³Ùl(ÕºukvïÞÍüùó©S§àرc899QRRR­Ûß¹sçn:P¿õ1b;wæÝwß½kÛ$„â6žQÑq×M+ <^šÊêðÍ$$¦rèà_Ôö­ÅÓO £_Ÿ‡Ë•Qv´³SÇ66÷þ¼×ÔzðAzΙCêìÙüï¸ôòË¥G1¯ <]üý´l,àlt4ÒÓ1 ¨ÜÜðnÑŸK·ö¹ÝÊf™çççc2™puu¥E‹L˜0Áz{¡Êòòòâ“O>añ⍤¤ƒ¯¯/£FbäÈ‘6×l––ÎÎÎÖ×ëÔ©jµ½^Ó§ÚÛ·oÏóÏ?ÏòåËY¾|9ÁÁÁ¼þúëÌž=»Âü­íýÃ?`±X°X,ÖÀsâĉ,\¸Ý»wc6›iÚ´)¯¿þ:üñçÏŸ¯¶m/""‚ü‘eË–Uë>P•õ¨)mBqóÚÌÖ-~¤ßÀ±5²‚>~-d”Da6›1™L˜L&ŒF#&“ ƒÁ`sϲßz½N‡N§£íCwt{ž9s&‰‰‰®¶t'UTÙ³gÓ¬Y3† vW¶I\–“uÄúøËùŸóÔ?F_óÏtí©k–³;ú0¯=ÿKþØ„““µZmóX£ÑX«ÕjT*•õ·££#*• ¥R‰££#J¥¥RYînBˆêå(] „¸“þYÍ“çÄí#kµ !$ð÷¤+¯Á¼‘ÊY»ÓÊîMVV®®®´mÛ–ÐÐPüýý­ù®^kÞËË‹FÛ‹Œ¸âzâ#FÜô³gϲråJöíÛG^^ …‚úõë3xð`úõëgóÇG«Õ’˜˜ˆ››3gÎä…^¨°W_ãiOû¯Õ&{ûN!„žBÜ´Š®Á¼[Ï °qã0Òœ IDATF D“&MÈÊÊ"<<œ#GŽðõ×_£R©ÐëõL:•ŒŒ }ôQêÕ«Ç™3gˆŒŒdÏž=|ú駸¸¸ðÚk¯NZZ¯½öÚMÕ)==·Þz  „——999lÚ´‰¯¿þ'''ºuëfÍIÆ ™0aYYYøûûÛ]{Ú­²ìy®B <…¸%÷Òu~Û¶m£uëÖLœ8ÑšV»vmÖ­[Gzz: 4`õêÕœ:uŠY³fÑ Ak¾Î;óÞ{ï±|ùrÆŒ@¯^½Ø¹s'iiiôêÕë¦êŽN§ãƒ>À×÷òÀnݺñÒK/‘””dxšL&¦NЇÇå… ì­‡=í¿VYö¿€¸øÝÌùúG^}ùµ”‘Bˆ»Œ¬Õ.„¸éÀóXÚI¾ýîW¼½=;fñ »9|$­Â¼iÇO±-&NÛ2iâhß/úƒ¸øöí;l &7mÞŽN§gÚ{¯P§ÎåQºwëÈþ;›Ø¸]x QŶmÛfwÞ›]íH!„¸éÀ³YÓ†„ŽN·‡;¢V«HHL½f!±±É Öß&½G·ŽÄŧŸ˜j &‹ŠJ'%¸¹¹Øäõ¼t;‹Å"£"DûòË/%ðBQsO€>½»ÚUHÚñ“xyyØÁ<|$y –pòÔYkúC¶`ï¾ÃÌ[°„‰Ï=‡‡z½_+]{;¤s{•jtå5—ͯ{ æíÊ+ªÞ½´¶½Bˆ{4ð´—6'À€ÒÙª‹…u‘Ѭ^³‰ÀÀ:¸¹ºw>ßš·w¯NŸ>ÇöØ$Þý÷§tâÐácñÔ߆ÜþA!„Bˆ{P•L÷Óë ¨Õj.\¸Èœo~bÕŸèÖµï½ýžžî诸¨ÜÁÁ§þ6”V-›¡ÓéÙ·‹¼¼|5 ¤]ÛÖ2"B!„÷¨*9â©V«ÐæäñáŒ9ä1vÌ(ºwëx)(Õ£¾b©´¼¼|>ûb>ÙÙ¹ |¤'‚ƒØ²5–„ÄTf|ü5Óþý*>µ¼dd„B!$ð,ÏË˃ÌL-¾¾>L}ç%ëZÿ§ÍÉ÷v-ëß‹—¬&++‡ÐÑí×6yîiZµlÆ?/gË–XþöäqOÊËË“N÷,Y«]q#Urª½QÃ@&Mmt¦gdQPPD“& ¬iþ`="Zæá®Á@éÍå…B!„ž éÜ€­Q;mÒ×Fl-d:;k8s6Ã&oÙÌwgg!„Bˆ{ÐuOµ/^²Úú8#3»\Zèèá´ jIPPKvÆ¥PXTLóf8rô8û¥Oï®4nTßúœz²lÅ:¾øò{îŒO-orróØ—‚B¡ sç¶2*B!„÷[àwÝ´²Àà¥I¡¬ßLBb*‡þEmßZ<ýÔ0úõyØæùé‰7ÑÛ≋ßMI‰gZ4oÂ#ý{мyc!„Bˆû-ð\8/Ìî‚T*£žĨ'Ý0oÇAtì$½/„÷Y«]qK§Bq³6ý¹¹ÂôÖ7•ÎBO!Ľ$33ÿj/ãv?~<íÛ·ç•W^©ñý©×ëùé§ŸHIIÁh4Ò¿žzê©{zðxëÏÌÜ3²S !ªfV»¢fÙ¼y3Ó¦M«ö2¤?/‹ŒŒ$..Ž6mÚ0fÌ:wî,+„¸ïÈO!îA‡Âh4V{·[—.]hÔ¨Ñ]ÑŸ§OŸJÒj4šûb;”SíB <…÷ŒçŸþ®©«Ùl¸o‚NSíB <…¨qL&ÄÅÅ¡Õjqqq¡uëÖ<ñÄøúúZóét:ÂÃÃIJJ"77‚ƒƒyüñÇquuµæ?~¼Íã~ø¡ÒuºVãÇgàÀäææ’ššŠ‹‹ ï½÷¾¾¾ddd°nÝ::D~~>ôíÛ—=zØ”7tèPüüüذaYYY¸¹¹ÑµkWüqíî—Š®ñ¬L?ÙSÛÑŸ€M9/^dõêÕìÚµ‹óçÏãééI‡>|8...6ϽVÿ !„žBˆZ¼x1Û¶m£oß¾4hЀœœ6nÜHZZ3fÌ@¥Ra0 #++‹>}úàïïOzz:QQQ8p€iÓ¦á|iÕ¯‰'²iÓ&Nœ8ÁĉoªN×+#**ŠÀÀ@žyæ´Z-¾¾¾dffòá‡âîîNß¾}ñðð //˜˜-Z„““:u²–^¯§oß¾xyyϺuëÐëõ<óÌ3v÷ËÕ*ÓOöÖãv÷gII aaa¤§§Ó»wo4hÀÉ“'Ùºu+`êÔ©6u®¨ÿkŠ«×jÿó·Õækß»¥ìøBHà)„¨qqq4oÞœÐÐPkZ­ZµØ²e YYYÉÙ³gyÿý÷ ¸üÞ¾=3gÎdíÚµ<ùä“tíÚ•äädNœ8A×®]oªN×+Ãl63eÊÜÝÝ­i›6mB¯×óæ›oâããcMïÔ©ï¾û.©©©6gnn.}ôuêÔ [·n¼õÖ[$&&Z>{úåj•é'{ëq»û322’Ó§Oó /X'uïÞ¦M›2þ|"""5jÔuû¿¦zìé¡Ö@4]{Jvv!„Ìj¢ºyyy‘––ÆÆÉÉÉ gÏžLŸ>Ý<%''Ó¸qc<<<(,,´þÔ©SRRRîX}ëׯ_.è eÖ¬Y6A§ÅbA¯×X—iذ¡5ØP*•RXXX©~¹ZeûÉžzÜn»víÂÇǧÜ,÷.]ºàããS®Îõ¿BÜ-䈧Õl̘1Ì;—¥K—²téR¦W¯^ÔªU €ŒŒ S¦L©xGv¼s»²‡‡G¹4…BÁŋٲe §OŸ&;;›¬¬, †ÒÕjÊ&Ö”ñôô¬° ‹¥RýrµÊö“=õ¸Ý²²²hÑ¢E…ÿ«[·.G޹aÿ !„žâžV0ªôˆ‹ÓØ0ÔC_¾û ¿jçѶV­ZñÙgŸ±gÏöíÛÇgãÆ¼óÎ;4lØ€Æ3räÈjï:‡ò'JRSSùöÛoqqq¡eË–tèЀ€š5kÆë¯¿^a ZUýrµÊô“=õ¨NÀõ¿BÜ3§ÙlfGl2«Ã7‘Ÿ_xÍõÛ- ›·Æ²-&­6O7BBÚ1lH¿r“ ŠX¾‰Ô=¹PTLmßZôìÑ™ýº×ø‚{ùÌatkæ`Úƒ9/ :În8Ôo…Ë[KQxùÝÕí3ŒE÷ÇÇ$à±D[íõ1œ={FCçέ§[“’’˜;w.[¶laüøñøøøP\\LëÖ­+ úªûÔëÒ¥Kñööfúôé899]±¯ÜÖ~¹ZMï§Šøøøžž^á{ê¹sçl._¨éd­v!Ä ^\ïŸ)»÷óŸé³ùùוäç_ÿš§_û“ßÿX‹O-/†ëO½€:¬[ÍÜy‹mò1cæ×Ä'ì¦c‡ †?6OwþXÁò•ëeDª9(+z³;†­¿`Î: ]éàÅ"LG“°”Ýým<žŠqŒµmÕ-??Ÿ>ø€_~ùÅ&½yóæ¥;襣[ÁÁÁdff’””d“ïÈ‘#Ì™3‡ˆˆÛ» ŽŠU¦Œ²Û]tZ,Ö¬YSÚï&Ómé—«U¶ŸnG_TVpp0999$&&Ú¤ÇÇÇ“——GÛ¶måÍIqϸæÏci'ùö»_ñöödì˜QÄ'ìæð‘´ ó¦?Ŷ˜:ulˤ‰£|¿èââSØ·ï0AA¥·ÏøsÍ&rrÏóÖëÏÓ¼yØ‹¯þo7m§oŸ‡ñ©å%#S J~ž -qžô …Kn:¦c»P¸Ê¸T5BBBˆç›o¾!((ƒÁ@tt4*•ŠÞ½{0dÈRRR˜?>‡¢qãÆddd…³³³ÍLmÀz¿ÊÈÈH €R©¬tÝ*SF»víHNNæ»ï¾£uëÖ”””””„V«ÅÍÍ‹/Þ–~¹ZeûévôEe <˜]»v±páBŽ;Fýúõ9uêÑÑÑøûû3tèPÙQ„÷~àÙ¬iCBG§ÛÃQ«U$$¦^³ØØd†ëo“Þ£[GââSˆOLµž©{PÏßtBéuVýûugÿ£ìÚµGô‘©¦ûPu…²Õ×Ç'À‡€æ?Éh äÇw1D/ƒÇŽƒpzákÎn¶ù :tk¿Á°ýwÌéÇQ8ªP6ë€zøÛ•n7E¯´Ãœž†ó”…¨zVá5žïOŸÍ…â‹|þÉ{Ö´ÃGÒ˜·` ……EÔ©ãËGÓK'Lzé=š6mÄ[¯Û.uWPPÄ¿Þüˆ®]‚ynÜß.ùðk!£t‡Mj‰9ç, WO4Ï~ˆªçS(4.× äµ±Ø^+©8§‰³m³ Ó‡a:´³‚-Pó‹ß êûwŠgÃd2a41 |öwJöDc´€ÞlÁ`¦ôÇÉŤÿÃàâMÛ‡Joÿã ò“ MÜ3̆,ëã/çΰ¿=~Ík<¯·dæÁi¼ö|é>½äM899¡ÑhP«Õ65õ±Z­F¥RY;::¢R©P*•8::¢T*Q*•2Kˆ¦JöHmNžõô¸Åb!b}_|ù=ÞÞÔ­ãÇùó—'ÔòöâÜÙ ŒW]óåêZàɨTõ—JÇðB>%ó^¥h|c.~Š1i\ãö2–-š'^Çýûã8¶é€!!Ü&~ý¼Ò S¡Àiü§¸ÿt·/P6n  %?¾ƒ¥äþK?̲N–þÖžÆt8Îü™óJ'`”å« %Ùx,ÉÆiÌGåÒÊ~ìkÛZ›<†˜ß1îGN¿Àõó8œ_]îµ°çcØò³lXB!DÙœª(D¯7 V«¹pá" ýξ}‡éÑ­¡Ï çË9‹È̺|Ô¨k×`Ö„ofÁÂ% ØgΜÍ`[L¼ŒFuž½ ºeaXŠ °èŠ1$¬Á°eëó; Û{ªº>Žæ™ÿ–nLmûaÜ…%?Ë68Û¾¬ôÿ£ü" W/œžûœ ÿ€¥¸Ó¡Xê””–ìÒNJæÿcÊÔC^ÂiÜ'Xr3JÏ:•íZO±§m;JÛ¦ y eÛ¾˜õz” [£ê< ý¦Ÿ0Û…²Œm\\œÝyovužû‰ô§BTcà©V«ÐæäñáŒ9ä1vÌ(ºwëx)(Õ£V_¾ÒA}ÉÍ=OìÎ]ìJÙ_„(´¸tͧ‹‹³ŒJuŸÃ^A5`<ÆØâVaÜf¦ƒ;(ùþMœ_™g“_Ù¢Ë\Úœ®::j>[zlesÛ•Y”MÛ]Γ}ÿÒmÀœuKqAék†¸U8‰9÷Ü¥À³Éé »ÚvúPicWpqÇ ›Sí– y5b\,X ’ôçmwõZí—Oµ›Ð¨U²á!ª&ðôòò 3S‹¯¯Sßy‰ÀÀºÖÿisòð­}y‚…RéÀØ1£>lgÏeâàà@½º~””èø÷û³¨#£RÍN®¨úAÕo æô4ŠÃþ†ùìQŒ‰áÀ¼J—g1›®‘~y5…Ò‡º—OíŒÉëÀ¨¥ Kn:ÆýÛ±äg£põªQ³ë-ºâõf¨ç?ü ¶ô§BÜg£†dfj™4q´MЙž‘EAAíÛ=Xî9ÞÞžx{_^®nõšM( Úµm-£Rƒ8ÔmŠªçÓè–|fÓÍ•Q;szæ4Û5§MG/ßkÑ¡~+üBF=†¨Òû¿ªMB¿ökôëæ‚ÅŒCݦ·U_t ÒÜZqnµ / ÍàI8 { ½^Á`@¯×£ÒëqÔéÐét²! !„TÑä¢Î¥§L·FÙÎZ^±ÀzÚýZ“ö°>2šÎÚPÏ_F¥š”|÷ Æ]°äžÃ¢+ÆR˜‹q× › | ãÍ}»é8¸4ÎKG¿a!– ù˜Nî§dÑÛ¥a½f¥e«œPx—~q1î߆C½Ð\ºîÔ˜\º¸ÀÍL,² Ý/}ׯûËÅB,Îcú+ùæÚviÒ‘~ËÏw®ÄRƒE_‚¥0óéCÖ‰RB!„¸ÁÏÅKV[gdf—K =€6A- jÉθ ‹ŠiÞ¬GŽgÿ£ôéÝ•Æê[Ÿsþ|I»öb2š8¾€#GsúL:Aµ`̳OȈT#ýæÑoþ±â€Í٠ͳÜT¹šÿ· ³ö % þIÉ‚^.Wã‚óKsAQúÈ¡NcL¹çÀbAÕy(ŠZuQ6ïŒéH‚õÿ·´Á·í‡ÂÙ ËÅ"J~ù7%¿üÛú¿r÷ñ´§m£Þ¢dÿvŒÚs”ü<ÕæO½,}þ’K!„¸QàwÝ´²Àà¥I¡¬ßLBb*‡þEmßZ<ýÔ0úõyØæùÙÚ\~ÿc-*• /Ow6 `øchÛ¦•¬Ó^ÍT½žÁt|7í,%@¥ÁÁ·>Žmú :¹ôTøMPxÔÆ5,Ý31¦lÀœ—‰ÂÕÇ ^hF½CýVÖ¼þ1Œ-Ý8;+­W—áWž·6±Háé‹ËûkÑý6Ó±]X.¡póÂ!°åÍ•ç]—÷ך¯1íÞ Út0ëAã‚CfX[`¾"¿···lhâž‘“e{—Y«]qÃÏM{o _]äò¢&1›Í˜L¦Ë77™0 Fëµe¿õz=ºK×x–Ý@^¶gqožG¬åòB{È)„B!$ðB!„x !„B!§B!„ÀS!„BHà)„¸—œ;wî¶”;bÄfΜ)\Mý_“¹8;ãì쌳“ÓU?4jÕ5„x !îbL™2E:Bú_!$ðBÜ^{÷îÅh4JGHÿ !„žB!„âþã(] Dõ2™L¬X±‚èèh²²²puu¥mÛ¶„††âïïoÍWRR²eˈE«ÕâååEHH£GÆÍÍÍšoĈ6W­ZuSõ:þ<¿þú+‰‰‰”””мysÆWaÞââb~ÿýwâââÈÍÍÅÛÛ›.]ºðôÓOãêêZ®Ü%K–””DAA>>>ôéÓ‡'Ÿ|¥Ri­wçÎy÷Ýwmž;sæL­m1b£F¢N:¬Y³†ôôt<<<èÓ§Ï<ó ÑÑÑüù矜;w///†ÊðáÃmʬL¿VôZ½zõbôèÑ8::Þ°ÿ+óZÇG«Õ’˜˜ˆ››3gΤvíÚvm+B!§¢B ,`ãÆ 4ˆ&Mš••Exx8GŽá믿F¥R¡×ë™:u*<úè£Ô«W3gÎÉž={øôÓOqqqàµ×^#<<œ´´4^{íµ›ªSQQo¿ý6 :???˜6mZ¹¼/^dêÔ©œ9s†Ò¸qcŽ?ÎúõëÙ³gaaaÖºðÖ[oqþüy D`` û÷ïç÷ß';;›W^y¥Òuݶmz½žÁƒãååÅúõëY¾|9ÇŽãôéÓ <"##ùñÇñ÷÷§K—.•êW€˜˜t:ƒÆÛÛ›˜˜V®\‰N§c„ ×íÿʾVdd$ 6d„ deeáïïÏwß}wÃm¥:ÉZíBˆ[<Íf3;b“Y¾‰üüBÎ »å¼‹…Í[cÙ“€V›‡§‡!!í6¤_µ¿q q§mÛ¶Ö­[3qâDkZíÚµY·nééé4hЀիWsêÔ)fÍšEƒ ¬ù:wîÌ{ï½ÇòåË3f ½zõbçΤ¥¥Ñ«W¯›ªÓêÕ«ÉÊÊâ?ÿùíÛ·`À€Ìš5‹;vØäýóÏ?9q⯿þ:Ý»w _¿~´hтٳg³bÅ þþ÷¿°jÕ*²³³y÷Ýwéܹ³µ\³ÙLTTO?ý4¾¾¾•ªknn.³gϦ~ýú´lÙ’)S¦°ÿ~¾ùæüüü bòäÉ$''[ÏÊô+€V«eΜ9зo_&MšDll¬5ð¼VÿWöµL&S§NÅÃãRÛŠBÔd×½Æ3e÷~þ3}6?ÿº’üüBª*ﯿýÉï¬Å§–Çõ§^@Ö­fî¼Å2"â¾ãííÍÑ£GY³f ÙÙÙÖ`löìÙÖ@bçÎ<ðÀxyyQPP`ý  nݺÄÇÇWi¨S§Ž5è,sõij€øøx|}}­Ag™ž={âëëKBB‚5-)) kÐYæ¹çžã«¯¾¢V­Z•®kãÆ­A'`}ܼyskÐ P¯^= ôhn™ÊökÓ¦M­A'€R©¤aÆäççß°ž•}­FÙön+BQ“]óˆç±´“|ûݯx{{2vÌ(âvsøHÚ-çM;~Šm1 têØ–IG0ø~ÑÄŧ°oßa‚‚ZÊȈûÆ‹/¾ÈgŸ}Æ¢E‹X´h 4 $$„Gy„Úµk¥÷„Ôëõüãÿ¨xGv¬Ú«f222x衇ʥWÜdddðàƒVXNÙ©ô2™™™´iÓ¦\>///¼¼¼n:p¿’B¡°¹fòÊt‹ÅbM«l¿VTGGGG›2¯¥*^ËžmE!îÊÀ³YÓ†„ŽN·‡;¢V«HHL¥*òÆÆ&—9Öß&½G·ŽÄŧŸ˜*§¸¯1þ|’““IIIaÏž=,[¶Œððpf̘A“&M°X,<ðÀ„††Þ‘:]+rpp°;oEÿ+ þª²^·RfeûõN¾VE}m϶"„weà ЧwW» ²7oÚñ“xyyP§Îåë¸IcÞ‚%œÿüsÖ­[ÇäÉ“ñó󣨨ˆ¶mÛ–+#))©Ü)Ù[U6ñåjéééåÒüüü*Ìk±X8}ú´Íén__ß Ë8qâ+W®ä±Ç£Y³f( †ò“Qì9¥]w²_oõµìÝV„¢&»ã÷ñÔöÅ IDATæäáSËËúÁ±>Š/¾üooêÖñãüùqßÈËËã7Þ`Þ¼y6é­[·.ÝA/õ !==ØØX›|àã?fÅŠ¶;¶Ã­íÚݺu#;;»ÜD¢ˆˆˆryCBB*ÌCNN;v´¦uîÜ™ôôtRSmÏŠDFF²cÇë­—<<<8qâ„ÍMØOŸ>MZZZ•öeûÕî7Ö úÿV_ËÞmE!j²;~;%½Þ€Z­æÂ…‹,\ô;ûö¦G·N„>3œ/ç,"3K+£"î¾¾¾ôèу˜˜>ù䂃ƒ1 lذ•JÅÀ9r$ Ìž=›}ûöѬY3Î;Gdd$...6³¡ÜÝÝÒçÆ ³ÞÓ^=ö;wî䫯¾â¯¿þ¢Aƒ¤¤¤’’‚F£±ÉûÄOÏW_}ÅáÇ­·SÚ°aõêÕcÔ¨QÖ¼#GŽ$..ŽO>ù„!C†P·n]öïßOtt´õo€‡~˜õë×3}útzôèANNëׯ§N:œ=[ugE*Û¯öª¨ÿoõµìÝVª“‹³³õJ¶·S2ÉšìBˆê <ÕjÚœ<>œ1‡ü‚"ÆŽE÷n/¥zÔòæ$î3“'OÆ××—;v””„““-Z´àå—_¦iÓ¦¥è..„……±lÙ2âããÙ¼y3ÎÎδk׎ÐÐP›™Ö>ú({öìañâÅtéÒ…:uêTªNNNN̘1ƒß~û˜˜ŠŠŠhÔ¨Ó¦Mã‹/¾°ÉëêêJXXK—.%>>žÈÈH¼½½¼ü³Öµþï_o~„§‡;ïO›bMóñk!£$j ³ÙŒÉdÂd2a41™L ŒF#ƒ½^oý­×ëÑétèt:Ú> Û³¸çäd±>þrþç<õÑ×<â™®=uÍrvGæµçß`É›prrB£Ñ V«mk4ëcµZJ¥²þvttD¥R¡T*qttD©T¢T*å!j˜;¾G6jÀ¤‰£m‚ÎôŒ, ŠhÒDîE'„Bq/ºã§ÚC:·#!1•­Q;?öoÖôµ[¬§Ý…UgÛ¶mvç½ÙÕŽ„Bˆ[ </Ym}œ‘™].-tôðJçmÔ’  –ìŒK¡°¨˜æÍqäèqö8JŸÞ]iܨ¾ŒŠUìË/¿”ÀSÜv²V»â–Ϩè¸ë¦]xV&ïK“BY¾™„ÄTü‹Ú¾µxú©aôë󰌈·ÁªU«¤„BÔìÀÓž‰D7“W¥R1ê‰AŒzbŒ€B!Ä}B¦û !„B <…B!ĽÃQº@ˆ;'//O:A!Ä}KŽx !„Bˆ;BŽx !„¨²V»âF䈧B!„ÀS!„BHà)„B!„žB!„¢æ‘ÉEBÜ£233ñ÷÷¯¶×?~<íÛ·ç•W^‘Á¸OÈZíBˆ‘#ž¢B–’ è~û/E/´¦`´/Eÿ A¿ùGé˜»ÄæÍ›™6mšt„¸û˜® ^ø÷.¼Ý CÌRé§²`ú0Š^zsæ‰ ÿ_0Ê‚Qîè×~sW´§FÖWñŽ[¥Êúäik¿Ý ã}Ã#žf³™±É¬ßD~~áu×d¿]yÅ: s¹ðþ`̧\¯S)ùî,yhž|G:©†;tèF£Q:BÜuJ~™†Ó _Öè:šÏF·f¦ý1˜ó2À Cáì†CýV¸¼µ…—ß«‹ñ`,˜ ÷nE=`|î7ýÆï)™ÿšõo·/phкæ~:‹î1IÀc‰öšò•.8Ô{UרˆBãr×Û u€’EïàüʼÛ;nJUéÏ]âšg³¦ =œnwD­V‘˜ÊÎ+î<ýŸ³KwŠqa¥A§Å .8>ØãîM˜ÆZO/8 CáânÕ,ÌY§P¶@óì8¶pù`aúÕ_aÜ· ó¹£Xô%(¹ËÅ".î8ÔiŠÓÄ/P6ë`[ì¡XJ.€ƒõ£Ï£[õÆCqXJ. pr½ùút¥õÝþ;æôã(U(›u@=| Žíú—ëÛ+ûI¿öJ~,=ˆâ±¼°\ފƦ̕ùppµ3~ Ñ<5KQúõó0ìX†ÓøOP¸zUjÜ*û¹Y¹-ûú ÀR”GÉ/Ó0îZ%?,–ë÷íž}zÛÿ!|»òŠ;Ç|î¦c»P6뀲açLİcµ±\,DÕ;voÂ|î¯Ëê–Ÿ0Ÿ>tùMùä~ŠÃžÂõãÍ(›—¦:ˆîR@kݘó20Ä.Ǹ/·ÿKEáêYþÃç›0Ÿ9bó&§ðôÅéÙoª\ÓñÝÆ¢ léä~.·¥¸ ôïû(ùñ]\â+Õgº?fR²ækLÀRúfi¹Xˆùô! ´vžqqq4oÞœÐÐPkZ­ZµØ²e YYYÉÙ³gyÿý÷ °ækß¾=3gÎdíÚµ<ùä“tíÚ•äädNœ8A×®7¿¯™Íf¦L™‚»ûå7ÜÈÈHNŸ>Í /¼@çÎèÞ½;M›6eþüùDDD0jÔ¨ Ë«L„¸îäm‹±ŸGå8(0$F w÷F=þ“+Þ Ì:sêæËI†˜¥woÂõ“m7|:xúbÎ9‹>üÿPxú¡êùÔ5¯ã¸øíK¶þrUP‘‹éÐÎk?çï}>õp¨ßªt?½âý÷º}1sö©Ëï‡i)Ïx×™Q(]î³OžÆ¸{Ó ûL·ø}t«¾°m×…|Li)XrÓËð¼T¦²q[C+}®Qi_4ކÜ\}z.|ð˜M_Z %÷EcÜ¿ ç¿AÕ÷ïÕ²ªz>~ý<00ý•Œc»þ•·›ýÜ´çȳÝ}f1SüÑLÇvUißȬvqy{L)ýöíØiúÍ?–Î5›0g• ÚÖo@Öàäô!”-»àö©¸~¶£ô4“É€~Í›7j§ñŸâöE<ãþýqT}ž--«@‹1uSÅÏ™#¨NÀý‡ÿ¡ê÷Ò:&®½ér-òÑ<5ç×~°æqzæ}œ§|o š+ýÅqË¥}ü®aѸ~‘€Ë#pz~6ŠºÍì*ÃËË‹´´46nÜHNN={ödúôéÖ-99™ÆãááAaa¡õ§N:øûû“’’RåÛCýúõm‚N€]»váããc :ËtéÒŸëÖ£:Ú î,ggœqvrºêGƒF­ºæÏÕœŸŸóKßàüê\Þø¹ü G=`®3£­g) »6”;gܽÕ8ÿë'Ü9‡ë‡Pxùa)ÌA÷ûŒ›j£zÈKÖ÷“’ÿoï¼Ã£*Ö?þ9ÛÓH€Ð{Mz/"ˆ AŠ  ü,×r•kãŠå*(zí¢Ø¥"MJ€ÐKèPB @ú¶s~œd³›l’Ý À|žgŸdÏÎΙ}眙ïy癯Ÿ!sb=rfÁ¶{eo5ê7‡èÔ÷‹ÿ瘛€ÿÇ»1ŸQüC_)mŸqôëø´ ÿvyþ ™‹¾ÏæœÄïuH>`5cYV0äkÝð‹*=°™eõµíë4„€9'˜—ˆÿWÇðö‡~P¤Qã;µ=ÑÖoƒäãïr¼,嵬úZP’„iâûütÿÿíD[¯µ:7áÇ—U/«—ÎO&p~2¦qÿ-r,ÿUª¸ªÙ¤ ïÉâÞÔ[YûÍR@¼°™í`¤CtG¿NÀOq˜¦äõí’ÆkGGOÁ…ýĵahÜóBµQô{wYÓú£ CÒÔ‹Þii Mh-|_]Œä¨6®]IJö{lNOSššM1ÔlêÔ«øc¸ç1¬‘sÕü®º¿‰uíïÅ4I}âÓwùÖõ?!'_¸¦| ÷NA¹|©à©´ÿÄ‚÷…& xD^\’ž‚|% )¼1šjhý*a·XÀ\zžãÆcöìÙ,X°€ P£F ÚµkG¯^½¨T© X­Vž}Ö}<”NWþ·r```‘cIII4iÒÄmúððpNœ8Ql~7ã7nQòcÖ´zЊ^+­û`ü4’^®ywì'¶£¤»Î:¶ä-¹¤ï1}‡Aj¶ Ûaè;ó’°ØP6áyÿ3 I˜ÎDÉNG1gcÝù'Ö¢mÞß—s´‡–5ßæµ©ðyòK$µÏ.ÜvyÙö•É×õA|žúJ-O¥pô݇cYûö£[ l¶ñWÏm¦Ëë®$!_ŽGŽZMhÍ¢"2årÜqõk-z‚F‹¶Y7lÑk\¼«Þ–×µ0Ï^ƒ0 zBµ­_0¦Ç> kZu¢Ï±­èÚÞ㥱LyŒ®è1qö‚+eXŽ©¬ýf©Î/l&'œ-xعÿŸ 7aè;–ܯŸEƳ¯HH…žï„gžë_ÞùÜ!¤àªhª7ÙŽæ˜5‡ÎÖ\GÚüFV}_ßíMaݱ ëÚﱟْyEu´J²û‹³e¯‚ÿ#zðSœ£á.k¾’?J ïËÒ Y澉ýt4æ™#°ú!7hÒæhÔÉ£<š5kƬY³8pà‡âÈ‘#,_¾œ¿ÿþ›—_~™:uÔ¡­zõê1lذv=h4Þ ˆ(J閼ѿAp{¢©ÛÊI¤jó/@W±{ `œëè¬]®×«Ie¿ï‡ü}ÿ‰Ø¶.ƺýl#A¶c?º…Üï¦:&“Èyñ ºv‹´]%vÌ´}^kùÆ®£ù1‚ò•$›á¡ÍŒÃ¦’ûã+ØOì$ëåÞH•е쉾çhty¢ÕáíÌ—Z=ÚæÝòhlÑk¢TSHˆ{TÞ‹'ܦÕ6hãä9½pS®Q%'Ó©Ÿ (›H,C¿YÞØLS­ TÌ~ñ$Úº­°ÇÌËÑTª.<ž‚k¼QRUÏŸ&(L}¬ÞÈ! ¥ *(Ùj±&¸ŠKìKæœ"O{æ%bþõkô€èŠÄ³”K¾×ˆaàd|ë¶&wóïØlCIhuH!áØö¬ôÝÂï• 7–© Âã)p½ÉP,¹ê²æl¬;—4y¢R׿nl{V©fN†êÕh±¬úʱخaÀc‚Öœí¸¥€JØÏ!÷‡—®](_§|½z*]8¹q'”*uQô¾ê°_^\'ëùU®\™N:±cǾøâ """°Z­lܸ½^OïÞ½¸ï¾ûˆŽŽfΜ9;vŒzõê‘@dd$>>>Efƒç¯‰¹zõjú÷ï68ò4h{÷îåÛo¿åôéÓÔªU‹ØØX6nÜHÕªU}úpôèQ–,YB»ví¨R¥|vRñõõåµ×^s, IPPýúõcÈ!%.ïíoܹX·ÿAÈP4àSxO0|Ü#›QRãÈùòÉ"ŸGýãpï…§eÝXÖýè¾ õñÇ8ö-Ç{Ã?žÇ¶gösÕu97ÍwI_VáénwšÜŸ§‘ûó4ÀýÚŠ–eŸ¸ÌÏo£ôÝ b®M£ÿƒýÐFä”Òmf^ò,ùÀmùŒ#_-âÍÔ„ÖÂöábݼ€œO'9—wŽ õ¤¼Æ¡ÿ¶ýä”8r¿yžÜož/¨ £/>OÎIýÑw¬®Ö²áìÇw ÇÇ …Tu»ô“£iÝϱØ}î/ÓÈýešã³Â6v¶¿£/ìû†!O—©Þ¼éß¼É×›IUÕþÇ~îSš©!’„䌮y7 <ç2Ç£\„gäÆí%sˆ×+­àÆ¡©V{ÆeìÇw`6•Üϧ ë0]D/r¿{©ruL“>vñäåÇë(²Œ¶VSôw/²ï¬Ï”OÉál7"iµèÚ Ä4a&™/v…kˆ×+_oÐw‚ýìA¤´$ÈÍEòñGW«Ún#°×¿ »³Úu:Æ +uÒŸŸ£FbÔ¨Q¥æY§NÞÿý2ÿ®’v;ò÷÷g̘1.ëŽzš‡7¿Ap‡¶CÕ!¥ÅÍ &?4Uk–íAºR8~ïmºô#l{Vª¡B6 ’Ošºh¶+Û=ßëaìgö¡¤Ä©ž<½MX-t­Ô™öš¼ÎÔ8PßwÖbYö ÖK‘ãÏ€lGS9m‹7ÄžÆá/a;…w%ë ’ÑM Cßcd!›UÇïý(ÌK>,Õfú.C±Ÿ=€’– .nî .B>øi— Dò·ÉÔu}°ˆ·L×á>u¸ÖjƶïotyWÞÀPüfnÄüû u¢RZ"’_ºˆ^‡¿T0Ì}%3 kôß(i èûŒÁpﲦv/þ Ãwú_˜}ûé½ê"ùþÁÅ{Êuu‘÷FíÑß=ÞÅ¥óÆfÚFíÑÔn{åò%—aìǶa=ŠïK ¼/CJâqeýšé7`|…l„*Wi"Zâ„yÁ1/zmûð›±ÁñÔãö‰;o]Do|§/¿cl$Ë2v»»ÝŽÍfÃn·cµZ±ÙlX­V,‹ã¯ÅbÁl6c6›iÝR]S£¯".4Áís?X f<熌øG±C퉗ãŠÍçè¶ž›ü"ó_‹ÉdÂh4b0\þ7Žÿ z½ÞñW§Ó¡×ëÑjµèt:´Z-Z­öºÅ; ·;9³Æ`Ýù'º¶ýñù×Oj¨„ÝŠeýÏäÎyô&Ö4-¢Ï…iŽ'Ø~ã0ÿñ?ì§÷’óÅ“G¾Šä_ %ù<Öè¿1ôŸx]fW ®?Û·o÷8íµìv$‚ÛëÞÕ€ê¹W2Ó@£E¹’„ý”:IRµLù á)p  «qÔ4Ìó¦cÝ8¯Èž²†ÞBxÞŠ|óÍ7Bx Àsز§º<`Þ2Y.HÆÑ¯ á)¸vŒCÿ…¦R8–³±ÇGÒjÑÔkƒ¡ÿx¤ 1L|«RR̦@ …ñyágÌ‹ßǶ{%rR,Ø­H¡hwÀ8ø)´Í» á)(ô½F£ï5ºÄ4îfM ‚;_G\§sŒ§]¶a2ê+ÚR– $ŸLc߆±o—k¾"êZ ×ÙnçZw ·Bx àºbµYÐj´Â@ µ 7’aÁmCjRR©idE&ךƒV«Ã&Û@ · w4Âã)‚ëFvNŠ,#!aԙĀ»@ „§@ å‹]¶“‘•†ÕV°{—V«ÅdôC#‰®G ¸SCí@ (dEÆbË%77›\k6²l+’F«Õâï¤îöe·`·Û„á!<w:Jn–%³°nþùj2šðú=áîñî¿`Ƀ0œ@p³ðçßnعr¿xkZº~†ðz×”Wö{£°í^árÌ4~&†ÁOÝòu’¿½qY~yîë˜WÌÆÐûaLS>¹9?@ô-wžð”e™-[÷°lùZ®^ÍàÛ¯g^SZ»]fÓælÙ¶›„„d´Z-ÕãÁ¡©Q½ª¨‘Š :3.“5}rì‘‚º=JîWÿDIKÀøÐËõyt+æßßÅvb'óS„ñ‚;”ÇF#¬j£2}79ñTØùeR¥ªh›v@×=`2¹ýŽ-&I±a?¶õš…§ á¹b6Xs±løù† OÑ·Ü¡Â3zßa–,]CBBé›À{šö›ïæ³gï!Z¶hLûv­¸šžÎæ¨Ýœ:ýÓÿó,•+‹Z¹Éä|<9öúÎ`÷( ¹ßþ Û¾µ˜½‡¾×h4Uê¨Ã™ýØoFåóàkÉEN:55ÍɘƽFc‘túN MOD×öžk>§ï‹¿€l }t˜¨„½»0é±Q<÷ÌDÝÛ›Ñ#ïgâø‡ÈÎÎa㦢Fn2Ö˰X¶YW|þõš*uÐT­‹Ï3ߪÃvÖMó…¡n.]ºtK”kèС̘1CT˜ãˆWÑ·¿W¡©qX×ÿì>ÝÈWñyòK$ÿrX¢L«½I}1†Y IDAT îÿ/ܼavÁmI±φ ê0fôtëÚƒAÏÎ]û)´M×/r¬MëfÄ]L5r“±,ýH}Ò04ZPd4H¾èZtǶo-ö£[qCÎ>¸(9)–̧Z‚¢`|ø Œ¾à’&ç³ÉX7ÍGS½!þŸîs‰G’|1ÿñ!rR,ÚšM0Ž} ]Ûþ®'µY0ÿõÖóÏ!ù ks7ÆQÓ^Ù2 ðÈyX6üŒ|þ0JN&’ošj 0<öÔkS¤ –Õß’µsÒl?äFPúŽ¿J7¥W¬XÁ?þÈÂ… +ÔõUQË%¨8H•Ðu¸Ý ‡#±݆2h2 ˜ÏÂv`-V X4 ×@ÀÈWÐ|¼H>JF*æ_ ÞŒ|é$Š%)0]óîjûÞàžÐÍj»õrü$mû0<ð,º6®ÞA%3Ü_þƒmï*”«ÉÞ7´ÌÛ{Q†¼’`ùóS,«¿FNKD[»ÆGÞFײ§#Eö‡bÛ¿ÎíéÜ–ÓËö×õ–µ? Ÿ=ˆbÎFò BS³)~o¯)¶)®o܆ÂT蠟x“¶ÈÅhUg5 zQ#7ùÒiì§÷¢mxÚ:ä|: ë–…hBk¢äd ï=ö­E¾tÊã<5Uj£‹èí`$Ö¨ß\„§bÎÆ¶óOô}ǹ àõ?!_8æxo?˜ì™#ñ{wÚíò2ÕIûÖäi5cݼ۾µø½·©LâÓ…Îwß«ï÷(¶ƒ‘ÈŽa?{m½Öêùvý…’›-†^®Ž|áÚ¦ñyê+”ÜL²ßŒ’uËŸŸâóüêˆ_ÔFOgÀç™oеí|îÙ>‚r% óoïàóÏ9^ÛÁ²ZýŽ®Ó|ûü‚Q2.#LJªõ]6^±nþ ÛÁ ÓcÿúF1Ÿ;‚õ»£\½ŒmýÏ0äYqq n{¬VO?ûº×ßS…/>}»Èq©R¸ã^S2.«mÉÝ0Þ÷ ,SKvvh‚Â0M|CD/¤°:`É!wîëX#碤§`Û¿}·áÞ·«¾VÅ’$a𠯼+©—Èùl2ö³Èýñet]D2ùa;éÆÑ¯c8ë¶%ä~ý Hüfl(“­½)ƒ£MMŽEßg ¦ÑÓ‘“cÉþïP”œ ,Ë>ÁçÙoŠ ©[þú‚Ü_v_ß^´¿Ö¨ß¢Sßg,ÆaS‘‚«¢¤\(âaõ¦oáY&ÒÒ®²hÉ**W ¦k—v¢Fn"öjŒ­¶qGÌ Õ˜;¿w75­?š 0$½Aí,9±P§K¨˜ø(}ÇÁäTBɸŒ5êw‡ð´nV—^ѵ»)¤šk§Z ßW#ùªyt}ËÚï±9=[6þª~ÖcúƒÔ²7l‡¡ï8ÌK>Àv`Cßy% ùr<Úp¤ÐšhBk"Ë2v»½ ñÝ¢ë;ݶu_d‹mæè;Á²ö'Õƒ\šÝív/^ÌÆIJJÂÏÏÖ­[3f̪V-Xé!77—… ²uëVRRR¦S§NŒ=Gº¡C‡ºüÿÇ”É /^dÉ’%:tˆ´´4$I¢V­Z 4ˆ~ýú¹œ£cÇŽ¼òÊ+.ߟ1c»vírœ¿´rmذeË–OPP½{÷fäÈ‘èt×Xvv6¿ýöÛ·oçòåË„„„йsgF…ŸŸŸKþ<ð)))ìÚµ f̘Ahh¨G¶” E¶#y¹8¼"[ÝÏooÔÍâuY45š ­Ý&¯<>þîy kä\õ¼WË&f¬Qê=¯k?à'Ô²úcz첦õGÉNÇ~l+º¶÷ 'xe÷ÿô& }ǪÂS‘±ÇìCÛð®ëZG;ÜõA|žúJm'+…£ï>ËÚ°ÝR6ñëEûkYóm^ßÒŸ'¿IuCK5›b¨Ù´P‡áyß"ÂÓk²²røôóÉÍ5óϧE¯Cí7Uxæ mk Ÿ;„\Mõ† Û‘‚³>ѽËXoDßs–_bݲÓ#o£¤§b;¨6L†~í4Â8D§ú¾~‘Î"¹'kä\GgâÒ¡]M*“ŒÃ¦’ûã+ØOì$ëåÞjÌYËžè{ŽFs×@µÁ”$$Ir„X·.&gËb¬²‚E«Œº5`VZAÇW ß|ó ÿý7÷Þ{/õë×'))‰åË—sâÄ >ÿüsôz=‹…×^{„„HõêÕ‰‹‹cõêÕ8p€÷ß___ž{î9–/_NLL Ï=÷\™lÏ¿ÿýo¹÷Þ{ &55•µk×òùçŸc2™èÖ­›Wy–T®ƒrôèQ Dhh([·neÑ¢EØl6}T½>rrrxíµ×ˆ‹‹cÀ€Ô«W3gΰjÕ*8ÀÌ™36X½z5uêÔáñÇ'))‰ªU«òÕW_•jkAÙ‘e+­ÁKO©ÙõÞ×h$ ¬f4äi£ã¸$Œ»Û~Ó9uÇŸØ×ÿ€ýÌ~”Ì+jÌzAaËö/žp< ;£mÐÆÉ»xAý-Õ æ4Ø/žD[·ö˜‚9šJÕ¯{ŸJ›ã*_)[;éMû+Ÿ;”çdè!úè#/^Ì#ĵÙív^{í5½²µ ìX-ÙMž‹wY¶c³dŽ’Ï;î-]X-ÇgqIþý&¤æ¥a[ð¶KŒg¹´“²½˜ãBVÒª]«®u_t­ú`;Iö›CÐ6í‚ýèVµ­Þ]›~×½ Åæ‘›×¦–mqvoÚ_EìN%¸ÙÂ3''—ÿ}üâ.1eÒôiÝ\ÔDEžù ‰.¯ã0ø ¤§ä Ï0ä”8µÁ¬Ó¹—pêuÌ wï ÕÔn¶á]ØOïźe‘ã‰]ßk4hK¿ íG¢Ô|ê¶*8u@e”+‰‡þ ã˜7ËÕÚÆ9>†Ü9Ïb;´ Ëú_\„§ä_ ®$a¼÷ÿ0ÝÿV««ÕŠÅbq¼Ìfs‰ç áäÉ“üùçŸtéÒ…°°0ú÷ïOÿþ3ø·mÛF£F&==Ýq¼F„‡‡³cLJð,&MšÄÈ‘# *˜|¡(Šã·”ö›¼¥Aƒ.¢O«ÕR·n]¢££ÇvìØAXX˜CtæÓ³gOæÎËÎ;]„gݺu]D§§¶\›ðÔêLhužx=rs®ÙVS«Õ"Iöƒ‘è_ÚðúqYð*9wË__ t½1MþMåêØÏ$ëµk[“RZ9>9&Úµ:¹» MÞ%3 ûùàÕ!…„cÛ³É7}÷‡0{§Øö²<ËP¶ë‹´©ÞàMû«©RùâIlÑ«1›ê™×ÓþÔes¿y$ >S>A×á>q3 áYœèC»¶-D-T$ ug >`ÎÆºsy^+eqˆ?ç¥:¤€‚å‚,+¿BÏDíÈ—N£mÔÞ%{ýÝ㱟ދmÛ”ÜLUÛöu/–”œ ÕÛªÑbYõ•c!aÃ€Ç .Þ¶ý±FÎŲò+4á UÏ©?äd"§\@2ù¡)?äæ_ßDÛ²'ÚšMÀ/XÆZUŒkò&X9ÊЪ¶Í¿aYÿÚʵPšvCÑê!3%éФC^âùžxâ fÍšÅ?üÀ?ü@íÚµéÔ©÷Üs¡¡êù.]º„ÅbqxÿŠÜÈ:]9_ ÙÙÙ¬X±‚sçΑ˜˜HBB‹%ÏS%—ëù‚ƒ‹n¡ÕjQœ–žIHH E ÷íEÍš59|øp©yzbkAÙ‘e9Y)øøVâûæ²æïµEÒ ¸§??>Üì4l¶Ü¢™\IÄz8ýé= c— iõêP»ÝŠd—œ~Š ¬f$dpº£$AaH•°Ÿ?Bî/£\Ü”C¶wŠ1Ôµ„eùgXw.G»æ[ôÝBN¹àÈ[S½¡£í³í\Žr5mÝüfmQ½€å0ÔìM?'-%;ÌÙ˜—~„ýÄμ6õñ²•Á‹öWße(æEïa?¹›œÏ§`þRH5”¤óØorÄ©º [Ïû–Ü9Ï9œ$9_?C€ž·®ðœ7YA£Ÿ˜\äØ˜ÑxöÇÙshÖ´!©—ÓX»Þ5°¹¿î¢Vn–îô R—ÏH‰C[£1ö˜hì1Ñ 7aY9;/M0ú# . Öý|üQr2Éýe¹¿Ls|Vx­5}·á˜x %G=®mÒ MÆî=œ§÷’ñ˜ëš¯ú^»ÌB5þöC‘SâÈùòÉ"yGýãð2Ï%À’Ü~fùŠ‹83=ôo,G¢PR.‘ûókØ« l2(wODê>²ÄóEDD0gÎöìÙCtt4`áÂ…,_¾œwÞy‡úõë£( 5b̘17äZؽ{7ï¿ÿ>~~~DDDйsgj×®MÓ¦MyüqÏ:*¥Ðz…×JIù¹ûÌ]l­'¶\›ðÈÌH`ô¨Á¤¦&³goALcûöí3æA2Ò/º »x*£FBÒ€¡UoôîwÄwfÿçl ‹ UÙ;dz Bæ^r ¹ë"z¢D¯Áºe¡c ¦J$ŸG”»ÝŠržV0«Ú©-3ý¶í §Ä‘ûÍóª§-¿M0úâóälÈ›`%U­«¶gç‘1¥™º|“$!ù£kÞ ÃϹIJ{Š7epØuÙ'X–¹ÎZ7ôŸ€¾Û°2Õµ7í¯áÏcÛ³ û¹ƒX7Í/² ‰;áéMß"¸„gäÆí%sžž¦={N x>vü4ÇŽŸ.ò!hêF mX¶Uô]†b?{%-A]tÚ7@]˜yðÓhZ÷sñöI!áø¾±–}޲o-ö”x$Ù‚Öä‡R­!Ôjн‡Íf#66£ÑH÷îÝÃÈ[·nåƒ>`åÊ•<ýôÓT©R…ÌÌLZ·níV$R¾V¾ÿþ{*W®ÌG}„OA Ø•+WÜzG­Ö¢3“¯^½Z®eªR¥ qqqnEç… ¨R¥äØcOm-(ル$¡(²cV»Õ’Å£ !55…³çâ¨W·ã¾—œ¬´:½#þYýNÁ=¢õA_½>¦¶ý05í€ä4©(ˆ]#9Çwºæöü1æoŸG>´ I«E×n ¦ 3É|±+ä”]¸H¡øÍ܈ù÷Ø¢× §%"ù¡‹è…qøK.CÜÚFíÑÔn{åò%”Ë»vÙmÃ{ß—\×2‡¿„íHrÜ ”¬+HF4u"0 x }‘¥=îåWnÑ2xÑþJ&?|ßY‹eÙ'Xw,EŽ?²Måp´-z¸ÿ^ô-¦É» µ naáùí×3=ÎÈÓ´Þä)¸ÁCë~ØOíÁ²ö{üfl@ß¹àÁ¢ðbÄÎhÞ…ïëzæµJ½¨ŠÜªuÑw}°ø<wÄwúr`Óø0¾ü¶\ôyáç<:r‘ÎVŠiô4t½ìã™ÿ¿b)~)˜´´4^|ñEZ¶lÉ[o½å8Þ¼ys¯]§NX²d [·nu™ÔsäÈÞ}÷]:tèÀ«¯¾Z¢·ÏRSS©_¿¾‹èT…ßÿ]í4–” äܹsØl6Çÿ… ˆ‰‰ñÈ é)ù6زe‹KœçæÍ›IMMå(ñûžÚZP6L&‹ “V›Y¶£×ëyꉱüðÓ"&<:ƒÑˆ¢(ØlVô:#–œœlL¦‚¡l¿‰ïa0Ð H’äˆùÔh4¼¿½^^¯WÓäý¯ÓéÐét®3ÞCªáûÒoEê5àÛ¢×¥·4)¸*¦É—š.÷ÓIȱGеíÏ¿~Bò »ËúŸÉó¶ýe_pßÓ2GMÃXÆsÈ)j{-ùWºæöW2úbñ Ưx|~Oû}ç\ú+Á-,<wú~ã0ÿñ?ì§÷’óÅ“G¾Šä_ %ù<Öè¿1ôŸXæ>» Ëâ÷±ŒT;©Gg8â&ooOþßüNÒÝò/… £GlÞ¼™÷Þ{víÚaµZY³f z½žÔÿÆ cçÎ|ôÑG:tˆ† réÒ%V¯^¯¯o‘‰EêsK—.eÈ!hµZ¯~O‡ضm~ø!­Zµ"''‡mÛ¶‘””D@@ÙÙÙŽ´]»veÕªU¼ùæ›ôèуÔÔTV­ZEµjÕ¸xñb¹•ëÁdÇŽ|òÉ'?~ܱœÒš5k¨^½:Ç—¼¸§¶”ÐÐPRS/^-OÈkóLxöŸФ·ËV4Z©©—]âkµZ­ËK£Ñ8Ägq÷–TA—è±î]íðø)™i Ñ¢\IÂ~J¤ ©XkÇæþô*úž#Ñ„7D>{À1:¥mÞU\à!<å&¬6ÆQÓ0Ï›Žuã<¬ç¹|nèý0à½ðLšï2Só¹ÿYtßòÓYh:ÿïüÊï$Kâé§Ÿ&,,Œ-[¶°{÷nL&Mš4á©§ž¢Au­=___fΜÉÂ… Ù±cëÖ­ÃÇLJ6mÚ0fÌjÔ¨á’çÀ9pàóæÍ£sçÎT«VÍ«ßùÔSOáïïÏÎ;Ù¾};•*U¢K—.¼úê«Ìž=›ýû÷“››‹Édb„ F¢¢¢øæ›o¨Q£“'Oæüùó,Z´¨ÜÊåççÇÌ™3Y°`;vì`õêÕ„„„0hÐ FŒᲈþµØZP6Ô¯ÇÉ“§¯†FãY×"Ûíœ:uІ êžù÷Ná—»ûÌݽX©®eOlû×9–c+Ô˜`ýz…ªCËòϰ,ÿÌõ ÁãC/‹ \P~ýhJâqeýšé7`|…,`å*MD-Ýè§ôM󱬘=î8’V‹¦^ ýÇ£ï>¢L32ó÷µµšaü$úž£ŠO;\õˆé"z{4Ô~£Q»ÝîØÁ(ÿe³Ù°ÙlX­V—ÿó‡ÝëÕ׳à¶#5é„Ëûuë7Р~E|LL 1gb¸»__DZ ›º £ Ç{wÃëÎÿç)½iíENæÅïcÛ½9)ìV¤ÀP´;`üÚækNCÎG°Ý‚r5É7mónG¼‚¶ŒK. nÈ„ …Ñ÷­®¯YNx³Ïî­0[Ñ]GVÜ0 c1là k—ά]»E†ÆMJ~È:y⇠×u5Ecaϧ»Ñ„âÂY*Âð»ä€iìÛ0öí[¢þ|žÿA\Ä!<‚Š*>‹êsî=j¿lÚ´Éã´eÝíH ðõõ¥ßÝ}ÙºegΞ¡yóæ„U©ŠoÞ$µìœ’“9zô(v»•~w÷uÙæ(Ö{YÒ{q÷¤@ ÂS ¸mÅgqñAx~üñǧÂSp-øûùsÏ=ý‰%&æ;wn'7WÝéÊd2J£Fõ©]»¶[XXt–æù,.æS á)ÜÔ¹ƒÔjµ.K0މ»Qx³ŒÙÍ*£àöº'êÔ©C:u¼þ®V«-âõôdè]NàÖ@Ÿ eèT‹Ÿù¡ó_ã)xNiOw÷YEñnîqaàÚD¨;§,ËŽ½ÆµZ-‰)Eg½;¿œgÆ;Ï–ÏɲŒ,ËŽYõŠ¢”û~éA¹y4ò¡óâïÎ^Kç—³w3ÿÿ’ħsžb˜] ÂS ¸í…¦¢(Åw*ŠRdØÝÝžâ…¿«ÕjÝŠÎ|Á™/:Ë{/t <ïgaèì±,,$Egañ™ÌÓõ<ÝM8Bx *0ùëh.Ê@¾x’Ìgïr¼¿Qio¥Îµ¸íùÑYpæ{?£»ay»Ýîø^qÞÎü—@P‘ï⼞Î^NOâ;KšÙ.naá)Ë2[¶îaÙòµ\½šQâ$OÓnÞ²‹M›w’˜˜‚ÅbÅÏÏ—F ë0h`êÖ­)jEpKt¬ù¯8Á)˲#¾³°H,m ¦üIIÎÃêùâÓù¯@P).Ö¹$ï§§"´¸|]öiâS ¸5…gô¾Ã,Yº†„„Ò÷&mü¥$ª†…Ò¦usŒÉ)—Ù¾#šƒ‡NðòÔÿâSpKzvÜ ³çSxOòâÖût% ± §àV¹/Šr/M|:Ã;{>ÝM,1žÁm Gq&4‹{_X„7,ïiÚâÎ!*:a ü;Zgoga¯¨sœgIâ²4a)„§àV¹Jú¼4Qêi@ „§@pÇv¸……eá­5Kžx;‚ÛAŒzâõT¬ !<ÑÑ–ÐQº›”$ĦàN¡Þ|.„ð¢ó D4Â@ !<@ Bx @ Bx @ „ð@ á)¹’r Ùn†®—Î #ܦˆå”7”sž&>=…g{>ÌÄŽ÷{ô“ɱÌÙ¾˜½qǸ’“I Éû[ôâ…Þco ›LŸ>ƒòǸýÜjµ2uêTÂÃÃy饗JÍÏl6c4ïèëìzÛ,áÜ1¾™öõZtâáF[Дöû6QsÿÃùK)¢~¦IDATŒý÷lÇû²’Ÿç?ÇÞÈnÙzynÆ\ö9[¬=ž›1—‹Ii|òÊXªW ¹¦s½òÑïlÙ{ÂåØÍ°ßõ¸n÷výô(~|s,=ÊàÇßç&û쳄„„ðÆoÜÙ×Úu´Yjü9¾™6œÌ+)è &$8*/?Í.³ûðYè" r‡¶ëVs²l'jé×è> xäaè;ExFï;Ì’¥kHHH.5#oÒ:³>r§cÎc0è±X¬¢FncŽ&žqü߬JÝÒJPxsÍÌ6+-ÃòöÀÿ#<0Œ”¬+è4Ú;ÆnaaaŒ;–ªU«–š666–ààà;þZ»^6³YÌüüÎx2¯¤Ð¨MOF<÷ ’$„gyq_¯6$¤\¥w‡¦×œ×ÛÏ G–eúM˜!Œ{ µëÍ:ÞðgþÇïÿû'~û˜ZÚÒ¼ó@aìÛ]xžŽ9Ï—_Í%$$ˆñㆳcç>ŽŸˆ¹æ´Î$§\æ¥kˆˆhŠÍjãØñÓ¢FncŽ%ªClá¡û”šþPüiΤÆðÆ€ÉÔ¯\€ZÁUï8Û 6L\@Àf~ÿˆ„sÇð fä _¸ ± ®'ÞW~›VZñPp«¶ëwõÁÉèHöo\Â’/¦R¿U7L¾Âà·³ðlØ cF?@·®í1ôìܵŸòHëÌÏ¿,A«Õ2nÌP¾ÿq¡¨ Âß'¶³äP$ÇÏ’ž›…^«¥Š%^ê;žõÛº¤M̸Ììm ‰:³´œ *ùrwãN<Óc¾zS¡'ã³yOÅž ÇDÇ Ì?„F¡µ+¬½Ìf3‹-bóæÍ¤¦¦BÇŽ5j® enn. .dëÖ­¤¤¤àçç‡Íæ~‚ʧŸ~Jdd¤Ë1wq C‡uyðàÁ"Çœ¿—››ËâÅ‹‰ŠŠ"%%…€€îºë.FMåÊ•‹äݪU+^yå~ýõW6mÚ„Õj¥k×®L™2½^]m–þáÇóÉ'Ÿ`µZù÷¿ÿÅbáã?ÆÇLJéÓ§~]m‘FÔÒ¯è3â9Bª\óµ³jóVlÚÏé ‰ääXðõ1R³jÿš0ˆfõ«Io³ÙùlÞ߬Ž:ˆÅb£[»ÆüûñÁøš .é¬V;¿­ÞÁÚ­‡‰K¼Œ^§¥iýê<|_:¶jÀè¿ .á2ÿyâÜÓ-¢È¹~\Åw‹62¨g^™<Äëßf±ÚX°rëw!.á2:­YVФ{÷ë?YuÀåXq±˜W3²™¿r;{Ÿ%6>³ÕFp€/mšÕáña½©Y­R™ë›哞™ÃìëÙ¶ï$iéY(…~VEŒß¼ÛõA^çð¶d¤%±õÏoé7êyÑAßΠOï.gäMZ€Í[vqìøiÆNHH¨‰ Â'Qóù~ç2W‘`“¹p%‘„Œ—ãû/ä©Å3É4g;Ž%g¦1?z5©YW™5äY·OÆM«Öõ¨,'’ÎÐ8¬âŠN›ÍÆôéÓ9sæ }ûö¥Zµjœ={–Õ«WsðàAfÍš…ɤ6Ôv»·Þz‹“'OÒ³gOj×®MJJJ¡ä¸§úô¡I“&,_¾œ‹/ºM7qâDÇÿßÿ=Õ«WgàÀÅt®V^ýuNŸ>M=0`.\ 22’ýû÷óá‡äz?æää0mÚ4, C† áØ±c¬_¿žÆŒs]m–þï¾ûŽÎ;³bÅ þøã’““éÞ½;+W®ä¯¿þbÒ¤I×ÍfùìÛ¸Kn6zƒ‰ŽŠŸØæ,:êT-V„|ýÛæ.ßêr,3;—ãgãIIËpûù+·s%½à~[¿ãþ&^?¨ ŽmvžŸ9—'b]DàÞ#g‰>z–—Â}½ÚP£Jq —IH¹êö\)—Ó¨YÍûXK«ÕÎs3ærèä§2¸OV)€z5Ã8Wr¨Ö™¸dæ-ßær,õJ&ë·aÌÿà)ü}MÞ—×C›Ȋ‹ïÿʱ3—<ÊÛÓëA´ëE ªND·!ì‹\Ä®Õ? áy'ÏëÅ•+é,\´’–-Ó½[{Q ‹ÝÊÏ»ÿ KÝV¼z÷Dªø…m5s>íÁ>Ž´—³Óynéd𳨴+Ov{ˆJ¾ÌÙþ?ïù‹¨3Ñ®‚Ü,.^M*õÉøÕŸ³âØ—c[Ï õ£ <$ƒžâ¾æ=*„ÍV­ZÅÉ“'yóÍ7‰ˆ(ðµlÙ’/¿ü’uëÖ1xð`Õãð÷ß;vŒgžy†>}ú8Ò^¸pƒÉ;""‘ç¶mÛŠQC† qQ¡¡¡.ÇœY±b§NbÒ¤I T Vš6mÊìÙ³Y¼x±‹(8uêíÚµãå—_F¯×c³Ùxì±Çغuk™„§76Ë?ÿÔ©S騱#+V¬ ::šçŸž.]º°råJâã㯫ÍæÞ ÔèZ.C~KÖî gû¦<÷è@|M¤gæpîbr±ž»+éÙëø “êÃýÛ³aÇQf}¿$ñÕE»^ŽízË.ƒØ¹ˆ+)—HŒ=AÕÚMDg}‹sS`~™§a{äAQ MÞD‰ “?a~!˜ôF*ùÒ¶FSêU*úûi÷rÒ²ÓiQ­o˜B%ß@.^MæRºê±ósí¬Ž%uü_ÒÌÇÉ¥¯ÝÖăöÅæÍ›©^½:U«V%))ÉñjÚTqìØ1GÚ7HïÞ½oZy£¢¢ ,âÝëׯþþþìÙ³§ÈwªV­ÊÔ©SÃê:ަM›bµZ¯»ÍªW¯N—.]ÐéÔçäððpºwïîxo·ÛoˆíâÏQÏ_¿e¹ä§×©)._Í$årFƒž*•éØªA±b¯wÇfLÑ—@?:F¨Ã¿ié™.iÖn; @·vM> #~&ê׬ÂóãÔ:ÏÊ6sàD,5ª¨â6!Ežþ°’§Þþ‘Ÿ—E©Ï<¯kª•\¼€î^…Y»]-C»æuylX/‚ü} ôÃ×çÚ–ùª[#Œá:R¿V|MBýx _;ÇçiéYeÊ×S›\JLs|oÔ Îøûšää =q6^´ë娮×lÔÆñÂù㢣OïÙµûãÑG¤Rˆ˜}[‘ÐkuLìô_m[ÄêãÛØ³—.u[ñpÛt¨íêEX}\î:’C§Ou}š‘$žìþ˱£ êÌÇʾA„ùïA™ÿÈ»( O:˸__`ñøYÔ ®æHcÔé+ŒÍbcc±X,L™2ÅíçYYY.iëÖ­‹tׂЋ‹£Aƒh -¤Õj©Y³&111n…§óÐ7À+¯¼rClêb³ÂïoY驸”Ï2?ãèÁgóþæð©8&OÿŽ Ú6¯Ë€î­èÞ®±ÛïD4®åTgjŽ/<Q:mѰ†kÇ^/¼ O¹Jõ&îîÒ’§¾½þÚÞ6oÞ̾}û1b„cņ;µ]¿šZŽàÖç†Çx~ûõL·¯fMº|.¸±œO‹g~ôjŽ&žájn&9V3±WHÍRã¿ü¾ÂÁ/رÐïw;—ŸžB®ÕLJÖÆŸâ|Zѧ”,µÒæ}OVdö]<Îü}kÜ–çÐ%µjYÍ3ïÁ/¿üÂÈ‘#™7oÞ µÛ]wÝEZZ+W®,5mãÆ¹té—.© ©¢(|ùå—å*<ƒ‚‚8þ<‹¥Øò¦§§™I¿zõj233éÙ³çµ{¥J© olv#(ÍfùäÇš=²³\Î;ç÷Hö>KrZ¹f+Z­]^Ügp€_™óíÖV¦Úsœ¥ëö’™KLl"Ÿü²Æá•kÞ°½ŽÐ`uX8úèYj‡Wfô .Hl‹> àŽ÷–ÖMÔËëv!&6‘¸Ä˼ôÁS‹Î w+j·ËnãGsÍj…úèïCÌ…D>ë¾ ñ&_Om°yÏqÒÒ³¨W#ŒÞ̦Ÿÿê9S™þÔPBCÊg˜}öìÙlܸ‘/¾øâŽn×ÎÛ“÷€¨¡f£¶¢³¾ (Ñã9o~Áò ‰ÉEŽý@™Ò *É™iÌÜð£{w*XãФ724¢/ ¬å¯£Qüu4Ê%ýÔ>ã¨s—ë“iÍà*K<Ë7;–ð×Ñ(R³¯’k5ÞÑm¸¤½’“Aì•õÉ8ܳjùòåX­VþüóÏ2Í´.+Çgûöí|ûí·ìÝ»—æÍ›c41›Íœ?žáÇS§NÈ®]»øïÿK¿~ýØ¿?iii4nܘ“'OºýMŽ>%¥È1w³°»víÊÊ•+yõÕWéÒ¥ Š¢péÒ%žyæ@]T}ëÖ­|ùå—>|˜ZµjqîÜ9¢¢¢hÖ¬÷Þ{ï5Û¤´ºðÆfe9wyÛ,Ÿïå`Ô2’ãNs1æ 5´º6þç~ùs‹ÛÏ&+ûÀØ!݈Üu”¤Ôt>üq%þX ðM=¯L‚&ÏÓ\½jÉi( ôhß„ÐZ4¬ÉáSêß5ʸ_úÈA‰Üu”«ÙŒuŽãx³úÕ‹Ìjw7úåüu|9]/kû–õÙ}’uÛ³.oSxX0~>F²rÌeÎ×+›åÙätl"ßù?~&Z7­ÍÃ÷uÅÏ÷Ú†„5jÄ¡C‡Ü¶ wR»p`óRê·êŠo€˜rÛ ÏÈÛK<æ,&½I+¨x„úÓ¾VsÎ]¾Ä•œ dE¡’o á {× Ú×jî’þå~ã©P‰¿ŽFw%I’õ ¦ah-ZT«_$ÿ×ï™Ä»ë¾çxÒ9R²Ò¨JÛšMâfùŒCñ;XETkèQùï»ï>V¬XÁ}÷ÝwCíȬY³øý÷ßÙ»w¯cY¤ÀÀ@j×®í2)§mÛ¶Lž<™E‹±hÑ"ÚµkÇ /¼ÀG}ä6ïï¿ÿ¾ÄcîDÔ£>ŠN§cëÖ­üúë¯èõz—m#ƒƒƒyï½÷˜7oÑÑÑlÞ¼™°°0†ΰaÃÊ%Ƴ´ºðÆfÞr=l渻 få÷á\M'ò÷OûÊw×d§>šsê\)iX¬6|}Œ4«_‘ƒ:Ó©UÙãƒ}ùæ­ÇøaÉf¶í?Åå+™øû™¸«y=ýGÇš™ª°¬Äãêlíw©« ôîØ¬@x–ÑãÙ´^8ï<û_ÿ¾ØøT™ø`/ÒÒ³<^ÿÒSóv6Úsø Z†.mñÌØ{˜ðêœ"ÂózÙ¬yÃÔ¯U…3’HNË ÙiÍÕ'b9—ÌŒçG\ÓµñÄOðä“Ob4ïèv=þìÇ2fÝïŸ,:êÛ)%ñ¸²~Íô0¾B°r±fׯá—=+ eõäÏ…A†ý—0ÿƒ'˜0}.M;ôF¹Ã˜öÉB6í>N§V xóŸÃðó1b³Ëüµqþ°ƒ^Çú^¹¦s$''3yòdºvíÊÔ©SïÈv]–íÌž:˜ØÑÔoÙ•É3–Tˆ˜pÁµ#6²Tr¬f²,9¬<¶•ß÷¯àîÆ„aŠ6½¤M/uxò·ÿ=MÊ¥3Â(wÛö©qŠ>&Y¹äZ¬$¥^åhŒ:©r°™ó¾xñ"›7oæÍ7ßÄ××—‡~øŽm×ÿœ3ØÑøóÐóŸÑy!<ž—$n¼¸Àã´Î1~åIi;ÝnO¬æ¾™öçí&¤j-^üj:½Aæá…÷e×Á÷ªÿyb(ý»–m“¡CÕ‡šÆóÄOP·nÝ;²]ß¼äKV|ÿ&z£½µ€z-:‹ ï6B'L ¸Ýq÷'„§ ¬è>L|ãW~~w]¢óã­ãçe[Ø}’øä+Øìv‚ühѰ#v¢M³:eÎ{úô鄇‡»1¾“hÓûAD-ã¾‰Ó…è¼ O@ Á AÄx @ „ð@ á)@ á)@ ÂS @p‡òÿ#MBmþð IEND®B`‚scribes-0.4~r910/help/C/figures/scribes_add_dialog.png0000644000175000017500000010451111242100540022471 0ustar andreasandreas‰PNG  IHDRšqê_òsBIT|dˆtEXtCREATORgnome-panel-screenshot—7w IDATxœìÝw|TUÞøñÏÌdfÒ{¯ôBG:" ˆ( ÖÕuUV}öÙ¢®[Üß®«¢Ûž]»>*HS:Ò -!„ -½÷dRfæþþ3É’‚ø}¿^óbæÜÓî L¾œ{ι „B!„B!„B!„B!„B!:›ªƒùoö§B!„¸3(mü³™¶†Ö röü‰¦ö÷M!„B|_íÞrÔå»·f,Aåõ6¼àº óf¦jöü‰æÎëªB!„ø¾Ú½å¨'–ÓtÝŸ-7 4m‚ÌGž›ÑýB!„·¹/þwŸõýî-Gý±˜&ÀØä½ Û‘ÎVMkùóW–àáêCIyAç÷ZQД`WQ„Ië€ÑÓôö ’©žB!„·“Sq'ùv÷evo9‚%È4õ4œFšŒnÚµR—5Òópõ¡°$÷† +Š‚ª½Á¡¢ ÍºD¯Ó›Ò—‘›«æjïqÆL{ûöÕ%„BñV_o$3=c‘€`œ];TO¡–¬Œ@!(Ô{{õXß~}¬&à€%À¬Ç76¼n››¥¥èÐ:šùÈs3pvpk±#¦z^®8;¹¢P]SEqy¨ëo>óÓ¬ OO¡ïÅ»UQšm¢¨XV]Ç…iK¡W¿6] !„BˆººÚ:NÆœÃEï‹›«;)W3aîž.7/ÜDU•ã‡Ïâ×ÈÊK#jrNNÖ<>ßCQ^»· jº&¯†àÓ˜[Ñ´2™[^ TYª0$8_¯ììì0šë)*Í&ùÊIŒš²Ö+4+ا_ ÷•h‚<ª)˨§ Ä7»z¼\k9SXˆ6´OÛ®ˆB!ĘÑhäTÌ9‚|úóÓÇ^D¯Ó³ûÀV¶í]ǘICqswnS=†êZŽJ`ìˆi,^ð8*`õÆ9~ä(ã§ G§×¶TÌžÆáņE@MÑR i3i6µhjÌœM=ÌÂB±³³#,pnÎ^ì9¾½S …ûŒTú^=HˆK9U™²ŠÝñÑÕàíZMžQÊË·Õ6…B!D£‚œô*7žzô,Áלé P©Õlݵ†Qã‡àæqã`³ºª†ØcID˜Æ’ž@£Ñ°ôÁ')z¿Ìk¹ôêÔRц¹Ž×™ /ÕMG4Í­Œhj´`2—s!ó(UÕ‘ô ˆÑhÄÓ×ᦑxm/juÓ˜UAŸs…©»ö0P•iàj¡ö<«(T9r¦×TÌ>þÐJ›B!„¢‘ÙlB£±C£ÖXÓÔj5³§Þb6³}ßzFŒØj°i¨ªáÔñdÆŽ˜Îà —[ƒLµJ…†Z³ÒZvâ]VæøÑ¸6÷§=ý¸µt®^^ô|kSÌ&39Yù¨Ô*ƒýn©>!D÷rótåRJ2ŸoxŸåKžE«µÜâV«ÕÌžv?[÷|ÉȨÁ¸¸ÙÞn®1Ô÷m2ãFÎ`ñ‚ǰ³³„…Š¢ ( ›w®%åj"£Æ i-6ÓcdÖšï^*Ú=¢©¨0Õ©@cFÓPRÑàâäŽÉdB¥Ra4ѨTØÛ9c6×€¢à˜s…ð´oö1Ršc¤ Ä] žÎUäi=9íEUÿH4u«#¨Bˆ®—›‡¯W¯¾ð›ôäÔxÞýü¯ÔÖÖ¡ÕÞôk€òò †Ëÿ·5íùß/¾á¿ñŽ”ùÇŸ6´©?MݬÎÛUÓs=“|œ/¾þg‡ÏC1+äç‘y-µFÃä¨9ì?ºÿ@ŸÎꮢh4j†Ý5€3'óéZl‚MÆÎz}ó7_0bÌ k°i¨®!þÄÆÝ5ƒ‡.· 2ÍŠ™Í;Ö²ÿè6FD B§·kí»F‹%¸´kòÒÐ8¢Ù–9šOT™uø8õÁÃÓ¬ü+”UçâåJ_oŒF#¥¥¥¸¹¹¡ÓÙáäàF•±§¬Te%سŽÒl#ŸÙÕáíj GNyGQÕ/ZeÓ–¢ûä3gʃÍÒõ†‹“+ù¹ú¶©®C x4O¿Ñ¿óŽ”é¨;áûÆh4vø<®\Ê ´¤œq£¦3{ʃ¸¹x°ÿèÖ;âºñC£Õjˆ=3±–`óч~Š½Þ²R\­V3gÚ|EaÛîµ Ñ­Î޳q)Œ¿k†ÍœLEQ0™ŒlÞ¹–G·1bÌt7ú^PÓ8‚Ù4ÀTÓÖͦ«ÎMõ5hÝu„÷"À»/ç.žÆ×# “ÉLEE ÄÅÅ…Ù³gÓ7t( ‡béWK˜{™5ä»â©­ÅÇÍ@Qlj ‰Tô‹@£Q·ºº]Ñ=ª*«1›LŒŽœÔì˜Z­adÄbNïÅ×ß»Mõ)­ü“¾Ñ¿õŽ”é¨;â;GéøyT”Uñ£ùÏ0fø›ô;âºñ¤±S3td?Ξ>Îëá±%Ï ÓZ¦0ªT*fO½…­»¿D­V1aô,/xÌ&È4+fKyl;CGöEg¯»Ùw‚5 ü.­½«Î2rRðuÁÓÇÿ(fË œ={–ŒŒ ŒF#sæÌ¡_X8öÞ¾xRe ½È?½o—* ÍzŽL¤¢÷PÔ*µ¬2â6—SHïxy4ÎÑ3›Í¨ÕjFGNâÐñªkÐë7ð5™LäæPRTzÝ7oÇl2w¨Lkžÿýb›ÏO,ùo†‡mõxÓ:KKÊÉË) ¶¶Ei<¦B…N«ÅÛÏ /T*H8ܬFƒÙlFù®° PkÔ89:Qm0`4óªUxùxèGBüùfu©5j“ÙºÓ±Z¥ÂÅÍ™ €NW0›Ì&r³ó)-)Çl2¡\—G­QãæîJ`/vvvÖsÑéôÍꋵÌÑЮk$„èYZ; C"ûæ[”/ÍüxÙϱûn®£F£aöôù¨ÔjJJ Y¼àq´v[)ŠÂæ_²ÿÈ6† ƒ¾­ñ™êF¯vï£Y«”}b¡~ƒ ò ÃÞÞE1>˜ÒÒ"##q*¿FMö·8eÅRŸ[GN…<œÊɳó Æ3ŠŠ¾Ce$SˆÛ„¢@YY³&>dM3™LœL8ĸ‘Ó ꇯWyE|·`Äd2q9å*j•Žûg>Jdxn.žT*¸v†ì¼ôfmÕÕ×·»LkßC‡²ùœœÒ¦|Š×®dQZRÆÈˆ Œ¿kÁ½±×;PSk · ƒØ„Ã|·Ÿò²rBû„¶s$ϧaÛÞ5Ìö}Bc¯w ¬¢„˜S{Ùsøk&EÍaÒ˜Ùx{øQe¨äD|4;ö¯E¥Ò4«ëLòqNÆG3sòû÷¢ÞXGrê¶ìþŒ´‹Wè7¨w‹çÕp=Ó.^A¯udþ¬GØw^¾hítÔë(-/æbZ»¢7’rá ý¿««¥¹­ iÏÿ~1F“™¬ôœv]# 6…èy­%Ø`$oþû—-žKKŠ KÚ}<½ÜÛT·¢ki4jEô"!ñ8ªõ–`Sß °l´yç—ì;ºAÃz£Ói;5>ëÐ>šj W/-eu霿T *3E•éh5öx»áå;úÒôeé8ª d)®r£`ÄpŠ{ B-«Ë…¸­ç1¸ßpœWv>í —®&SW_‹Nkù‚9‰ÖQUYƒ£=¥¥åÜ;}©MÀh¨©æTÂa¼½üÜox³¶:RæV¿/®/_˜WÌØ‘Ól¨­{¾àtR Ãá{–0dÀH&ŒšÉ·ñšÕéêâÙl&;ï~ÞÁ6{Ïù÷¢¦Ö@ye)¾^Öô¨áw³çð×Íêrqr#;ïiW’9 GË~w>žþL7·Åà´A}]=Ç̲ 2Ó³Ò¸œ~‘ßö€—‡/Q#¦râÌ~öṴ̀Ácðõ´–Ûwdó-]#w×Vû)„è^vvú‡‡púÜ1”µ ?yäyëT¨–-ŒÖ±÷ðV ÅÞ^ÛéñÙÍoß ªU©Á äàæéˆJ­¢¨âNa£Èô„Ké»Dè/“yÅì‹&œÌE¸xVRäÚòSÖ…ÝN1›©6Ô0*r²Mú…Ôêõ¤]9Gø€‘xyøÑ;t …ùc2™6xŒM¹Ï6þs)ñ€Âþ#†Œ³9ÞÑ2·âúòõ¦z&Œšaýœ“ŸÎ¾ï‚¹èow0fø‚,·˜Ç ŸÂ‘ØÝ-ÖûÿN|RL³-™ª UüåŸ/PQYÆò‡þË:RìéîK³ ”@Uu«>x•ںΥžæ™Gk=6bÈ8öjœ6•r9‰uÛÞÇÕÙ{½[ö|ÙlÂÏ'ˆßþüoÖ|aÁý8zr7^îlÝ·o/›@sëÞÕØ;ØãáåNIqi»¯‘ì,ÄíÅh4a2™qtp²Þ1iJ¥RáäèŒbV¨¯3¡Ówþ¿á?¨Ö¡±ãõu&Âü"ñíÇ‘=;qËÐàì¨ÂÇޟµ‹¸VÖà6{¥½=0k$Ú¢§•—V ×;1p”5­²ªœÌÜ+€e͆@`ô°ÉlØñ¡5¨ðt³]…žr% ¿Š ‹IºpªYÐØ‘2=¢‰¾¡Ö¾¡­îÇéïÜbpx!''Grò3lÒÓ³/QQY†FCFö%k ÙtÔ³©k™©ÔÖÕàëçCÚ•s6Ç|šŒˆ¶Dg¯##;k™©ú…Ò+xÍ{’^!ô µÉkg§EQ<½Ü)+.o±¾ JŠJÛ}äN•·ÚÚ:.]Èbò˜9<´ðñM€YSïÃl6±e÷—ô³}‹ù:ª s4Û¶§šbRì9„¿ì?´ųœÒáÈ>¨0¤ÎD_?tZ-iÙY8oˆÁcÆpJ†øbÔ·üÅ+„èe%eŒ:­¶q%¹³“+m}‹ùG ÇWß|Ley%€uŵ•¢ ˜-«­U*õõÅ;TæV÷vl©|Ó/ÝšZE9-–UT*¸¾Ï€ÑX»‡S³@Ôd2¢RJ­n©Xó6ãú5êV®aƒâÂRýzñøƒ/àçÓ8¡ÚPÅ餛y· ZZ™ní»ÑdíB{¯‘ìÁ)Äí¡®ÖÈ¥‹™LŽšÃâ5[]®(Šõ6zÓ'mÚ¹šÞptjy>gGÜÒ­s°|/ª±#Ès0^.Á:º³} N.zgoJMÃ8 M^>¡>>ةդdf¢ß~ŸŠaŽ ¢Æ±mOBt.“ÉD]½‘QÚïÙ'GÂû åÊYPAna&!AØ7’¤‹§ïß|¾eGÊ´ý–lËáS³ò*È-È´Þú­6Tòö{/Y`{Gjj ÖÏS+A”Y±ìRÜRWTª6D™@¯àþèõäç1 Ï›c%e…7(©`4ytÑ kYYUΧþFÚÕsè´úM“ÉŒ Ë´‰¦4 ™éÙØ;è;xdDSˆžVWkäjj6“ÆÎn¶»eáÏ:JJ‹xlÉϬûl6>AHÅ×Û?'¬¯?lÞò­sÌvzÄÝ1€3I'¨ÕäãèÜ8™TÛÛ‹¢»Ã9¿? òóð÷öAÊ…¬,jœÆ·º–ÒQ¡”ºéZY/„è*e•¸ºx0 O„5MQª •6ù´v:›=GEN&éÂ)4j ñ‰16Aãc>OlÂa<Ý}Òä–{ªýe:ûÖ¹F­áøé9õ ƒ,slÂûñúo>ÂNc‡^ï€ÑXoÝ‚ÉNcŠ‚ÉhFk§!íj2GϲÖ72bf³‰uÛÞÇÑɱÝ×H¶¬¢çÔ×I¿œÇ”qsY¼à1›g—[V—¯eÏ¡-„ôòF£Ñwö`ûlô¦·Ñ¿Þù!½|°wеÜ`µ{ÃvkºÑLÿxõáÄé#TÔgaï¬Á¬˜[¼{¥êíM®Ñ1©˜ss BBBf×NŸ'¬º–Ú»RìÓ¹“P…­S Ùmó¤ ±hµvxz[:^WWÏåô TT•áâä€ÖNËð!ã8—K}½~ò÷ÍXÊÐA£p´w¦¸4Ÿ“gQPœËòÅ/ÚÔïàhOuUM»Ê´õÁ×oÝÑZy{=555¼¿æ-¦Œ½‡»"&âç„N«§®®†üâ’Op0f;ŠbÆÞÑòŠÊënmªJ­Bc×¶9è‰Nq-+•¨áwãéîKµ¡’¤‹§Ø¾ïKjjªðôñh1ÐT«ÕØé4|ñõ¿˜?û"޶nQu9ã"‡¾ÝɰÁcÿÝêñР~h4v˜Ìfìì‰OŠ!8 7Q#îÆÙѕںŠJò°×; ·×S[[Û®k$à¢gÔÕɺšÏ”q–‘̦A¦Y1³yÇ—ì:ø5A½|°ÓYކz{æ0 °|ÉsÖ`³émôÛþ °[ 6[>ÔΞ?±à‘çfpåbóÉߊYMŸ€Hz aôN ª<œíZ]ÑÔÀl4£\. àh a5 ýz÷æ[m .*¼O¦â6(”’Éý1éeΦÝ¡¤¸Ìæ1‰ \\±·o¼eRTXÒâmQW't:=••UÔÕÖÙ,òQ©TÍý>¾^˜ÍJ»Ë´EyY%µµµm,¯P]]ƒ¡º¦Ù¹©P¡R©qpÐãàdJ¥¢ ¿åMÓ=½Ü).*m–®ÓiÑé´TVV·Xîú'}¼öÛ *Ðëu8;;¡V«[l_¯×ãâêDeEµ5u(Mþ—¯BjP̶×S­VãéeùODue5†ššë®¹ Fƒ»‡+j5íºFBˆîg2™É¾VÄäæd6Ü.ßu`3Aa^hu¶ñ•Éh&+½€ÑçØÜFo(ÿÍþÍ|½s5A¡ÖGá^HL§(Ï2•h÷–£‹PýÝ«ªÉ{PÓ¾ME…kƒzß…“ƒ+{l§Šlœt˜åæ·‰Ô ôñ&0K¡&-Ó¸øø8¢wq¤´°˜ººzÐÞx•¥¢s¸º»´z¬é¿}wO·Vó)(89;âäìØ¦6êíH™›qrqÄÉ¥y­•×ÛëÑÛßxRÃw[ÃoKnx¬…ú‹ Kš¥©PááÝüÉ: –þ·Ö†YQptvı×ÒRÆr=ìì±wjù.’‚‚Éܾk$„è~†êZý{³xþc¶ 3›v~Éñö@m×Âc¿ÕàìIì™Ã¨€Ç–Bˆ•J%«¶…í¦ÓÛQPšË??xƒŸ?õìõŽlÙ¹–¾Â/Ð öæýV©Uø¸q"þ*T<úÐÓ RñÑêpùj¾Aîþ~jó>šŠÉDII)gO“–y–ªº"4v­oëÑJÅÞN`VPëíÐhÔ «…?Ïÿ~±Íg;;;Ù‡RÑ!ž^.\;Àë«~‹‹³+—¯ÇËÏ•ZÕ®ïo?WNœ>Dvn&ײSññwCQ:þ(à6hš©åRN u=*e£âV/ÑFš&OjmźBÜI[ž)#šBˆŽòðr¢¦¦ê’B<}PkÚ—D¥/?gJª,¦·Ÿ+*Õ­}7µoMÕw÷çPd*‘B!Äm£éªò[Ù×V×°û¢`6ÝÚ`‡÷ÑB!„âFÚ<¢yáLv—wF!„BÜ~ ¼y¦´ëYç«ßÿ°C!„Bˆï§e?}²Ãó4egt!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]⦠âF 2¸’–@eE1f¥c§B!D×R«Ô8»xÒ»_$Þ>!ÝÖ®š¢ÃJ‹ó¸|’¡‘3ñôF­Öôt—„BѳÙDqa&ɉû°Óèp÷ôë–v%Ж–zŠa#æÐ»ßÈžîŠB!nÂÃ3W7oNŸÜĨ¨{»¥M™£):¬¢¬wÏ€žî†B!ÚÈË'”в¢nkOMÑafÅ,·Ë…BˆïµZÓ­k*$ÐB!„]BM!„BÑ%d1P;<ùôK8::ð—ÿ÷K\œZ<>~ÜHžXþP·÷ïv’M``àÓŽB!ÚOF4; ºÚÀÖmûzº·­;vð /Ü1í!„¢c$Ðì ÃGN›[ÐÓݸ-={£ÑxÇ´#„BˆŽ‘@³ƒL&3ë6îèén!„BܶdŽf¨T*E!1ñÉçS Üÿ†ù32sزu/iiW©6Ô Ói ðeÖÌÉŒº+š¯aŽçÒ%óqpгk÷!òò‹ðpweæŒIL½{,ûcÿJKËñ÷óæ¾y3¸käP›ö †¶lÝK\|å•xz¹5z8÷ÎŠí¼³ç•.\¸Ðæý¦M›¬ŸkjjذaÇŽ£°°www¢¢¢øÑ~„³³³5ŸÉd⫯¾"::šüü|œœœˆŒŒdÙ²eøùùÝ´!„BÜdD³†ˆƒƒ=6îDQ”VóñÖÛïq&!™ÊªjÌf355µ\¾’Á»ï¯&ù|j³2‡ç£OÖ“•‡Ñh¤ °˜5k·°êï³nýv ‹1dfåòîû«¹z5ÓZ¶®®ž7ß~}ŽQRR†Ñd"?¿ˆm;öóýß ûÚ^|ñEúöík}ߨ¯:~ûÛß²k×.&L˜À3Ï<äI“8pà/½ôÕÕÕÖ¼|ðk×®eĈ<óÌ3Ì™3‡S§Nñûßÿžúúú¶#„BˆÛ‡Œhv€‹³#óæNcÃW;ÉÈÌáè±X&MÓbÞ#Çb©©©E¯×ñ³§–èGrr*Ÿ}ñ5IçRšˆfeç1oî4Æ»‹Ø¸³lÚ¼€äó©Ì½çn&ŽÍñ“ñlݶEQˆ‹O¢W¯`vï=Lffš¥Kæ3h`_.¦^fÍš-$ŸOåø‰xÆm|däÊ7^@§Óuʵ™2e 111\ºt‰)S¦XÓ·lÙBzz:ï¼ó¡¡¡Öô1cÆðÊ+¯°qãF{ì1:Dxx8O=õ”5Ÿ··7;wî$''‡ÐÐÐVÛB!ÄíCF4;húô øøx°iËjjj[Ì÷À‚9üûŸâOüƒpuqÆËËÃz¼ºÚЬLHp æÏÂ×׋éSÇ[Óƒƒüy`Á|}½˜9}¢5½¢¢Òú>..€~}{1,b:–ˆ!8°'OµiËÃà 7œœÚ{ Ú%&&†þýûãîîNyy¹õD@@ÇoÒ'RRRغu+–W3gÎdÕªU6AªB!no2¢ÙAv ‹Ýÿßý‚òòJvî:ØjÞ¬ì<ŽÅÄ‘’r™œÜÌæÆG?5}ßÀßß×ú^¯oi ð³¾··×·XG /¯¦ IDAT^¾åù¥S.ó«—þڬì›Z—ÈÎΦ®®ŽÇ¼ÅãMçŽ>óÌ3¬\¹’O>ù„O>ù„ÐÐP¢¢¢˜5kÞÞÞÝÕe!„BÜ" 4oÁÈC8 S.³gïÑó9ËgŸ¢( 2€±Q#èÛ'Œ·Þy¯ÕzµÚÆç‡«T*ë{»VÒ›RZ\›ª¬¨ºáñ®¢( ýû÷gÙ²e7ÍÁûï¿Ï©S§8}ú4 lذmÛ¶ñ—¿ü…>}útC…Bq«$мEKšÇŸþòÏV÷sl˜G9tÈ^|þ **».Øóöñ$7·€ˆˆA¼°b¹5½¨¸g't:m—µ}#¾¾¾TVVÙìXll,®®®FÒÓÓÑëõLœ8‘‰-SŽ;ÆÛo¿ÍÎ;Y±bE·ö]!„#s4oQHH Çjõxe¥e5uzF6©iW¹v-‹?Yo=ÞÙ‹ÀGŽ@RÒEöî?Jaa1'O%ðÊ«oñìÏÇšµ[lò—””QRRFUUó¹¢¥V7ÿkENNÇŽ³I?wþ:_}õÕwý)á—¿ü%ï½g;âÞ¬î–ÚB!ÄíCF4;Á³‰;Ûâ‚ ÃÃ9›@yy%o®|°Ìïtqq¦¢¢Òf!Og˜3k §ãÏ‘›[ÀºõÛY·~»õ˜—§;÷Þ3Í&Ã<ÎÎ|>»‹‹ ›7oæ¾ûîC£Ñ°hÑ"Nœ8ÁªU«HLL¤_¿~dgg³k×.­+Î}||˜4i‡æÍ7ßdäÈ‘Ô×׳{÷n´Z-³gϾa;B!„¸}H Ù \]™;g*_oÞÕìØc<€N§%þÌ9jkëéÓ'„˜Ë‰“ñì?CÚ¥kÔÖÖÙ,ú¹ŽŽ¼ôëgؾ}?ñgÎQZVŽ£ƒY´ðÜÜ\:¥™3g ¬^½š±cÇâï#o¼ñ6làøñãìÛ·†βeË ²–_±b>>>=z”ØØXìíí8p Ï=÷œuïÌÖÚB!Äí£¥%ÚÙó'Ö<òÜ NI ål.«ßÿ°;û&nsûwÊìûþ 7wß›gB!Ämaýç/3}öò6ç_öÓ'0Ì2˜S”WEQ^»·]€êï^UMÞ€™ä&„B!º„Ü:o£†g‚·Ç‡ï½Ñ=B!„ø~M!„BÑ%dD³dt²9µJÙlêén!„¢ÌfjU÷3ʈ¦è07/J‹szºB!„h£¢‚t\ܼº­= 4E‡õë?Ф„=äf§ÊȦBq3›Mäf§r2fýú·þ ™Î&·ÎE‡¹{ú1`Ð(ÎÄn¥²¢³rãç¬ !„¢g¨Ujœ]<é7`$îž~ÝÖ®šâ–xû„àíÒÓÝB!ÄmHn !„Bˆ.!¦B!„èh !„Bˆ.!¦B!„èh !„Bˆ.!¦B!„èh !„Bˆ.!¦B!„èh !„Bˆ.!¦B!„èh !„Bˆ.!Ï:·¤° ƒ+i TVcVÌ=Ý!„B´@­RãìâIï~‘xû„t[»hŠ+-ÎãBòI†FÎÄÓ;µZÓÓ]B!D ÌfÅ…™$'îÃN£ÃÝÓ¯[Ú•@StXZê)†˜Cï~#{º+B!„¸ Ï\ݼ9}r£¢îí–6eŽ¦è°Š²"Ü=zºB!„h#/ŸP*ÊŠº­= 4E‡™³Ü.B!¾GÔjM·®©@S!„Bt 4…B!D—è²Å@O>ýR³4µZ“£¡¡Ìœ1‰¡CtUó]¢áœÆÉËêp=Š¢“OP íŠ¯ÎªÿvQRR“O>‰ÙlæwÞ¡OŸ>7-³páÂ6׿iÓ¦[é^«²³³ ¼ažÛ¡Ÿ·báÂ…Œ3†—_~¹Ãu´å: !„øaëÖUçf³™ŠÊ*Î%§r.9•=|?Ó§ïÎ.ô¸´K×X»~¾wD0y#‡@«Õ²wï^ž~úé›–yñÅm>oÛ¶K—.5Kï*;vìàÓO?eÆ 7Ì×Óýìim½NB!~غ<ÐuW/ž‡YQ¨©©åÂ…KlÞºƒ¡†õ·9lÞÞž]ÝNáï›k‡ëxã­ÿàÛ%õßN¢££ ÅÍÍÇóãÿNwÃ2S¦L±ùÃ¥K—š¥w•³gÏb4oš¯§ûÙÓÚz„Bü°uy ©Óiñðp³~ ôÃËËýû3L&3GŽÆ²pÁì®îF§øókÿý½®¿;]¹r…k×®1oÞ<üýýIHHàØ±cL:µ§»&„BˆnÒ#¶GŒ‡‡%%e\L¹lsÌ`¨aËÖ½ÄÅ'QQ^‰§—;Q£‡sïÜ©ØÙ5vWQ¢çȱXòò 1¸¸83xP?ÌŸ…—§»M½µµulßy€¸Ó‰• ×ëéÛ7Œ÷Í$,,Èš¯ažä æ™™Ãé3çpp°ç7¿|šWÿð`;‡²!ÿâEsñðpcç7ÉÍ+ÄÓÓéS'ØL h:o5æÛÓÄ|{€ß{Ãæøõs4EáhÌ)>IfV.jµŠ @¦LŽbÂø»lγ¡Ž‡š‡¿¯7[·ï'#3ggGÆŒŽä³m®cWÍ ŽŽà®»î"88˜?ü}ûöuz YSSÆ 8vì………¸»»Å~ô#œ­ùL&_}õÑÑÑäççãääDdd$Ë–-ÃÏÏ2W¶é¼Ë… vêÜʶösáÂ…<øàƒøûû³uëVrrrpuueêÔ©,]º”èèh6oÞLvv6îîîÌ›7ùóçÛ”àðóócóæÍäççãããÃÌ™3Y°`juëëÿ²²²øúë¯ILL¤¤¤•JEHHsçÎeúôé6m´vÚzžB!~z$ÐT©TPRRF^~㦡uuõ¼ùö{dfæXÓò󋨶c?—.§ó_/øàöìÙÃ=÷ÜCŸ>}ÈÏÏgÛ¶m\¼x‘ýë_hµZ^|ñÅ.™kÙž~‚enk]]sçÎÅÝÝo¾ù†7’––FFFsçÎÅÑÑ‘]»vñé§ŸâççÇØ±c­å;FAA³gϦwïÞÄÅÅñù矓™™ÉóÏ?ßbsrrøõ¯««+÷Üsîîî±wï^þõ¯aooÏ„ Z½Ní=O!„w¾{¥“£ÕÕÕÖ´Ý{“™™ƒF£fé’ù Ø—‹©—Y³f ÉçS9~"žqc-;<}€!áýyhñYo™+úÕ~ýß¶ U †Z|/CRRRf p[“‘™Ãä‰c˜5såå•|úùFò󋨳÷'Œ"Àß—•o¼Ì¯^ú+Ð8wõfŽÅÄYƒÌaƒX8›·î%áìyb¾c@ÿÞLœ0ʦ\Ú¥k̘6»§Œ%;'÷?ø£ÉD쩳6æÊ7,«Žo6w²=Μ9Cii)Ó§OG£±lè>aÂRRRØ»w/?þx§´³eËÒÓÓyçw µ¦3†W^y…7òØc–à-<<œ§žzÊšÏÛÛ›;w’““Chh(S¦Lé’¹–íé'@qq1«V­"$$€Aƒñ /””Äÿþïÿâëk™ßÁŠ+8uê”M ™——dzÏ>ËÌ™3˜9s&ÿøÇ?8xð sçÎ¥_¿~Íú¸mÛ6jkkùÓŸþ„5}„ <ûì³ÄÆÆZÍÖ®S{ÏS!įÇ÷ÑünÀ °ŒÂôëÛ‹aƒÐé´D ÈÀ–mqNž:kÍÛÀdçäs&!™ÒÒr&NÅÿ¼ý*ÿüÛ­A&À©ïÊ…ðÀ‚9øúz1<2œÇy€G—-dÑÂ{šõË×׋Y3&àïKøàþ7=__/}d!þþ> ЛÇ]ôÝù)œ9“ `3WµaîjÓ´–:|wwWžýÙ#„„È3O/ÃÝÝÕ&OSA~,yø>üý}9b(ƒõ ¢¢Ê&_CœœnzŽmuðàAk`Òð^¥RÉdê”vbbbèß¿?îîî”——[_AAApüøqk^RRRغu+€%[µj•MPÔÚÓO€Þ½{[ƒLÀú~À€Ö °Ž WVVÚ”÷ðð`ÆŒ6i÷ßoùÏÅõm5xê©§øè£l‚LEQ¨­­°þÙ™ç)„âÎ×c#šÕÕôÖ´†ÛèS.[GþšÊÈh¼õ}ß½ÓùrÝVJJÊØ´y7š^aÁŒw“&޶ÎGk¨7ðº}+GÖjÿüý|Z=Ö’^aÁ6£ž}û4/…E%íª«©†Ûñýú†ÙÌ­´³³£_ß0NÅ%’•Û¬Üõçêìì`½•ÞUª««9yò$öööøûû“ŸŸo=ÆÕ«W‰µë¨ììlêêêZ!mz½žyæV®\É'Ÿ|Â'Ÿ|Bhh(QQQÌš5 oïO‹èÎ~‚%PlªáïÕõsÒ¯ÿ™†……5 ²ÌCÎÍmþw¥¡®êêjvìØÁÕ«WÉËË#77—ºº:À2âfÚ{žB!î|=öÍŸc @|}É+7ùeVÙd4nú´ñ„…qâä.\¸Dn^&“™K—Ó¹t9kéY<öÈ6åÛò˲ƒƒ}›óÍFéšþò¿ÑŒ›¹Ù-ûÖòhµ¶?Zµúæõt†˜˜kpòì³Ï¶˜gïÞ½h*ŠBÿþýY¶lÙMóFDDðþûïsêÔ)NŸ>MBB6l`Û¶müå/iÓfòÝÑOhÛÏüFFû[ÒÚßÅØØXÞzë-œœœˆˆˆ`ìØ±„††2hÐ ž|òÉ6µÛÞóBqçë‘@óÊÕ ‹¬·t¼}<ÉÍ- "b/¬XnM/*.ÅÅÙ N XV§§g‘_PÌ䉣Yö£ù 5\¹šÁç«7SPPĉ“g¬¦¯Ù9y\KÏBQë/ò}Žqöìy|Yüà½Ø5ù­Ñ´/8¼t9“Él-wõZ–õ˜O‹û„¶-˜ð!==›´K×0šLÖ>FÒ.],Sn «ÍŸ|òÉf#…Š¢ð÷¿ÿøøxŠŠŠðòòº¥¶|}}©¬¬$22²Ù±ØØX\]-S ŒF#éééèõz&NœÈĉË¢™·ß~›;w²bÅŠ[êKgô³³dgg7KKOO 88¸Ù1€?þ///V­Z…ƒCã4ŠÒÒÒ6·ÛÝç)„âö×ås4ëêê)))£¤¤Œ‚‚"bO%ðŸwW–`nÒ„ÑÖ¼#G  )é"{÷¥°°˜“§xåÕ·xöç¿cÍÚ-TTT²ò>à“ÿÛÀ{~Éù iTUP«ÕÖM¤W·Þ5r(`Y ¾nývòò ILºÈöH>ŸÆ¥Ké6AfG”––óáÇkÉÊÎ#íÒ5¾XmÙòE¥R1<2Üš¯¡œœ|òó‹HI¹rÃzÇF°Öÿî{«ÉÌÌ!33‡wß_Cii9€Í|ÔöjøÙTU:\Gƒ‚‚’““ áÞ{ï%**Êæ5vìX&OžŒ¢(ìß¿ÿ–Û‹ŠŠ"''‡cÇŽÙ¤Ÿ;wŽ×_¯¾ú °< ó—¿ü%ï½÷žM¾ðpËÏ¥é(ß­Œ>ßj?;KNNqqq6i›7oF¥RÙÌ›mª¨¨www› SQÖ¯_4±oé:u÷y !„¸ýuùˆæ©¸Äf[ó4X´ð|}GµæÌšÂéøsäæ°nývÖ­ßn=æåéν÷LÀÛÛ“ûï›Áæ-{ÈÍ-àUÚÔ«R©˜ÿÌÆzgO!þÌ92³rÙwàû4þ"Ôjµ,ýÑ|n•‡‡§â‰m²` `ÞÜi6çàKFfW®fðÊïV°êßáòÝÊëMŸ:ääT’Î¥p&!™3 É6Ç'MCÔ˜áîwÃ\ØÎØG3::EQ¬«[2wî\öìÙÃþýûY¼xñ-Ý&^´h'Nœ`ÕªU$&&Ò¯_?²³³ÙµkŽŽŽÖÎ>>>Lš4‰Ã‡óæ›o2räHêëëÙ½{7Z­–Ù³àââX³ûî»ï†·¡;»ŸÅÎÎŽ•+W2oÞ<üüü8qâqqq<øàƒÖ¹š×=z4111¼óÎ; 6 ƒÁ@LL ùùù¸¸¸Øì-_§î>O!„·¿n½u®V«qrr¤Oï¦O›@ø`ÛmVxé×ϰ}û~âÏœ£´¬G""²há=¸¹¹XóΛ;À_ü–ôŒljjjq°×Ó»w3gLbHxãJq½^Ço~õ3¶ï<ÀéÓI—”bo¯§¿ÞÜ?o:¡¡-ÿòmÁƒú2<2œÍ[ö’Ÿ_ˆ—·³fLbÊä(›|Ë–.`Ýúíd|·“ŸŸ7ÆúÖå§Ñ¨ùùsË9rô$ÇbâÈÈÌA­VÀÔ»ÇZ·{ºDGG£Õjo¸){XXááá$''“Àðá’yã7ذaÇgß¾}8880|øp–-[fT­X±Ž=Jll,ööö 8çž{޾}§oÌ™3‡„„V¯^ÍØ±cñ÷÷ïpÿ:ÒÏÎ0räHÌÎ;)..&44”çŸþ†?—çž{gggNœ8Á·ß~‹§§'ãÆã•W^á?ÿùgΜ¡¦¦{{ËÜå–®SwŸ§BˆÛ_KÃIÚÙó'Ö<òÜ NI ål.«ßÿ°…ì?l]õdïƒý»?eö}ÿ…›{óç¶‹ž±páBÆŒÃË/¿ÜÓ]Bq›ZÿùËLŸ½¼Íù—ýôI ³ ¼åUQ”WÀî-G ú»WU“÷ ¦Ç÷ÑB!„w¦.¹uÞô™ÞmÕð¼o!„BqgM!„BÑ%ºdDó‡4:ùC:×ë©UjÌæÎyœ¤è›6mêé.!„¸™Í&Ôªîg”MÑa.n^”çôt7„BÑFE鸸ÝÚSÚCMÑaýú")a¹Ù©2²)„BÜÆÌf¹Ù©œŒÙ@¿þ£º­Ý{Ö¹øþs÷ôcÀ Qœ‰ÝJeE1f¥íÏ’B!D÷Q«Ô8»xÒoÀHÜ=ýº­] 4Å-ñö ÁÛ'¤§»!„BˆÛÜ:B!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]BM!„BÑ%$ÐB!„]®§;ÐO>ýR›ó~øÞ]Ø“[×p.ãÇä‰åu¸EQÈÎÉ'(Я³ºÖaûwÚÓ]B!DLŸ½¼[Ûû^šÂVÚ¥k¬]¿Àß[ V;SwÿÅB!DûôÄÀÐ÷"Ð\ùÆË6ŸõÒ_uW/ž×]êQo¼õ|{¸'¶¼|öt„BÑ‚¢ü‹=Òî÷"Ðôðpk1]§Ó¶zL!„Bô¬ïE ÙC [¶î%.>‰ŠòJ<½Ü‰=œ{çNÅήñ´æL.]2=»v"/¿wWfΘÄԻDzïÀ1öˆ¡´´?oî›7ƒ»FmVÇâEsñðpcç7ÉÍ+ÄÓÓéS'0}Úø›ö7#3‡-[÷’–v•jC :–À_f̨͜»"šµóíib¾= ØÎMmë¹7­ïVçŒ !„B\ïŽ 4ëêêyóí÷ÈÌ̱¦åç±mÇ~.]Nç¿^x•JeSæÐáãdeçY?³fíÎ$$“|>Õšž™•Ë»ï¯æ·/=G¯^Á6u?OÆum~¹n+Å%¥,^4·ÕþñÖÛïa0ÔXÓjjj¹|%ƒwß_Í/^ü áƒûwÙ¹ !„Bt…;2Ðܽ÷0™™9h4j–.™Ï }¹˜z™5k¶|>•ã'â7v¤M™¬ì<æÍÆøqww–M›w|>•¹÷ÜÍÄñ£9~2ž­Ûö¡( qñIÍÍŒÌ&O왓(/¯äÓÏ7’Ÿ_Äž½G˜8aþ-Ï©² èÍã.,[9“ÜjX0‡ÿóOüé¿ "b®.ÎxyyXWW¬ï›ÎIm˜£Ú4­½çÞPÞÉÉ¡Õþ‰Û[}}=/¾ø"o¾ùfö#??­V‹§§ç óÕÕÕñþûï³|ùrxànê]sµµµ=ÖöjáÂ…,]º”W_}•øøøžîŽâ6pGŽhæåp1å²uô¯©ŒŒìfiþMFõúÆÑ½À€Æ}*ííõÖ÷f³¹Y½Â‚mnK÷íj}_XTrÃ>geçq,&Ž””ËääØÔßR[­éȹw…… ЫW/V­ZeM¯©©aùòåÔÖÖ2lØ0^{íµnéϬ´´”k×®‘——wóÌ,%%…7ráÂ*++Q…'žx‚ððp~õ«_µXæ³Ï>ã›o¾aèСŒ5ª›{lñ /àááÁÿøÇiÿNõãÿ˜¢¢"öíÛÇŸÿüg^ýu”Ý(„ø!»#Må&YeEU³4­Vc}ß4X´k%½%&“ɶŠb}¯V·>x|äX,Ÿ}þ5Š¢0tÈÆF oŸ0Þzç½¶×’Žœ{WQ©T\½z•¬¬,‚‚‚øöÛo©««ë¶>üøøøðÈ#àç×½›÷ÇÅÅñúë¯ãââ¸qã8yò$ÎÎÎ <˜’’Öÿcƒ»»;øÃš-Në.éé鸻»÷HÛw²ûï¿€#FðÚk¯±ÿ~ 4…ø»#MoOrs ˆˆÄ +–[Ó‹ŠKqqvB§ÓvI»—.§c2™Ñh,AåÕkYÖc>Þ­ßNl˜÷9tÈ^|þ **Û6|{êÜ[Ò¿®]»Æ‘#GX²d ÑÑÑŒ5ŠØØØnëÇÁ¢E‹º½ÍÏ?ÿgggþùÏâââBLL ‘‘‘<ùä“7,WZZÊ!Cz,È]/"²SFaaa÷DÑÓîÈoú‘#†°ó›h’’.²wÿQFD†sùj}¼“ÉÌ´©ãXºd~§·[ZZ·¯eÞ½Ó1jøbõ&À2²7<2¼Õr••Õ¤gd“švVËæ­{¬Ç› Œ`§Ñ`4™ÈÉÉ'?¿ˆÒÒr è ´ÿÜKJÊËb Îž§iooϘ1c8zô(K–,¡¨¨ˆÄÄD^}õU›@ó÷¿ÿ=‰‰‰üÏÿü½{÷¶©#&&†•+W²xñb–.]Ú®ö× À¼mÛHÛ°+[·bª©!hêTƼöZ''kÞÚ’Îò ¹ÇSqõ*Æšì==ñ=ša+VàfS¯ÿرøù?Dëì̸¿þ•¬èh.mØ€ÞÃño½…ÏHË¢+s}=>ûŒË›7S™™‰ÖÙ™€ ¶bÎÁ¶ ÊÚãÿø´IÛ´iS‹yEa÷îÝìß¿ŸÌÌLjkkqttÄÇLJ×^{ WW×v·Ÿ••EïÞ½qqq¡ªªŠÊÊJnZNQ”ŽðƒeþäÆ9|ø0EEExxx0fÌ–,Y‚‹‹‹MÞ… 2lØ0V¬XÁÇL||<†¨¨(~úÓŸboooÍ×ÔÙ³g›¥5½~éÃË/¿Ìš5k8tèõõõŒ?ž§Ÿ~­¶cÿÁk빕——³fÍΟ?O^^F£___î¾ûn-Z„F£iVçƒ>Èßÿþwêëëùõ¯M]]ûÛßpppàøƒõgÙžëР¡½ëïò!~xîÈ@sά)œŽ?GnnëÖogÝúíÖc^žîÜ{Ï´.i×ÃÃSq‰Ä^·àfÞÜiøú¶¾ wÄðpNÆ&P^^É›+ß,Á¤‹‹3•Íø’‘™Ã•«¼ò»•¬zçw¸8;µûÜæqvÕ>šS¦LáÈ‘#\¾|™³gÏâææÆðáÃmòÌš5‹ÄÄD8ÀO~ò›c‡`Ú´ŽÿÌŽþ┦6nQuí›oй¹1úw¿³¦•¦¥‘üÑG6å \Û¹“ÜãǹoçNtM~©Ÿ;Gþ©S¸öéCiJ Ç~õ+ê+*pëÓ‡’‹9ýæ›Ì^·ÅlæÐŠä=jÇ*{ IDAT-[[\ÌÕmÛÈ9z”Ùk×v8Øœ:uªõ¶ä¶mÛÈÊÊj5ïG}ÄŽ;èÓ§óçÏÇÁÁòòr233m¦x´GXXiiiìÛ·°ïñ¶Þ¾¿Ñ4£ÑÈþð._¾Ì´iÓð÷÷çÊ•+ìÚµ‹³gϲråJk€Õ ¨¨ˆßüæ7óðÃÏÁƒqtt´Ž°>ñÄÖüü1Ì™3§Óú`0xõÕW©««ã¾ûîãüùóìß¿–-[Ö¦ëÒ’¶œ[~~>III„‡‡3eÊÌæÿÏÞ½ÇUU&j6w«ÜÄÄK¢b†˜÷K†YiÖAìâT6•YÍ8—lÒ:ãefJ§3S§)›šò49b¥É„yi¯Š¢ÅX*šWDDPDQn›}þ@vl¹ˆý¾ç³?ÁÚïz×»×bÎ~|×û¾«B;vìÐÒ¥KU\\¬É“'×hë| AƒiÕªUJHHÐéÓ§5lØ0­^½Z_|ñ…žzê)»ÎTw]Mw½øÂ³úâ‹díþú[œ+”‡»»úô顸ػåãSû¿Â›ªgD˜néÛKÿúùô ¿¼ŒQpp€ÊËÊ[õ³×å–[n‘···RSSµ{÷n >¼FoÖÀååå¥Í›7ë§?ý©µ7¤¨¨H»víRÏž=Õ¡C»ÛPpà€z?õ”zLž¬Ô^PÎÖ­:¾nMÐtkß^Ñ3g*xÀµ»á™KJôõ_þ¢C *9sF'·lQ—±?¬…Zzþ¼úþò—ê4j”VÝwŸJΜQÔŒê8l˜VÝwŸÎffJ’­X¡“_}%gg ™?_!ÆéìþýúêW¿Rq~¾þóöÛüjÍI[ ѧOë-ÊÔÔÔzƒfrr²5þ|»{×®4uêTÍ™3Go¿ý¶<==%éª=£/VöÞ»»×Ý{¾fÍeffjîܹÖÏ'I‘‘‘Z¸p¡Ö­[§{î±]Öëĉ;v¬¦L™"“ɤñãÇkÊ”)Ú¶m›5Œ?ÞZ~Ñ¢E °ÙÖÔ68p@ýúõÓ‹/¾(ggg•——ëÉ'ŸTJJJ“‚fC>[XX˜Þzë-›ýbcc5mÚ4­_¿¾FÐs¦F½á?ù‰.åæZï~ÿýÖß+.Ox:œ˜(IêzÏ=ºaÔ(I’d¤Âââôí{ïédjj“>[Cµoß^ÙÙÙZµj•Æ×,a3<<\o¼ñ†>ýôS}u¹Çöå—_Öm·Ý¦Ÿüä'6“m töìY­ZµJ’4|øð:ëݼy³:vì¨àà`åV;¿’¤½{÷Ö7]»vµ1IrrrRhh¨¾ýö[»>›=mÖŒ3¬çÖÉÉI:tè]m¨ÒÏV½‡øüùó*..–Åb‘ŸŸŸöíÛW£ÎŽ;jðàÁÖýBBB4lØ0ëïU·¼í9U¬õë×kùòå8p üýýåááÑ”S  j“Amˈ#´fÍuêÔIaÕÂ\u£GVbb¢’““­AsË–-ruuÕ!W„g}¢¢¬?›ª& Ôr»øxR’|ú©Î~÷J mfð×6›ß¹];]ªçwI*¨êÙLH°†Öê® ¼F™>}º,X üãZ¶l™¢¢¢4hÐ 4¨I“r‚‚‚ôÜsÏI’¶oß®€€%%%i×®]Z°`uáö×_]rqqÑ“O>Yï5=vì˜JKKõôÓO×ú~QQ͉rÞÞÞ5nÇ;88Ø=,Àž6׸›ÙlÖ'Ÿ|¢¤¤$\µÎ€€›:¯ü½Š=ç¡Ê3Ï<£òòrÅÇÇkÉ’%zôÑG[uÝT­ãššÕŸíÝF÷Сñ"""4pà@EGG×Y&44TÚ½{· TQQ¡={öhäÈ‘õÞfm.ßþýïúæ7š½Þ²Ë·ŠëÒR ×;ï¼£­[·jÛ¶mJOOWJJŠ‚ƒƒm&~Ø+''Gaaaš={¶–-[¦¥K—*!!ÁzkwÒ¤I:t¨Ö¬Y£?üP¡¡¡êÛ·o­uY,…††Öy»¹%–%ºÚÐ}ô‘Õ¿ :Ôú¿™?þXGޱ»Þ¦œ‡„„mÞ¼Y111êÛ·¯ºwïnw;´]×|ÐÄõáůþ†1cÆhß¾}Ú¸q£µÇ¦)“€cß?þ!Iê0hnýÝï䬳ûöéßM['I®~~*ÎËS¯)St˯~ÕMµ›‹‹‹FŽ©‘#Gª¤¤D‰‰‰Š×²eËô‹_ü¢Iuçää¨_¿~2™LŠÕÒ¥K•““c}?""BŠŠŠÒÔ©S•””TgÐ Ô… 4`À¸Édª··³%ÚМ֯_¯Íš5˦½«W¯nR½M9_|ñ…:wîlíñðãtÍͶÐCÙÚØ :T|ðRSSe6›¤ÈȺǻ6§òK•7½]Û·—«¯¯ 23•>¿é×µãðá:” Ì%KäÕ¥‹n9RNíÚ©¼¨HEÙÙròð°ÚR\]]u÷Ýw+>>¾ÞÛŸ QVV¦3gÎXgœ÷]åãVCCCk” ”¤z'‰DGGkåÊ•Z½zµÆפ¶ÕÅÇÇGGUii©\\\j¼ßmhN¥¥¥rww· ƒÛ·oWæå¡öjÊy8þ|åÊj³xñb}ñź÷Þ{›4i Àµéššøñpqq±Žç”¤x Åz“: ¤7êèêÕ:z¹ȳS'9{zª¬ 3goþùÏ•³u«.æäh{µYîÕß·7h®\¹ÒúsÕÂØÕ·UŸQýüóÏ«{÷î ‹‹‹ŠŠŠ´mÛ6™L&=Ú®ã?óÌ3ŠŒŒ”«««,‹öï߯7ÞxC©©©jß¾½õ)1µ©¯7qâĉںu«Þÿ}¥§§«W¯^ruuUII‰Ž=ª‰'Z—S²×!C´zõjÍš5Kƒ–ÅbQvv¶µg·%ÚМúôé£ôôt½þúëêÒ¥‹222´ÿ~yxx¨¸¸Øîz[â<¬\¹ReeeJLL$h×!‚&®)cƌњ5käàà`w²Ç€9s”6gŽr¶m“ƒ££:Ž©èßþV«'LhRÐôÖÝË–éÛ¿ÿ]'6nTÑÉ“ª(+“³§§üzôµ%ckÑ¢Eõn«4===µsçN;wNf³YíÚµS=4eÊ›ek#$$DiiiÖÞÉÝ»w+00PcÆŒQ\\œüüüìª×ÛÛ[¯½öš>ýôS¥§§+##ú½sçÎͲnãc=&'''¥¤¤(>>^ÎÎÎ6k€¶DšÓ´iÓôî»ï*--MiiiêÝ»·æÏŸ¯E‹éL-+&4TKœ‡qãÆYWCpý©­»ÈùÎû†•JÒ#ÓF+mËIRfFŽ–¼÷~K¶ mDò—*æÎŸÊ?¨éÏ4NKKÓ«¯¾ªaÆé7¿ùM3´FKHHÐâŋߠà1aÂEFFjÞ¼y-Ð:´†ŠŠ ÅÅÅé–[nÑìÙ³[»9$åçî·~_7ÖÃS§(üæÊõ¬óO)ÿÔyIÒ—Ÿ'é’¤‹—_EÕ~¾$©¸þçÀ-¨  @ï¿ÿ¾œý¸I´žcÇŽ)((¨Á½[>>>ÊÊÊâñ„×±½{÷Jª\¿À·ÎÑê–.]ª’’mÚ´IçÎÓÏþó&/·ƒ–3}úôF•úè#­Y³F‘‘‘êß¿³´ãzõøã+??_ëÖ­Óþð½òÊ+êÑ£Gk7 AЄažxâ ëÏ‹-RÇŽu×]w5¹ÞèèhEGGK’vîÜÙ  ¨GyDÁÁÁM>þµæØ±còõõm–ºÒÓÓõÊ+¯ÈËËKƒVZZš<==Õ³gO={¶ÎýRSSåëë«Ù³gËɉÿ·RŸ{ï½W’¥¹sç*99™  àºÅ7 3~üxëÏ‹-R@@€Í¶–×jÇn+/^,OOOýõ¯•———RSSÕ·o_M™2¥Þý Ô»woBf#ôéÓG’”——×Ê-ãð­€ëÚ›o¾© 6Øl»ò–ý±cÇ4}útõêÕKüãkÔ1kÖ,íß¿_ÿûß­cKJJ´|ùrmÞ¼YùùùòóóÓ€ôÐCÉËËË®¶*>>^{÷îÕ©S§T^^®   ÝvÛmŠ‹‹“£££µì•Ã222jl³gh‰'Ô­[7yyy©¨¨H.\PHHÈU÷³X,rphØÜÂÔÔT­]»Vßÿ½Š‹‹åíí­›nºI³fͲ–‰ÕÍ7߬¹sçÚì;{öleddØ|¶ª²3gÎT||¼6mÚ¤²²2 2DO?ý´œmÚùå—_*99YYYY*))‘‡‡‡5wî\y{{[Ëë³Ï>Ó–-[”——'///EGGkÒ¤Iò÷÷·iWcÚP¥êzšÍæ7h‹š¸®5Êz[råÊ•:qâD2;wÖM7ݤ½{÷*77WAAAÖ÷N:¥}ûö©_¿~ÖY^^®Ù³gëСCºýöÛÕ¡C>|Xk×®UFF†^{í5¹¹¹5º­¹¹¹Ú³gzõꥑ#Gª¢¢B;vìÐÒ¥KU\\¬É“'[Ë5,¡K—.:xð Ö­[§.]ºHRƒ‡˜L¦«–Y¸p¡’’’Ô±cG;VíÚµSnn®víÚÕ¤v_ºtI/¿ü²JKK5~üxíÝ»WÉÉÉòóóÓÃ?l-÷ÁhÕªUºñÆuß}÷ÉÝÝ]………ÊÊÊ’Åb±–+++Óï~÷;>>vµ~Lš¸®õéÓÇz‹255µÖ )I£GÖ´iÓ&ÝÿýÖí›6m’ÅbÑèÑ£­ÛÖ¬Y£ÌÌLÍ;×Z·$EFFjáÂ…Z·nî¹çžF·5,,Lo½õ–Í¶ØØXM›6Mëׯ· šF K˜:uªæÌ™£·ß~[žžž’dÓËW›‹/J’ÜÝÝë-·yóf%%%iÈ!úõ¯mÓC[=äÙãÀêׯŸ^|ñE9;;«¼¼\O>ù¤RRRlB^rr²5þüZ{«¬ZµJÐSO=¥±cÇZ·GDDèwÞÑgŸ}föÓ†êÜÝÝuáÂ…&}v¸–±Ž& iذaruuÕÆm¶oÚ´I>>>ºõÖ[­Û6oÞ¬Ž;*88X¹¹¹ÖWDD„$iïÞ½vµ¡zàùóçuúôiëmùsçÎÙUgc…‡‡ë7ÞPLLŒÊÊÊ$I/¿ü².\¨‚‚›²:|ø°-Z$I>|x½u¯]»VÎÎÎzöÙgmB¦Ô°ÞÐúkÆŒÖðèä䤈ˆëg¨Ò¾}{™Íf­ZµªÆ{ÕmÙ²EÞÞÞ5z‰cbbäéé©;wÚ݆ê¬C‡iùòå:~ü¸5´Àõ‚M@’‡‡‡† ¢ 6(33SáááÊÌÌTvv¶î½÷^›`tìØ1•––êé§Ÿ®µ®¢¢"»Ú`6›õÉ'Ÿ())©F¨kIAAAzî¹ç$IÛ·oW@@€’’’´k×.-X°À:>ñõ×_WFF†\\\ôä“OjÈ!õÖ{äÈuëÖÍÚSÚœ‚ƒƒk W˜9sfrÓ§Oׂ ôüCË–-STT” ¤AƒÙLdÊÊÊRXXXq§ŽŽŽêÔ©“¾ÿþ{»ÛPÝ3Ï<£òòrÅÇÇkÉ’%zôÑG5a„«~^h+šÀe111Ú°aƒ6nܨððpkïfõÛæRåmÞÐÐÐ:o‡Ú»ÔÐG}¤ÄÄDõïß_C‡µÞŠþøãuäÈ»êlŠœœ………iöìÙZ¶l™–.]ª„„ë ôI“&ièСZ³f>üðC…††ªoß¾uÖW^^^£'³¥…‡‡ëwÞÑÖ­[µmÛ6¥§§+%%EÁÁÁš={¶uâÓÕnå7×çHHHÐæÍ›£¾}ûª{÷îÍR/\+šÀe½zõR‡ôÕW_éñÇWJJŠÂÃÃjS.00P.\Ѐš|Ë·ºõë×+$$D³fͲ©wõêÕõîg2™š<Ʊ6999êׯŸL&“bccµtéRåääX߈ˆPDD„¢¢¢4uêT%%%Õ4ƒ‚‚tìØ1•——_u¤º>Sqq±ýè29R#GŽTII‰¯eË–é¿ø…$) @'NœÅb±¹f³YYYY5þ&ìõÅ_¨sçÎÖd¸Þ0F¸Ìd2)&&FçÏŸ×Ǭ½™Rå‚ñgÏž½jl¬ÒÒR¹»»Û›íÛ·+33³Þý|||tôèQ•––6[[ÊÊÊtæÌëŒóï¾ûN’j X’tÕI-ƒ RQQ‘–.]Zã½+C¥¯¯¯rrrl¶'&&^õ\4–«««î¾ûnI¶C¢££UXXXci¬µk×êÂ… 1bD³ÿüùó ê_¼x±|ðA-Y²¤YŽ -…MfåÊ•6¿çååÙl³w–tõ:ª»®«ÞÆ”•*—CZºt©>ÿüs¹ººjذa5Ž?qâDmݺUï¿ÿ¾ÒÓÓÕ«W/¹ººª¤¤DGÕĉ­K5FŸ>}”žž®×_]]ºtQFF†öïß/z{ò† ¢Õ«WkÖ¬Y}z£Ê}ô‘Ö¬Y£ÈÈHõïß¿…[\iúôéòóóÓœ9sZåøuòäIÍ™3Gîîîºï¾ûäââ¢ãÇ·v³šEcþÖ[óº=þøãÊÏÏ׺uëô‡?üA¯¼òŠzôèÑâí`,‚& óÄOX^´h‘:v쨻ÉõFGG+::Z’´sçÎÍÀÀ@=òÈ# nòñ’žž®W^yE^^^]½zõÒÿøÇõÌš5Kû÷ï×ßÿþwëXÛââb}öÙgÚ²e‹òòòäåå¥èèhMš4IþþþvŸ‡†þ­yÝ,‹¾üòK%''+++K%%%òððP`` æÎ+ooïí©:—f³¹Æ{Ú>‚&®k£F²ÞŽ[¹r¥Nœ8Ñà}SSSõæ›oÖ™åååš={¶:¤Ûo¿]:tÐáǵvíZeddèµ×^³†±ÆèÒ¥‹<¨uëÖ©K—.’Ôà[ý&“©Î÷ìio~~¾~ûÛߪS§NzðÁµ{÷nmذAÖÖÆ °§ —.]ÒË/¿¬ÒÒR?^{÷îUrr²üüüôðÃ7è¼T—››ký¹¤¤¤Æ6I ²nß³gzõꥑ#Gª¢¢B;vìÐÒ¥KU\\¬É“'K’:wnºI{÷îUnn®uI:uê”öíÛ§~ýúYCfYY™~÷»ßéàÁƒ>|¸î¼óN?~\6lÐ×_­?ÿùÏòññ±ë<4ôoÝÈëöÁhÕªUºñÆuß}÷ÉÝÝ]………ÊÊÊ’Åb©õ®oM\×úôéc½5—ššÚà ™žž®¿üå/êÒ¥‹MÈ”¤E°NH IDAT5kÖ(33SsçεÖ-UÞ†]¸p¡Ö­[§{î¹§Ñm:uªæÌ™£·ß~Ûz¼Úz€ª»xñ¢$ÉÝݽÎ2ö´÷ĉ;v¬¦L™"“ɤñãÇkÊ”)Ú¶m›5h6fh„=m8pà€úõë§_|QÎÎÎ*//דO>©””»‚æÓO?}ÕmU=yaaazë­·lÞ‹Õ´iÓ´~ýzkД¤Ñ£GëÀÚ´i“î¿ÿ~ëöM›6Éb±hôèÑÖm«V­ÒôÔSOiìØ±ÖízçwôÙgŸÙÁÆœ‡†þ­yÝ’““åèè¨ùóç7ª×ÙÝÝ].\hpymëhWÈÈÈЂ Ô¹sgÍ›7Ï&dJÒæÍ›Õ±cG+77×úŠˆˆ$íݻ׮ㆇ‡ë7ÞPLLŒÊÊÊ$I/¿ü².\¨‚‚›²:|ø°-Z$I>|xõÚÓÞ®]»ZC¦$999)44TgΜ±ë³ÙÓ†àà`͘1ÃXœœœa=7õâ‹/Z_]»v­±íÅ_´–­ÞC|þüy>}ÚzÛøÜ¹s6õ6L®®®Ú¸q£ÍöM›6ÉÇÇG·Þz«uÛ–-[äíí]£1&&FžžžÚ¹s§áç¡1{ÝÚ·o/³Ù¬U«V5ª}ƒÖ¡C‡´|ùr?~Üú(m=š@5zõÕWåää¤9sæÔ™R帼ÒÒÒZ{È$©¨¨Èîãé¹çž“$mß¾]JJJÒ®]»´`Áë¾×_]rqqÑ“O>©!C†ÔY§=íõöö®q;ÞÁÁÁîÛŸö´!88¸Æíô™3gÚu|I8p õçÕ«WרVÙlÖ'Ÿ|¢¤¤¤!ÿJ2dˆ6lØ ÌÌL…‡‡+33SÙÙÙº÷Þ{­c%)++Kaaa5ÆÔ:::ªS§NúþûïkÔßÜç¡1{ݦOŸ® èÿø‡–-[¦¨¨( 4Hƒ ªw²Ú3Ï<£òòrÅÇÇkÉ’%zôÑG5a„fý,ZA¨Æ××WÑÑÑJHHÐ'Ÿ|¢§žzªF‹Å¢ÐÐÐ:oß6Çr1999 ÓìÙ³µlÙ2-]ºT ÖÛÖ“&MÒСCµfÍ}øá‡ Uß¾}k­«%Ú{5×Bã£>Rbb¢ú÷ﯡC‡Z‡&|üñÇ:räHò111Ú°aƒ6nܨððpkïfõÛæ’®Ô«‡ÒkAc¯[xx¸ÞyçmݺUÛ¶mSzzºRRR¬Ù³g×9¹-!!A›7oVLLŒúöí«îÝ»7ûgÐ:šÀ}ôQJOO×믿®.]º(##Cû÷ï—‡‡‡Š‹‹kÝgÔ¨QZºt©>ÿüs¹ººjذa5ÊÄÅÅ)%%E .Ôž={ª#GŽhË–-êÙ³§5”ÙÞ¿õæ¾nÏ?ÿ¼ºwﮀ€¹¸¸¨¨¨HÛ¶m“Édª5xÛóËÊÊ”˜˜h×ÊZA†©š]%;;Ûf›½AóÊz¯Üvåò- -{%___½ôÒKš5k–^{í5Í›7OáááòööÖk¯½¦O?ýTéééÊÈÈT9¦sçÎv­¡)I!!!JKK³öNîÞ½[3fŒâââäççgW½Fµ·ºÇ{LNNNJIIQ||¼œmÖm‰64§iÓ¦éÝwßUZZšÒÒÒÔ»woÍŸ?_‹-ªs潿¿¿¢¢¢”žž®#FԺ䔯¯¯,X %K–h×®]Ú¼y³5qâD›…àíaÏßzs_·ª™óçΓÙlV»víÔ£GM™2Åfy${7N«V­Ò¸qãš\€–QÛ ç;ïV*IL­´-{$I™9ZòÞû-Ù6´É_~¨˜;*ÿ žSÜ´xñbÅÇÇ7(€M˜0A‘‘‘š7o^ ´h^Š‹‹Ó-·Ü¢Ù³g·vs€ëV~î~ë÷uc=«gŸ}¶µ›Ò¢ªžK޶‰ëü80F† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`‚& AЀ!š0„Sk7×üÜý­Ýp !h¢Y$ùak7\cšh²˜;ÚÚM× ÆhÀM‚  C4`‚& AЀ!š0A† hÀM‚  C4`§ÖnMa±XTZZ¦òr³djíÖ\‡,’““£\\œe25ï æÚÌÀk×PM@›TQQ¡óç‹t<ë”òÏ©àÜy—Èb±´vÓ®&“Inn®òõñ’ûv í,/¯vrphÚ Ñªk—ùýÍÉR^~žŠ/«‚k×lL&¹¹»)À?@]:tRxØMÍrí‹  hsÊÍfegçjßþ,¹º¹ëæ¾ý"Vë¹¹Y,]¼xQ'OžTFÆ7Ê>¹O=:©cÇ 99:ÚUg¹Ù¬ãY'´%-U&'‹zôê®èÁ‘rswåÚ5#‹Å¢âK%:›¯}ßí×Þï35|À…vºÁîkg‚& M±X,Ê9•§oþsXýûߪÈÈÈÖnÒuËd2©]»vêÞ½»ºwï®={öhçÎrptÐ !A†‹E'Næ(iK²zÞÜ]Ý{t«þ®,¢G³Ù˜$7…v Qh×ÜXI[’uçmcÔù†Ž-ê š€6åBÑEíߟ¥Aƒ+""¢µ›ó£)'''e|³K>Þžòòlרý/]TÊÎTõ¾¥‡ºue˜C ï*G¥ìLU{ß±¾vöbÖ9 Í°X,:q"Wî^„ÌV!w/8‘Û¨ h±XôýáC29I]ÃnÅRÁ«…_]ÃnÉIúþð¡ ùôhÚŒÒÒ2Ê-Pß[nmí¦ü¨õêÕK_ïÞ¡n]ËäêêÒ }JKËôýñ#êÖÉî³=åkܸÎ÷‹ <äæ{±Þ:®,3"f B»t´«=mQ·°ôýá#êÞ£Á×®)š€6£¼Ü¬3gÏ+$$¤µ›ò£Ö¡C-8¯òr³\]¶Oy¹Y¹§suó€›ìšöÖï_ú›NŸÊ““““œmÞÿdÙRM›6¥Þ:Þzë¸m¤$ÉÃÝSï~8G?ñ_vµ§-ònï¥Ýi{uíš‚  h;L•=c®-ñ ‰:¹¸¸¨´´L–Іïd’JJJdr²È¢FìgâsçŠtúô)µkç¥cYÇj”È͵íÑ\¶,ÞúóäÉËÙÙYù§s%I½BT9 ÉÞö´=‡•””4îÚ5AЦX,UTTÈÑŽ%ZªfÚÖÕ£f2™ÜÛf6›µnÝ:mÚ´IGŽQii©Ô¯_?M˜0An_k‹Õ€4sæÌ:ËT{z%+,•”ÉÉÉùê…kÛÿò¬t“ÉA JááÊÌܧР³Ü]]UÕt‡Ëu^¹~göñSZ¹|ƒ2Ò÷élþ9¹y¸©s× ‹é¯Ûï$Ƕ9ÅÅl.WiYI‹®WJд9UA§1K´˜L&}õóçu`÷×µJ“ɤU£ïmPØ,((Ðþð9rDC‡ÕðáÃåää¤ÌÌLýûßÿÖ–-[4gÎ………Ùõù®eåååMÚ¿¤¬X®å%rt´#l^¾.“EWé…4YLªm[+**äêî&³ÙlS§¥ZïÞÁ}GõûÊÓÛC·Ý9PAÁíuñb±v¦þGï½þ±vmÛ£çç<Ù&×ü¼X\Øâ3ý š€6§òÑ…¥¾…~no¦‚Ü}úèöÛoשS§´gÏž·ïZWu¾-K“zÅ,‹ÊËËTtéœ,[žç‡{Þ&™ë š²XÌ2[ÊT^^&IÊÌÜWùŽ¥B%%%jçÚNí\ÛU5Èæ÷UXx¨<½Ükì„rptн‡[}©¢Æ¼ÊÊKTtñ\“¯=èÑ´Yf³Y¥¥¥rqiÜ2-U½šÕCæÞ‚3úãv^õ‹xË–-rppÐÈ‘#ë,óðÃë‘G‘···uÛ‰'´bÅ ýç?ÿÑÙ³ge2™ª±cÇ*&&ÆZ.66V'NT‡”˜˜¨“'OÊÛÛ[#GŽÔ¤I“ääôÃWwAA–.]ª;v¨°°Pþþþ5j”î¿ÿ~›žÔââb-[¶L)))ÊËË“¯¯¯¨I“&ÉÓÓóªç«ê<7‡ªó[RzI‹<ݼ¥vlV]''7••Õ~ëÜl.WE…Yf³Ìæ2›Yè¹¹§e±XäÚÎݦÎê×ÜÇÏKöÕ©ì<…øÛÔÝ©Kýó‹?Ù|IÊÎÊUâ§ôÝ7Tpæ¼L&u Ò]÷×È1•KqýßÛ+”ôEª^ÿàEw´¿ûû*;ë´ÞþçËÁÁA%Å¥ZŸ¤í[2”ú¬¼}=5`èÍŠ{dŒ<½jöÈ×§¬¼DE—Zþ–y‚& Í©þ¥Y^^®ŠŠ ¹¸¸ÈÁ¡þuUã:W¾W«Fß+I*ÎÍSnñE=¿ó«}>>6¿Ÿùä>}Z?ÿùÏ%I¥¥¥z饗”““£»îºK;vTVV–Ö®]«o¾ùFúÓŸêý,¥¥¥M—Y]õÇL––]Ò9s™<Ü=åÔ 1›WŸ´bÅòF¶¨ÂfÖùݱÃõÏ÷Vêù§_Ó­Cz«ßÀ^êuKwùúyÕºwNvžþ{úÿÊËÇSwŒ"_/É;§ kÓôîëŸÈÅÍIƒFôÕ°˜~Jú"U©›vë¿&ýð‹3yç´oÏaÝyß0™*gæÏ±P¹'ó5zÜ`u¸!PÙÇOiÝ[õŸÝ™šûúsòhçÖ€ÏeÑÅâ"•”^jäùh^M@›se 4›Íºté’œœœäääÔèq‘µ®Á=>çÎS—.]UÿÊ•+URR¢yóæ)00к}èСúÙÏ~¦;vØͼ¼<½ù曺á†$I·ß~»ž~úi¥¤¤XƒfBB‚NŸ>­™3gjÀ€’*LjVTThÆ z衇¨Ï?ÿ\ÇŽÓŸÿüguîÜÙzŒhÖ¬YZ¾|¹&OžlÓÞÊÛÛå*++köž°êo$©Ü\ªÂ gäìä&7799ÕÝ;}eS‚ƒ;Öû{]ŠK«h±Øþ=Ýõ_Ãäää¨ÏþùomÝô¶núF’ÔùÆŽ2²¯F"7·Ú¸ö__©´¤L/ÍŸ*ÿ@_ëö#nÖožü“vmß«ÃoVXP…t TêÆÝºï¡Û­åR7~-‹Å¢á1ýd±X´zÅfeÉÑþú uêÒÁZ.j`/ý~Æ;úüãd=ôÄØzΑE%¥—T\z±Æ¹n MÀu£¼¼\ååå2™Lrtt”£££L&“õåààPcÒϸu‰ SžÄòÔSOéÁ´éé´X,*))‘$ë«„……YC¦$9::ªK—.Ú½{·uÛŽ;l ™Už|òI=ðÀjß¾½$)55U7Ýt“|}}UXXh-wà 7($$DÛ¶mÓ#¨c‡²uìP¶6¬MÓ¬ùO©}@åµ|ôé{ô_’·¯§µžŠ ‹Š/]¾¶—J¬Û‡Ý¥eý[Ge«s·Ê™ºa—nè¤Î7vÅR¡í[¾Ñ=Båãë©óç.XÛÔ±S€:t ÐÎÔoõàãwY'1Y,ª¨¨Ù\Vùsó qh.MÀu§¢¢ÂÚWµÞ¢¿¿3Ëóò®>Û¼Š¯¯¯rssµ$åææjÙ²eÊÊÊR^^žrssUVV9Y¥¸¸Ø¦>õW-éTµýÔ©SŠˆˆ¨µîîî:{ö¬¤Ê±¡eeezì±Çjm—“““ ¬á¹1ëS¡¢Â¬KÅE2WTNþ±H—ÿkÑù 6e‡PkW“±ç õçó ”“w¼ÖrA]ÝuG×[tGÜ-:S U§êÛÝGôÞÿ~¢ŸN¿ÛZ.ïÔ9íüdŸNÏ×™Ó…ÊÏ-TYiåpƒKÅEÖúã:ÈôO“Ö­Ý¢±÷RnöY=tRãl-sòDžÊJËõì¤ß×Ú&G'‡ËeM’Ir0I’ƒL’Éä(“ƒCC‡¼¶‚&àºQQQa³Y]@@€Í¤Ÿçw~%IZ5ú^ýOÿa lpp¼ñƵsçNËÝݽÖ2ÇŽÓǬÛo¿]ýû÷×7ß|£wÞyGîîîêÙ³§úõë§Ž;ª{÷îš1c†$Ùô’VõÀÖ¦¡åªX,uëÖM±±±õ–©Þ£Y\\l‚ÐÜëEÖU_e¯\yíO¬1I&™dÄÒ•&“m›VºUƒFõVû@o›rA!~zlúÝZðÂü6˺Ϸ»룿®•»‡«ÂzÞ ÈèÕ¡S{u»©£~ÿË¥j×ÈÏßKaõÍöƒ÷À`íÞv@&“¢‡ôøáau ÖÝÖÓæÚ[yÙ*d¾ü_“Ù$GC®=š€6çÊ/P‹Å¢²²2kÀ¬þ¾¿¿¿¾úùó:·7Ó2óóóåïï¯Üâ‹êéÛ¾Ö:ë2hÐ mß¾][·nµ™-^Ý–-[”™™©‘#GÊd2é“O>‘ŸŸŸæÌ™#7·&rT¿•}åñ¯4ýýýuêÔ©åŽ?®5kÖh̘1êÚµ«TTT¤Þ½{רë믿–——W­Ç6›ÍÖ'0UŸéÞT&“í„-‹Å¢rsi­×®–½klÉ;]PK¹ºTGYUgõcnß´W>í=5쎛kìëèè(¿o](¶î“¸ä+ùúyê7¯L’«ÛšÎü0ü zý·ï©¥ï®ÓñC¹úzûAÝÔ«“|Úÿ0ó¿} ·.•(<ò‡ñ´U¾Ý}Xž^îWý[­°˜e1›åèà,GÇÖz¬£ hsª»¬š¸"UŽŸ¼ò%É&dž={V:{ö¬ÿj¤Êu5ýýýkÝÿÊWß¾}¦+VèðáÃ5Þß³g6oÞ¬   8P:s挼½½åááa-g2™´råJI•½yÕÛ[5ž´ú«*\TýÞ¯_?åææê»ï¾³)·qãF¥¥¥©]»v6åvîÜiSîÀúë_ÿªÕ«W×yl“Édí%¾ò¼Û}íªý_E…Eee¥²TH&94àUµö©E&Sel@ o£^Reøq°iÏÇè¬äÄtååÖ8þÉcgt83[‘ýÂ¬Û Ï^”§‡ÜÜ\­Ûd1i]âNI•=”Õëè{ëMruuVÒ¿v(/§@ý‡Fؼߧ˜òr ôÍöƒ6Ûí;©EY¥äÄô+Yd6›U^^fsΫÎaK¡GÐf]‚jSPP ___ëÏWÊ-¾h³®æÕ˜L&M›6M ,Ы¯¾ª[o½U=zô$íÛ·Ïò¦M›fí ŒŠŠÒŽ;ô·¿ýM½zõRqq±vìØ¡¼¼!éŠ[ç#ïî§wüKÿóR¼¢…«àÅP¦IDATóÁrptPÖ‘\íüjŸ|Û{iüCC­ûôî×M_o? Þ^£ðÞUr©TߤЙ¼óòðtSñ¥R›ú]Ý\tó­Ýµã«½rusÖÍ·Þdóþèñýµ'ýþ¹ðKÜ{B¡Ý‚u:ç¬RÖeÈÍÝEãÖ¨sVÙc\&g'gÕÖ#l4‚& Í©êɬ¨¨hЗî¹sçêÜ^5¼®2µñ÷÷×ܹsõïÿ[;vìЮ]»d6›åïï¯Ñ£Gëž{[©r&x»ví´k×.íܹS¾¾¾ºõÖ[õË_þRÿ÷ÿ§={öØÇOò(ÒGÏ9Ï÷Ñ™3gtáÂ=|øPápXTOOÏ“Ï?~\çÎÓðð°ÎŸ?/¿ß¯ŽŽíß¿_3¾'×ßt±Â¦a2Óá§Ð‘Ñ\–fÞ Ÿ›•œšÙ¿ïÖŽ:râuýå‹¿ô©†ÿú±dY ׇ´·g§¾ùÊW2êX8ü²ªk|¾¦‘÷'ZS«®]›uø­ÝúýoÞÕ•ÑO%äõMßVßµw»>úH]»6Ë_YΩºÆ¯£?ýžþôÇ÷52<¡¿¿÷¡ª>=×Õ¢o¿þ5Õ¯_£BÙKrίVéâ"hÊŽý ¡ýz!œÏI"¨··W½½½óúìÀÀ€f;zôhÆû“'Oæ¼Æ±cÇfü, å¼f¶`0¨¾¾>õõõÍú¹|ßm³' ÍU6†aÈLÄÔoΠẌföd±ì¶´¶¯WkûüjrV|:pèe84óØ÷ß|5ç9[;6ê¿}3ï5k‚Õz­ÿëz­?ÿêS…2MS–ka}W ‚& ìØ¥~–zVmÁçœ:uª-Y>öó¤Å²Ò%‹Šé;ûœHz9LS.Õ¥ëY¦Ù”e¤_§/o¥Y’\–¥„é–•gæþ‘ƒ?+¨=¿|ûÇÿËÉ4r»ç³ªÐâ!hÊŠ=Ae9J·œ>}zÉ¿óiTlÈw†’f²è )† ½w~PÉG©Éë¿Qº®ÜéÙìIË”Ûpɲ,Ŭ¤¢ñ¸b±˜"±˜"‘¨â–©¸/ãšv{~õöOŠjW¹°¬TR×þï4åÃ’¼Þ*E£Ñ¼5,QzSSSòz«ä2 Ù´$ŸÏ§X$!¯¯Øøaè{{ž¼ûùNÈ.Oîr§Úb&M¹Ü.Y–”4“Š'LÅ“qÅqÅcIY2µ­óHÆ5³K.­dÑHB>Ÿ¯°¾[‚& lx$¯wþ³˜½Þ*µmlÕÈÕë™Æº¹OÈ¡{÷6uïÞVÔ¹Hùï­/ÕÕ¶£ ¾[‚& l†¡¦¦uºqëc«½½}¹›TqÆÆÆ45õHM  4 Cm­ÏêÒÄeݹy_õÍ…—%ÂÂLÞøBn«Jm­Ï.Ù(.APV‚5=·µYÃÃ(™LjûöíËݤŠqùòe]¼øOuïlS°&PðùÁš€öìÚ£wþ<(Ó4µ~ÓÚ´¹Üúä®n^»§o½ØSTß‹  (+†a¨¡>¬¦.]ÑÄÄ„:;;ÕÐР@ PQÏÛ•šeYzüø±nß¾­ÑÑQE£µ£³U õá¢Ë556hß /éü?†tçæ}5·„µjM¼~Ï’/¸’Y²‹$ôå½Gºqýs¹­*í{á%556,éÿAPvŸWéeÂQF軕¯r*”`I4PM”A%AÐ@I4PM”A%AÐ@I´2Ð?8Tªv`…™5hžþõ»úÎÝýLí] KÕ&<…îN>p¾µ²¶rÝ:·ÏÕÚoî}~_[:³(cƒg‡úÒ/³ÃfÆ–oDóI*ýÛà5IÒÚúÚ<ÀJ–5’)¥²¢©Ì`ifýLFŽk¹%ù$ù{¾»çn‰Ú €24xv¨_RLÒ”¤Ç9¶)IIÑ|³ÎMIæàÙ!î™@’4xvè R!3šÞÇÓ["½%5=²™sDÓ%©J’W’?½U§7¿có*5úiä¹Vû–xR©qlSšÉŒ¤Çó=£i'ѤRé4®éPiQRM€J‘4£ÊÙœ1¢™+h:/’P*LÆ43dÚÇš+_vÐŒ+ó6ºóöùœ³Îí͸r‡L‚&@åp͸cs>«ihZÒì#š¦RaÒ2·ÓcJM–±¨ vt>^éÜ'ä(q4׈¦” šÎk?›i‡L‚&@epÎã±Ã¦sŸ1¢9Û-oC©ih:TfïíãXùœ…Ù“9öÎBîs†Dñ¹òì š•Áùˆe®}ƺçó ‰Æ<÷XÙ¬yî%Iÿ{’‹èaû2IEND®B`‚scribes-0.4~r910/help/C/figures/scribes_toolbar.png0000644000175000017500000004013511242100540022065 0ustar andreasandreas‰PNG  IHDRÿG NbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ -³ US IDATxÚíw|EÿÇß»×Ó{H¡‘ÞQ¤(U)*X@D)Òô)>>tD”ªH“Þ«4•.½B …´ËÕÝýýqIH 4 ~ìûõºÜevovvnf>óýNY;#Üç»ŠŠŠŠŠŠÊ“‹rë»pÑÊ”¯$©ù¥¢¢¢¢¢òtsüÈAÏLáW9/ñÊ”¯$ü´h­šc******O9];4ËêøgŠ¿$Ü*üY¢¿sïAN;@ܹ£èŒ(’ÙiCkð@A@vd È2ƒé)è4 Õ4†ìs½ • HdiŠRs_EEEEE¥(_2<»püÈÁœâŸ-üO^`å/3 ñ 2òçŸû©Z¡Ñ¥Š±vó^ânЮeDÈ¢å›ñ÷õ¢yÓZœ8}‘?§jÅRD—*Æß,ÀÓ/ˆwúUs_EEEE¥@Y»üׇú~³W^}ªã=ôÏ)6/Ïñ##´YâŸuP’d¯ÇÑ÷ݾlܰŽÂÅ£‰I´pnË?Ý‚+¦½gQ™BEJ!KK×D§ÓãÁñóÉœ¼x÷ߟÙ?ÏÉŽSEEEEE¥ ذò7 øô¡â3v<ƒ|ÊßÇ.<µñfbrZýûŽœ@–$æMÅØ/¡EEAVdYAVYÎý®(Ȳ ŠâšQ (ÈN'6»1cÇóÆ'ãÐéôjéSQQQQyìl^³„W;w{èxn¤²yÍ ø”}GÎ=uñ?}ŽÍ Æ£Íy¢$»,t‹ÅLxx(QQQ˜L&²V¸>Þ\5pó£’½†€Ì@\ÜUÊ•+KrR~…Ô¨¢¢¢¢R`<¬:K#%IÎþü4Æ  %—ËßµºÏfµâîfÂ`0 Ñh8sæ v»›º¯d <¹ÿ汈¢hµ:üüüHOMÆÛ/P-yÏwªÀ· ¶ÿ«ãÏrÞÜz€,Ë8N2,6’’Ó8ù:ÿĤ¢¦©¨ü;1ü÷);ž¬ÏOc¼YâÛ…l6—ø;Nt:8R¶°£€’mõ»Üþ»wïbÆô©¼þÆ[4jØ AEŒF#Éæ´‡¾ •§å?ý–o|ô¯?Ëy“Q1ô z|}<‰,Ês±X¾ã×j½º>íÒ€ñ󶪙ñ #ËùdI˹-éœñÎÿÞ}ÅÕíÓïÿU¼9¿—“¼Žß)Þ<,×A»Ýާ‡G¶uÕjËÓâ—œ›·lF+_ç»/ÚÒû‹ˆŠŠÂËÛ ^‡¿¿?WcÌꤿg”ã'OU"ò_–ó A³¶€€ÑäF`ha*U«Aû/Z”M-LX‹ U7Û¼_VΙÈK?P3Bµüÿ¥%åFWriÚ¿‰7/÷þýÄ;{ü{¼ÑoZ®°9ÿíõ@ñÞfùgá°Ûp×¢é °a³Y³E¿lÙ²xyy£( ›7oÄËÝJ£è ¦ÿ´š&/¶¤\¹òF222Ðëud¤_SKÊøf#~Øt‚¥ à‰›^ÀšaáôÙ‹l8G–ÃJÔ˜¨^¥eÂ|ðq×£ =ÝÌ嫉;ËÙkv¼ž…Êðþ !®«,‘–fæÌ¹Ël:r x¡}}*»i8²v'«¯Ûs¥É#¨ ½›…`ψåÛßN Ñ{P£rQJ‡ûàã¦C¶Û‰»–ÀÞýg9—êÌõ}½‡Ÿ/NT°:d’n¤pôع•?‘Õ›eZýs‚?ÿ>Ƈ_ô¡v@Úº-gvFu¼3k²ÖèEíªE)ê—Q‹ÃfåJìuvýužXkîÊ/ˆzÊ—-Jù¢~zÑ¡˜˜Ä£ç9“žë·ùúçÍwüݲŽeýÿÓŽ³Ô!ÔÇ„ 9ˆ‹‹gÇÞ3XÃhT.”P_8m\¼ê}—°å=¼ß<~2“u.ÀÖµK²?çuO*ÿÏÅ?ŸŒÐ[EùÖx;÷™r×ïÏŸÐ;Ï´Ü-ÞÎ}¦0Bïl±ÏºFVXÖ9÷/€H{ô;ì.·¿(¸fúW©R…Z5kR«V-jÖª…——’ädÆõús /Tðà‡;ªÐ°Q2£ÀÃ݃ŒôTµÔ©Ü“w—¦l˜ ¢ âæîNŠѼ’„œ)5šU¥~™ByÑkDQÄÓË“èREiß¼×Ó²ã«^+0‡Ðiðòö¢Jå²´»¬À¾¿’(ušÃñæ\i‰~>€#“G²~é4:/:·©FRA¸ëÑ zƒ"EÂhײ2…sŒÀkô>t}¹"¼0jE4Z-þ4¬ÿܿΛ¨‘”*EÉRå)^2’e‹Ž»ÒÞ¬6ï>Sq]÷Í6U¨€¯I‡F0MD ÓËeñÍшm^®ÁK•à ÷uà5ƒy¡Qu.Æ$fŸ«( kæO¾cÚn=Öµn$EýÝÐktz=…‹„ñj«ò¼Õ E\ázƒ‘’¥JÐ6â:ŽÌ÷AòøAÊÌý¦[åÿ?²,?Ô+gÔ÷Ñ¡Hfþ»óúÂ%1V*C¨AdÏ‚)L]½+ éhLÞT¬Ý’qŸ´¥yíX>[@Qo#‘µ£ñÓ ¤œÚȱ 8~%Ÿ°(Þ0–Q^ÿ:ADo0 7WÒ{VÅ·+7ŠÑ´}4:‘Ô³›:f>ÇbRð/Å;мD ¯”=ɘý%(dÒQ£"%½´Ø’ñí7³ÙuøfEOѨò´lß‘cÛàýJ¬¦8uæì‡)N9 ¸,씳›2j.ǯfÕà}¦ ¨ÖèGê¹í 5›ã±fÊ4îÉäOR­;çl¥^(JÔ*{ßyü eæëŸ7g[ÿ®a”Üé~V‡žIË?ŸæžÝj]ßf±ßÇuò:ç^ñtè=ESúÜv·kæå ÐæeùKNÞÞAhDYV Áétf¯÷?tð )ñÇh]'œi?mÄéY†WÛ4¥Há"x{yƒ( Óë///ì6«ZêTîÉìG±îšž€Èxxzráô :÷Ò˜/L ¦D(í % ýÿû5¯Åej±sù þy€qcÇar7s‘RQÑ<_­Ý^ù OZñf1×¹Gc>?‰Ë%‚Ys1ƒ×Š{л±™‘1©*ê‡é’ˆÄ™A¬CCa_7Z•0¹<zS£SïÛÒîY¤§¶üÿõ©Yȵ§Åÿ†Îä¸L¡ò•1õ,_°•–Ÿ¿œ/y%ˆ7ûíŠ3{J 5ƒ3¯;x:ÿ8ƒ(T®"“¥s·Òü‹—ñ+׌#ßüŠw³êÔ-âЩ}F²>É€bÕñóòDd–ü2oO®_½œCüo:ôîÅÔ¡39n¤P¹jØ-—²Ã¿úÇl„”¯JFê9d¥ZSIl±ãˆI(Ì[¡†ûÎã)3…ý ¹â‰¬þ’ZÙžaË?:Ê]㽟ëäuνâý·÷%åáËÓòw:ì8ì6²VîÙívNŠ,³~Ã,©—h]§Ó^ƒ{xMªT©JpP0ƒ»#sI ,£1è‹êö¦p( :AÀ˜—ZšÌÂz{‡ð·X3~åkâíæAPp &]¦èhQœ7°&'°vÓ)ìB)îGd1?*G— eÓÚìZ·ž_ƃ,S¶aUê‡ï`AkQ¤XS’¸²?Š—¦X‡Î$ôÛ†µˆ?¢ÝX7u?ϲè4ZBï1©N£óG¶œåz\´.Ù®4;•£qwó&¬:1ÿ&æ½#°§ýYßÌÙ×ý#ÕN@岸¹yâ^Ìt«‘ROW–àÌsW_·à_¡^&÷Ì<×#Û-¤„C–³ÆØ³Fs¦_¼cÚ6%Û𯛻a!þÙánXñ¯Tww_BCü Š”Œ=-‰€Èã)3ø…Ý—jí?£–ÿcó¿Ÿë<è˜˦r[ØâiÓºÇ7äeÐæÝ8‚V«EÁî°‡ÝfcÏÞ=ö8šVðaúÜMdKP®x$:­³ÙLFF‚àZïïåíÑhBEtzuw¿g‰X‡B„^àE?‡ÉÝãÔ›\›=93N# ¹¥ÓÞFþ…CñÖÝ*.2ÈV2b™1m1qñ‰ûùàããG±ÒÕéÖº:Õë—`ê. JúR?Äeíý0b0Ëþ:CšÍ‰¨õaóÊY7ã“,82bÙŸ^œ*žUyU˜Ë1mk"ô"ŽôÃ̺”Žwù´&®;ÂtýÚ¿ÆþtÇ+™=™§L!HMO=—´"Aa5"ZCP¾ä¯¨u£Yc— ]ZµAëšÛpëuƒÃpËq]ɲ§5…ë™ç¾hâ¨AK`‘P¼3;£F7W.) ´ó§4x†ß1}NÖâí¯³­˜Ùÿ¾Ò{›øgõ6+nnndmØëííÅ¢E¿ræì)&ÿh¡pé´mÐÐP<==Eñ¦Q9)P¯×£(àææ†ÉdÄaw€^TKß3À¹G¹T™ˆ"uüþíÇæóŒ˜pweA_5 ïÀ@Ò°N•ÛŽÝ8ñ+Èi¤&ij)ÖF«p#}ÆN¢Ï=zð7.œ$½¶?•ßã]Á„¢HLY~}Èó>³;qܧ2eʼÀÐ2yÇ•|zU_x“ÓÛq½}E‚¢^`D¿‡sCæ\𖓤“Û4x2IBEB½Ð{zrjÛQbÚU"<ë:­—5îo4^å=gwä°ge*Và£w+ÜÿÄí )]ûU6Kå­J>TîÔ—ÊÑÐÞOøƒäñƒ”I’9a•©hÒ0bæììðQ?nT+«jù?Ðw$IÉ »ûzüûéXü›xšu}[x³n£Y;û³ûŽ÷6ñ—e×ÊXkFE«ÕJbb"¡¡¡‰ªI½† ‰ŒŒ$"""Ûârô°³7R\/ƒÁŠŒÃnE£U-ÿg¢wmKbÖŒß(Y˜:UÊè7âã8ü×næý¼ŒsvwÂÊø¡5zæÑKwŒ{òŠøk­T¯XŠÂA¾ˆŠÄë±Ú»™?®Dã^ E¶sxã^äHêU+…·®_>ͪE?óNÿ1·_K6³òR‹yã¤^˜Ç¡ ‰°Òè=½Qd §=…³^8„zÕËS´/zÁIµXŽÚÏÆ H¼‘Nì•Ë ‘˜6kµž+KÍrÅ1vb/œdÍâyôülÜ}ßkö9’‹9¤¤D.;Í®[Y³ë¢{¡Ê¡Õ òÒâ°&2sÆ¢ËFR§r)‚¼MXS8º7sf,äX†‘JAh ^8i,š·„í…hP£"‘a—NeÅ¢ù\ŠI àÚä¿~Œ1Рz% zà4§rþôQÖ,ý~_þïâ/=Pøƒäñƒ”Y–غõþ5 ÷5e‡¯ÿe*M:¼§VØgIüs`Ó7F>ðwä{åç,s3Þ; y¿S¼wµü³Üø^^^”*U oooªV­Š——~¾¾xxz"ÂMϱë_ö¶¿(FDQÄáp¢Swù{fîì?x€ßÍ'-å› Р1˜0z%<ª8z?_ÿ™¾†-KfäYào=–x5ŽÃŽòË‚9XR“3W’hÐÜ1úGV8Á§=ƒ=»Ï0gún$Ý@–AcòaÕûãH:·û¶kذnÛp!1Õ~S)ŒZ ÞnÚìsD7/Nœ:͆ÕKI½‘€ÝfCQD×µ½)ÅîD’dD–ÿ¾œI㎑žš‚¢hйù°¡÷xÏåë}#ˆˆZ½­›%kâéëƒFïF`€‚,»6µÑÙ¹s' fM'=%§Ã‰ 3aô '´bILz=þ¾z$IFëæÍ¹ —Ù¾a-©IñØ­d4èÝý(Y‡” ;Þ’“s§ظ| ñ×â\<­ƒ›?»>ú/ §vÞ1ÍY÷ö á÷›ÇRf$I&ùòÆnÉc'°;nœ¿x‰"ááj…}V “üÚáO–óÙ§%Þ»Š¿ä”Ðêt€N§#<<œô:=­æö«( 9ø‚€ÙlF# X-Ljé{väo¿"è+øcΰàpʙΠQÐb0šðôò@›)Zåê·ÃbÉÈSo=Rï0,6+IΞ£ÉoOw$IFçL±Š 0gàÌEÒ±9%EAD4:=Ám±Û,Ù÷r§ßñþÃï?¤Ìx…W¤´W$vGî-ÊU£Duû?¤˜>mñºZ3Е)_ÉþÓ¢µ,Û¸€Ýë~¥^Õ’Ô«[÷¦uŸYYáÁ–+Å'$0zü$j4ëŒ_P¨ZúTTTTT;'öï xùǹ#{hÕ®§ÏÇ<µñ¦¤¦±yÁø¼-ÿâ媳tíïü´`iÃ>s?ÓÈÏ6ñ…›æ¾ËÂ@27âeª ˆµ‡­¢¢¢¢R ´hÓ‘UK>t'Î\zªãÍâ–Gúº|‡><ߤ]ŽM>²¬ý›â/ËR¦Ð»‚%kBKðQt­ÈšýorÏŽ_EEEEEåqrüÌZ´éøÐq<íñæ)þËÍ 1ôn^ùšñNIÁiQ7ÜPQQQQ)ö9¡Æ›Ã¤×Õ­UÃîQI-******ÿÏI¹xð¦å¿bþ4’âÔ\QQQQQQùʵ˜ tï}»îºcôðQsJEEEEEå)Åšžœg¸öß|IEEEEEEåéEÝl_EEEEEEUüUTTTTTTTñWQQQQQQQÅ_EEEEEEEUüUTžRöÙÚÏzúTTTž´ùÑåË1Œó5ñññȲòÐñ•)]ŠÁƒàáá¡þJŸ€B\8s ?õ>î‚ÝngÚ÷ÓéóáOlü¶x)M›6Æ×Çç©É_Y–Å‚µAdY&!!‡ÃùPñh4"h4š‡NÓÕ«q|5j q×âº=Õˆ"Õ«?ǧýú>p^ÿiò§Ó‰V«}ªï!ßR?xØp.\¼Lýúõè{‚ ܦ( +V¬ÀËË‹A>ýYx~˜=‡óI6Q¤nâü +dŸk&'ˆØ,ÌÕÿN‹Ãaÿ‘§ê>l6o¾õ.:wáÚµ‚ƒžÈû/A£¦ÍؾežîOEþîücgΜ¥ë›¯ç‹h>(iii¼Ò¶§OŸ<Ú¢íD”ˆŒdùÒEøx{?T\£ÆŒåÀ¡Ã¼ð ÷øMˆ¢xW!ÊÈÈ`Ê´ï)[®Í›5Ax‚Û›ÝNRb^^ž¸»»?–k^ºt™¿"%5 (Rªd$•+U@¯×ß&øûâèñȲŒF£!ºtU+WF«Õð´‘/âït:‰½J—.]xï½÷î(òYB¯Ï‚ ””Ä©3gpJN´š§»‡•g!—¡ê ¯bsB°!‰JÊg?þX¹Eà3ƒQ2s†[,VÜgìÀ™rƒøÄ$üýüº{XV®ZÍù‹—ðõõͳs—•öÔÔÜLFÞ|½K[wkÐ{ô1µj×a℉¼¼~õ[¦¶lÙB×®Ýhݶ+—/Ád2>”Äá_’’Bß>Þ±¼<*vïÙËõø–,]zG/cÎ4%''sìØ1DQ¤B… Ùß””ºvíÊ–m;hórˇJWÌ•+´nÝšþýûçyÜjµ2qâDŽ?Ž(ŠT«V?þ½^[{j·ÛÙ»w//Å Ë )€ªf·;¸{…bE‹Þ¥#¸›cÇODܵ8Š„…вEóGš®S§Ï°ïïƒX­ :v§ƒSgÏsõüYJ:RI½zðð&AïËY’ð÷÷#--SgΓ’’Ê M=»–¿¢(‚-`÷kõgŸU`³âE–‘$™üèTÍ;Ÿ„ë1.åTEdYAVdW˜,£ùžyŽ"gž«Èø…£×û½ó%¿œ’‚Ý¡ ›4XÌéi·YÿJöŸ¼Ã4:NYqu 2ƒ….T1W®Ò¹Ë›øúÞÝýœ‘aaðgƒxµ};ÜÜÜž‘•¹Aƒ¼üZ¾ò9­Ûuà÷e‹1Üb½<‰)ÁÏ‹Vf63°ÿ'5Í îîîT¨PNwGáOOOg̘1¬_¿žˆˆ4 S§N¥U«V 8, >>>˜ÍÙíØ£hOSSSùðéW¯'NÄÝ݃U«VÒ³gO&Nœˆ‡‡G®k ‚Ù¹V ¤m°ÙllؼŒ çÎ] QÃú·åÍšuëq8eÞ~·;F£‘;v°aÝZ^jöâ#óY,ö<‚Íj¡Qý: ãÒÆ5Ú· µëR¢j;ÜŠAÀËù¿·#¯[…_dÊ7n‡`0²zízâ®'pîüŠ+úlŠÿ½D>/ëþNÿ?÷^ê Þ~µ¢‚(¢È2²,!K²,¡È²,#KÎì0×g'N‡ÔÄk¬Þw1Ÿ­JIRd™?ÿÜGDÑb„††Ý¬¢ 7E]!¯€‚ÕjC–”'h®— h4â=­yQ»¥÷ Œý5‘%¢¸tì{Fûÿþ÷Û'Úòߺu+£>Á”}¿Óý•Ö¼õN~š5îÉöœùóÖ‡ƒ™øÕÒÒÒ3rEQ8yò'OŸF’$Š-JùreûX«Åb¡W¯^x{{3wî\ÂÂÂ0™L$&&2iÒ$>úè#¦M›–-Úš_~ù…Ê•+óÚk±Z­€BçαZ­,\¸îÝ»çjSs¥KxüæA†ÅÂ… ù¸_?¶oÛÆü…¿Ò¾]›ìN^LÌbb¯ñV·n ¶nÝÊúukðIßG:”’’ŠÃé$(0€ˆ°pö~ù)¬\Åkë÷â]6·PF§\DqJ7jͶç£Ùº{ µGO£|¹hvìÚËåË1ªø?¬ðßZhóÍ3!;1gdpöÂ4:}¦ÀË™¢/ewYFVd—õ/Ë.ë_QÐ8­8ÖüM“’¢ "W¯^¥c»6x{zðF“¨òR ê½ÔNŸ‡èç¬Ì®8Tò¯S&3qòTü‚8y`£'ìåµÖåxï½Ñ¬_¿‘ŠÊCá"EHKM¥pá†ǖ>‡ÃÁå˜ÜÝ=¸tñ"áááÄÄÄP­Ús¼Ñ»k-§Û”¡t¯ýÝ{¾ÏÓ§ÈxzÉÉ)Ä'$dzÜn¾dEæâŋȲL¡Ðp>1‘ic‡òAŸiÚ¸ÿ›8‰ŒäS –Ðjàâ5‘T‡?ý?@ÇWÛc0ò¡*÷l»æÍ›‡$IŒ3‡ÃAF†I’ c̘1ôèуùóçÓ©S§GÞ™}ûöñÅ_àp8\xfg¨yóæ|þùç¼ûî»wnSá±»}}|(]šåË—ñÚk9z4ŒY?þÌ;ouE¯×qàÐ!Ô¯ÁhÄ`0°ÿß|Üçƒì!•´´4öìÝGÓ&*2{†÷ÅsýV"·#å—_1ŒxKùRd™óæU¿%q›×²­Ï›õêòÐ<…íœø¨ ê­é^Âÿ¨¬Yr²oÿaVí:Ìéx3g“¬œO¶s!U$K$%ÞIDATâR:\ιbÕk7ç0qMrçºâI<Þ\—=™·fËË©dÅeù+@Æiذ!~ׯSjíj¼ŽdîÈÿ°ß.㯒•¤„›¯ qÜHˆÃét ËäË ?ÏFgàÐî)Œúß¶,oË{M¤W¯^œ8}†è •ùcï_”)W‘u·P·A#víÙÇõë×iºÒÒÒ8tø(_x‰5ë7S¦\EþØûWvz^íØ‰/ ¥÷ÊÉüôÁH¾Û½œ*U«1xèçÈJÁ•_ûFÍ^¦ý›=èøvo:½û»Äë=ú2é‡yø‡àç@Ÿ¡c9›LžïÓç¥cü9ÕÉúq k¾VØ7MbfŸëü8u öí—-~ùÕFå%ü‚ °téRzôè^¯Ç锲;îYîô>úˆ… "IÒ#µü³Òj6›ñõõÅÇÇoÜÝÝ!{è!çÐiöj.ËÿñS¿^b.]äÈ‘#T¨Pš½Äª5k\Y»½Á€Á`@üýü±dX×ÀißÏdמ?9{î|¾¦ÉÇÇ­FCì?ЬYKDýæ˜wïæúèѤ®\‰,ˤ§§“ššŠÓéÄzäW‡ !eåJ‚j5 ìø%Nü6‡ÝNÑ"…ŸºvNû¨ j^ÖüÝþT=gY–œµkצók¯ß×u²&Ø%§&ñ÷έhD—Õ•‡+MàÌmÿ€@ÞéõKRR¹pôŽ3x®m[Îÿ¾”K%KÓð•vxxyç²VÀj±¨ÂŸož…¥Ë'=þ­“˜öÓ~¶þÞŽF­—òû¼–œ>}šµ‹:púôiVÿÒž£G²hV;¾;Ž·ßêÀ'ýGP8¬Í^|!ßÓvüø öí?È'Ÿ dÊ·½i.+W®¤ïïSX·n.›äzÿ}2ß·ïGïUS˜Û]Æ|BÏÚ­ùâ˯øÏð¡2Ì"I2>åøà“A)Rô®ìáéEß¡c™5i4¿mû–5äìù«&hVª•’hÿÅRF eøÐÁ=¶~7á—$‰k×®eÏ E×p–··Wöu#""°X,¤§§?²üÍÙ>z{{Odddö?A¸~ý:F£1{8-55“шsx­,ÿ¬twh×–Y?ÍÁétR¡BÎ;Ëá#G(W6šÃ‡Íf£dÉ’Ì™¿ooâhöRsYfçÎ?ˆ,^,ßÒd4©Tº$±1‡xîëï‰7ûéÓœûâ žn$ž;‰âtàY i3QRRSRHÛ¸‘2C¿DŽ?Í5HDDÕò¿›ð”Ûßét¢É5¹PdYfåÊüðÃÌš5‹ü‘Ù³gsíÚµÌñ g–µ/hE×ÌÙü´üe)s<_(_¡µ»¾MÜ‹ÍÙ«×ñ÷¯¿â¾}ůưòÛ±ü½w·Ë½$Ù3ú$YAÕÿ‡gÓæ-\‹Odëšo™ôþláß¼¬ /wYÉžõ]hÛu{Öw¡ý[«9°ímz|²óÕ1lÛy˜ÅóGrîb ý} _Óu=>ž¿fÐè/X²pNo`öû#è¿åG¦wìÏÇfðý«Ÿ¸Þ3…J‹Þ®ÀÀñL^¿€À BLžú]uª²¬dFsÛëÖ¹!F“ïö EÞàÕ/5Ä'çŽ/À¦÷SøeáΜ9›¯–^†IVºõz=AAb4oûþ£°üomwíÞƒÞ3ÅK–ÜÖ^Κ5‹† "Š"éiiÌüòKfïÞ,`ËÀ×ׇîowcËæüðÃLž¾GŸÂbµréÒEìv;v»òåËóÞ{=iÖ¼í;¼Š—§'±±±hÁЕþüIªÔ{ÿ×_'bþ||:u©ÓqÌ|£ßCHOÅ]§åêòùüurVƒ (ºp!={R¹Ó».y¢ç.ˆå¿Ö~^…¸oŠ?8× »ÍŠV¨P¡<6›…„¨Rì[³Š¸Kˆ˜:•ÒcÞ¼–ù;·R»u{üü‘e»CÊô¬ú_¹KrŠ«•¾lj'ðòòrõ0Å›“ÿäì• V«•7’8vü&““ÉD‘Â… d󌸸8Î^¸Ä÷“¾`Ùê},ÕŒ;.á×ïg¾7áÅŽ‹ùõû&4ﲌUó[ðB‡elZÚšÆm–±yYæ/9@ó¦å(<‰2¥Jáî‘?+Nž:C¿ÁY±h)ý6ÎdjËxåd&½Ô‹ž‹ÿË„–½é>gÚõ¥ûœ‘Lh÷1Ýç|Å„výè1g$? Kç>ïпÛ¬\µ†–-^zìV@ìÕ8¬6Gvo™p3ÌU?£k4aÕ¹³¼öŸ¬ î9V.– ‡FSY¹z ÷ù0_,ÿ¼Ú Fƒ··7—.]"000WÙÌ:çüùó(Š‚§§ç#µü÷îû“#g¯1lØP/ú…Áƒ‡Ð¥Kg$IbÖ¬YhµZÚ·o9=ùß~K]­–S¦0!#£À-ÿ,¼¼f³³ÙœýÛ¦¥¥aÈ×Ëi‰tíö)éRÒ-$&žaÃÆÍ¼×ýÇ~ÁÁÁ\¹|‰wßάQ é>l;Ûf7¢ñØúcÃ\ïë§×¥v—µ,žP“Æ]×°r~ Zv^Åæem˜6s­ZµäðÁýä×%ïð!Ó¾”-ü½–ý¯½MÏCûÚ@>˜5”ñ‡òñÜÿðMÇ!·½0m0ƒÞéÃ’%KXñû²‡^†öoö¯SW@ˆ½ïzž{Ž„K‡ù¦¸nmg f…GŽæ›—2¯6jÉÒå¸û‡óó¨R¥ÊmcéÿûßÿhÑ¢ƒá‘Xþ‡æÀ‰Ë´~¹9 VLdX2˜5k²,S¯^=^yåôz=³ÆŒ¡¼ÓÉ‘¹s¹âåIÇ–-Y²iSË¿`­TA¨U³v»ƒ#F0hÐ Š.LFFëׯÇäæFéR¥°Ûí\»vŸþ™—^hJhhH~L´Š€˜c‰§ ФXoP¦ãÛÙŸ•æ²ÞàÐÂéÃS%ú€, ‰ÂÃTñ’Üþ[7­£Qå"iZQQ…XDƒ@éÚۦ'å"pØy®Lô&LϺ+-/WëéG3[9xöLþˆ¦Ë^Q@ÔhЋ.OCtùŠdX¬œ?àB¼:m›æÎæ¯5+ˆŸ1ƒÕ«côôdù¤o‰¨UIR ´:ÿ¹ÿ C‡Ëõ»¥§§sáÂPt:eJ—Æ)IØl6”Ì°à  ô9çO( _ÉÕ«q„„zì ÒçÇ2xð0"*õgÖ¨ú¼=x;ç4¥Îr½×ﺑ?7¥é[ØñsSjv^Ãê-iÞi%s§4¡ÿ¬ø}5]ßìôÐéJMM¥G|±ø;æÏû+&1ºA7>]ðßtʧ ¾b|ç¡ øeã:¡ÿ‘¹Þûü0œ÷êtbîܹlܰAv"ÚÇž·Y ëývnÄœ"ùÀ ¶Ñ RÞûVyºAzº9_:&yµ?¿þ¶”ƒçùløWl[»„1_M¯ž=ñ÷÷Gâãã;v,‰‰‰ôèÑã‘­T:rä(»ž¢}›—‘e™ù‹~Gkç›ñãÑétÙ×u:Ì0r§çÌá´‡;m&M¦JõêOŒåŸÅÞ][ظ~%Ÿ}ö…3…ÿ»ï¿'=-Qùõ—_Ð\«²^ïÜ‘:µkæ§T–4ÚÛ:C¶ô$BKW¹}ˆÀÃC–µ–£üÈ:§ÓÁÓ†ö‘Uô‡þü¬@Þ¾þx™Ò]‚›ùº%Õ¹„>9>Ao¦%ó³Þ`â|‚“òåëæÛ_VdØràûÏ%!I ²¬à”elVgŽ_ÂjNeË_g)^‡³ü9¹k©û÷vüÅ«×`ú¼5HeÚ!šÓ ¬YÌfndæ/@jZ ññ”ŒŠB«ÕºÆvE1Ç8¯ÃéäÄñãøúøäž@©(Ä'$žÑn·“˜À‰“'¹‘’BbB_{ ›ÕŠ3sBWö䮀ÈÈHýú+éf3¡!!”)]KFÆcÙ(åNˆ¢ÈŒï¦ÐõíwiÐp‹¾mH‡·0~`j6ÄÄ ùßùüüó>ø­Zµdõê5¬›ßšW{máÓ^Õ9j4‡!ü¥&_AµZþûßoèõe–7îóÇ0²Í§t~³ S'NaÕªU,øþgÆÇ€7>¢÷—ýøiìtúýüzÕêÌĉùcç¸{yHž¨·a=¾Ñµƒ¦¢do`eNÏÀ¢õ"ºIgEæÚéƒ(ç–°j„D…È;Çép²"½>}¸Žø­–?À¢ÅK9z1™ö­[RÈß‹}G/°}ëfª•+A÷wGséÒ%$I"**Š%JdïŸßí˜,ˬݴNßÀ!É,]µóõÓôëÛ“É”kWÔ5K—âuñ" KsÂn§ÊþC«û< –¿¢(ìùc#æ#èåƒ[p4ÿ›Àˆe¿¡s "$´FÇ º5Ópùì¯üµC¡yÛ÷išt>^Ä_:OhÉÒ(Š‚ýâEÜŸfÿÊŸ ŠŠ& º,qqüõÕÊúÅúÏ?££D‘´ädÌ71ùúªâÿ¤¹ýCCÃHL9»VŸ»§Ÿ§Øß¡syŽÞ膄>{¦o¾¸ý%IV°f˜IŠ»ˆ=#IQåÌÍ{œvÒã/"_¿€%ù:FïBá¥9Z¢9ɈX€cþ²,c³Ùˆ§S—.ü8k‡kb—$ËhDÑõ.Ëh$ Y£AÊì$Þ¸AË-X·nÅŠÅétx¥Ðétü8s­Z·åµŽŸ±jZ#Úôø‰÷{õâà¿IOM¥áÌïHJHâ›o¾aü°W˜øÓ–ÏiA­¦ƒ™;w«W,Ë·ô\¿Gÿ×{ñîÏ#ù¾Ë ^þÃ>ŠŸ7³˜ŽÙœÎŠe‹éòf7¾ì=„~s¾¤wí×óõvlÛ†ÓnÅÏ×§Àò³]›6´hÑE¾¹1UÛ¶ï ï°±Äÿ“óûÖòf‰òÅïüˆ E×€C_Šúõê>t{•ó}ñÒeüs)…6/7'$À›}G/°mëf„´Ë 6„€€Ê•+wÛ÷r q~vD=Œ:Ì+¶í%5ö}>ü —ð ‚Àö‘%cõjNÆ'P¸O^ͱËßíëü FýwïÜ€õØ—T(éƒ[Pil7.¤Á(ëx³k?~üßG¼X?½®,%ËUA<ú+Kç%ÓþÍ¡l“ªðçrtÅ/öø„¤É“‰Ÿ8Cd$e2ô\^1Ÿ“ Í8Ü}ýˆ¸˜„^òáL½zø¾ù&ÁC†prçÜŠFåÛòï§Vüÿí¦>Òú/Q„Ã;P*Ôãælá¦ëñ¦ 2·;RÈ ËÑ1Ðàæé—oÑåöw½®_:Iýp ë×aýÆ-Ø®ç Ô|¥&6[<€Ó)Q¬˜7ÁÁ…øeí„Wkˆ%ù*ëOÚÑ ¿ÖO’eÌf3dâĉ·µÞ¹Ü½™”.]š—[µzâ–Ê z–-þ•–¯´£k·¡LÑ™ÏÍåË—‰,‘é66l .fǪNŠNçÎ8xà KîùãbïÑý4jJŸúðÁØw4¯uîÈ_{ö  à‘ùô³·ºuã­OzñÕ§ŸóŸ/ÿÞ]»@vâç_°O!E·;ì€hÔëQ™˜Ã;p3Ç0ç§Y ô)#æÄÒÿ5p»¥ŸmwÂOkዹ^L™6‚ÿ‡³¸rŠõ¯¿-áä•4^mÓO7v8îÛÐ[b2|höXÿý¶iùÑž¶hÞŒ?LC£é×·O.¸ ü½{7×6lÀãÏ?9s·NèñÙgh4š¼'R€å¯( ìX‡tü?” ÀXkâY¯Å±âh$½úOÀÛÇ¿ÂÕ‰IÙ‰éê?˜‚¢ˆ¬ð<îg·²hV/wŽ›[þ?åï"ZÎ\<‡¶A]|÷BP¤7>œJdnê¦ j´¤<·˜Ëgtã &p~ÅïœjVg¹:8ÒS÷d¿G>ÛÿÖNÁ: w:÷a)^˜õñ)”+€$9n±ø…Ü»Yÿ‚@ŠÙJPhþÍèÌiùÛÌɼܢ5z½Ž|ÂËbIO¢Tª™fM`29yò$f³?ü¼<9Ÿ á& ®uþOÀÞþr¦ø›L&¢Ë–½¯ïx?ä£O%nnn,_ºˆúšÒ­Û &OžB玲þ9ƒáØžOy®ñ4š6iÀÒ¥¿“œ”H¡Àù—“‰_ÌãùÚõøþ»ïºå'¾;ž7»vcó†µè3g+oÚ´‰þÝû2lø0vnßì´R(ø‰o„R®ž'Ô[ÏwßM%*²?Ìü‘û}º?ÿá­f ŠƒF'.ÁÂÍp2¾(cÆ~AšÏ£yȧAfÕï7rêj:í[·ÄÝÍÀîÃçØ±m3zËU† ’-ü÷j·ò{È*$$„áC#Ërö2ìk_ºpc«Vrü8GýƒãÅf| P©¨’L™<‘°BÁˆbŽm~ÝÝx»ëë¼ùz'22·°6 èuZ´ZM¾åqVý~þùêLþn&EÊÖäì™3˜lW2l(¾¾¾ô<’GµÎÿÖkÛív¦Ì™ƒ·ÙÌ«mÚÐw„láÏ«#R–¿¯‹V»íErÚX|°(oö“Kø³Ðëu¼ýNofÿ¨C¹¾‰òâe®ÙC(Z,2_Ó¥Ñh]“üœN¢Z·G4Ù?i,úb!ØŽÇ×ß?{E…Ãá 99™87=g‹ûظ9µÞûˆSgÏ!Š":­–§ í£.¤O¾þ:£'÷@‘¥.~r~®;!{d ×øTg¾=¶Ñét¢àZê'I.Ëßf·¡È2f‹‡Ùõ²ÙìÙâP¹reœN'’tˆ³„(ºö.HË?-5•I“'‘˜ÈÆ].ñ¡C²·HV%{òŸœù´DY–‘$‰³çÎñÍ7ßÀÁû‰OL¼ç£€ ‚ ÀfÏšÎÅ‹¹p)†©“¾äË‘Si×®-k×nÄšaåùê•i4 Ë—cß®?hÑê ÈoG2¸G¶mßÁ»o¿E|BâSáêÏ",,4ó!9·E½¨E¯{ô«BCCyëNüþû ‚ 2} ÃÇÇç=•ùÕ†e=W «.ÜzÝE‹]¶,ƒ‡ ¡n½z¹\ýy¹ü³—€åU2Ѝʹl%Þž&úúâ®KyM&ïvŸÙ³u\;¹[ZVϺôz¹b¾¦ËÏÏw7ÉÉ©œ8yŠ¢õ› +ņ938÷Ï_xéxùƒ bN¹Î´TÒ%bÝ?¥rݺÄÄÆñÏñ“X­JE•|6Å_£ÑàããÍš5kî¸&ónOÏÊËwàÀž{®Z¾Üä{={bÉ S¯7äÛd¿B~^»ò‚¡¤ËòWlV¾¾>Dbp$'!;mûUÆjµâp8r½ì «"an>e¬ ?îkœRþÍÒ÷|Dëzƒ^‡¢( 0aÆ1mê4öíÛ‡%= åŸË¯hDaöìÚÁÇŸôgл1tè0V®\ðT ÿÍ6 à®D\\_}õžžžhµEdêÔ©÷ò[§¥¥qùòå<-ÚÌ’Ì›7“'Oæyüüù󄇇3eêT¦Lz׸¬V+§N"2²Dä±(мöj^y¹¢¨A¯×ÝÛ`Óéx³ë»üýwüý)V¬h¾Ïø×iµÔ®ùz §$¡‰ªŒÎÝDÕ2QX’“°Ûí¸{W'E£eÏÁÃ\µ:ˆß¼-ÓÓ™AÕJå xúê «[«†}û»INˆû×8xˆþ?#>!1_\_aa¡|5âK*–‹.½Þ5’$1rì·¤ ^ØœI×c±'Ç¡Ñj][ +®Gý dîÚ¯(ÙO°Ê"n…«‚=ݵQŠý_|›ÂaáÔšš<¼¹|ñ4þAOu~>®ûp:œ9w‘;wÑ­ëë8lVÜÜLrÏŠûÄäæÁ… çiþbÓ§>*|5z,;vþ‘ëÙÿVäž¾}û|ˆŸ÷Ãy+ÒÓÓ™8å;.ÇÄæ‹øV¯^ƒöm[ãnÒª¿û-¤¥§³óÝ$&Ý@JE•¤B¹²èt·wRRRSÙ»ï/RRR0T©R‰Ð§ê~¯Å\ {ïóOüÁ5Û;5-§$ñ°¾%ƒÞ€Á C¯Óÿ¿-tŠ¢àpf>50?Ü8­V‡Ê£E–å'jh"k/•û{*Xlö|1ZDQÀ¨×çš¿ðp¿mþÌ#Q€§ðásµ=ÎË£óÿ,ñÏW“ZE|¼}ÔRôR¯SÅúiãI›“  ÿà ¶»éÉܤE#±ÿ3Ò?Så^ýÉUTTTTTž±N¯š******ªø«¨¨¨¨¨¨¨â¯¢¢¢¢¢¢¢Š¿ŠŠŠŠŠŠŠ*þ*******ªø«¨¨¨¨¨¨¨â¯¢¢¢¢¢¢¢Š¿ŠŠŠŠŠŠÊcãž;üI’D†ÅŠ((jn©¨¨¨¨¨<¦»> éÿ„–sÃÀWIEND®B`‚scribes-0.4~r910/help/C/scribes.xml0000644000175000017500000010035711242100540016716 0ustar andreasandreas ]>
    &app; Manual V&manrevision; 2005 Lateef Alabi-Oki Scribes Documentation Project &legal; Lateef Alabi-Oki Scribes Documentation Project
    mystilleef@gmail.com
    &app; Manual V&manrevision; &date; Lateef Alabi-Oki Scribes Documentation Project This manual describes version &appversion; of &app;. Feedback To report a bug or make a suggestion regarding the &app; application or this manual, follow the directions in the Scribes Feedback Page. &app; is a GNOME text editor.
    scribes text editor Introduction &app; is an extensible text editor that is simple and powerful. You can use &app; to create, view and edit text files. &app; provides powerful functions to manipulate text easily and a plugin system to extend the capabilities of the editor. Scribes is Free Software. However, writing software is time-consuming, painstaking and costly. Kindly support the project by donating. Your donation will help advance the development of the project. Thank you. Support Scribes. Getting Started Starting &app; You can start &app; in the following ways: Applications menu Choose Accessories Scribes Text Editor . Command line Execute the following command: scribes Support Scribes. Text Editor Window When you start &app;, the following window is displayed.
    &app; Window Shows the text editor window. Contains toolbar, editing area and statusbar.
    The &app; window contains the following element: Toolbar The toolbar provides access to the most used operations of the text editor. Point to a toolbar button to activate the tooltip for the toolbar button. The tooltip provides information on what operation the toolbar button can perform. The operations on the toolbar only represent some of the operations that the editor can perform. See shortcut keys for all the operations that can be performed by the editor. Editing Area Use the editing area to view and type text. The editing area contains a line margin. The line margin displays line numbers. The editing area also contains a line highlight. The line highlight is a visual aid that shows the line the cursor is on. Statusbar The statusbar displays information about the operations of the editor. The statusbar contains four sections. The first one shows an image that changes corresponding to the operations carried out by the editor. The second section usually shows the full path of the document shown in the editing area. It also shows text representing operations performed. The third sections shows the current position of the cursor in the editing area. The last sections shows the mode the editor is in. The editor has two main modes: the insert mode; and the overwrite mode.
    Popup Menu Some advanced text editing functions are displayed in the popup menu. Right-click on the editing area to display the popup menu. You can also display the popup menu by pressing Shift-F10. Or by pressing the Menu key.
    &app; Popup Menu Shows the text editor's popup menu.
    Support Scribes.
    Command Line You can run &app; from a command line and open a single file or multiple files. To open multiple files from a command line, type the following command, then press Return: scribes file1.txt file2.txt file3.txt When the application starts, the files that you specify are displayed in separate &app; windows.
    Usage Most operations discussed in this section can be found in &app; popup menu. Support Scribes. File Operations This section shows you how to perform file operations. To Open An Existing File To open a file, click on the Open toolbar button to show an Open File dialog. You can also press Ctrl-O to show the Open File dialog. Use the Open File dialog to select the file you wish to view or edit. Press Enter to load the file into the editing area of the editor. To Open An Existing File at a Remote Location To open a file at a remote location, press Ctrl-L to show the Open Location dialog. Enter the location of the file in the entry field. Press Enter to load the file into the editing area of the editor. To Save a File Press Ctrl-S to save your file. Automatic Saving &app; automatically saves your files. There is no need to manually save files. To Rename a File To rename a file, press Ctrl-Shift-S to display the Save Document dialog. Type the new name of the file in the entry field. Press Enter to change the name of the file. You can also click on the Save As toolbar button to display the Save Document dialog. Common Operations This section shows you how to perform common text operations with the text editor. To Undo Edits To undo an action, click on the Undo toolbar button. You can also press Ctrl-Z shortcut key to undo an edit. To Redo Edits To redo an action, click on the Redo toolbar button. You can also press Ctrl-Shift-Z shortcut key to redo an edit. To Cut Text Press Ctrl-X to cut a selected text. To Copy Text Press Ctrl-C to copy a selected text. To Paste Text Press Ctrl-V to paste cut text or copied text. To Search for Text To search for text in the editing area, click on the Search toolbar button to display the Search bar. You can also press Ctrl-F to display the Search bar. The Search bar appears right above the statusbar. Type the text you wish to search for in the text entry field. Press Enter to start searching. Found matches are highlighted in the editing area. Selected matches are highlighted in a different color. Click on the Next button to select the next match. Click on the Previous button to select the previous match. Press Esc to hide the search bar. Clicking on the editing area also hides the search bar. Hiding the search bar removes all highlights in the editing area. To Search for Text Incrementally To incrementally search for text in the editing area, press Ctrl-K to display the incremental search bar. The incremental search bar works just like the search bar. To Replace Text To replace text in the editing area, click on the Replace toolbar button to display the Replace bar. The Replace bar appears right above the statusbar. Type the text you wish to replace in the search entry field. Type the text you wish to insert in the editing area in the replace entry field. Then press Enter to find all occurences of the text. You can also click the Replace button to replace the occurrence of the string with the text in the Replace with field. Click Replace All to replace all occurrences of the string. Found matches are highlighted. Replaced text are highlighted in a different color. Use the Next and Previous button to navigate between found matches. Click on the display area to hide the Replace bar. You can also press Esc to hide the Replace bar. To Position the Cursor on a Specific Line To position the cursor on a specific line in the current file, click on the GOTO toolbar button to show the GOTO bar. The GOTO bar appears right above the statusbar. Enter the the specific line you wish to position the cursor on in the text entry field. Press Enter. Alternatively, you can use the spin button to scroll the specific line you wish to position the cursor on. Advanced Usage This sections discusses some advanced features of the text editor. Support Scribes. Automatic Word Operations This section shows you how to use automatic word completion. Introduction When typing text in the editing area, a suggestion box displaying a list of words may appear periodically. The suggestion box lists words found in the editing area. Only words longer than 3 characters appear in the suggestion box.
    &app; Suggestion Box Shows the text editor's editing area with a word completion window or suggestion box.
    Usage As you type, the editor tries to guess text that is likely to be entered into the editing area. It shows a suggestion box containing possible words for completion. The list of words in the suggestion box is filtered as you type to remove unlikely words for completion. Press Up or Down to select words in the suggestion box. Press Enter to insert selected words into the editing area. Press Esc to hide the suggestion box at any time. To improve workflow, learn to filter the list of words in the suggestion box until the right word is the first in the box. The goal is use the Enter key to insert text into the editing area without using the Up or Down key to select words in the suggestion box. This skill takes a little practice, but it is worth learning. Purpose The purpose of automatic word completion is to improve workflow and reduce typing and errors. The process of showing and hiding the suggestion box is handled automatically by &app;. However, pressing Esc will hide the suggestion box at any time.
    Automatic Pair Character Completion This section shows you how to use automatic pair character completion. Introduction Scribes supports automatic completion for pair characters. Supported pair characters include, '', "", <>, (), {}, [], and quote characters for different locales and languages. Usage Type the opening character of any pair character and the closing character is automatically inserted into the editing area. For example, if you type {, &app; automatically inserts } into the editing area. You can move the cursor after the closing pair character by typing the closing pair character, or by pressing Esc. Special Character &app; may or may not automatically complete the apostrophe character depending on the context it is being used. Completion does not occur when the character is used to signify possession. Pair completion works for the angle bracket only when editing markup source code files. &app; supports pair completion for the dollar sign when editing LaTeX files. Enclosing Selected Text in Pair Characters Select text and press any opening pair character to enclose the selected text in the pair characters. Templates Introduction Templates are pre-configured text you can insert into the editing area. Optionally, it can contain placeholders. Placeholders are text you can modify. The following screenshot contains a template with placeholders. The placeholders are highlighted.
    A Template Containing Placeholders Shows a template containing placeholders in the text editor's editing area.
    To Show the Template Editor You can manage templates via the template editor. The template editor is displayed by pressing Alt-F12.
    <application>&app;</application> Template Editor Shows a template editor.
    To Add a New Template After displaying the template editor, click on the Add button to display the Add New Template dialog. You can also press Alt-A to display the Add New Template dialog. The following screenshot illustrates the process of creating a snippet called "test."
    Template Editor Add Dialog Shows the Add New Template dialog for the template editor.
    Use the Add New Template dialog to create new templates. Type the name of the template in the Name entry field. Optionally, type the description of the template in the Description entry field. Type the content of the template in Template entry field. Press the Save to create the new template.
    Placeholders Placeholders are highlighted text within a template that you can modify. Placeholders are inserted between ${...}, where ... is an arbitrary name you provide. There is a special placeholder called ${cursor}. The ${cursor} placeholder indicates the last navigation point in a template. You can only have one ${cursor} placeholder within a template. Two or more placeholders with the same name will be modified simultaneously. Placeholder Navigation Press Tab to navigate between placeholders. Press Shift-Tab to cycle between placeholders indefinitely.
    Test Template Expanded in Editing Area Shows the Add New Template dialog for the template editor.
    To Use Templates To use a template, type the trigger of the template in the editing area. A trigger is the name assigned to a template. Press Tab to expand the trigger into a template. If the template contains placeholders, press Tab to navigate between placeholders. Type over selected placeholders to modify them. &app; exits template mode when there are no more placeholders to navigate to. Typing over the last selected placeholder also exits template mode. So does moving the cursor out of the template region. Placeholder highlights are removed when &app; exits template mode. The statusbar provides feedback when template mode is exited. To Insert Tab Character in Template Mode Press Ctrl-T to insert a tab character in template mode. To Import Templates To import templates, download the template tarball from the website. A link to the template tarball is also provided in the template editor. Unpack the tarball. Then drag and drop each XML template file to the template editor to import premade templates. You can also click on the Import Button to show the Import Dialog. Then use the Import Dialog to select and import XML template files. To Export Templates To export templates, select the language you wish to export on the left pane of the template editor. Then drag and drop the selection to the desktop. You can also press the Export Button to show the Export Dialog. Then use the Export Dialog to export selected templates.
    Document Switcher Introduction The document switcher allows you to focus any window containing a document open by &app;. It is a better, efficient and effective replacement for tabs.
    <application>&app;</application> Document Switcher Shows the Open Documents dialog.
    Usage Press F9 to display the document switcher. Use the Up and Down arrow keys to navigate to the document you wish to focus. Press Enter to focus the window associated with the document. You can also double-click to focus the window associated with the document. Closing Documents via the Switcher Press the Delete key on selected item to close the associated document.
    Keyboard Shortcuts All functions in &app; are mapped to keyboard shortcuts. Keyboard shortcuts are the recommended way to perform operations. This section shows you how to use keyboard shortcuts in &app;. Efficient Text Editing It may not be possible to learn all keyboard shortcuts available in &app; at once. However, if you find yourself using an operation repeatedly, learn its keyboard shortcut. Using keyboard shortcuts to perform operations is fast and efficient. It also improves the fluidity of your workflow. About Scribes Scribes is developed by Lateef Alabi-Oki (mystilleef@gmail.com). To find out more about Scribes visit the Scribes Web Site. This manual is written by Lateef Alabi-Oki (mystilleef@gmail.com). This program is distributed under the terms of the GNU General Public license as published by the Free Software Foundation; either version 2 of the License, or any later version. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program. Support Scribes. Support Scribes Scribes is Free Software. However, writing software is time-consuming, painstaking and costly. Kindly support the project by donating. Your donation will help advance the development of the project. Thank you. Support Scribes.
    scribes-0.4~r910/help/C/legal.xml0000644000175000017500000000605111242100540016344 0ustar andreasandreas Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual. This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license. Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters. DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT: DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. scribes-0.4~r910/help/scribes-C.omf0000644000175000017500000000140511242100540016667 0ustar andreasandreas (Lateef Alabi-Oki) (Lateef Alabi-Oki) Scribes Manual V0.3 August 2005 Scribes is a GNOME text editor. user's guide scribes-0.4~r910/help/Makefile.am0000644000175000017500000000073411242100540016412 0ustar andreasandreasinclude $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook DOC_MODULE = scribes DOC_ENTITIES = DOC_INCLUDES = legal.xml DOC_FIGURES = \ figures/scribes_add_dialog.png \ figures/scribes_completion.png \ figures/scribes_template_editor.png \ figures/scribes_document_switcher.png \ figures/scribes_test_template.png \ figures/scribes_toolbar.png \ figures/scribes_placeholder.png \ figures/scribes_window.png \ figures/scribes_popup_menu.png DOC_LINGUAS = scribes-0.4~r910/help/scribes.omf.in0000644000175000017500000000062311242100540017115 0ustar andreasandreas mystilleef@gmail.com (Lateef Alabi-Oki) Scribes Manual user's guide scribes-0.4~r910/CONTRIBUTORS0000644000175000017500000000002611242100540015300 0ustar andreasandreasJame Laver Frank Hale scribes-0.4~r910/Makefile.in0000644000175000017500000006445511242100540015505 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure ABOUT-NLS \ AUTHORS COPYING ChangeLog INSTALL NEWS TODO install-sh missing \ mkinstalldirs py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(startupdir)" DATA = $(startup_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ edit = sed -e 's,@python_path\@,$(pythondir),g' startupdir = $(prefix)/bin startup_script = scribes startup_script_in_files = $(startup_script).in startup_DATA = $(startup_script_in_files:.in=) ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} SUBDIRS = po help data SCRIBES # Workaround broken scrollkeeper that doesn't remove its files on # uninstall. distuninstallcheck_listfiles = find . -type f -print | grep -v scrollkeeper EXTRA_DIST = m4 \ autogen.sh \ depcheck.py \ $(startup_script_in_files) \ xmldocs.make \ omf.make \ gnome-doc-utils.make \ intltool-merge.in \ intltool-update.in \ intltool-extract.in \ i18n_plugin_extractor.py \ CONTRIBUTORS \ TODO \ GenericPlugins \ LanguagePlugins \ Examples \ compile.py \ removepyc.py \ scribesplugin \ scribesmodule \ TRANSLATORS DISTCLEANFILES = $(startup_script) \ intltool-extract \ intltool-merge \ intltool-update \ gnome-doc-utils.make all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): install-startupDATA: $(startup_DATA) @$(NORMAL_INSTALL) test -z "$(startupdir)" || $(MKDIR_P) "$(DESTDIR)$(startupdir)" @list='$(startup_DATA)'; test -n "$(startupdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(startupdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(startupdir)" || exit $$?; \ done uninstall-startupDATA: @$(NORMAL_UNINSTALL) @list='$(startup_DATA)'; test -n "$(startupdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(startupdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(startupdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(startupdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-startupDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-startupDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-data-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-startupDATA install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-startupDATA $(startup_script): Makefile $(startup_script_in_files) rm -f $(startup_script) $(startup_script).tmp $(edit) $(startup_script_in_files) > $(startup_script).tmp mv $(startup_script).tmp $(startup_script) install-data-hook: echo "Start byte compiling plugins..." python -OO compile.py echo "Finished byte compiling plugins" if [ -d $(DESTDIR)$(datadir)/scribes/plugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/plugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/plugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/plugins ;\ fi if [ -d $(DESTDIR)$(datadir)/scribes/GenericPlugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ fi if [ -d $(DESTDIR)$(datadir)/scribes/LanguagePlugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ fi if [ -d $(DESTDIR)$(libdir)/scribes ]; then \ echo "removing " $(DESTDIR)$(libdir)/scribes ;\ rm -rf $(DESTDIR)$(libdir)/scribes ;\ echo "removed " $(DESTDIR)$(libdir)/scribes ;\ fi mkdir -p $(DESTDIR)$(libdir)/scribes cp -R GenericPlugins $(DESTDIR)$(libdir)/scribes cp -R LanguagePlugins $(DESTDIR)$(libdir)/scribes cp scribesmodule $(DESTDIR)$(startupdir) cp scribesplugin $(DESTDIR)$(startupdir) chmod 755 $(DESTDIR)$(startupdir)/$(startup_script) chmod 755 $(DESTDIR)$(startupdir)/scribesmodule chmod 755 $(DESTDIR)$(startupdir)/scribesplugin rm -rf $(startup_script) python removepyc.py # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/Examples/0000755000175000017500000000000011242100540015200 5ustar andreasandreasscribes-0.4~r910/Examples/GenericPluginExample/0000755000175000017500000000000011242100540021247 5ustar andreasandreasscribes-0.4~r910/Examples/GenericPluginExample/README0000644000175000017500000000045511242100540022133 0ustar andreasandreasINSTALLATION ============ Close all Scribes windows. Place PluginFoo.py and the Foo folder in ~/.gnome2/scribes/plugins USAGE ===== Press f to activate foo PURPOSE ======= - Shows plugin designers how to write a plugin. - Shows plugin designers how to structure code in Scribes. scribes-0.4~r910/Examples/GenericPluginExample/Foo/0000755000175000017500000000000011242100540021772 5ustar andreasandreasscribes-0.4~r910/Examples/GenericPluginExample/Foo/__init__.py0000644000175000017500000000000011242100540024071 0ustar andreasandreasscribes-0.4~r910/Examples/GenericPluginExample/Foo/Signals.py0000644000175000017500000000045511242100540023750 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "dummy-signal": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/Examples/GenericPluginExample/Foo/Utils.py0000644000175000017500000000013011242100540023436 0ustar andreasandreas# Utility functions shared among modules belong here. def answer_to_life(): return 42 scribes-0.4~r910/Examples/GenericPluginExample/Foo/Exceptions.py0000644000175000017500000000011511242100540024462 0ustar andreasandreas# Custom exceptions belong in this module. class FooError(Exception): pass scribes-0.4~r910/Examples/GenericPluginExample/Foo/Trigger.py0000644000175000017500000000221011242100540023742 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor name, shortcut, description, category = ( "activate-foo-power", "f", _("Activate the holy power of foo"), _("Example") ) self.__trigger = self.create_trigger(name, shortcut, description, category) self.__manager = None return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __activate(self): try: self.__manager.activate() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False scribes-0.4~r910/Examples/GenericPluginExample/Foo/Foo.py0000644000175000017500000000161111242100540023066 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Foo(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __foo(self): message = "Witness the awesome power of Foo!" title = "Foo Power" # Update the message bar. self.__editor.update_message(message, "yes", 10) # Show a window containing Foo message. self.__editor.show_info(title, message, self.__editor.window) return False def __activate_cb(self, *args): self.__foo() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/Examples/GenericPluginExample/Foo/Manager.py0000644000175000017500000000042611242100540023720 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Foo import Foo Foo(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False scribes-0.4~r910/Examples/GenericPluginExample/PluginFoo.py0000644000175000017500000000120511242100540023521 0ustar andreasandreasname = "Foo Plugin" authors = ["Lateef Alabi-Oki "] version = 0.1 autoload = True class_name = "FooPlugin" short_description = "Unleashes Foo's awesome powers!" long_description = """A demonstration plugin that shows an information window and updates the message bar. This plugin shows plugin designers how to write plugins and structure code in Scribes""" class FooPlugin(object): def __init__(self, editor): self.__editor = editor self.__trigger = None def load(self): from Foo.Trigger import Trigger self.__trigger = Trigger(self.__editor) return def unload(self): self.__trigger.destroy() return scribes-0.4~r910/intltool-merge0000644000175000017500000011473311242100540016317 0ustar andreasandreas#!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Merger # # Copyright (C) 2000, 2003 Free Software Foundation. # Copyright (C) 2000, 2001 Eazel, Inc # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Maciej Stachowiak # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUOTED_STYLE_ARG = 0; my $QUOTEDXML_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "quoted-style" => \$QUOTED_STYLE_ARG, "quotedxml-style" => \$QUOTEDXML_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || "iconv"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file -l >$devnull") == 0)); return 0; } if (! isProgramInPath ("$iconv")) { print STDERR " *** iconv is not found on this system!\n". " *** Without it, intltool-merge can not convert encodings.\n"; exit; } # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; "ed_merge_translations($QUOTEDXML_STYLE_ARG); &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style --quoted-style includes translations in the quoted string style --quotedxml-style includes translations in the quoted xml string style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { if (my $linguas = $ENV{"LINGUAS"}) { for my $lang (split / /, $linguas) { my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } else { if (open LINGUAS_FILE, "$PO_DIR/LINGUAS") { while () { next if /^#/; for my $lang (split) { chomp ($lang); my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } close LINGUAS_FILE; } else { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/usr/lib/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\]+)*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\]+)*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\]+)*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } # entity_encode: (string) # # Encode the given string to XML format (encode '<' etc). sub entity_encode { my ($pre_encoded) = @_; my @list_of_chars = unpack ('C*', $pre_encoded); # with UTF-8 we only encode minimalistic return join ('', map (&entity_encode_int_minimalist, @list_of_chars)); } sub entity_encode_int_minimalist { return """ if $_ == 34; return "&" if $_ == 38; return "'" if $_ == 39; return "<" if $_ == 60; return ">" if $_ == 62; return chr $_; } sub entity_encoded_translation { my ($lang, $string) = @_; my $translation = $translations{$lang, $string}; return $string if !$translation; return entity_encode ($translation); } ## XML (bonobo-activation specific) merge code sub ba_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } if ( ! -d "C" ) { mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n"; } open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED C/$OUTFILE\n" unless $QUIET_ARG; } else { open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } } sub keys_merge_translation { my ($lang) = @_; if ( ! -d $lang && $MULTIPLE_OUTPUT) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n"; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; if (!$MULTIPLE_OUTPUT) { print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { my $non_translated_line = $_; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $_ = $non_translated_line; s/(\w+)=.*/$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { keys_merge_translation ($lang); } keys_merge_translation ("C"); } else { keys_merge_translation ("."); } } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub quoted_translation { my ($xml_mode, $lang, $string) = @_; $string = entity_decode($string) if $xml_mode; $string =~ s/\\\"/\"/g; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $translation = entity_encode($translation) if $xml_mode; $translation =~ s/\"/\\\"/g; return $translation } sub quoted_merge_translations { my ($xml_mode) = @_; if (!$MULTIPLE_OUTPUT) { print "Quoted only supports Multiple Output.\n"; exit(1); } for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($xml_mode, $lang, $1) . "\""/ge; print OUTPUT; } close OUTPUT; close INPUT; } } scribes-0.4~r910/configure0000755000175000017500000067112311242100540015343 0ustar andreasandreas#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for scribes 0.4-dev-build910. # # Report bugs to <>. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='scribes' PACKAGE_TARNAME='scribes' PACKAGE_VERSION='0.4-dev-build910' PACKAGE_STRING='scribes 0.4-dev-build910' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="configure.ac" ac_default_prefix=/usr # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON DISABLE_DEPRECATED WARN_CXXFLAGS WARN_CFLAGS HAVE_GNOME_DOC_UTILS_FALSE HAVE_GNOME_DOC_UTILS_TRUE DISTCHECK_CONFIGURE_FLAGS ENABLE_SK_FALSE ENABLE_SK_TRUE DOC_USER_FORMATS OMF_DIR HELP_DIR PKG_CONFIG LN_S YELP SED MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES CATOBJEXT CATALOGS MSGFMT_OPTS EGREP GREP CPP GETTEXT_PACKAGE DATADIRNAME am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ALL_LINGUAS INTLTOOL_PERL GMSGFMT MSGFMT MSGMERGE XGETTEXT INTLTOOL_POLICY_RULE INTLTOOL_SERVICE_RULE INTLTOOL_THEME_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_CAVES_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_XML_RULE INTLTOOL_KBD_RULE INTLTOOL_XAM_RULE INTLTOOL_UI_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_SHEET_RULE INTLTOOL_SERVER_RULE INTLTOOL_PONG_RULE INTLTOOL_OAF_RULE INTLTOOL_PROP_RULE INTLTOOL_KEYS_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_DESKTOP_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_nls enable_dependency_tracking with_help_dir with_omf_dir with_help_formats enable_scrollkeeper enable_compile_warnings enable_iso_c enable_cxx_warnings enable_iso_cxx ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures scribes 0.4-dev-build910 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/scribes] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of scribes 0.4-dev-build910:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-nls do not use Native Language Support --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-scrollkeeper do not make updates to the scrollkeeper database --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings --enable-iso-c Try to warn if code is not ISO C --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings. --enable-iso-cxx Try to warn if code is not ISO C++ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-help-dir=DIR path to help docs --with-omf-dir=DIR path to OMF files --with-help-formats=FORMATS list of formats Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <>. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF scribes configure 0.4-dev-build910 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by scribes $as_me 0.4-dev-build910, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #GNOME_COMMON_INIT am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='scribes' VERSION='0.4-dev-build910' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' _am_tools=${am_cv_prog_tar_pax-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test "${am_cv_prog_tar_pax+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #AM_SILENT_RULES([yes]) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case "$am__api_version" in 1.01234) as_fn_error "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 ;; *) ;; esac if test -n "0.35.0"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5 $as_echo_n "checking for intltool >= 0.35.0... " >&6; } INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || as_fn_error "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 fi # Extract the first word of "intltool-update", so it can be a program name with args. set dummy intltool-update; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_UPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE if test -n "$INTLTOOL_UPDATE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 $as_echo "$INTLTOOL_UPDATE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-merge", so it can be a program name with args. set dummy intltool-merge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE if test -n "$INTLTOOL_MERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 $as_echo "$INTLTOOL_MERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-extract", so it can be a program name with args. set dummy intltool-extract; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_EXTRACT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT if test -n "$INTLTOOL_EXTRACT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 $as_echo "$INTLTOOL_EXTRACT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then as_fn_error "The intltool scripts were not found. Please install intltool." "$LINENO" 5 fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Check the gettext tools to make sure they are GNU # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGMERGE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 $as_echo "$INTLTOOL_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_PERL"; then as_fn_error "perl not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 $as_echo_n "checking for perl >= 5.8.1... " >&6; } $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then as_fn_error "perl 5.8.1 is required for intltool" "$LINENO" 5 else IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 $as_echo "$IT_PERL_VERSION" >&6; } fi if test "x" != "xno-xml"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 $as_echo_n "checking for XML::Parser... " >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else as_fn_error "XML::Parser perl module is required for intltool" "$LINENO" 5 fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi GETTEXT_PACKAGE=scribes cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="de fr nl it pt_BR sv zh_CN" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = x""yes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES # Checks for programs. # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SED in [\\/]* | ?:[\\/]*) ac_cv_path_SED="$SED" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SED=$ac_cv_path_SED if test -n "$SED"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi #AC_PATH_PROG([GCONFTOOL], [gconftool-2]) # Extract the first word of "yelp", so it can be a program name with args. set dummy yelp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_YELP+set}" = set; then : $as_echo_n "(cached) " >&6 else case $YELP in [\\/]* | ?:[\\/]*) ac_cv_path_YELP="$YELP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_YELP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi YELP=$ac_cv_path_YELP if test -n "$YELP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YELP" >&5 $as_echo "$YELP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi gdu_cv_version_required=0.3.2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gnome-doc-utils >= $gdu_cv_version_required" >&5 $as_echo_n "checking gnome-doc-utils >= $gdu_cv_version_required... " >&6; } if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then gdu_cv_have_gdu=yes else gdu_cv_have_gdu=no fi if test "$gdu_cv_have_gdu" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error "gnome-doc-utils >= $gdu_cv_version_required not found" "$LINENO" 5 fi # Check whether --with-help-dir was given. if test "${with_help_dir+set}" = set; then : withval=$with_help_dir; else with_help_dir='${datadir}/gnome/help' fi HELP_DIR="$with_help_dir" # Check whether --with-omf-dir was given. if test "${with_omf_dir+set}" = set; then : withval=$with_omf_dir; else with_omf_dir='${datadir}/omf' fi OMF_DIR="$with_omf_dir" # Check whether --with-help-formats was given. if test "${with_help_formats+set}" = set; then : withval=$with_help_formats; else with_help_formats='' fi DOC_USER_FORMATS="$with_help_formats" # Check whether --enable-scrollkeeper was given. if test "${enable_scrollkeeper+set}" = set; then : enableval=$enable_scrollkeeper; else enable_scrollkeeper=yes fi if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then ENABLE_SK_TRUE= ENABLE_SK_FALSE='#' else ENABLE_SK_TRUE='#' ENABLE_SK_FALSE= fi DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" if test "$gdu_cv_have_gdu" = "yes"; then HAVE_GNOME_DOC_UTILS_TRUE= HAVE_GNOME_DOC_UTILS_FALSE='#' else HAVE_GNOME_DOC_UTILS_TRUE='#' HAVE_GNOME_DOC_UTILS_FALSE= fi # Check whether --enable-compile-warnings was given. if test "${enable_compile_warnings+set}" = set; then : enableval=$enable_compile_warnings; else enable_compile_warnings="maximum" fi warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 $as_echo_n "checking whether gcc understands $option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : has_option=yes else has_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 $as_echo "$has_option" >&6; } if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) as_fn_error "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5 ;; esac CFLAGS="$realsave_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 $as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_flags" >&5 $as_echo "$warning_flags" >&6; } # Check whether --enable-iso-c was given. if test "${enable_iso_c+set}" = set; then : enableval=$enable_iso_c; else enable_iso_c=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C compiler" >&5 $as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; } complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ \ -ansi\ \ *) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *\ \ -pedantic\ \ *) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCFLAGS" >&5 $as_echo "$complCFLAGS" >&6; } WARN_CFLAGS="$warning_flags $complCFLAGS" # Check whether --enable-cxx-warnings was given. if test "${enable_cxx_warnings+set}" = set; then : enableval=$enable_cxx_warnings; else enable_cxx_warnings="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C++ compiler" >&5 $as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; } warnCXXFLAGS= if test "x$GXX" != xyes; then enable_cxx_warnings=no fi if test "x$enable_cxx_warnings" != "xno"; then if test "x$GXX" = "xyes"; then case " $CXXFLAGS " in *\ \ -Wall\ \ *) ;; *) warnCXXFLAGS="-Wall -Wno-unused" ;; esac ## -W is not all that useful. And it cannot be controlled ## with individual -Wno-xxx flags, unlike -Wall if test "x$enable_cxx_warnings" = "xyes"; then warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warnCXXFLAGS" >&5 $as_echo "$warnCXXFLAGS" >&6; } # Check whether --enable-iso-cxx was given. if test "${enable_iso_cxx+set}" = set; then : enableval=$enable_iso_cxx; else enable_iso_cxx=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C++ compiler" >&5 $as_echo_n "checking what language compliance flags to pass to the C++ compiler... " >&6; } complCXXFLAGS= if test "x$enable_iso_cxx" != "xno"; then if test "x$GXX" = "xyes"; then case " $CXXFLAGS " in *\ \ -ansi\ \ *) ;; *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; esac case " $CXXFLAGS " in *\ \ -pedantic\ \ *) ;; *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCXXFLAGS" >&5 $as_echo "$complCXXFLAGS" >&6; } WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" DISABLE_DEPRECATED="" if test $USE_MAINTAINER_MODE = yes; then DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP" for DOMAIN in $DOMAINS; do DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES" done fi #AM_GCONF_SOURCE_2 if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.5" >&5 $as_echo_n "checking whether $PYTHON version >= 2.5... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error "too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.5... " >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then as_fn_error "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if test "${am_cv_python_version+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if test "${am_cv_python_platform+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling See \`config.log' for more details." "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = system("python depcheck.py"); if (result != 0) exit(EXIT_FAILURE); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else as_fn_error "Error: Dependency check failed" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_config_files="$ac_config_files po/Makefile.in Makefile help/Makefile SCRIBES/Makefile SCRIBES/PluginInitializer/Makefile SCRIBES/TriggerSystem/Makefile SCRIBES/TriggerSystem/Bindings/Makefile SCRIBES/URILoader/Makefile SCRIBES/EncodingSystem/Makefile SCRIBES/EncodingSystem/Error/Makefile SCRIBES/EncodingSystem/Error/GUI/Makefile SCRIBES/EncodingSystem/ComboBoxData/Makefile SCRIBES/EncodingSystem/SupportedEncodings/Makefile SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile SCRIBES/SaveProcessInitializer/Makefile SCRIBES/SaveSystem/Makefile SCRIBES/SaveSystem/ExternalProcess/Makefile SCRIBES/GUI/Makefile SCRIBES/GUI/MainGUI/Makefile SCRIBES/GUI/MainGUI/StatusBar/Makefile SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile SCRIBES/GUI/MainGUI/Window/Makefile SCRIBES/GUI/MainGUI/Toolbar/Makefile SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile SCRIBES/GUI/MainGUI/View/Makefile SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile SCRIBES/GUI/MainGUI/Buffer/Makefile SCRIBES/GUI/InformationWindow/Makefile data/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi ac_config_commands="$ac_config_commands po/stamp-it" if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then as_fn_error "conditional \"ENABLE_SK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then as_fn_error "conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by scribes $as_me 0.4-dev-build910, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to <>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ scribes config.status 0.4-dev-build910 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "SCRIBES/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/Makefile" ;; "SCRIBES/PluginInitializer/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/PluginInitializer/Makefile" ;; "SCRIBES/TriggerSystem/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/TriggerSystem/Makefile" ;; "SCRIBES/TriggerSystem/Bindings/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/TriggerSystem/Bindings/Makefile" ;; "SCRIBES/URILoader/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/URILoader/Makefile" ;; "SCRIBES/EncodingSystem/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/Makefile" ;; "SCRIBES/EncodingSystem/Error/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/Error/Makefile" ;; "SCRIBES/EncodingSystem/Error/GUI/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/Error/GUI/Makefile" ;; "SCRIBES/EncodingSystem/ComboBoxData/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/ComboBoxData/Makefile" ;; "SCRIBES/EncodingSystem/SupportedEncodings/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/SupportedEncodings/Makefile" ;; "SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile" ;; "SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile" ;; "SCRIBES/SaveProcessInitializer/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/SaveProcessInitializer/Makefile" ;; "SCRIBES/SaveSystem/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/SaveSystem/Makefile" ;; "SCRIBES/SaveSystem/ExternalProcess/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/SaveSystem/ExternalProcess/Makefile" ;; "SCRIBES/GUI/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/Makefile" ;; "SCRIBES/GUI/MainGUI/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Makefile" ;; "SCRIBES/GUI/MainGUI/StatusBar/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/StatusBar/Makefile" ;; "SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile" ;; "SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile" ;; "SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile" ;; "SCRIBES/GUI/MainGUI/Window/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Window/Makefile" ;; "SCRIBES/GUI/MainGUI/Toolbar/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Toolbar/Makefile" ;; "SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile" ;; "SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile" ;; "SCRIBES/GUI/MainGUI/View/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/View/Makefile" ;; "SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile" ;; "SCRIBES/GUI/MainGUI/Buffer/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/MainGUI/Buffer/Makefile" ;; "SCRIBES/GUI/InformationWindow/Makefile") CONFIG_FILES="$CONFIG_FILES SCRIBES/GUI/InformationWindow/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then as_fn_error "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 fi rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.in" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi scribes-0.4~r910/compile.py0000644000175000017500000000025111242100540015422 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- from compileall import compile_dir compile_dir("GenericPlugins/", force=True) compile_dir("LanguagePlugins/", force=True) scribes-0.4~r910/m4/0000755000175000017500000000000011242100540013742 5ustar andreasandreasscribes-0.4~r910/m4/progtest.m40000644000175000017500000000555011242100540016060 0ustar andreasandreas# progtest.m4 serial 4 (gettext-0.14.2) dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ(2.50) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) scribes-0.4~r910/m4/.cvsignore0000644000175000017500000000005211242100540015737 0ustar andreasandreasintltool.m4 gnome-doc-utils.m4 gtk-doc.m4 scribes-0.4~r910/m4/python.m40000644000175000017500000000345011242100540015527 0ustar andreasandreas## this one is commonly used with AM_PATH_PYTHONDIR ... dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) dnl Check if a module containing a given symbol is visible to python. AC_DEFUN(AM_CHECK_PYMOD, [AC_REQUIRE([AM_PATH_PYTHON]) py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ ifelse([$2],[], [prog=" import sys try: import $1 except ImportError: sys.exit(1) except: sys.exit(0) sys.exit(0)"], [prog=" import $1 $1.$2"]) if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC then eval "py_cv_mod_$py_mod_var=yes" else eval "py_cv_mod_$py_mod_var=no" fi ]) py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` if test "x$py_val" != xno; then AC_MSG_RESULT(yes) ifelse([$3], [],, [$3 ])dnl else AC_MSG_RESULT(no) ifelse([$4], [],, [$4 ])dnl fi ]) dnl a macro to check for ability to create python extensions dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) dnl function also defines PYTHON_INCLUDES AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" if test "$py_prefix" != "$py_exec_prefix"; then PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" fi AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" AC_TRY_CPP([#include ],dnl [AC_MSG_RESULT(found) $1],dnl [AC_MSG_RESULT(not found) $2]) CPPFLAGS="$save_CPPFLAGS" ]) scribes-0.4~r910/m4/gettext.m40000644000175000017500000004673211242100540015704 0ustar andreasandreas# gettext.m4 serial 37 (gettext-0.14.4) dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], [no], [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AM_NLS ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([gt_GLIBC2])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([bh_C_SIGNED])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([gl_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_XSIZE])dnl AC_REQUIRE([gt_INTL_MACOSX])dnl AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). gt_CHECK_DECL(_snprintf, [#include ]) gt_CHECK_DECL(_snwprintf, [#include ]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(feof_unlocked, [#include ]) gt_CHECK_DECL(fgets_unlocked, [#include ]) gt_CHECK_DECL(getc_unlocked, [#include ]) case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac AC_SUBST([HAVE_POSIX_PRINTF]) if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi AC_SUBST([HAVE_ASPRINTF]) if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi AC_SUBST([HAVE_SNPRINTF]) if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi AC_SUBST([HAVE_WPRINTF]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then gt_LC_MESSAGES fi if test -n "$INTL_MACOSX_LIBS"; then CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" gt_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" gt_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) dnl gt_CHECK_DECL(FUNC, INCLUDES) dnl Check whether a function is declared. AC_DEFUN([gt_CHECK_DECL], [ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, [AC_TRY_COMPILE([$2], [ #ifndef $1 char *p = (char *) $1; #endif ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) if test $ac_cv_have_decl_$1 = yes; then gt_value=1 else gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) scribes-0.4~r910/m4/intltool.m40000644000175000017500000002421511242100540016054 0ustar andreasandreas## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- ## Copyright (C) 2001 Eazel, Inc. ## Author: Maciej Stachowiak ## Kenneth Christiansen ## ## 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. ## ## As a special exception to the GNU General Public License, if you ## distribute this file as part of a program that contains a ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 40 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ AC_PREREQ([2.50])dnl AC_REQUIRE([AM_NLS])dnl case "$am__api_version" in 1.[01234]) AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) ;; *) ;; esac if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' _IT_SUBST(INTLTOOL_DESKTOP_RULE) _IT_SUBST(INTLTOOL_DIRECTORY_RULE) _IT_SUBST(INTLTOOL_KEYS_RULE) _IT_SUBST(INTLTOOL_PROP_RULE) _IT_SUBST(INTLTOOL_OAF_RULE) _IT_SUBST(INTLTOOL_PONG_RULE) _IT_SUBST(INTLTOOL_SERVER_RULE) _IT_SUBST(INTLTOOL_SHEET_RULE) _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) _IT_SUBST(INTLTOOL_UI_RULE) _IT_SUBST(INTLTOOL_XAM_RULE) _IT_SUBST(INTLTOOL_KBD_RULE) _IT_SUBST(INTLTOOL_XML_RULE) _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) _IT_SUBST(INTLTOOL_CAVES_RULE) _IT_SUBST(INTLTOOL_SCHEMAS_RULE) _IT_SUBST(INTLTOOL_THEME_RULE) _IT_SUBST(INTLTOOL_SERVICE_RULE) _IT_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found]) fi AC_MSG_CHECKING([for perl >= 5.8.1]) $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then AC_MSG_ERROR([perl 5.8.1 is required for intltool]) else IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" AC_MSG_RESULT([$IT_PERL_VERSION]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr]])], [DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share dnl in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [DATADIRNAME=share], [DATADIRNAME=lib]) ;; *) [DATADIRNAME=lib] ;; esac]) fi AC_SUBST(DATADIRNAME) IT_PO_SUBDIR([po]) ]) # IT_PO_SUBDIR(DIRNAME) # --------------------- # All po subdirs have to be declared with this macro; the subdir "po" is # declared by IT_PROG_INTLTOOL. # AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl dnl The following CONFIG_COMMANDS should be exetuted at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) fi rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.in" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) # _IT_SUBST(VARIABLE) # ------------------- # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST # AC_DEFUN([_IT_SUBST], [ AC_SUBST([$1]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) ] ) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) scribes-0.4~r910/m4/lcmessage.m40000644000175000017500000000240411242100540016147 0ustar andreasandreas# lcmessage.m4 serial 4 (gettext-0.14.2) dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([gt_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) if test $gt_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) scribes-0.4~r910/m4/gtk-doc.m40000644000175000017500000000255611242100540015544 0ustar andreasandreasdnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST(HTML_DIR) dnl enable/disable documentation building AC_ARG_ENABLE(gtk-doc, AC_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [default=no]]),, enable_gtk_doc=no) have_gtk_doc=no if test x$enable_gtk_doc = xyes; then if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then have_gtk_doc=yes fi dnl do we want to do a version check? ifelse([$1],[],, [gtk_doc_min_version=$1 if test "$have_gtk_doc" = yes; then AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) have_gtk_doc=no fi fi ]) if test "$have_gtk_doc" != yes; then enable_gtk_doc=no fi fi AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") ]) scribes-0.4~r910/m4/iconv.m40000644000175000017500000000642611242100540015332 0ustar andreasandreas# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) scribes-0.4~r910/m4/glibc2.m40000644000175000017500000000135411242100540015351 0ustar andreasandreas# glibc2.m4 serial 1 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.0 or newer. # From Bruno Haible. AC_DEFUN([gt_GLIBC2], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, ac_cv_gnu_library_2, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2=yes, ac_cv_gnu_library_2=no) ] ) AC_SUBST(GLIBC2) GLIBC2="$ac_cv_gnu_library_2" ] ) scribes-0.4~r910/m4/isc-posix.m40000644000175000017500000000170611242100540016126 0ustar andreasandreas# isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) scribes-0.4~r910/m4/gnome-doc-utils.m40000644000175000017500000000342311242100540017214 0ustar andreasandreasdnl Do not call GNOME_DOC_DEFINES directly. It is split out from dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself. AC_DEFUN([GNOME_DOC_DEFINES], [ AC_ARG_WITH([help-dir], AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),, [with_help_dir='${datadir}/gnome/help']) HELP_DIR="$with_help_dir" AC_SUBST(HELP_DIR) AC_ARG_WITH([omf-dir], AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),, [with_omf_dir='${datadir}/omf']) OMF_DIR="$with_omf_dir" AC_SUBST(OMF_DIR) AC_ARG_WITH([help-formats], AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),, [with_help_formats='']) DOC_USER_FORMATS="$with_help_formats" AC_SUBST(DOC_USER_FORMATS) AC_ARG_ENABLE([scrollkeeper], [AC_HELP_STRING([--disable-scrollkeeper], [do not make updates to the scrollkeeper database])],, enable_scrollkeeper=yes) AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"]) dnl disable scrollkeeper automatically for distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"]) ]) # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) # AC_DEFUN([GNOME_DOC_INIT], [AC_REQUIRE([AC_PROG_LN_S])dnl ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1]) AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required]) PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required], [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no]) if test "$gdu_cv_have_gdu" = "yes"; then AC_MSG_RESULT([yes]) ifelse([$2],,[:],[$2]) else AC_MSG_RESULT([no]) ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3]) fi GNOME_DOC_DEFINES ]) scribes-0.4~r910/m4/codeset.m40000644000175000017500000000135111242100540015632 0ustar andreasandreas# codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) scribes-0.4~r910/omf.make0000644000175000017500000000435011242100540015044 0ustar andreasandreas# # No modifications of this Makefile should be necessary. # # This file contains the build instructions for installing OMF files. It is # generally called from the makefiles for particular formats of documentation. # # Note that you must configure your package with --localstatedir=/var # so that the scrollkeeper-update command below will update the database # in the standard scrollkeeper directory. # # If it is impossible to configure with --localstatedir=/var, then # modify the definition of scrollkeeper_localstate_dir so that # it points to the correct location. Note that you must still use # $(localstatedir) in this or when people build RPMs it will update # the real database on their system instead of the one under RPM_BUILD_ROOT. # # Note: This make file is not incorporated into xmldocs.make because, in # general, there will be other documents install besides XML documents # and the makefiles for these formats should also include this file. # # About this file: # This file was derived from scrollkeeper_example2, a package # illustrating how to install documentation and OMF files for use with # ScrollKeeper 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.3 (last updated: March 20, 2002) # omf_dest_dir=$(datadir)/omf/@PACKAGE@ scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper # At some point, it may be wise to change to something like this: # scrollkeeper_localstate_dir = @SCROLLKEEPER_STATEDIR@ omf: omf_timestamp omf_timestamp: $(omffile) -for file in $(omffile); do \ scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \ done; \ touch omf_timestamp install-data-hook-omf: $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir) for file in $(omffile); do \ $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \ done -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) uninstall-local-omf: -for file in $(srcdir)/*.omf; do \ basefile=`basename $$file`; \ rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \ done -rmdir $(DESTDIR)$(omf_dest_dir) -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) clean-local-omf: -for file in $(omffile); do \ rm -f $$file.out; \ done scribes-0.4~r910/configure.ac0000644000175000017500000000470011242100540015711 0ustar andreasandreas# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT([scribes],[0.4-dev-build910],[]) #GNOME_COMMON_INIT AC_PREREQ(2.63) AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip tar-pax]) AM_MAINTAINER_MODE([enabled]) #AM_SILENT_RULES([yes]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([configure.ac]) AC_PREFIX_DEFAULT([/usr]) IT_PROG_INTLTOOL([0.35.0]) dnl ================================================================ dnl Gettext stuff. dnl ================================================================ GETTEXT_PACKAGE=scribes AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) ALL_LINGUAS="de fr nl it pt_BR sv zh_CN" AM_GLIB_GNU_GETTEXT # Checks for programs. AC_PATH_PROG([SED], [sed]) #AC_PATH_PROG([GCONFTOOL], [gconftool-2]) AC_PATH_PROG([YELP], [yelp]) GNOME_DOC_INIT GNOME_COMPILE_WARNINGS([maximum]) GNOME_CXX_WARNINGS([yes]) GNOME_MAINTAINER_MODE_DEFINES #AM_GCONF_SOURCE_2 AM_PATH_PYTHON([2.5]) AC_LANG([C]) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]],[[int result = system("python depcheck.py"); if (result != 0) exit(EXIT_FAILURE);]])], [], [AC_MSG_ERROR([Error: Dependency check failed])]) AC_CONFIG_FILES([ po/Makefile.in Makefile help/Makefile SCRIBES/Makefile SCRIBES/PluginInitializer/Makefile SCRIBES/TriggerSystem/Makefile SCRIBES/TriggerSystem/Bindings/Makefile SCRIBES/URILoader/Makefile SCRIBES/EncodingSystem/Makefile SCRIBES/EncodingSystem/Error/Makefile SCRIBES/EncodingSystem/Error/GUI/Makefile SCRIBES/EncodingSystem/ComboBoxData/Makefile SCRIBES/EncodingSystem/SupportedEncodings/Makefile SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile SCRIBES/SaveProcessInitializer/Makefile SCRIBES/SaveSystem/Makefile SCRIBES/SaveSystem/ExternalProcess/Makefile SCRIBES/GUI/Makefile SCRIBES/GUI/MainGUI/Makefile SCRIBES/GUI/MainGUI/StatusBar/Makefile SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile SCRIBES/GUI/MainGUI/Window/Makefile SCRIBES/GUI/MainGUI/Toolbar/Makefile SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile SCRIBES/GUI/MainGUI/View/Makefile SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile SCRIBES/GUI/MainGUI/Buffer/Makefile SCRIBES/GUI/InformationWindow/Makefile data/Makefile] ) AC_OUTPUT scribes-0.4~r910/TODO0000644000175000017500000000000111242100540014101 0ustar andreasandreas scribes-0.4~r910/NEWS0000644000175000017500000000003311242100540014115 0ustar andreasandreasSee ChangeLog for details. scribes-0.4~r910/COPYING0000644000175000017500000004235511242100540014466 0ustar andreasandreasGNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. scribes-0.4~r910/po/0000755000175000017500000000000011242100540014040 5ustar andreasandreasscribes-0.4~r910/po/POTFILES0000644000175000017500000002403011242100540015207 0ustar andreasandreas ../Examples/GenericPluginExample/Foo/Trigger.py \ ../GenericPlugins/About/AboutDialog.glade \ ../GenericPlugins/About/AboutDialog.py \ ../GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade \ ../GenericPlugins/AdvancedConfiguration/MenuItem.py \ ../GenericPlugins/AutoReplace/GUI/TreeView.py \ ../GenericPlugins/AutoReplace/GUI/Window.glade \ ../GenericPlugins/AutoReplace/GUI/Window.py \ ../GenericPlugins/AutoReplace/GUI/i18n.py \ ../GenericPlugins/AutoReplace/MenuItem.py \ ../GenericPlugins/AutoReplace/TextColorer.py \ ../GenericPlugins/AutoReplace/TextInserter.py \ ../GenericPlugins/AutoReplace/i18n.py \ ../GenericPlugins/Bookmark/Feedback.py \ ../GenericPlugins/Bookmark/GUI/GUI.glade \ ../GenericPlugins/Bookmark/Trigger.py \ ../GenericPlugins/BracketCompletion/Manager.py \ ../GenericPlugins/BracketSelection/Feedback.py \ ../GenericPlugins/BracketSelection/Trigger.py \ ../GenericPlugins/Case/CaseProcessor.py \ ../GenericPlugins/Case/Marker.py \ ../GenericPlugins/Case/PopupMenuItem.py \ ../GenericPlugins/Case/Trigger.py \ ../GenericPlugins/CloseReopen/Trigger.py \ ../GenericPlugins/DocumentBrowser/DocumentBrowser.glade \ ../GenericPlugins/DocumentBrowser/TreeView.py \ ../GenericPlugins/DocumentBrowser/Trigger.py \ ../GenericPlugins/DocumentBrowser/Window.py \ ../GenericPlugins/DocumentInformation/DocumentStatistics.glade \ ../GenericPlugins/DocumentInformation/SizeLabel.py \ ../GenericPlugins/DocumentInformation/Trigger.py \ ../GenericPlugins/DocumentInformation/Window.py \ ../GenericPlugins/DocumentSwitcher/Trigger.py \ ../GenericPlugins/DrawWhitespace/Trigger.py \ ../GenericPlugins/EscapeQuotes/Escaper.py \ ../GenericPlugins/EscapeQuotes/Trigger.py \ ../GenericPlugins/FilterThroughCommand/Feedback.py \ ../GenericPlugins/FilterThroughCommand/GUI/ComboBox.py \ ../GenericPlugins/FilterThroughCommand/GUI/GUI.glade \ ../GenericPlugins/FilterThroughCommand/Trigger.py \ ../GenericPlugins/Indent/IndentationProcessor.py \ ../GenericPlugins/Indent/PopupMenuItem.py \ ../GenericPlugins/Indent/Trigger.py \ ../GenericPlugins/LastSessionLoader/Trigger.py \ ../GenericPlugins/LineEndings/Converter.py \ ../GenericPlugins/LineEndings/PopupMenuItem.py \ ../GenericPlugins/LineEndings/Trigger.py \ ../GenericPlugins/LineJumper/GUI/GUI.glade \ ../GenericPlugins/LineJumper/GUI/LineLabel.py \ ../GenericPlugins/LineJumper/LineJumper.py \ ../GenericPlugins/LineJumper/Trigger.py \ ../GenericPlugins/Lines/LineOperator.py \ ../GenericPlugins/Lines/PopupMenuItem.py \ ../GenericPlugins/Lines/Trigger.py \ ../GenericPlugins/MatchingBracket/Manager.py \ ../GenericPlugins/MatchingBracket/Trigger.py \ ../GenericPlugins/MultiEdit/FeedbackManager.py \ ../GenericPlugins/MultiEdit/Trigger.py \ ../GenericPlugins/NewWindow/Trigger.py \ ../GenericPlugins/OpenFile/NewFileDialogGUI/FeedbackLabel.py \ ../GenericPlugins/OpenFile/NewFileDialogGUI/FileCreator.py \ ../GenericPlugins/OpenFile/NewFileDialogGUI/InfoLabel.py \ ../GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade \ ../GenericPlugins/OpenFile/NewFileDialogGUI/Validator.py \ ../GenericPlugins/OpenFile/NewFileDialogGUI/Window.py \ ../GenericPlugins/OpenFile/OpenDialogGUI/GUI/GUI.glade \ ../GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Displayer.py \ ../GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade \ ../GenericPlugins/OpenFile/RemoteDialogGUI/Window.py \ ../GenericPlugins/OpenFile/Trigger.py \ ../GenericPlugins/Paragraph/Manager.py \ ../GenericPlugins/Paragraph/PopupMenuItem.py \ ../GenericPlugins/Paragraph/Trigger.py \ ../GenericPlugins/PreferencesGUI/GUI/GUI.glade \ ../GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/DataModelGenerator.py \ ../GenericPlugins/PreferencesGUI/Trigger.py \ ../GenericPlugins/Printing/Feedback.py \ ../GenericPlugins/Printing/Trigger.py \ ../GenericPlugins/QuickOpen/Feedback.py \ ../GenericPlugins/QuickOpen/GUI/GUI.glade \ ../GenericPlugins/QuickOpen/Trigger.py \ ../GenericPlugins/Readonly/Trigger.py \ ../GenericPlugins/RecentOpen/ExternalProcess/DataGenerator.py \ ../GenericPlugins/RecentOpen/ExternalProcess/Feedback.py \ ../GenericPlugins/RecentOpen/ExternalProcess/GUI/GUI.glade \ ../GenericPlugins/RecentOpen/ExternalProcess/__init__.py \ ../GenericPlugins/RecentOpen/ProcessCommunicator.py \ ../GenericPlugins/RecentOpen/Trigger.py \ ../GenericPlugins/SaveDialog/GUI/FeedbackUpdater.py \ ../GenericPlugins/SaveDialog/GUI/FileChooser/URISelector.py \ ../GenericPlugins/SaveDialog/GUI/GUI.glade \ ../GenericPlugins/SaveDialog/Trigger.py \ ../GenericPlugins/SaveFile/Trigger.py \ ../GenericPlugins/ScrollNavigation/Manager.py \ ../GenericPlugins/ScrollNavigation/Trigger.py \ ../GenericPlugins/SearchSystem/GUI/Bar.py \ ../GenericPlugins/SearchSystem/GUI/ComboBox.py \ ../GenericPlugins/SearchSystem/GUI/FindBar.glade \ ../GenericPlugins/SearchSystem/GUI/MenuComboBox.py \ ../GenericPlugins/SearchSystem/MatchIndexer.py \ ../GenericPlugins/SearchSystem/PatternCreator.py \ ../GenericPlugins/SearchSystem/ReplaceManager.py \ ../GenericPlugins/SearchSystem/Searcher.py \ ../GenericPlugins/SearchSystem/Trigger.py \ ../GenericPlugins/Selection/PopupMenuItem.py \ ../GenericPlugins/Selection/Selector.py \ ../GenericPlugins/Selection/Trigger.py \ ../GenericPlugins/SelectionSearcher/MatchIndexer.py \ ../GenericPlugins/SelectionSearcher/MatchNavigator.py \ ../GenericPlugins/SelectionSearcher/PatternCreator.py \ ../GenericPlugins/SelectionSearcher/Trigger.py \ ../GenericPlugins/ShortcutWindow/Trigger.py \ ../GenericPlugins/Spaces/PopupMenuItem.py \ ../GenericPlugins/Spaces/SpaceProcessor.py \ ../GenericPlugins/Spaces/Trigger.py \ ../GenericPlugins/SwitchCharacter/Switcher.py \ ../GenericPlugins/SwitchCharacter/Trigger.py \ ../GenericPlugins/TemplateEditor/EditorGUI/GUI.glade \ ../GenericPlugins/TemplateEditor/EditorGUI/Window.py \ ../GenericPlugins/TemplateEditor/Export/GUI/FileChooser.py \ ../GenericPlugins/TemplateEditor/Export/GUI/GUI.glade \ ../GenericPlugins/TemplateEditor/Import/GUI/FileChooser.py \ ../GenericPlugins/TemplateEditor/Import/GUI/GUI.glade \ ../GenericPlugins/TemplateEditor/Import/TemplateDataValidator.py \ ../GenericPlugins/TemplateEditor/Import/XMLTemplateValidator.py \ ../GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeView.py \ ../GenericPlugins/TemplateEditor/MainGUI/GUI.glade \ ../GenericPlugins/TemplateEditor/MainGUI/LanguageTreeView.py \ ../GenericPlugins/TemplateEditor/MenuItem.py \ ../GenericPlugins/TemplateEditor/Trigger.py \ ../GenericPlugins/Templates/utils.py \ ../GenericPlugins/ThemeSelector/Feedback.py \ ../GenericPlugins/ThemeSelector/GUI/FileChooserGUI/FileChooser.py \ ../GenericPlugins/ThemeSelector/GUI/FileChooserGUI/GUI.glade \ ../GenericPlugins/ThemeSelector/GUI/MainGUI/GUI.glade \ ../GenericPlugins/ThemeSelector/MenuItem.py \ ../GenericPlugins/ThemeSelector/Trigger.py \ ../GenericPlugins/TriggerArea/GUI/GUI.glade \ ../GenericPlugins/TriggerArea/MenuItem.py \ ../GenericPlugins/TriggerArea/Trigger.py \ ../GenericPlugins/UndoRedo/Trigger.py \ ../GenericPlugins/UserGuide/Trigger.py \ ../GenericPlugins/WordCompletion/Manager.py \ ../GenericPlugins/WordCompletion/SuggestionProcess/__init__.py \ ../GenericPlugins/WordCompletion/Trigger.py \ ../LanguagePlugins/HashComments/Trigger.py \ ../LanguagePlugins/HashComments/i18n.py \ ../LanguagePlugins/JavaScriptComment/FeedbackManager.py \ ../LanguagePlugins/JavaScriptComment/Trigger.py \ ../LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/cli.py \ ../LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/__init__.py \ ../LanguagePlugins/PythonErrorChecker/Feedback.py \ ../LanguagePlugins/PythonErrorChecker/Trigger.py \ ../LanguagePlugins/PythonNavigationSelection/Trigger.py \ ../LanguagePlugins/PythonSymbolBrowser/SymbolBrowser.glade \ ../LanguagePlugins/PythonSymbolBrowser/Trigger.py \ ../LanguagePlugins/Sparkup/Feedback.py \ ../LanguagePlugins/Sparkup/GUI/GUI.glade \ ../LanguagePlugins/Sparkup/Trigger.py \ ../LanguagePlugins/zencoding/GUI/GUI.glade \ ../LanguagePlugins/zencoding/Trigger.py \ ../SCRIBES/CommandLineParser.py \ ../SCRIBES/DialogFilters.py \ ../SCRIBES/EncodingSystem/ComboBoxData/Generator.py \ ../SCRIBES/EncodingSystem/Error/GUI/GUI.glade \ ../SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py \ ../SCRIBES/EncodingSystem/SupportedEncodings/GUI/GUI.glade \ ../SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py \ ../SCRIBES/GUI/InformationWindow/MessageWindow.glade \ ../SCRIBES/GUI/InformationWindow/WindowTitleUpdater.py \ ../SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py \ ../SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ClipboardHandler.py \ ../SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/FileLoadHandler.py \ ../SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ReadonlyHandler.py \ ../SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/SavedHandler.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/GotoToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/HelpToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/NewToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/OpenToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PreferenceToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PrintToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RecentMenu.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RedoToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/ReplaceToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SaveToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SearchToolButton.py \ ../SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/UndoToolButton.py \ ../SCRIBES/GUI/MainGUI/Window/TitleUpdater.py \ ../SCRIBES/PluginInitializer/ErrorManager.py \ ../SCRIBES/SaveSystem/FileNameGenerator.py \ ../SCRIBES/SaveSystem/ReadonlyHandler.py \ ../SCRIBES/URILoader/ErrorManager.py \ ../SCRIBES/Utils.py \ ../SCRIBES/i18n.py \ ../data/Editor.glade \ ../data/EncodingErrorWindow.glade \ ../data/EncodingSelectionWindow.glade \ ../data/MessageWindow.glade \ ../data/ModificationDialog.glade \ ../data/scribes.desktop.in scribes-0.4~r910/po/nl.po0000644000175000017500000021765611242100540015032 0ustar andreasandreas# translation of nl.po to Nederlands # Language =nl translations for scribes package. # Copyright (C) 2007 THE scribes'S COPYRIGHT HOLDER # This file is distributed under the same license as the scribes package. # # Filip Vervloesem , 2007. msgid "" msgstr "" "Project-Id-Version: nl\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-03-16 23:37+0100\n" "PO-Revision-Date: 2007-03-17 01:43+0100\n" "Last-Translator: Filip Vervloesem \n" "Language-Team: Nederlands \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. .decode(encoding).encode("utf-8") #: ../data/scribes.desktop.in.h:1 ../SCRIBES/internationalization.py:321 msgid "Edit text files" msgstr "Tekstbestanden bewerken" #. .decode(encoding).encode("utf-8") #. From scribes.desktop #: ../data/scribes.desktop.in.h:2 ../SCRIBES/internationalization.py:320 msgid "Scribes Text Editor" msgstr "Scribes tekst-editor" #: ../data/scribes.schemas.in.h:1 msgid "A list of encodings selected by the user." msgstr "Een lijst van door de gebruiker geselecteerde coderingen." #: ../data/scribes.schemas.in.h:2 msgid "Case sensitive" msgstr "Hoofdlettergevoelig" #: ../data/scribes.schemas.in.h:3 msgid "Detach Scribes from the shell terminal" msgstr "Koppel Scribes los van de shell-terminal" #: ../data/scribes.schemas.in.h:4 msgid "" "Determines whether or not to use GTK theme colors when drawing the text " "editor buffer foreground and background colors. If the value is true, the " "GTK theme colors are used. Otherwise the color determined by one assigned by " "the user." msgstr "Bepaalt of de GTK themakleuren gebruikt worden voor de tekst en de achtergrond van het tekstvenster. Deselecteer deze optie om zelf de kleuren te bepalen." #: ../data/scribes.schemas.in.h:5 msgid "Determines whether to show or hide the status area." msgstr "Bepaalt of de statusbalk getoond wordt of niet." #: ../data/scribes.schemas.in.h:6 msgid "Determines whether to show or hide the toolbar." msgstr "Bepaalt of de werkbalk getoond wordt of niet." #: ../data/scribes.schemas.in.h:7 msgid "Editor background color" msgstr "Achtergrondkleur voor het tekstvenster" #: ../data/scribes.schemas.in.h:8 msgid "Editor foreground color" msgstr "Tekstkleur voor het tekstvenster" #: ../data/scribes.schemas.in.h:9 msgid "Editor's font" msgstr "Lettertype voor het tekstvenster" #: ../data/scribes.schemas.in.h:10 msgid "Enable or disable spell checking" msgstr "Spellingscontrole in- of uitschakelen" #: ../data/scribes.schemas.in.h:11 msgid "Enables or disables right margin" msgstr "Rechterkantlijn in- of uitschakelen" #: ../data/scribes.schemas.in.h:12 msgid "Enables or disables text wrapping" msgstr "Regelafbreking in- of uitschakelen" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:13 ../SCRIBES/internationalization.py:138 msgid "Find occurrences of the string that match the entire word only" msgstr "Enkel complete woorden als zoekresultaat weergeven" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:14 ../SCRIBES/internationalization.py:136 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "Zoekresultaat hoofdlettergevoelig" #: ../data/scribes.schemas.in.h:15 msgid "Lexical scope highlight color" msgstr "Accentueerkleur voor lexicaal bereik" #: ../data/scribes.schemas.in.h:16 msgid "Match word" msgstr "Enkel complete woorden" #: ../data/scribes.schemas.in.h:17 msgid "Position of margin" msgstr "Positie van de kantlijn" #: ../data/scribes.schemas.in.h:18 msgid "Selected encodings" msgstr "Geselecteerde coderingen" #: ../data/scribes.schemas.in.h:19 msgid "Sets the margin's position within the editor" msgstr "Positie van de kantlijn in het tekstvenster instellen" #: ../data/scribes.schemas.in.h:20 msgid "Sets the width of tab stops within the editor" msgstr "Breedte van de tabstops in tekstvenster instellen" #: ../data/scribes.schemas.in.h:21 msgid "Show margin" msgstr "Kantlijn tonen" #: ../data/scribes.schemas.in.h:22 msgid "Show or hide the status area." msgstr "Statusbalk tonen of verbergen." #: ../data/scribes.schemas.in.h:23 msgid "Show or hide the toolbar." msgstr "Werkbalk tonen of verbergen." #: ../data/scribes.schemas.in.h:24 msgid "Spell checking" msgstr "Spellingscontrole" #: ../data/scribes.schemas.in.h:25 msgid "Tab width" msgstr "Tabbreedte" #: ../data/scribes.schemas.in.h:26 msgid "Text wrapping" msgstr "Regelafbreking" #: ../data/scribes.schemas.in.h:27 msgid "The color used to render normal text in the text editor's buffer." msgstr "De tekstkleur voor het tekstvenster." #: ../data/scribes.schemas.in.h:28 msgid "The color used to render the text editor buffer background." msgstr "De achtergrondkleur voor het tekstvenster." #: ../data/scribes.schemas.in.h:29 msgid "The editor's font. Must be a string value" msgstr "Het lettertype voor het tekstvenster." #: ../data/scribes.schemas.in.h:30 msgid "" "The highlight color when the cursor is around opening or closing pair " "characters." msgstr "De accentueerkleur wanneer de cursor naast overeenkomstige haakjes staat." #: ../data/scribes.schemas.in.h:31 msgid "" "True to detach Scribes from the shell terminal and run it in its own " "process, false otherwise. For debugging purposes, it may be useful to set " "this to false." msgstr "" "Schakel dit in om Scribes los te koppelen van de shell-terminal en in zijn eigen " "proces te draaien. Om fouten op te sporen kan het nuttig zijn om dit uit te schakelen." #: ../data/scribes.schemas.in.h:32 msgid "True to use tabs instead of spaces, false otherwise." msgstr "Schakel dit in om tabs in plaats van spaties te gebruiken." #: ../data/scribes.schemas.in.h:33 msgid "Use GTK theme colors" msgstr "GTK themakleuren gebruiken" #: ../data/scribes.schemas.in.h:34 msgid "Use Tabs instead of spaces" msgstr "Tabs in plaats van spaties gebruiken" #. From module accelerators.py #: ../SCRIBES/internationalization.py:41 ../plugins/UndoRedo/i18n.py:27 msgid "Cannot redo action" msgstr "Actie kan niet ongedaan gemaakt worden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:44 msgid "Leave Fullscreen" msgstr "Schermvullend verlaten" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py, fileloader.py, timeout.py #: ../SCRIBES/internationalization.py:47 ../plugins/SaveDialog/i18n.py:25 msgid "Unsaved Document" msgstr "Niet-opgeslagen document" #. .decode(encoding).encode("utf-8") #. From module filechooser.py #: ../SCRIBES/internationalization.py:51 msgid "All Documents" msgstr "Alle documenten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:52 msgid "Python Documents" msgstr "Python-documenten " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:53 msgid "Text Documents" msgstr "Tekstdocumenten" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:56 #, python-format msgid "Loaded file \"%s\"" msgstr "Bestand \"%s\" geladen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:57 msgid "" "The encoding of the file you are trying to open could not be determined. Try " "opening the file with another encoding." msgstr "De codering van het bestand dat u wilt openen kan niet worden vastgesteld. Probeer het bestand met een andere codering te openen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:59 msgid "Loading file please wait..." msgstr "Bestand wordt geladen, even wachten a.u.b..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:60 msgid "" "An error occurred while openning the file. Please file a bug report at " "http://scribes.sourceforge.net" msgstr "" "Er heeft zich een fout voorgedaan tijdens het openen van het bestand. Vul a." "u.b. een foutrapport in op http://scribes.sourceforge.net" #. .decode(encoding).encode("utf-8") #. From module fileloader.py, savechooser.py #: ../SCRIBES/internationalization.py:64 msgid " " msgstr "" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:67 msgid "You do not have permission to view this file." msgstr "U heeft geen rechten om dit bestand te bekijken." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:68 msgid "The file you are trying to open is not a text file." msgstr "Het bestand dat u probeert te openen is geen tekstbestand." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:69 msgid "The file you are trying to open does not exist." msgstr "Het bestand dat u probeert te openen bestaat niet." #. .decode(encoding).encode("utf-8") #. From module main.py #: ../SCRIBES/internationalization.py:72 #, python-format msgid "Unrecognized option: '%s'" msgstr "Onbekende optie: '%s'" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:73 msgid "Try 'scribes --help' for more information" msgstr "Probeer 'scribes --help' voor meer informatie" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:74 msgid "Scribes only supports using one option at a time" msgstr "Scribes ondersteunt enkel het gebruik van één optie tegelijk" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:75 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s heeft geen argumenten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:76 #, python-format msgid "Scribes version %s" msgstr "Scribes versie %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:77 #, python-format msgid "%s does not exist" msgstr "%s bestaat niet" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:80 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "Het bestand \"%s\" is in alleen-lezen modus geopend" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:81 #, python-format msgid "The file \"%s\" is open" msgstr "Het bestand \"%s\" is geopend" #. .decode(encoding).encode("utf-8") #. From modules findbar.py #: ../SCRIBES/internationalization.py:84 #, python-format msgid "Found %d match" msgstr "%d zoekresultaat gevonden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:85 msgid "_Search for: " msgstr "_Zoek naar: " #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:89 msgid "No indentation selection found" msgstr "Geen inspringing geselecteerd" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:90 ../plugins/Indent/i18n.py:25 msgid "Selection indented" msgstr "Inspringing van selectie vergroot" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:91 ../plugins/Indent/i18n.py:27 msgid "Unindentation is not possible" msgstr "Inspringing verkleinen is onmogelijk" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:92 ../plugins/Indent/i18n.py:28 msgid "Selection unindented" msgstr "Inspringing van selectie verkleind" #. .decode(encoding).encode("utf-8") #. From module modes.py #: ../SCRIBES/internationalization.py:95 msgid "loading..." msgstr "Laden..." #. .decode(encoding).encode("utf-8") #. From module preferences.py #. From module replace.py #: ../SCRIBES/internationalization.py:100 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" is vervangen door \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:101 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Alle zoekresultaten van \"%s\" zijn vervangen door \"%s\"" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:104 msgid "An error occurred while saving this file." msgstr "Er heeft zich een fout voorgedaan bij het opslaan van dit bestand." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:105 msgid "" "An error occurred while decoding your file. Please file a bug report at " "\"http://openusability.org/forum/?group_id=141\"" msgstr "" "Er heeft zich een fout voorgedaan tijdens het decoderen van het bestand. Vul " "a.u.b. een foutrapport in op\"http://openusability.org/forum/?group_id=141\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:107 #, python-format msgid "Saved \"%s\"" msgstr "\"%s\" opgeslagen" #. .decode(encoding).encode("utf-8") #. From module textview.py #: ../SCRIBES/internationalization.py:110 msgid "_Find Matching Bracket" msgstr "_Zoek overeenkomstig haakje" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:111 msgid "Copied selected text" msgstr "Geselecteerde tekst gekopieerd" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:112 msgid "No selection to copy" msgstr "Geen selectie om te kopiëren" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:113 msgid "Cut selected text" msgstr "Geselecteerde tekst geknipt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:114 msgid "No selection to cut" msgstr "Geen selectie om te knippen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:115 msgid "Pasted copied text" msgstr "Geselecteerde tekst geplakt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:116 msgid "No text content in the clipboard" msgstr "Geen tekstinhoud in het klembord" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:119 #, python-format msgid "%d%% complete" msgstr "%d%% voltooid" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:120 msgid "completed" msgstr "Voltooid" #. .decode(encoding).encode("utf-8") #. From module tooltips.py #: ../SCRIBES/internationalization.py:123 msgid "Open a new window" msgstr "Een nieuw venster openen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:124 msgid "Open a file" msgstr "Een bestand openen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:125 msgid "Rename the current file" msgstr "Het huidige bestand hernoemen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:126 msgid "Print the current file" msgstr "Het huidige bestand afdrukken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:127 msgid "Undo last action" msgstr "Laatste actie ongedaan maken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:128 msgid "Redo undone action" msgstr "De ongedaan gemaakte actie opnieuw uitvoeren" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:129 ../plugins/IncrementalBar/i18n.py:28 #: ../plugins/FindBar/i18n.py:28 ../plugins/ReplaceBar/i18n.py:28 msgid "Search for text" msgstr "Tekst zoeken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:130 ../plugins/ReplaceBar/i18n.py:31 msgid "Search for and replace text" msgstr "Tekst zoeken en vervangen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:131 msgid "Go to a specific line" msgstr "Naar een bepaalde regel gaan" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:132 msgid "Configure the editor" msgstr "De editor configureren" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:133 msgid "Launch the help browser" msgstr "De help-browser starten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:134 msgid "Search for previous occurrence of the string" msgstr "Vorig zoekresultaat weergeven" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:135 msgid "Search for next occurrence of the string" msgstr "Volgend zoekresultaat weergeven" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:139 msgid "Type in the text you want to search for" msgstr "Voer de tekst in waarnaar u wilt zoeken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:140 msgid "Type in the text you want to replace with" msgstr "Voer de tekst in waardoor u de zoekresultaten wilt vervangen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:141 msgid "Replace the selected found match" msgstr "Geselecteerde zoekresultaat vervangen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:142 msgid "Replace all found matches" msgstr "Alle zoekresultaten vervangen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:143 msgid "Click to specify the font type, style, and size to use for text." msgstr "Klik hier om de stijl en de grootte van het tekstlettertype in te stellen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:144 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" "Klik om de breedte in te stellen van de ruimte die wordt ingevoegd wanneer u " "op de Tab-toets drukt." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:146 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "" "Selecteer om de tekst op het einde van een regel af te breken, zodat die binnen de grens " "van het tekstvenster blijft." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:148 msgid "Select to display a vertical line that indicates the right margin." msgstr "Selecteer om de rechterkantlijn aan te duiden met een verticale lijn." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:150 msgid "Click to specify the location of the vertical line." msgstr "Klik om de plaats van de verticale lijn te bepalen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:151 msgid "Select to enable spell checking" msgstr "Selecteer om de spellingscontrole in te schakelen" #. .decode(encoding).encode("utf-8") #. From module usage.py #: ../SCRIBES/internationalization.py:155 msgid "A text editor for GNOME." msgstr "Een tekst-editor voor GNOME." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:156 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "gebruik: scribes [OPTIE] [BESTAND] [...]" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:157 msgid "Options:" msgstr "Opties:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:158 msgid "display this help screen" msgstr "dit helpvenster tonen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:159 msgid "output version information of Scribes" msgstr "versie-informatie van Scribes tonen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:160 msgid "create a new file and open the file with Scribes" msgstr "een nieuw bestand aanmaken en openen met Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:161 msgid "open file in readonly mode" msgstr "bestand in alleen-lezen modus openen" #. .decode(encoding).encode("utf-8") #. From module utility.py #: ../SCRIBES/internationalization.py:164 msgid "Could not find Scribes' data folder" msgstr "Kon Scribes' datamap niet vinden" #. .decode(encoding).encode("utf-8") #. From preferences.py #. From error.py #: ../SCRIBES/internationalization.py:170 msgid "error" msgstr "fout" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:173 #, python-format msgid "Removed spaces at end of line %d" msgstr "Spaties aan het einde van regel %d verwijderd" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:176 msgid "No spaces were found at beginning of line" msgstr "Er zijn geen spaties gevonden aan het begin van de regel" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:177 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Spaties aan het begin van regel %d verwijderd" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:178 msgid "Removed spaces at beginning of selected lines" msgstr "Spaties aan het begin van de geselecteerde regels verwijderd" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:179 msgid "Removed spaces at end of selected lines" msgstr "Spaties aan het einde van de geselecteerde regels verwijderd" #. .decode(encoding).encode("utf-8") #. From module actions.py #: ../SCRIBES/internationalization.py:182 ../plugins/Indent/i18n.py:23 #: ../plugins/Selection/i18n.py:23 ../plugins/Lines/i18n.py:23 #: ../plugins/SaveFile/i18n.py:23 ../plugins/UndoRedo/i18n.py:23 #: ../plugins/Spaces/i18n.py:23 msgid "Cannot perform operation in readonly mode" msgstr "Kan deze actie niet uitvoeren in alleen-lezen modus" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:185 ../plugins/Indent/i18n.py:29 #, python-format msgid "Unindented line %d" msgstr "Inspringing van regel %d verkleind" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:186 msgid "No selected lines can be indented" msgstr "Inspringing van geselecteerde regels kan niet worden vergroot" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:189 msgid "" "An error occurred while encoding your file. Try saving your file using " "another character encoding, preferably UTF-8." msgstr "" "Er heeft zich een fout voorgedaan tijdens het coderen van uw bestand. " "Probeer uw bestand op te slaan met een andere tekencodering, bij voorkeur " "UTF-8." #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:193 msgid "" "An encoding error occurred. Please file a bug report at http://openusability." "org/forum/?group_id=141" msgstr "" "Er heeft zich een coderingsfout voorgedaan. Vul a.u.b. een foutrapport in op " "http://openusability.org/forum/?group_id=141" #. .decode(encoding).encode("utf-8") #. From autocomplete.py #: ../SCRIBES/internationalization.py:198 #: ../plugins/WordCompletionGUI/i18n.py:3 msgid "Word completion occurred" msgstr "Woord is aangevuld" #. .decode(encoding).encode("utf-8") #. From encoding.py #: ../SCRIBES/internationalization.py:201 msgid "Character _Encoding: " msgstr "T_ekencodering:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:202 msgid "Add or Remove Encoding ..." msgstr "Codering toevoegen of verwijderen..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:203 msgid "Recommended (UTF-8)" msgstr "Aanbevolen (UTF-8) " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:204 msgid "Add or Remove Character Encoding" msgstr "Tekencodering toevoegen of verwijderen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:205 msgid "Language and Region" msgstr "Taal en regio" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:206 msgid "Character Encoding" msgstr "Tekencodering" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:207 msgid "Select" msgstr "Selecteer" #. .decode(encoding).encode("utf-8") #. From filechooser.py, savechooser.py #: ../SCRIBES/internationalization.py:210 msgid "Select character _encoding" msgstr "Selecteer tekencodering" #. .decode(encoding).encode("utf-8") #. From filechooser.py #: ../SCRIBES/internationalization.py:213 msgid "Closed dialog window" msgstr "Dialoogvenster gesloten" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:216 #, python-format msgid "Cannot open %s" msgstr "Kan %s niet openen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:217 msgid "Closed error dialog" msgstr "Foutmelding gesloten" #. .decode(encoding).encode("utf-8") #. From fileloader.py #: ../SCRIBES/internationalization.py:220 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. " "Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "Het MIME-type van het bestand dat u probeert te openen kon niet worden vastgesteld. Controleer of dit bestand wel een tekstbestand is.\n" "\n" "MIME type: %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:222 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "Het MIME-type van het bestand dat u probeert te openen is niet dat van een " "tekstbestand.\n" "\n" "MIME type: %s" #. .decode(encoding).encode("utf-8") #. From printing.py #: ../SCRIBES/internationalization.py:226 #, python-format msgid "Printing \"%s\"" msgstr "\"%s\" wordt afgedrukt" #. .decode(encoding).encode("utf-8") #. From encoding.py #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:229 #: ../SCRIBES/internationalization.py:232 #: ../SCRIBES/internationalization.py:234 msgid "English" msgstr "Engels" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:230 #: ../SCRIBES/internationalization.py:231 #: ../SCRIBES/internationalization.py:255 msgid "Traditional Chinese" msgstr "Traditioneel Chinees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:233 #: ../SCRIBES/internationalization.py:241 #: ../SCRIBES/internationalization.py:245 #: ../SCRIBES/internationalization.py:264 #: ../SCRIBES/internationalization.py:290 msgid "Hebrew" msgstr "Hebreeuws" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:235 #: ../SCRIBES/internationalization.py:238 #: ../SCRIBES/internationalization.py:258 #: ../SCRIBES/internationalization.py:261 #: ../SCRIBES/internationalization.py:295 #: ../SCRIBES/internationalization.py:303 msgid "Western Europe" msgstr "West-Europees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:236 #: ../SCRIBES/internationalization.py:250 #: ../SCRIBES/internationalization.py:252 #: ../SCRIBES/internationalization.py:262 #: ../SCRIBES/internationalization.py:289 #: ../SCRIBES/internationalization.py:300 msgid "Greek" msgstr "Grieks" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:237 #: ../SCRIBES/internationalization.py:266 #: ../SCRIBES/internationalization.py:293 msgid "Baltic languages" msgstr "Baltische talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:239 #: ../SCRIBES/internationalization.py:259 #: ../SCRIBES/internationalization.py:284 #: ../SCRIBES/internationalization.py:302 msgid "Central and Eastern Europe" msgstr "Centraal- en Oost-Europees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:240 #: ../SCRIBES/internationalization.py:260 #: ../SCRIBES/internationalization.py:287 #: ../SCRIBES/internationalization.py:299 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgaars, Macedonisch, Russich, Servisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:242 #: ../SCRIBES/internationalization.py:257 #: ../SCRIBES/internationalization.py:263 #: ../SCRIBES/internationalization.py:291 #: ../SCRIBES/internationalization.py:304 msgid "Turkish" msgstr "Turks" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:243 msgid "Portuguese" msgstr "Portugees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:244 #: ../SCRIBES/internationalization.py:301 msgid "Icelandic" msgstr "Ijslands" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:246 msgid "Canadian" msgstr "Canadees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:247 #: ../SCRIBES/internationalization.py:265 #: ../SCRIBES/internationalization.py:288 msgid "Arabic" msgstr "Arabisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:248 msgid "Danish, Norwegian" msgstr "Deens, Noors" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:249 #: ../SCRIBES/internationalization.py:297 msgid "Russian" msgstr "Russisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:251 msgid "Thai" msgstr "Thais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:253 #: ../SCRIBES/internationalization.py:268 #: ../SCRIBES/internationalization.py:269 #: ../SCRIBES/internationalization.py:270 #: ../SCRIBES/internationalization.py:276 #: ../SCRIBES/internationalization.py:277 #: ../SCRIBES/internationalization.py:279 #: ../SCRIBES/internationalization.py:280 #: ../SCRIBES/internationalization.py:281 #: ../SCRIBES/internationalization.py:306 #: ../SCRIBES/internationalization.py:307 #: ../SCRIBES/internationalization.py:308 msgid "Japanese" msgstr "Japans" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:254 #: ../SCRIBES/internationalization.py:271 #: ../SCRIBES/internationalization.py:282 #: ../SCRIBES/internationalization.py:296 msgid "Korean" msgstr "Koreaans" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:256 msgid "Urdu" msgstr "Urdu" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:267 msgid "Vietnamese" msgstr "Vietnamees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:272 #: ../SCRIBES/internationalization.py:275 msgid "Simplified Chinese" msgstr "Vereenvoudigd Chinees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:273 #: ../SCRIBES/internationalization.py:274 msgid "Unified Chinese" msgstr "Eengemaakt Chinees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:278 msgid "Japanese, Korean, Simplified Chinese" msgstr "Japans, Koreaans, Vereenvoudigd Chinees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:283 msgid "West Europe" msgstr "West-Europa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:285 msgid "Esperanto, Maltese" msgstr "Esperanto, Maltees" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:286 msgid "Baltic languagues" msgstr "Baltische talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:292 msgid "Nordic languages" msgstr "Noord-Europese talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:294 msgid "Celtic languages" msgstr "Keltische talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:298 msgid "Ukrainian" msgstr "Oekraïens" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:305 msgid "Kazakh" msgstr "Kazachs" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:309 msgid "All languages" msgstr "Alle talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:310 #: ../SCRIBES/internationalization.py:311 msgid "All Languages (BMP only)" msgstr "Alle talen (enkel BMP)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:312 msgid "All Languages" msgstr "Alle Talen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:313 #: ../plugins/SyntaxColorSwitcher/i18n.py:24 msgid "None" msgstr "Geen" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:317 msgid "Replaced tabs with spaces on selected lines" msgstr "Tabs vervangen door spaties op de geselecteerde regels" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:325 msgid "Co_lor: " msgstr "K_leur:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:326 ../plugins/ColorEditor/i18n.py:37 msgid "B_old" msgstr "_Vet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:327 ../plugins/ColorEditor/i18n.py:38 msgid "I_talic" msgstr "_Cursief" #. .decode(encoding).encode("utf-8") #. From templateadd.py #: ../SCRIBES/internationalization.py:331 msgid "_Name:" msgstr "_Naam:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:332 msgid "_Description:" msgstr "_Beschrijving:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:333 msgid "_Template:" msgstr "_Sjabloon:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:334 msgid "Add New Template" msgstr "Voeg nieuw sjabloon toe" #. .decode(encoding).encode("utf-8") #. From templateedit.py #: ../SCRIBES/internationalization.py:337 ../plugins/TemplateEditor/i18n.py:28 msgid "Edit Template" msgstr "Bewerk sjabloon" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:340 msgid "Select to use themes' foreground and background colors" msgstr "Selecteer om voorgrond- en achtergrondkleuren van thema te gebruiken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:341 msgid "Click to choose a new color for the editor's text" msgstr "Klik om een nieuwe kleur te kiezen voor de tekst van de editor" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:342 msgid "Click to choose a new color for the editor's background" msgstr "Klik om een nieuwe kleur te kiezen voor de achtergrond van de editor" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:343 msgid "Click to choose a new color for the language syntax element" msgstr "Klik om een nieuwe kleur te kiezen voor het syntaxiselement" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:344 msgid "Select to make the language syntax element bold" msgstr "Selecteer om het syntaxiselement vet te maken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:345 msgid "Select to make the language syntax element italic" msgstr "Selecteer om het syntaxiselement cursief te maken" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:346 msgid "Select to reset the language syntax element to its default settings" msgstr "Selecteer om het syntaxiselement te herstellen naar zijn standaardwaarden" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #. From readonly.py #: ../SCRIBES/internationalization.py:353 msgid "Toggled readonly mode on" msgstr "Alleen-lezen modus ingeschakeld" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:354 msgid "Toggled readonly mode off" msgstr "Alleen-lezen modus uitgeschakeld" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:357 msgid "Menu for advanced configuration" msgstr "Menu voor geavanceerde instellingen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:358 msgid "Configure the editor's foreground, background or syntax colors" msgstr "Stel de voorgrond-, achtergrond- en syntaxiskleur voor het tekstvenster in" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:359 msgid "Create, modify or manage templates" msgstr "Sjablonen aanmaken, wijzigen of beheren" #. .decode(encoding).encode("utf-8") #. From cursor.py #: ../SCRIBES/internationalization.py:362 #, python-format msgid "Ln %d col %d" msgstr "Rg %d, Kol %d" #. .decode(encoding).encode("utf-8") #. From passworddialog.py #: ../SCRIBES/internationalization.py:365 msgid "Authentication Required" msgstr "Verificatie vereist" #: ../SCRIBES/internationalization.py:366 #, python-format msgid "You must log in to access %s" msgstr "U moet inloggen om %s te openen" #: ../SCRIBES/internationalization.py:367 msgid "_Password:" msgstr "_Wachtwoord:" #: ../SCRIBES/internationalization.py:368 msgid "_Remember password for this session" msgstr "_Onthoud wachtwoord voor deze sessie" #: ../SCRIBES/internationalization.py:369 msgid "Save password in _keyring" msgstr "_Sla wachtwoord op in sleutelhanger" #. From fileloader.py #: ../SCRIBES/internationalization.py:372 #, python-format msgid "Loading \"%s\"..." msgstr "\"%s\" wordt geladen..." #. From bookmark.py #: ../SCRIBES/internationalization.py:375 msgid "Moved to most recently bookmarked line" msgstr "Naar regel met meest recente bladwijzer gegaan" #: ../SCRIBES/internationalization.py:376 msgid "Already on most recently bookmarked line" msgstr "Reeds op regel met meest recente bladwijzer" #. bookmarktrigger.py #: ../SCRIBES/internationalization.py:377 #: ../SCRIBES/internationalization.py:452 #: ../plugins/BookmarkBrowser/i18n.py:27 msgid "No bookmarks found" msgstr "Geen bladwijzers gevonden" #. From dialogfilter.py #: ../SCRIBES/internationalization.py:381 msgid "Ruby Documents" msgstr "Ruby-documenten" #: ../SCRIBES/internationalization.py:382 msgid "Perl Documents" msgstr "Perl-documenten" #: ../SCRIBES/internationalization.py:383 msgid "C Documents" msgstr "C-documenten" #: ../SCRIBES/internationalization.py:384 msgid "C++ Documents" msgstr "C++-documenten" #: ../SCRIBES/internationalization.py:385 msgid "C# Documents" msgstr "C#-documenten" #: ../SCRIBES/internationalization.py:386 msgid "Java Documents" msgstr "Java-documenten" #: ../SCRIBES/internationalization.py:387 msgid "PHP Documents" msgstr "PHP-documenten" #: ../SCRIBES/internationalization.py:388 msgid "HTML Documents" msgstr "HTML-documenten" #: ../SCRIBES/internationalization.py:389 ../plugins/TemplateEditor/i18n.py:27 msgid "XML Documents" msgstr "XML-documenten" #: ../SCRIBES/internationalization.py:390 msgid "Haskell Documents" msgstr "Haskell-documenten" #: ../SCRIBES/internationalization.py:391 msgid "Scheme Documents" msgstr "Scheme-documenten" #. From textview.py #: ../SCRIBES/internationalization.py:394 msgid "INS" msgstr "INV" #: ../SCRIBES/internationalization.py:395 msgid "OVR" msgstr "OVR" #. From loader.py #: ../SCRIBES/internationalization.py:398 msgid "" "Open Error: An error occurred while opening the file. Try opening the file " "again or file a bug report." msgstr "" "Fout bij openen: er heeft zich een fout voorgedaan bij het openen van het bestand. " "Probeer het bestand opnieuw te openen of vul een foutrapport in." #: ../SCRIBES/internationalization.py:400 #, python-format msgid "Info Error: Information on %s cannot be retrieved." msgstr "Fout: informatie over %s kan niet opgehaald worden." #: ../SCRIBES/internationalization.py:401 msgid "Info Error: Access has been denied to the requested file." msgstr "Fout: toegang tot het gevraagde bestand is geweigerd." #: ../SCRIBES/internationalization.py:402 msgid "Permission Error: Access has been denied to the requested file." msgstr "Fout bij toegang: toegang tot het gevraagde bestand is geweigerd." #: ../SCRIBES/internationalization.py:403 msgid "Cannot open file" msgstr "Kan bestand niet openen" #. From save.py #: ../SCRIBES/internationalization.py:406 msgid "" "You do not have permission to save the file. Try saving the file to your " "desktop, or to a folder you own. Automatic saving has been disabled until " "the file is saved correctly without errors." msgstr "" "U heeft geen rechten om het bestand op te slaan. Probeer het bestand op te " "slaan op uw bureaublad of een map die u bezit. Automatisch opslaan is " "uitgeschakeld totdat het bestand foutloos is opgeslagen." #: ../SCRIBES/internationalization.py:409 msgid "" "A saving operation failed. Could not create swap area. Make sure you have " "permission to save to your home folder. Also check to see that you have not " "run out of disk space. Automatic saving will be disabled until the document " "is properly saved." msgstr "" "Opslaan is mislukt. Kon geen wisselbestand aanmaken. Controleer of " "u rechten heeft om in uw thuismap op te slaan. Kijk ook na of u nog " "voldoende schijfruimte hebt. Automatisch opslaan is uitgeschakeld totdat het " "document foutloos is opgeslagen." #: ../SCRIBES/internationalization.py:413 msgid "" "An error occured while creating the file. Automatic saving has been disabled " "until the file is saved correctly without errors." msgstr "" "Er heeft zich een fout voorgedaan bij het aanmaken van het bestand. " "Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is " "opgeslagen." #: ../SCRIBES/internationalization.py:415 msgid "" "A saving error occured. The document could not be transfered from its " "temporary location. Automatic saving has been disabled until the file is " "saved correctly without errors." msgstr "" "Er heeft zich een fout bij het opslaan voorgedaan. Automatisch opslaan is " "uitgeschakeld totdat het bestand foutloos is opgeslagen." #: ../SCRIBES/internationalization.py:418 msgid "" "You do not have permission to save the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "U heeft geen rechten om het bestand op te slaan. Automatisch opslaan is " "uitgeschakeld totdat het bestand foutloos is opgeslagen." #: ../SCRIBES/internationalization.py:420 msgid "" "A decoding error occured while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Er heeft zich een decoderingsfout voorgedaan bij het opslaan van het " "bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is " "opgeslagen." #: ../SCRIBES/internationalization.py:422 msgid "" "An encoding error occurred while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Er heeft zich een coderingsfout voorgedaan bij het opslaan van het bestand. " "Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is " "opgeslagen." #. From regexbar.py #: ../SCRIBES/internationalization.py:426 msgid "Search for text using regular expression" msgstr "Zoek naar tekst met reguliere uitdrukkingen" #: ../SCRIBES/internationalization.py:427 msgid "Close regular expression bar" msgstr "Reguliere uitdrukkingenbalk sluiten" #. From replacestopbutton.py #: ../SCRIBES/internationalization.py:430 msgid "Stopped replacing" msgstr "Vervangen gestopt" #. templateeditorexportbutton.py #: ../SCRIBES/internationalization.py:433 #: ../plugins/TemplateEditor/Template.glade.h:6 msgid "E_xport" msgstr "_Exporteren" #. templateeditorimportbutton.py #: ../SCRIBES/internationalization.py:436 #: ../plugins/TemplateEditor/Template.glade.h:8 msgid "I_mport" msgstr "_Importeren" #. templateadddialog.py #: ../SCRIBES/internationalization.py:439 msgid "Error: Name field must contain a string." msgstr "Fout: naamveld moet een tekenreeks bevatten." #: ../SCRIBES/internationalization.py:440 #, python-format msgid "Error: '%s' already in use. Please choose another string." msgstr "Fout: %s is reeds in gebruik. Kies a.u.b. een andere tekenreeks." #: ../SCRIBES/internationalization.py:441 msgid "Error: Name field cannot have any spaces." msgstr "Fout: naamveld mag geen spaties bevatten." #: ../SCRIBES/internationalization.py:442 msgid "Error: Template editor can only have one '${cursor}' placeholder." msgstr "Fout: sjabloon kan slechts één '${cursor}' placeholder hebben." #. importdialog.py #: ../SCRIBES/internationalization.py:445 msgid "Error: Invalid template file." msgstr "Fout: ongeldig sjabloonbestand." #. exportdialog.py #: ../SCRIBES/internationalization.py:449 #: ../plugins/TemplateEditor/Template.glade.h:7 msgid "Export Template" msgstr "Exporteer sjabloon" #. preftabcheckbutton.py #: ../SCRIBES/internationalization.py:457 msgid "Use spaces instead of tabs for indentation" msgstr "Selecteer om spaties in plaats van tabs te gebruiken voor inspringing" #: ../SCRIBES/internationalization.py:461 msgid "Select to underline language syntax element" msgstr "Selecteer om syntaxiselement te onderstrepen" #: ../SCRIBES/internationalization.py:464 #: ../plugins/DocumentBrowser/i18n.py:24 msgid "Open Documents" msgstr "Documenten openen" #: ../SCRIBES/internationalization.py:466 msgid "Current document is focused" msgstr "Huidige document heeft de focus" #: ../SCRIBES/internationalization.py:467 msgid "Open recently used files" msgstr "Onlangs gebruikte bestanden openen" #: ../SCRIBES/internationalization.py:469 msgid "Failed to save file" msgstr "Opslaan van bestand is mislukt" #: ../SCRIBES/internationalization.py:470 msgid "" "Save Error: You do not have permission to modify this file or save to its " "location." msgstr "" "Fout bij opslaan: u heeft geen rechten om dit bestand aan te passen of op te " "slaan op zijn locatie." #: ../SCRIBES/internationalization.py:472 msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "" "Fout bij opslaan: bestand overzetten van wisselbestand naar permanente locatie is " "mislukt." #: ../SCRIBES/internationalization.py:473 msgid "Save Error: Failed to create swap location or file." msgstr "Fout bij opslaan: aanmaken van wisselbestand of bestand is mislukt." #: ../SCRIBES/internationalization.py:474 msgid "Save Error: Failed to create swap file for saving." msgstr "Fout bij opslaan: aanmaken van wisselbestand om op te slaan is mislukt." #: ../SCRIBES/internationalization.py:475 msgid "Save Error: Failed to write swap file for saving." msgstr "Fout bij opslaan: schrijven wisselbestand om op te slaan is mislukt." #: ../SCRIBES/internationalization.py:476 msgid "Save Error: Failed to close swap file for saving." msgstr "Fout bij opslaan: sluiten wisselbestand om te slaan is mislukt." #: ../SCRIBES/internationalization.py:477 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "Fout bij opslaan: bestandsinhoud decoderen van \"UTF-8\" naar Unicode is mislukt." #: ../SCRIBES/internationalization.py:478 msgid "" "Save Error: Failed to encode contents of file. Make sure the encoding of the " "file is properly set in the save dialog. Press (Ctrl - s) to show the save " "dialog." msgstr "" "Fout bij opslaan: bestandsinhoud coderen is mislukt. Controleer of de codering " "van het bestand juist is ingesteld in het opslaanvenster. Druk (Ctrl - s) om " "het opslaanvenster te tonen." #: ../SCRIBES/internationalization.py:482 #, python-format msgid "File: %s" msgstr "Bestand: %s" #: ../SCRIBES/internationalization.py:484 msgid "Failed to load file." msgstr "Laden van bestand is mislukt." #: ../SCRIBES/internationalization.py:486 msgid "Load Error: You do not have permission to view this file." msgstr "Fout bij laden: u heeft geen rechten om dit bestand te bekijken." #: ../SCRIBES/internationalization.py:487 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "Fout bij laden: toegang tot bestand op afstand is geweigerd." #: ../SCRIBES/internationalization.py:488 msgid "" "Load Error: Failed to get file information for loading. Please try loading " "the file again." msgstr "" "Fout bij laden: verkrijgen van bestandsinformatie om te laden is mislukt. Probeer " "het bestand a.u.b. nogmaals te laden." #: ../SCRIBES/internationalization.py:490 msgid "Load Error: File does not exist." msgstr "Fout bij laden: bestand bestaat niet." #: ../SCRIBES/internationalization.py:491 msgid "Damn! Unknown Error" msgstr "Verdomd! Onbekende fout" #: ../SCRIBES/internationalization.py:492 msgid "Load Error: Failed to open file for loading." msgstr "Fout bij laden: openen van bestand om te laden is mislukt." #: ../SCRIBES/internationalization.py:493 msgid "Load Error: Failed to read file for loading." msgstr "Fout bij laden: lezen van bestand om te laden is mislukt." #: ../SCRIBES/internationalization.py:494 msgid "Load Error: Failed to close file for loading." msgstr "Fout bij laden: sluiten van bestand om te laden is mislukt." #: ../SCRIBES/internationalization.py:495 msgid "" "Load Error: Failed to decode file for loading. The file your are loading may " "not be a text file. If you are sure it is a text file, try to open the file " "with the correct encoding via the open dialog. Press (control - o) to show " "the open dialog." msgstr "" "Fout bij laden: decoderen van bestand om te laden is mislukt. Het bestand dat u " "probeert te openen is misschien geen tekstbestand. Indien u zeker bent dat het " "een tekstbestand is, probeer het bestand dan te openen met de correcte " "codering via de het openvenster. Druk (control - o) om het openvenster te " "tonen." #: ../SCRIBES/internationalization.py:499 msgid "" "Load Error: Failed to encode file for loading. Try to open the file with the " "correct encoding via the open dialog. Press (control - o) to show the open " "dialog." msgstr "" "Fout bij laden: coderen van bestand om te laden is mislukt. Probeer het bestand te " "openen met de correcte codering via het openvenster. Druk (control - o) om " "het openvenster te tonen." #: ../SCRIBES/internationalization.py:503 #, python-format msgid "Reloading %s" msgstr "%s herladen" #: ../SCRIBES/internationalization.py:504 #, python-format msgid "'%s' has been modified by another program" msgstr "%s is aangepast door een ander programma." #: ../plugins/BookmarkBrowser/i18n.py:23 msgid "Move to bookmarked line" msgstr "Naar regel met bladwijzer gaan" #: ../plugins/BookmarkBrowser/i18n.py:24 msgid "Bookmark Browser" msgstr "Bladwijzer-browser" #: ../plugins/BookmarkBrowser/i18n.py:25 msgid "Line" msgstr "Regel" #: ../plugins/BookmarkBrowser/i18n.py:26 msgid "Bookmarked Text" msgstr "Tekst van bladwijzer" #: ../plugins/BookmarkBrowser/i18n.py:28 ../plugins/Bookmark/i18n.py:27 #, python-format msgid "Moved to bookmark on line %d" msgstr "Verplaatst naar bladwijzer op regel %d" #: ../plugins/PrintDialog/i18n.py:23 msgid "Print Document" msgstr "Document afdrukken" #: ../plugins/PrintDialog/i18n.py:24 msgid "Print file" msgstr "Bestand afdrukken" #: ../plugins/PrintDialog/i18n.py:25 msgid "File: " msgstr "Bestand:" #: ../plugins/PrintDialog/i18n.py:26 msgid "Print Preview" msgstr "Afdrukvoorbeeld" #: ../plugins/RemoteDialog/i18n.py:23 ../plugins/OpenDialog/i18n.py:23 msgid "Open Document" msgstr "Document openen" #: ../plugins/RemoteDialog/i18n.py:24 msgid "Type URI for loading" msgstr "Voer URI in om te laden" #: ../plugins/RemoteDialog/i18n.py:25 msgid "Enter the location (URI) of the file you _would like to open:" msgstr "Voer de locatie (URI) in van het bestand dat u _wilt openen:" #: ../plugins/AutoReplace/i18n.py:23 #, python-format msgid "Replaced '%s' with '%s'" msgstr "'%s' vervangen door '%s'" #: ../plugins/Templates/i18n.py:23 msgid "Template mode is active" msgstr "Sjabloonmodus is actief" #: ../plugins/Templates/i18n.py:24 msgid "Inserted template" msgstr "Sjabloon ingevoegd" #: ../plugins/Templates/i18n.py:25 msgid "Selected next placeholder" msgstr "Volgende placeholder geselecteerd" #: ../plugins/Templates/i18n.py:26 msgid "Selected previous placeholder" msgstr "Vorige placeholder geselecteerd" #: ../plugins/About/i18n.py:23 msgid "Scribes is a text editor for GNOME." msgstr "Scribes is een tekst-editor voor GNOME." #: ../plugins/About/i18n.py:24 msgid "Information about the text editor" msgstr "Informatie over de tekst-editor" #: ../plugins/TemplateEditor/Template.glade.h:1 msgid "here" msgstr "hier" #: ../plugins/TemplateEditor/Template.glade.h:2 msgid "_Description:" msgstr "_Beschrijving:" #: ../plugins/TemplateEditor/Template.glade.h:3 msgid "_Name:" msgstr "_Naam:" #: ../plugins/TemplateEditor/Template.glade.h:4 msgid "_Template:" msgstr "_Sjabloon:" #: ../plugins/TemplateEditor/Template.glade.h:5 msgid "Download templates from" msgstr "Download sjablonen" #: ../plugins/TemplateEditor/Template.glade.h:9 #: ../plugins/TemplateEditor/i18n.py:26 msgid "Import Template" msgstr "Importeer sjabloon" #: ../plugins/TemplateEditor/Template.glade.h:10 #: ../plugins/TemplateEditor/i18n.py:32 msgid "Template Editor" msgstr "Sjablonen configureren" #: ../plugins/TemplateEditor/Template.glade.h:11 msgid "gtk-add" msgstr "gtk-add" #: ../plugins/TemplateEditor/Template.glade.h:12 msgid "gtk-cancel" msgstr "gtk-cancel" #: ../plugins/TemplateEditor/Template.glade.h:13 msgid "gtk-edit" msgstr "gtk-edit" #: ../plugins/TemplateEditor/Template.glade.h:14 msgid "gtk-help" msgstr "gtk-help" #: ../plugins/TemplateEditor/Template.glade.h:15 msgid "gtk-remove" msgstr "gtk-remove" #: ../plugins/TemplateEditor/Template.glade.h:16 msgid "gtk-save" msgstr "gtk-save" #: ../plugins/TemplateEditor/i18n.py:23 msgid "_Language" msgstr "_Taal" #: ../plugins/TemplateEditor/i18n.py:24 msgid "_Name" msgstr "_Naam" #: ../plugins/TemplateEditor/i18n.py:25 msgid "_Description" msgstr "_Beschrijving" #: ../plugins/TemplateEditor/i18n.py:29 msgid "Error: Name field cannot be empty" msgstr "Fout: naamveld mag niet leeg zijn" #: ../plugins/TemplateEditor/i18n.py:30 msgid "Error: Trigger name already in use. Please use another trigger name." msgstr "" "Fout: Naam van trigger is al in gebruik. Gebruik a.u.b. een andere naam voor " "de trigger." #: ../plugins/TemplateEditor/i18n.py:31 msgid "Add Template" msgstr "Voeg sjabloon toe" #: ../plugins/TemplateEditor/i18n.py:33 msgid "Error: You do not have permission to save at the location" msgstr "Fout: u heeft geen rechten om op de locatie op te slaan" #: ../plugins/TemplateEditor/i18n.py:34 msgid "Error: No selection to export" msgstr "Fout: geen selectie om te exporteren" #: ../plugins/TemplateEditor/i18n.py:35 msgid "Error: File not found" msgstr "Fout: bestand niet gevonden" #: ../plugins/TemplateEditor/i18n.py:36 msgid "Error: Invalid template file" msgstr "Fout: ongeldig sjabloonbestand" #: ../plugins/TemplateEditor/i18n.py:37 msgid "Error: No template information found" msgstr "Fout: geen sjablooninformatie gevonden" #: ../plugins/AutoReplaceGUI/i18n.py:23 msgid "Auto Replace Editor" msgstr "Automatisch vervangen editor" #: ../plugins/AutoReplaceGUI/i18n.py:24 msgid "_Abbreviations" msgstr "_Afkortingen" #: ../plugins/AutoReplaceGUI/i18n.py:25 msgid "_Replacements" msgstr "_Vervangen door" #: ../plugins/AutoReplaceGUI/i18n.py:26 #, python-format msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "Fout: %s is reeds in gebruik. Gebruik a.u.b. een andere afkorting." #: ../plugins/AutoReplaceGUI/i18n.py:27 msgid "Automatic Replacement" msgstr "Automatische vervanging" #: ../plugins/AutoReplaceGUI/i18n.py:28 msgid "Modify words for auto-replacement" msgstr "Wijzig woorden voor automatisch vervangen" #: ../plugins/Indent/i18n.py:24 msgid "Indenting please wait..." msgstr "Inspringen, even wachten a.u.b..." #: ../plugins/Indent/i18n.py:26 #, python-format msgid "Indented line %d" msgstr "Regel %d ingesprongen" #: ../plugins/Indent/i18n.py:30 msgid "I_ndentation" msgstr "I_nspringen" #: ../plugins/Indent/i18n.py:31 msgid "Shift _Right" msgstr "Ve_rgroot inspringing" #: ../plugins/Indent/i18n.py:32 msgid "Shift _Left" msgstr "Verk_lein inspringing" #: ../plugins/Selection/i18n.py:24 msgid "Selected word" msgstr "Geselecteerd woord" #: ../plugins/Selection/i18n.py:25 msgid "No word to select" msgstr "Geen woord om te selecteren" #: ../plugins/Selection/i18n.py:26 msgid "Selected sentence" msgstr "Geselecteerde zin" #: ../plugins/Selection/i18n.py:27 msgid "No sentence to select" msgstr "Geen zin om te selecteren" #: ../plugins/Selection/i18n.py:28 #, python-format msgid "No text to select on line %d" msgstr "Geen tekst om te selecteren op regel %d" #: ../plugins/Selection/i18n.py:29 #, python-format msgid "Selected line %d" msgstr "Regel %d geselecteerd" #: ../plugins/Selection/i18n.py:30 msgid "Selected paragraph" msgstr "Paragraaf geselecteerd" #: ../plugins/Selection/i18n.py:31 msgid "No paragraph to select" msgstr "Geen paragraaf om te selecteren" #: ../plugins/Selection/i18n.py:32 msgid "S_election" msgstr "S_electie" #: ../plugins/Selection/i18n.py:33 msgid "Select _Word" msgstr "Selecteer _woord" #: ../plugins/Selection/i18n.py:34 msgid "Select _Line" msgstr "Selecteer rege_l" #: ../plugins/Selection/i18n.py:35 msgid "Select _Sentence" msgstr "_Selecteer zin" #: ../plugins/Selection/i18n.py:36 msgid "Select _Paragraph" msgstr "Selecteer _paragraaf" #: ../plugins/Lines/i18n.py:24 #, python-format msgid "Deleted line %d" msgstr "Regel %d verwijderd" #: ../plugins/Lines/i18n.py:25 #, python-format msgid "Joined line %d to line %d" msgstr "Regel %d samengevoegd met regel %d" #: ../plugins/Lines/i18n.py:26 msgid "No more lines to join" msgstr "Geen regels meer om samen te voegen" #: ../plugins/Lines/i18n.py:27 #, python-format msgid "Freed line %d" msgstr "Nieuwe regel ingevoegd op regel %d" #: ../plugins/Lines/i18n.py:28 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Tekst verwijderd vanaf cursor tot einde van regel %d" #: ../plugins/Lines/i18n.py:29 msgid "Cursor is already at the end of line" msgstr "Cursor is reeds aan het einde van de regel" #: ../plugins/Lines/i18n.py:30 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Tekst verwijderd vanaf cursor tot het begin van regel %d" #: ../plugins/Lines/i18n.py:31 msgid "Cursor is already at the beginning of line" msgstr "Cursor is reeds aan het begin van de regel" #: ../plugins/Lines/i18n.py:32 msgid "_Lines" msgstr "Rege_ls" #: ../plugins/Lines/i18n.py:33 msgid "_Delete Line" msgstr "Regel verwij_deren" #: ../plugins/Lines/i18n.py:34 msgid "_Join Line" msgstr "Regels samen_voegen" #: ../plugins/Lines/i18n.py:35 msgid "Free Line _Above" msgstr "Regel er_boven invoegen" #: ../plugins/Lines/i18n.py:36 msgid "Free Line _Below" msgstr "Regel er_onder invoegen" #: ../plugins/Lines/i18n.py:37 msgid "Delete Cursor to Line _End" msgstr "Van cursor tot _einde regel verwijderen" #: ../plugins/Lines/i18n.py:38 msgid "Delete _Cursor to Line Begin" msgstr "Van _cursor tot begin regel verwijderen" #: ../plugins/Preferences/i18n.py:23 msgid "Font" msgstr "Lettertype" #: ../plugins/Preferences/i18n.py:24 msgid "Editor _font: " msgstr "_Lettertype van de editor:" #: ../plugins/Preferences/i18n.py:25 msgid "Tab Stops" msgstr "Tabstops" #: ../plugins/Preferences/i18n.py:26 msgid "_Tab width: " msgstr "_Tabbreedte:" #: ../plugins/Preferences/i18n.py:27 msgid "Text Wrapping" msgstr "Regelafbreking" #: ../plugins/Preferences/i18n.py:28 msgid "Right Margin" msgstr "Rechterkantlijn" #: ../plugins/Preferences/i18n.py:29 msgid "_Right margin position: " msgstr "Positie van _rechterkantlijn" #: ../plugins/Preferences/i18n.py:30 msgid "Spell Checking" msgstr "Spellingscontrole" #: ../plugins/Preferences/i18n.py:31 msgid "Change editor settings" msgstr "Instellingen van de editor wijzigen" #: ../plugins/Preferences/i18n.py:32 msgid "Preferences" msgstr "Voorkeuren" #: ../plugins/Preferences/i18n.py:33 #, python-format msgid "Changed font to \"%s\"" msgstr "Lettertype gewijzigd in \"%s\"" #: ../plugins/Preferences/i18n.py:34 #, python-format msgid "Changed tab width to %d" msgstr "Tabbreedte gewijzigd in %d" #: ../plugins/Preferences/i18n.py:35 msgid "_Use spaces instead of tabs" msgstr "_Spaties in plaats van tabs gebruiken" #: ../plugins/Preferences/i18n.py:36 msgid "Use tabs for indentation" msgstr "Tabs voor inspringing gebruiken" #: ../plugins/Preferences/i18n.py:37 msgid "Use spaces for indentation" msgstr "Spaties voor inspringing gebruiken" #: ../plugins/Preferences/i18n.py:38 msgid "Enable text _wrapping" msgstr "_Regelafbreking inschakelen" #: ../plugins/Preferences/i18n.py:39 msgid "Enabled text wrapping" msgstr "Regelafbreking ingeschakeld" #: ../plugins/Preferences/i18n.py:40 msgid "Disabled text wrapping" msgstr "Regelafbreking uitgeschakeld" #: ../plugins/Preferences/i18n.py:41 msgid "Display right _margin" msgstr "Rechter_kantlijn weergeven" #: ../plugins/Preferences/i18n.py:42 msgid "Show right margin" msgstr "Rechterkantlijn tonen" #: ../plugins/Preferences/i18n.py:43 msgid "Hide right margin" msgstr "Rechterkantlijn verbergen" #: ../plugins/Preferences/i18n.py:44 msgid "_Enable spell checking" msgstr "Spellingscontrole inschak_elen" #: ../plugins/Preferences/i18n.py:45 ../plugins/SpellCheck/i18n.py:24 msgid "Enabled spellchecking" msgstr "Spellingscontrole ingeschakeld" #: ../plugins/Preferences/i18n.py:46 ../plugins/SpellCheck/i18n.py:23 msgid "Disabled spellchecking" msgstr "Spellingscontrole uitgeschakeld" #: ../plugins/Preferences/i18n.py:47 #, python-format msgid "Positioned margin line at column %d" msgstr "Kantlijn geplaatst op kolom %d" #: ../plugins/BracketCompletion/i18n.py:23 msgid "Pair character completion occurred" msgstr "Overeenkomstige haakjes aangevuld" #: ../plugins/BracketCompletion/i18n.py:24 msgid "Enclosed selected text" msgstr "Geselecteerde tekst omringd door haakjes" #: ../plugins/BracketCompletion/i18n.py:25 msgid "Removed pair character completion" msgstr "Overeenkomstig haakje verwijderd" #: ../plugins/DocumentBrowser/i18n.py:23 msgid "Select document to focus" msgstr "Selecteer document voor focus" #: ../plugins/DocumentBrowser/i18n.py:25 msgid "File _Type" msgstr "Bestands_type" #: ../plugins/DocumentBrowser/i18n.py:26 msgid "File _Name" msgstr "Bestands_naam" #: ../plugins/DocumentBrowser/i18n.py:27 msgid "Full _Path Name" msgstr "Volledige _padnaam" #: ../plugins/DocumentBrowser/i18n.py:28 msgid "No documents open" msgstr "Geen documenten geopend" #: ../plugins/SearchPreviousNext/i18n.py:23 msgid "No previous match" msgstr "Geen vorig zoekresultaat" #: ../plugins/IncrementalBar/i18n.py:23 ../plugins/FindBar/i18n.py:23 #: ../plugins/ReplaceBar/i18n.py:23 msgid "Match _case" msgstr "_Hoofdlettergevoelig" #: ../plugins/IncrementalBar/i18n.py:24 ../plugins/FindBar/i18n.py:24 #: ../plugins/ReplaceBar/i18n.py:24 msgid "Match _word" msgstr "Enkel complete _woorden" #: ../plugins/IncrementalBar/i18n.py:25 ../plugins/FindBar/i18n.py:25 #: ../plugins/ReplaceBar/i18n.py:25 msgid "_Previous" msgstr "_Vorige" #: ../plugins/IncrementalBar/i18n.py:26 ../plugins/FindBar/i18n.py:26 #: ../plugins/ReplaceBar/i18n.py:26 msgid "_Next" msgstr "V_olgende" #: ../plugins/IncrementalBar/i18n.py:27 ../plugins/FindBar/i18n.py:27 #: ../plugins/ReplaceBar/i18n.py:27 msgid "_Search for:" msgstr "_Zoeken naar:" #: ../plugins/IncrementalBar/i18n.py:29 ../plugins/FindBar/i18n.py:29 #: ../plugins/ReplaceBar/i18n.py:29 msgid "Closed search bar" msgstr "Zoekbalk gesloten" #: ../plugins/IncrementalBar/i18n.py:30 msgid "Incrementally search for text" msgstr "Oplopend naar tekst zoeken" #: ../plugins/IncrementalBar/i18n.py:31 msgid "Close incremental search bar" msgstr "Oplopende zoekbalk sluiten" #: ../plugins/OpenDialog/i18n.py:24 msgid "Select file for loading" msgstr "Selecteer bestand om te laden" #: ../plugins/ToolbarVisibility/i18n.py:23 msgid "Hide toolbar" msgstr "Werkbalk verborgen" #: ../plugins/ToolbarVisibility/i18n.py:24 msgid "Showed toolbar" msgstr "Werkbalk getoond" #: ../plugins/MatchingBracket/i18n.py:23 #, python-format msgid "Found matching bracket on line %d" msgstr "Overeenkomstig haakje gevonden op regel %d" #: ../plugins/MatchingBracket/i18n.py:24 msgid "No matching bracket found" msgstr "Geen overeenkomstig haakje gevonden" #: ../plugins/BracketSelection/i18n.py:23 msgid "Selected characters inside bracket" msgstr "Tekens binnen haakjes geselecteerd" #: ../plugins/BracketSelection/i18n.py:24 msgid "No brackets found for selection" msgstr "Geen haakjes gevonden voor selectie" #: ../plugins/Case/i18n.py:23 msgid "No selection to change case" msgstr "Geen selectie om hoofd- en kleine letters te verwisselen" #: ../plugins/Case/i18n.py:24 msgid "Selected text is already uppercase" msgstr "Geselecteerde tekst bestaat reeds uit hoofdletters" #: ../plugins/Case/i18n.py:25 msgid "Changed selected text to uppercase" msgstr "Geselecteerde tekst gewijzigd in hoofdletters" #: ../plugins/Case/i18n.py:26 msgid "Selected text is already lowercase" msgstr "Geselecteerde tekst bestaat al uit kleine letters" #: ../plugins/Case/i18n.py:27 msgid "Changed selected text to lowercase" msgstr "Geselecteerde tekst gewijzigd in kleine letters" #: ../plugins/Case/i18n.py:28 msgid "Selected text is already capitalized" msgstr "Geselecteerde tekst is al gekapitaliseerd" #: ../plugins/Case/i18n.py:29 msgid "Capitalized selected text" msgstr "Geselecteerde tekst gekapitaliseerd" #: ../plugins/Case/i18n.py:30 msgid "Swapped the case of selected text" msgstr "Hoofd- en kleine letters van geselecteerde tekst omgewisseld" #: ../plugins/Case/i18n.py:31 msgid "_Case" msgstr "Hoofd- of kleine _letters" #: ../plugins/Case/i18n.py:32 msgid "_Uppercase" msgstr "_Hoofdletters" #: ../plugins/Case/i18n.py:33 msgid "_Lowercase" msgstr "_Kleine letters" #: ../plugins/Case/i18n.py:34 msgid "_Titlecase" msgstr "_Eerste letter hoofdletter" #: ../plugins/Case/i18n.py:35 msgid "_Swapcase" msgstr "_Verwissel hoofd- en kleine letters" #: ../plugins/Bookmark/i18n.py:23 #, python-format msgid "Removed bookmark on line %d" msgstr "Bladwijzer voor regel %d verwijderd" #: ../plugins/Bookmark/i18n.py:24 #, python-format msgid "Bookmarked line %d" msgstr "Bladwijzer voor regel %d toegevoegd" #: ../plugins/Bookmark/i18n.py:25 msgid "No bookmarks found to remove" msgstr "Geen bladwijzer gevonden om te verwijderen" #: ../plugins/Bookmark/i18n.py:26 msgid "Removed all bookmarks" msgstr "Alle bladwijzers verwijderd" #: ../plugins/Bookmark/i18n.py:28 msgid "No next bookmark to move to" msgstr "Geen volgende bladwijzer" #: ../plugins/Bookmark/i18n.py:29 msgid "No previous bookmark to move to" msgstr "Geen vorige bladwijzer" #: ../plugins/Bookmark/i18n.py:30 msgid "Already on first bookmark" msgstr "Reeds op eerste bladwijzer" #: ../plugins/Bookmark/i18n.py:31 msgid "Moved to first bookmark" msgstr "Naar eerste bladwijzer gegaan" #: ../plugins/Bookmark/i18n.py:32 msgid "Already on last bookmark" msgstr "Reeds op laatste bladwijzer" #: ../plugins/Bookmark/i18n.py:33 msgid "Moved to last bookmark" msgstr "Naar laatste bladwijzer gegaan" #: ../plugins/Bookmark/i18n.py:34 msgid "_Bookmark" msgstr "_Bladwijzer" #: ../plugins/Bookmark/i18n.py:35 msgid "Bookmark _Line" msgstr "Bladwijzer aan_maken voor regel" #: ../plugins/Bookmark/i18n.py:36 msgid "_Remove Bookmark" msgstr "Bladwijzer verwijde_ren" #: ../plugins/Bookmark/i18n.py:37 msgid "Remove _All Bookmarks" msgstr "_Alle bladwijzers verwijderen" #: ../plugins/Bookmark/i18n.py:38 msgid "Move to _Next Bookmark" msgstr "Volge_nde bladwijzer" #: ../plugins/Bookmark/i18n.py:39 msgid "Move to _Previous Bookmark" msgstr "_Vorige bladwijzer" #: ../plugins/Bookmark/i18n.py:40 msgid "Move to _First Bookmark" msgstr "_Eerste bladwijzer" #: ../plugins/Bookmark/i18n.py:41 msgid "Move to Last _Bookmark" msgstr "_Laatste bladwijzer" #: ../plugins/Bookmark/i18n.py:42 msgid "_Show Bookmark Browser" msgstr "_Bladwijzer-browser" #: ../plugins/SaveDialog/i18n.py:23 msgid "Save Document" msgstr "Document opslaan" #: ../plugins/SaveDialog/i18n.py:24 msgid "Change name of file and save" msgstr "Bestandsnaam veranderen en opslaan" #: ../plugins/UserGuide/i18n.py:23 msgid "Launching help browser" msgstr "Help-browser wordt opgestart" #: ../plugins/UserGuide/i18n.py:24 msgid "Could not open help browser" msgstr "Help-browser kon niet geopend worden" #: ../plugins/ReadOnly/i18n.py:23 msgid "File has not been saved to disk" msgstr "Bestand is niet opgeslagen op schijf" #: ../plugins/ReadOnly/i18n.py:24 msgid "No permission to modify file" msgstr "Geen rechten om,bestand aan te passen" #: ../plugins/UndoRedo/i18n.py:24 msgid "Undid last action" msgstr "Laatste actie is ongedaan gemaakt" #: ../plugins/UndoRedo/i18n.py:25 msgid "Cannot undo action" msgstr "Actie kan niet ongedaan gemaakt worden" #: ../plugins/UndoRedo/i18n.py:26 msgid "Redid undone action" msgstr "Laatste ongedaan gemaakte actie is opnieuw uitgevoerd" #: ../plugins/Spaces/i18n.py:24 msgid "Replacing spaces please wait..." msgstr "Spaties worden vervangen, even wachten a.u.b..." #: ../plugins/Spaces/i18n.py:25 msgid "No spaces found to replace" msgstr "Geen spaties gevonden om te vervangen" #: ../plugins/Spaces/i18n.py:26 msgid "Replaced spaces with tabs" msgstr "Spaties vervangen door tabs" #: ../plugins/Spaces/i18n.py:27 msgid "Replacing tabs please wait..." msgstr "Tabs worden vervangen, even wachten a.u.b..." #: ../plugins/Spaces/i18n.py:28 msgid "Replaced tabs with spaces" msgstr "Tabs vervangen door spaties" #: ../plugins/Spaces/i18n.py:29 msgid "No tabs found to replace" msgstr "Geen tabs gevonden om te vervangen" #: ../plugins/Spaces/i18n.py:30 msgid "Removing spaces please wait..." msgstr "Spaties worden verwijderd, even wachten a.u.b..." #: ../plugins/Spaces/i18n.py:31 msgid "No spaces were found at end of line" msgstr "Geen spaties gevonden aan het einde van de regel" #: ../plugins/Spaces/i18n.py:32 msgid "Removed spaces at end of lines" msgstr "Spaties verwijderd aan het einde van de regels" #: ../plugins/Spaces/i18n.py:33 msgid "S_paces" msgstr "S_paties" #: ../plugins/Spaces/i18n.py:34 msgid "_Tabs to Spaces" msgstr "_Tabs naar spaties" #: ../plugins/Spaces/i18n.py:35 msgid "_Spaces to Tabs" msgstr "_Spaties naar tabs" #: ../plugins/Spaces/i18n.py:36 msgid "_Remove Trailing Spaces" msgstr "Spaties aan einde regel ve_rwijderen" #: ../plugins/GotoBar/i18n.py:23 msgid "Move cursor to a specific line" msgstr "Cursor naar een bepaalde regel verplaatsen" #: ../plugins/GotoBar/i18n.py:24 msgid "Closed goto line bar" msgstr "Ga naar-balk gesloten" #: ../plugins/GotoBar/i18n.py:25 #, python-format msgid " of %d" msgstr " van %d" #: ../plugins/GotoBar/i18n.py:26 msgid "Line number:" msgstr "Regelnummer:" #: ../plugins/GotoBar/i18n.py:27 #, python-format msgid "Moved cursor to line %d" msgstr "Cursor verplaatst naar regel %d" #: ../plugins/SearchReplace/i18n.py:23 msgid "Searching please wait..." msgstr "Aan het zoeken, even wachten a.u.b..." #: ../plugins/SearchReplace/i18n.py:24 #, python-format msgid "Found %d matches" msgstr "%d zoekresultaten" #: ../plugins/SearchReplace/i18n.py:25 #, python-format msgid "Match %d of %d" msgstr "Zoekresultaat %d van %d" #: ../plugins/SearchReplace/i18n.py:26 msgid "No match found" msgstr "Geen zoekresultaten" #: ../plugins/SearchReplace/i18n.py:27 msgid "No next match found" msgstr "Geen volgend zoekresultaat" #: ../plugins/SearchReplace/i18n.py:28 msgid "Stopped operation" msgstr "Bewerking gestopt" #: ../plugins/SearchReplace/i18n.py:29 msgid "Replacing please wait..." msgstr "Aan het vervangen, even wachten a.u.b..." #: ../plugins/SearchReplace/i18n.py:30 msgid "Replace found match" msgstr "Geselecteerd zoekresultaat is vervangen" #: ../plugins/SearchReplace/i18n.py:31 msgid "Replaced all found matches" msgstr "Alle zoekresultaten zijn vervangen" #: ../plugins/SearchReplace/i18n.py:32 msgid "No previous match found" msgstr "Geen vorig zoekresultaat" #: ../plugins/ReplaceBar/i18n.py:30 msgid "Replac_e with:" msgstr "V_ervangen door:" #: ../plugins/ReplaceBar/i18n.py:32 msgid "Closed replace bar" msgstr "Vervangbalk gesloten" #: ../plugins/ReplaceBar/i18n.py:33 msgid "_Replace" msgstr "Ve_rvangen" #: ../plugins/ReplaceBar/i18n.py:34 msgid "Replace _All" msgstr "_Alles vervangen" #: ../plugins/ReplaceBar/i18n.py:35 msgid "Incre_mental" msgstr "_Oplopend" #: ../plugins/ColorEditor/i18n.py:23 msgid "Change editor colors" msgstr "Kleuren van het tekstvenster veranderen" #: ../plugins/ColorEditor/i18n.py:24 msgid "Syntax Color Editor" msgstr "Syntaxiskleuren configureren" #: ../plugins/ColorEditor/i18n.py:25 msgid "_Use default theme" msgstr "_Standaardthema gebruiken" #: ../plugins/ColorEditor/i18n.py:26 msgid "Using theme colors" msgstr "Themakleuren gebruiken" #: ../plugins/ColorEditor/i18n.py:27 msgid "Using custom colors" msgstr "Aangepaste kleuren gebruiken" #: ../plugins/ColorEditor/i18n.py:28 msgid "Select foreground color" msgstr "Voorgrondkleur selecteren" #: ../plugins/ColorEditor/i18n.py:29 msgid "_Normal text color: " msgstr "_Normale tekstkleur:" #: ../plugins/ColorEditor/i18n.py:30 msgid "_Background color: " msgstr "_Achtergrondkleur:" #: ../plugins/ColorEditor/i18n.py:31 msgid "_Foreground:" msgstr "_Voorgrond:" #: ../plugins/ColorEditor/i18n.py:32 msgid "Back_ground:" msgstr "Achter_grond:" #: ../plugins/ColorEditor/i18n.py:33 msgid "Select background color" msgstr "Achtergrondkleur selecteren" #: ../plugins/ColorEditor/i18n.py:34 msgid "Language Elements" msgstr "Taalelementen" #: ../plugins/ColorEditor/i18n.py:35 msgid "Select foreground syntax color" msgstr "Voorgrondkleur voor syntaxiskleuring selecteren" #: ../plugins/ColorEditor/i18n.py:36 msgid "Select background syntax color" msgstr "Achtergrondkleur voor syntaxiskleuring selecteren" #: ../plugins/ColorEditor/i18n.py:39 msgid "_Underline" msgstr "_Onderstrepen" #: ../plugins/ColorEditor/i18n.py:40 msgid "_Reset to Default" msgstr "Standaardwaarden he_rstellen" #: ../plugins/SyntaxColorSwitcher/i18n.py:23 msgid "_Highlight Mode" msgstr "_Accentueermodus" #: ../plugins/SyntaxColorSwitcher/i18n.py:25 #, python-format msgid "Activated '%s' syntax color" msgstr "'%s' syntaxiskleuren geactiveerd" #: ../plugins/SyntaxColorSwitcher/i18n.py:26 msgid "Disabled syntax color" msgstr "Syntaxiskleuren uitgeschakeld" scribes-0.4~r910/po/fr.po0000644000175000017500000020171711242100540015017 0ustar andreasandreas# translation of PACKAGE. # Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # <>, 2006. # , fuzzy # <>, 2006. # # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-08 14:46+0200\n" "PO-Revision-Date: 2007-04-28 09:30+0200\n" "Last-Translator: Hanusz Leszek \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit" #. From module about.py #: ../SCRIBES/internationalization.py:68 msgid "Scribes is a text editor for GNOME." msgstr "Scribes est un éditeur de texte pour GNOME." #. .decode(encoding).encode("utf-8") #. From module accelerators.py #: ../SCRIBES/internationalization.py:71 msgid "Cannot undo action" msgstr "Impossible d'annuler l'action" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:72 msgid "Cannot redo action" msgstr "Impossible de refaire l'action" #. .decode(encoding).encode("utf-8") #. From module lines.py #: ../SCRIBES/internationalization.py:75 #, python-format msgid "Deleted line %d" msgstr "Ligne effacée %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:76 #, python-format msgid "Joined line %d to line %d" msgstr "Collé la ligne %d à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:77 msgid "No more lines to join" msgstr "Plus de lignes à coller" #. .decode(encoding).encode("utf-8") #. From module select.py #: ../SCRIBES/internationalization.py:80 msgid "Selected word" msgstr "Mot sélectionné" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:81 msgid "No word to select" msgstr "Pas de mot à sélectionner" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:82 #, python-format msgid "No text to select on line %d" msgstr "Pas de texte à sélectionner dans la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:83 #, python-format msgid "Selected line %d" msgstr "Ligne %d sélectionnée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:84 msgid "Selected paragraph" msgstr "Paragraphe sélectionné" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:85 msgid "No paragraph to select" msgstr "Pas de paragraphe à sélectionner" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:86 msgid "Selected sentence" msgstr "Phrase sélectionnée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:87 msgid "No sentence to select" msgstr "Pas de phrase à sélectionner" #. .decode(encoding).encode("utf-8") #. From module case.py #: ../SCRIBES/internationalization.py:90 msgid "No selection to change case" msgstr "Pas de sélection pour appliquer un changement de casse" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:91 msgid "Selected text is already uppercase" msgstr "Le texte sélectionné est déjà en majuscules" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:92 msgid "Changed selected text from lowercase to uppercase" msgstr "Le texte sélectionné a été changé de minuscules en majuscules" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:93 msgid "Selected text is already lowercase" msgstr "Le texte sélectionné est déjà en minuscules" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:94 msgid "Changed selected text from uppercase to lowercase" msgstr "Le texte sélectionné a été changé de majuscules en minuscules" #. .decode(encoding).encode("utf-8") #. From module bracket.py #: ../SCRIBES/internationalization.py:97 #, python-format msgid "Found matching bracket on line %d" msgstr "Parenthèse correspondante trouvée à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:98 msgid "No matching bracket found" msgstr "Pas de parenthèse correspondante trouvée" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py #: ../SCRIBES/internationalization.py:101 #: ../SCRIBES/internationalization.py:738 msgid "Disabled spellchecking" msgstr "Correction orthographique désactivée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:102 #: ../SCRIBES/internationalization.py:737 msgid "Enabled spellchecking" msgstr "Correction orthographique activée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:103 msgid "Leave Fullscreen" msgstr "Quitter le plein écran" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py, fileloader.py, timeout.py #: ../SCRIBES/internationalization.py:106 msgid "Unsaved Document" msgstr "Document non sauvé" #. .decode(encoding).encode("utf-8") #. From module filechooser.py #: ../SCRIBES/internationalization.py:109 msgid "Open Document" msgstr "Ouvre document" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:110 msgid "All Documents" msgstr "Tous les documents" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:111 msgid "Python Documents" msgstr "Document Python" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:112 msgid "Text Documents" msgstr "Document texte" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:115 #, python-format msgid "Loaded file \"%s\"" msgstr "Fichier \"%s\" chargé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:116 msgid "" "The encoding of the file you are trying to open could not be determined. Try " "opening the file with another encoding." msgstr "" "Erreur de décodage. L'encodage de caractères du fichier que vous essayez " "d'ouvrir n'est pas reconnu. Essayez d'ouvrir le fichier avec un autre " "encodage de caractères." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:118 msgid "Loading file please wait..." msgstr "Chargement du fichier, patientez SVP..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:119 msgid "" "An error occurred while openning the file. Please file a bug report at " "http://scribes.sourceforge.net" msgstr "" "Erreur lors de l'ouverture du fichier. Reportez le bogue sur notre site:" "http://scribes.sourceforge.net" #. .decode(encoding).encode("utf-8") #. From module fileloader.py, savechooser.py #: ../SCRIBES/internationalization.py:123 msgid " " msgstr " " #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:126 msgid "You do not have permission to view this file." msgstr "Vous n'avez pas la permission d'ouvrir ce fichier." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:127 msgid "The file you are trying to open is not a text file." msgstr "Le fichier que vous essayez d'ouvrir n'est pas un fichier texte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:128 msgid "The file you are trying to open does not exist." msgstr "Le fichier que vous essayez d'ouvrir n'existe pas." #. .decode(encoding).encode("utf-8") #. From module main.py #: ../SCRIBES/internationalization.py:131 #, python-format msgid "Unrecognized option: '%s'" msgstr "Option non reconnue: '%s'" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:132 msgid "Try 'scribes --help' for more information" msgstr "Essayez 'scribes --help' pour plus d'information" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:133 msgid "Scribes only supports using one option at a time" msgstr "Scribes ne supporte qu'une option à la fois" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:134 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s ne prend pas de paramètres" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:135 #, python-format msgid "Scribes version %s" msgstr "Scribes version %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:136 #, python-format msgid "%s does not exist" msgstr "%s n'existe pas" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:139 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "Le fichier \"%s\" est ouvert en lecture seule" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:140 #, python-format msgid "The file \"%s\" is open" msgstr "Le fichier \"%s\" est ouvert" #. .decode(encoding).encode("utf-8") #. From modules findbar.py #: ../SCRIBES/internationalization.py:143 msgid "No match found" msgstr "Pas de correspondance trouvée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:144 #, python-format msgid "Found %d match" msgstr "%d correspondance trouvée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:145 #, python-format msgid "Found %d matches" msgstr "%d correspondances trouvées" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:146 msgid "_Search for: " msgstr "_Rechercher: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:147 msgid "_Search for:" msgstr "_Rechercher:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:148 msgid "_Previous" msgstr "_Précédent" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:149 msgid "_Next" msgstr "_Suivant" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:150 msgid "Match _case" msgstr "Respecter la casse" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:151 msgid "Match _word" msgstr "Mot entier" #. .decode(encoding).encode("utf-8") #. From modules gotobar.py #: ../SCRIBES/internationalization.py:154 msgid "Line number:" msgstr "Numéro de ligne:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:155 #, python-format msgid " of %d" msgstr " de %d" #. .decode(encoding).encode("utf-8") #. From module help.py #: ../SCRIBES/internationalization.py:158 msgid "Launching help browser" msgstr "Lancement de l'aide" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:161 msgid "No indentation selection found" msgstr "Pas de sélection à indenter" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:162 msgid "Selection indented" msgstr "Sélection indentée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:163 msgid "Unindentation is not possible" msgstr "Désindentation impossible" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:164 msgid "Selection unindented" msgstr "Sélection désindentée" #. .decode(encoding).encode("utf-8") #. From module modes.py #: ../SCRIBES/internationalization.py:167 msgid "loading..." msgstr "chargement..." #. .decode(encoding).encode("utf-8") #. From module preferences.py #: ../SCRIBES/internationalization.py:170 msgid "Font" msgstr "Fonte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:171 msgid "Editor _font: " msgstr "_Fonte de l'éditeur:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:172 msgid "Tab Stops" msgstr "Utilisation des Tabulations" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:173 msgid "_Tab width: " msgstr "_Taille des tabulations:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:174 msgid "Text Wrapping" msgstr "Mise à la ligne" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:175 msgid "Enable text _wrapping" msgstr "Activer la mise a la _ligne" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:176 msgid "Right Margin" msgstr "Marge à droite" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:177 msgid "Display right _margin" msgstr "Afficher la marge à _droite" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:178 msgid "_Right margin position: " msgstr "_Position de la marge à droite: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:179 msgid "Spell Checking" msgstr "Correction orthographique" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:180 msgid "_Enable spell checking" msgstr "_Activer la correction orthographique" #. .decode(encoding).encode("utf-8") #. From modules printing.py #: ../SCRIBES/internationalization.py:183 msgid "Print Preview" msgstr "Aperçu avant impression" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:184 msgid "File: " msgstr "Fichier: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:185 msgid "Print Document" msgstr "Imprimer le Document" #. .decode(encoding).encode("utf-8") #. From module replace.py #: ../SCRIBES/internationalization.py:188 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" a été remplacé par \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:189 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Toutes les occurences de \"%s\" ont été remplacées par \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:190 msgid "Replac_e with:" msgstr "R_emplacer par:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:191 msgid "_Replace" msgstr "_Remplacer" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:192 msgid "Replace _All" msgstr "Remplacer _Tout" #. .decode(encoding).encode("utf-8") #. From module savechooser.py #: ../SCRIBES/internationalization.py:195 msgid "Save Document" msgstr "Sauver le Document" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:198 msgid "An error occurred while saving this file." msgstr "Une erreur est arrivée lors de la sauvegarde du fichier." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:199 msgid "" "An error occurred while decoding your file. Please file a bug report at " "\"http://openusability.org/forum/?group_id=141\"" msgstr "" "Une erreur est arrivée lors du décodage du fichier. Reportez le bogue sur " "notre site:\"http://openusability.org/forum/?group_id=141\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:201 #, python-format msgid "Saved \"%s\"" msgstr "\"%s\" sauvé" #. .decode(encoding).encode("utf-8") #. From module textview.py #: ../SCRIBES/internationalization.py:204 msgid "Shift _Right" msgstr "Déplacer à _Droite" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:205 msgid "Shift _Left" msgstr "Déplacer à _Gauche" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:206 msgid "_Find Matching Bracket" msgstr "_Rechercher la parenthèse correspondante" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:207 msgid "Copied selected text" msgstr "Le texte sélectionné a été copié" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:208 msgid "No selection to copy" msgstr "Pas de sélection à copier" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:209 msgid "Cut selected text" msgstr "Couper le texte sélectionné" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:210 msgid "No selection to cut" msgstr "Pas de sélection à couper" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:211 msgid "Pasted copied text" msgstr "Le texte a été collé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:212 msgid "No text content in the clipboard" msgstr "Pas de texte dans le presse-papier" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:215 #, python-format msgid "%d%% complete" msgstr "%d%% effectué" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:216 msgid "completed" msgstr "terminé" #. .decode(encoding).encode("utf-8") #. From module tooltips.py #: ../SCRIBES/internationalization.py:219 msgid "Open a new window" msgstr "Ouvrir une nouvelle fenêtre" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:220 msgid "Open a file" msgstr "Ouvrir un fichier" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:221 msgid "Rename the current file" msgstr "Renommer le fichier" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:222 msgid "Print the current file" msgstr "Imprimer le fichier" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:223 msgid "Undo last action" msgstr "Défaire l'action précédente" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:224 msgid "Redo undone action" msgstr "Refaire l'action annulée" #. .decode(encoding).encode("utf-8") #. .decode(encoding).encode("utf-8") #. From findbar.py #: ../SCRIBES/internationalization.py:225 #: ../SCRIBES/internationalization.py:355 msgid "Search for text" msgstr "Rechercher dans le texte" #. .decode(encoding).encode("utf-8") #. .decode(encoding).encode("utf-8") #. From replacebar.py #: ../SCRIBES/internationalization.py:226 #: ../SCRIBES/internationalization.py:359 msgid "Search for and replace text" msgstr "Chercher et Remplacer dans le texte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:227 msgid "Go to a specific line" msgstr "Aller à une ligne spécifiée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:228 msgid "Configure the editor" msgstr "Configurer l'éditeur" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:229 msgid "Launch the help browser" msgstr "Afficher l'aide" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:230 msgid "Search for previous occurrence of the string" msgstr "Rechercher des occurences précédentes de la chaine" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:231 msgid "Search for next occurrence of the string" msgstr "Rechercher la prochaine occurence de la chaine" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:232 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "Rechercher des occurences de la chaine en respectant la casse" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:234 msgid "Find occurrences of the string that match the entire word only" msgstr "Rechercher des occurences de la chaine par mot entier seulement" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:235 msgid "Type in the text you want to search for" msgstr "Entrez le texte que vous désirez chercher" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:236 msgid "Type in the text you want to replace with" msgstr "Entrez le texte que vous désirez remplacer" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:237 msgid "Replace the selected found match" msgstr "Remplacer cette occurence" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:238 msgid "Replace all found matches" msgstr "Remplacer toutes les occurences" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:239 msgid "Click to specify the font type, style, and size to use for text." msgstr "" "Cliquez pour specifier les caractéristiques de la fonte à utiliser pour le " "texte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:240 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" "Cliquez pour specifier le nombre d'espaces à inserer lorsque vous pressez la " "touche Tabulation." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:242 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "Activer la coupure du texte lorsque vous atteignez la marge à droite." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:244 msgid "Select to display a vertical line that indicates the right margin." msgstr "Afficher la ligne verticale qui indique la marge à droite." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:246 msgid "Click to specify the location of the vertical line." msgstr "Cliquer pour spécifier la position de la marge à droite." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:247 msgid "Select to enable spell checking" msgstr "Activer la correction orthographique" #. .decode(encoding).encode("utf-8") #. From module undo_redo.py #: ../SCRIBES/internationalization.py:250 msgid "Undid last action" msgstr "Action précédente annulée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:251 msgid "Redid undone action" msgstr "Action annulée réactivée" #. .decode(encoding).encode("utf-8") #. From module usage.py #: ../SCRIBES/internationalization.py:254 msgid "A text editor for GNOME." msgstr "Un éditeur de texte pour GNOME" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:255 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "usage: scribes [OPTION] [FILE] [...]" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:256 msgid "Options:" msgstr "Options:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:257 msgid "display this help screen" msgstr "affiche cette page d'aide" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:258 msgid "output version information of Scribes" msgstr "affiche les informations de version de Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:259 msgid "create a new file and open the file with Scribes" msgstr "créer un nouveau fichier et l'ouvrir avec Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:260 msgid "open file in readonly mode" msgstr "ouvrir le fichier en lecture seule" #. .decode(encoding).encode("utf-8") #. From module utility.py #: ../SCRIBES/internationalization.py:263 msgid "Could not find Scribes' data folder" msgstr "Impossible de trouver le répertoire de données de Scribes" #. .decode(encoding).encode("utf-8") #. From preferences.py #: ../SCRIBES/internationalization.py:266 msgid "Preferences" msgstr "Préférences" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:269 msgid "error" msgstr "erreur" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:272 msgid "No spaces were found at end of line" msgstr "Aucun espace n'a été trouvé à la fin de la ligne" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:273 #, python-format msgid "Removed spaces at end of line %d" msgstr "Les espaces de fin de la ligne ont été supprimés à la ligne %d" #. .decode(encoding).encode("utf-8") #. From module lines.py #: ../SCRIBES/internationalization.py:276 #, python-format msgid "Freed line %d" msgstr "Ligne %d libérée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:277 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Le texte a été supprimé du curseur à la fin de la ligne à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:278 msgid "Cursor is already at the end of line" msgstr "Le curseur est déjà à la fin de la ligne" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:279 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Le texte a été supprimé du curseur au début de la ligne, à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:280 msgid "Cursor is already at the beginning of line" msgstr "Le curseur est déjà au début de la ligne" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:283 msgid "No spaces were found at beginning of line" msgstr "Aucun espace n'a été trouvé au début de la ligne" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:284 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Les espaces de début de ligne ont été supprimés, à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:285 msgid "Removed spaces at beginning of selected lines" msgstr "" "Les espaces de début de ligne ont été supprimés sur les lignes sélectionnées" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:286 msgid "Removed spaces at end of selected lines" msgstr "" "Les espaces de fin de ligne ont été supprimés sur les lignes sélectionnées" #. .decode(encoding).encode("utf-8") #. From module actions.py #: ../SCRIBES/internationalization.py:289 msgid "Cannot perform operation in readonly mode" msgstr "Impossible d'effectuer cette opération en mode lecture seule" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:292 #, python-format msgid "Indented line %d" msgstr "La ligne %d a été indentée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:293 #, python-format msgid "Unindented line %d" msgstr "La ligne %d a été désindentée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:294 msgid "No selected lines can be indented" msgstr "Les lignes sélectionnées ne peuvent être indentées" #. .decode(encoding).encode("utf-8") #. From module case.py #: ../SCRIBES/internationalization.py:297 msgid "Swapped the case of selected text" msgstr "La casse du texte sélectionné a été inversée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:298 msgid "Capitalized selected text" msgstr "Le texte sélectionné a été capitalisé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:299 msgid "Selected text is already capitalized" msgstr "Le texte sélectionné est déjà capitalisé" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:302 msgid "" "An error occurred while encoding your file. Try saving your file using " "another character encoding, preferably UTF-8." msgstr "" "Une erreur est apparue lors de l'encodage du fichier. Essayez de le sauver en " "utilisant un autre codage de caractère, de préférence UTF-8." #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:306 msgid "" "An encoding error occurred. Please file a bug report at http://openusability." "org/forum/?group_id=141" msgstr "Une erreur d'encodage est apparue." #. .decode(encoding).encode("utf-8") #. From brackets.py #: ../SCRIBES/internationalization.py:310 msgid "Pair character completion occurred" msgstr "Autocompletion de parenthèse" #. .decode(encoding).encode("utf-8") #. From autocomplete.py #: ../SCRIBES/internationalization.py:313 msgid "Word completion occurred" msgstr "Autocompletion de mot" #. .decode(encoding).encode("utf-8") #. From brackets.py #: ../SCRIBES/internationalization.py:316 msgid "Removed pair character completion" msgstr "Autocompletion de parenthèse annulée" #. .decode(encoding).encode("utf-8") #. From encoding.py #: ../SCRIBES/internationalization.py:319 msgid "Character _Encoding: " msgstr "_Codage des caractères: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:320 msgid "Add or Remove Encoding ..." msgstr "Ajouter ou Supprimer le codage ..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:321 msgid "Recommended (UTF-8)" msgstr "Recommandé (UTF-8)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:322 msgid "Add or Remove Character Encoding" msgstr "Ajouter ou Supprimer l'Encodage de Caractère" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:323 msgid "Language and Region" msgstr "Langue et Région" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:324 msgid "Character Encoding" msgstr "Encodage de Caractère" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:325 msgid "Select" msgstr "Selectionner" #. .decode(encoding).encode("utf-8") #. From bookmark.py #: ../SCRIBES/internationalization.py:328 #, python-format msgid "Line %d is already bookmarked" msgstr "La ligne %d a déjà un signet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:329 #, python-format msgid "Bookmarked line %d" msgstr "Un signet a été placé sur la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:330 #, python-format msgid "No bookmark on line %d to remove" msgstr "Pas de signet à supprimer sur la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:331 #, python-format msgid "Removed bookmark on line %d" msgstr "Le signet sur la ligne %s a été supprimé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:332 msgid "No bookmarks found to remove" msgstr "Aucun signets n'a été trouvé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:333 msgid "Removed all bookmarks" msgstr "Tous les signets ont été supprimés" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:334 msgid "No next bookmark to move to" msgstr "Pas de signet suivant" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:335 #, python-format msgid "Moved to bookmark on line %d" msgstr "Curseur placé sur le signet de la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:336 msgid "No previous bookmark to move to" msgstr "Pas de signet précédent" #. .decode(encoding).encode("utf-8") #. From filechooser.py, savechooser.py #: ../SCRIBES/internationalization.py:339 msgid "Select character _encoding" msgstr "Encodage de caractère" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:342 #, python-format msgid "Replaced tabs with spaces on line %d" msgstr "Remplacé les tabulations par des espaces à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:343 #: ../SCRIBES/internationalization.py:655 msgid "Replacing tabs please wait..." msgstr "Changement des tabulations, patientez SVP..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:344 #, python-format msgid "No tabs found on line %d" msgstr "Pas de tabulations dans la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:345 msgid "No tabs found in selected text" msgstr "Pas de tabulations dans le texte sélectionné" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:346 msgid "Removing spaces please wait..." msgstr "Effacement des espaces, patientez SVP..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:347 msgid "Indenting please wait..." msgstr "Indentation en cours, patientez SVP..." #. .decode(encoding).encode("utf-8") #. From gotobar.py #: ../SCRIBES/internationalization.py:350 msgid "Move cursor to a specific line" msgstr "Déplacer le curseur à une ligne spécifiée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:351 #, python-format msgid "Moved cursor to line %d" msgstr "Curseur placé à la ligne %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:352 msgid "Closed goto line bar" msgstr "Barre 'aller à la ligne' masquée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:356 msgid "Closed search bar" msgstr "Barre de recherche masquée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:360 msgid "Closed replace bar" msgstr "Barre de remplacement masquée" #. .decode(encoding).encode("utf-8") #. From filechooser.py #: ../SCRIBES/internationalization.py:363 msgid "Closed dialog window" msgstr "Fenêtre de dialogue fermée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:364 msgid "Select file for loading" msgstr "Selectionner le fichier à charger" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:367 #, python-format msgid "Cannot open %s" msgstr "Impossible d'ouvrir %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:368 msgid "Closed error dialog" msgstr "Fenêtre d'erreur fermée" #. .decode(encoding).encode("utf-8") #. From fileloader.py #: ../SCRIBES/internationalization.py:371 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. " "Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "Le type MIME du fichier que vous essayez d'ouvrir ne peut être déterminé," "Verifiez que le fichier est bien un format texte\n" "\n" "type MIME: %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:373 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "Erreur lors de la vérification du fichier. Le fichier que vous essayez " "d'ouvrir n'est pas un fichier texte.\n" "\n" "Type MIME : %s" #. .decode(encoding).encode("utf-8") #. From savechooser.py #: ../SCRIBES/internationalization.py:377 msgid "Change name of file and save" msgstr "Changer le nom du fichier et le sauver" #. .decode(encoding).encode("utf-8") #. From printing.py #: ../SCRIBES/internationalization.py:380 msgid "Print file" msgstr "Imprimer fichier" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:381 #, python-format msgid "Printing \"%s\"" msgstr "Impression de \"%s\"" #. .decode(encoding).encode("utf-8") #. From preferences.py #: ../SCRIBES/internationalization.py:384 msgid "Change editor settings" msgstr "Modifier les paramètres de l'éditeur" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:385 #, python-format msgid "Changed font to \"%s\"" msgstr "La fonte est maintenant: \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:386 #, python-format msgid "Changed tab width to %d" msgstr "Taille des tabulations: %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:387 msgid "Enabled text wrapping" msgstr "Mise à la ligne activée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:388 msgid "Disabled text wrapping" msgstr "Mise à la _ligne désactivée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:389 msgid "Show right margin" msgstr "Affiche la marge à droite" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:390 msgid "Hide right margin" msgstr "Cache la marge à droite" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:391 #, python-format msgid "Positioned margin line at column %d" msgstr "Marge à droite placée à la colonne %d" #. .decode(encoding).encode("utf-8") #. From about.py #: ../SCRIBES/internationalization.py:394 msgid "Information about the text editor" msgstr "Informations à propos de l'éditeur de texte" #. .decode(encoding).encode("utf-8") #. From select.py #: ../SCRIBES/internationalization.py:397 msgid "No brackets found for selection" msgstr "Aucun crochet n'a été trouvé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:398 msgid "Selected characters inside bracket" msgstr "Les caractères à l'intérieur des parenthèses ont été sélectionnés" #. .decode(encoding).encode("utf-8") #. From bracket.py #: ../SCRIBES/internationalization.py:401 msgid "Enclosed selected text" msgstr "Le texte sélectionné a été entouré" #. .decode(encoding).encode("utf-8") #. From encoding.py #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:404 #: ../SCRIBES/internationalization.py:407 #: ../SCRIBES/internationalization.py:409 msgid "English" msgstr "Anglais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:405 #: ../SCRIBES/internationalization.py:406 #: ../SCRIBES/internationalization.py:430 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:408 #: ../SCRIBES/internationalization.py:416 #: ../SCRIBES/internationalization.py:420 #: ../SCRIBES/internationalization.py:439 #: ../SCRIBES/internationalization.py:465 msgid "Hebrew" msgstr "Hébreu" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:410 #: ../SCRIBES/internationalization.py:413 #: ../SCRIBES/internationalization.py:433 #: ../SCRIBES/internationalization.py:436 #: ../SCRIBES/internationalization.py:470 #: ../SCRIBES/internationalization.py:478 msgid "Western Europe" msgstr "Europe Occidentale" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:411 #: ../SCRIBES/internationalization.py:425 #: ../SCRIBES/internationalization.py:427 #: ../SCRIBES/internationalization.py:437 #: ../SCRIBES/internationalization.py:464 #: ../SCRIBES/internationalization.py:475 msgid "Greek" msgstr "Grec" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:412 #: ../SCRIBES/internationalization.py:441 #: ../SCRIBES/internationalization.py:468 msgid "Baltic languages" msgstr "Langues Baltiques" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:414 #: ../SCRIBES/internationalization.py:434 #: ../SCRIBES/internationalization.py:459 #: ../SCRIBES/internationalization.py:477 msgid "Central and Eastern Europe" msgstr "Europe Centrale et Orientale" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:415 #: ../SCRIBES/internationalization.py:435 #: ../SCRIBES/internationalization.py:462 #: ../SCRIBES/internationalization.py:474 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgare, Macédonien, Russe, Serbe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:417 #: ../SCRIBES/internationalization.py:432 #: ../SCRIBES/internationalization.py:438 #: ../SCRIBES/internationalization.py:466 #: ../SCRIBES/internationalization.py:479 msgid "Turkish" msgstr "Turc" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:418 msgid "Portuguese" msgstr "Portugais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:419 #: ../SCRIBES/internationalization.py:476 msgid "Icelandic" msgstr "Icelandais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:421 msgid "Canadian" msgstr "Canadien" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:422 #: ../SCRIBES/internationalization.py:440 #: ../SCRIBES/internationalization.py:463 msgid "Arabic" msgstr "Arabe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:423 msgid "Danish, Norwegian" msgstr "Danois, Norvégien" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:424 #: ../SCRIBES/internationalization.py:472 msgid "Russian" msgstr "Russe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:426 msgid "Thai" msgstr "Thaï" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:428 #: ../SCRIBES/internationalization.py:443 #: ../SCRIBES/internationalization.py:444 #: ../SCRIBES/internationalization.py:445 #: ../SCRIBES/internationalization.py:451 #: ../SCRIBES/internationalization.py:452 #: ../SCRIBES/internationalization.py:454 #: ../SCRIBES/internationalization.py:455 #: ../SCRIBES/internationalization.py:456 #: ../SCRIBES/internationalization.py:481 #: ../SCRIBES/internationalization.py:482 #: ../SCRIBES/internationalization.py:483 msgid "Japanese" msgstr "Japonais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:429 #: ../SCRIBES/internationalization.py:446 #: ../SCRIBES/internationalization.py:457 #: ../SCRIBES/internationalization.py:471 msgid "Korean" msgstr "Koréen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:431 msgid "Urdu" msgstr "Ourdou" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:442 msgid "Vietnamese" msgstr "Vietnamien" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:447 #: ../SCRIBES/internationalization.py:450 msgid "Simplified Chinese" msgstr "Chinois Simplifié" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:448 #: ../SCRIBES/internationalization.py:449 msgid "Unified Chinese" msgstr "Chinois Unifié" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:453 msgid "Japanese, Korean, Simplified Chinese" msgstr "Japonais, Koréen, Chinois SImplifié" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:458 msgid "West Europe" msgstr "Europe Occidentale" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:460 msgid "Esperanto, Maltese" msgstr "Esperanto, Maltais" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:461 msgid "Baltic languagues" msgstr "Langues Baltiques" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:467 msgid "Nordic languages" msgstr "Langues Nordiques" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:469 msgid "Celtic languages" msgstr "Langues Celtiques" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:473 msgid "Ukrainian" msgstr "Ukrainien" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:480 msgid "Kazakh" msgstr "Kazak" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:484 msgid "All languages" msgstr "Toutes les langues" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:485 #: ../SCRIBES/internationalization.py:486 msgid "All Languages (BMP only)" msgstr "Toutes les langues (BMP uniquement)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:487 msgid "All Languages" msgstr "Toutes les langues" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:488 msgid "None" msgstr "Aucun" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:492 msgid "Replaced tabs with spaces on selected lines" msgstr "" "Les espaces de fin de ligne ont été supprimés sur les lignes sélectionnées" #. .decode(encoding).encode("utf-8") #. From scribes.desktop #: ../SCRIBES/internationalization.py:495 msgid "Scribes Text Editor" msgstr "Scribes Editeur de Texte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:496 msgid "Edit text files" msgstr "Edite les fichiers textes" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:499 msgid "Syntax Color Editor" msgstr "Configuration de la Coloration Syntaxique" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:500 msgid "_Use default theme" msgstr "Utiliser le thème par défa_ut" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:501 msgid "_Normal text color: " msgstr "Couleur du texte _normal" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:502 msgid "_Background color: " msgstr "Couleur de _Fond" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:503 msgid "Language Elements" msgstr "Elements de Language" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:504 msgid "Co_lor: " msgstr "Cou_leur:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:505 #: ../SCRIBES/internationalization.py:750 msgid "B_old" msgstr "_Gras" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:506 #: ../SCRIBES/internationalization.py:751 msgid "I_talic" msgstr "_Italique" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:507 msgid "_Reset to Default" msgstr "_Remise à zéro" #. .decode(encoding).encode("utf-8") #. From templateseditor.py #: ../SCRIBES/internationalization.py:510 msgid "Template Editor" msgstr "Editeur de Patrons" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:511 msgid "_Language" msgstr "_Langue" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:512 msgid "_Name" msgstr "_Nom" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:513 msgid "Description" msgstr "Description" #. .decode(encoding).encode("utf-8") #. From templateadd.py #: ../SCRIBES/internationalization.py:516 msgid "_Name:" msgstr "_Nom:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:517 msgid "_Description:" msgstr "_Description:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:518 msgid "_Template:" msgstr "_Patron:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:519 msgid "Add New Template" msgstr "Ajouter un Patron" #. .decode(encoding).encode("utf-8") #. From templateedit.py #: ../SCRIBES/internationalization.py:522 msgid "Edit Template" msgstr "Editer un Patron" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:525 msgid "Select to use themes' foreground and background colors" msgstr "Sélectionner pour utiliser les couleurs du thème par défaut" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:526 msgid "Click to choose a new color for the editor's text" msgstr "Cliquer pour choisir une couleur pour le texte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:527 msgid "Click to choose a new color for the editor's background" msgstr "Cliquer pour choisir une couleur pour le fond" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:528 msgid "Click to choose a new color for the language syntax element" msgstr "Cliquer pour choisir une couleur pour cet élément de syntaxe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:529 msgid "Select to make the language syntax element bold" msgstr "Cocher pour mettre l'élément de syntaxe en gras" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:530 msgid "Select to make the language syntax element italic" msgstr "Cocher pour mettre l'élément de syntaxe en italique" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:531 msgid "Select to reset the language syntax element to its default settings" msgstr "Cliquer pour remettre a zéro les paramètres de l'élement de syntaxe" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:535 msgid "Change editor colors" msgstr "Changer les couleurs de l'éditeur" #. .decode(encoding).encode("utf-8") #. From readonly.py #: ../SCRIBES/internationalization.py:538 msgid "Toggled readonly mode on" msgstr "Mode lecture seule activé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:539 msgid "File has not been saved to disk" msgstr "Le fichier n'a pas été sauvé sur le disque" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:540 msgid "Toggled readonly mode off" msgstr "Mode lecture seule désactivé" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:541 msgid "No permission to modify file" msgstr "Vous n'avez pas la permission d'écrire dans ce fichier." #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:544 msgid "Menu for advanced configuration" msgstr "Menu de configuration avancée" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:545 msgid "Configure the editor's foreground, background or syntax colors" msgstr "Changer les couleurs de l'éditeur" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:546 msgid "Create, modify or manage templates" msgstr "Créer, et modifier les Patrons" #. .decode(encoding).encode("utf-8") #. From cursor.py #: ../SCRIBES/internationalization.py:549 #, python-format msgid "Ln %d col %d" msgstr "Li %d col %d" #. .decode(encoding).encode("utf-8") #. From passworddialog.py #: ../SCRIBES/internationalization.py:552 msgid "Authentication Required" msgstr "Authentification requise" #: ../SCRIBES/internationalization.py:553 #, python-format msgid "You must log in to access %s" msgstr "Vous devez vous identifier pour acceder à %s" #: ../SCRIBES/internationalization.py:554 msgid "_Password:" msgstr "Mot de _passe:" #: ../SCRIBES/internationalization.py:555 msgid "_Remember password for this session" msgstr "_Enregistrer le mot de passe pour cette session" #: ../SCRIBES/internationalization.py:556 msgid "Save password in _keyring" msgstr "Sauver le mot de passe dans le _trousseau" #. From fileloader.py #: ../SCRIBES/internationalization.py:559 #, python-format msgid "Loading \"%s\"..." msgstr "chargement de \"%s\"..." #. From bookmarkbrowser.py #: ../SCRIBES/internationalization.py:562 msgid "Bookmark Browser" msgstr "Gestionnaire de signets" #: ../SCRIBES/internationalization.py:563 msgid "Line" msgstr "Ligne" #: ../SCRIBES/internationalization.py:564 msgid "Bookmarked Text" msgstr "Signet ajouté" #. bookmarktrigger.py #: ../SCRIBES/internationalization.py:565 #: ../SCRIBES/internationalization.py:570 #: ../SCRIBES/internationalization.py:727 msgid "No bookmarks found" msgstr "Aucun signet n'a été trouvé" #. From bookmark.py #: ../SCRIBES/internationalization.py:568 msgid "Moved to most recently bookmarked line" msgstr "Curseur placé sur le signet le plus récent" #: ../SCRIBES/internationalization.py:569 msgid "Already on most recently bookmarked line" msgstr "Déjà sur le signet le plus récent" #. From dialogfilter.py #: ../SCRIBES/internationalization.py:574 msgid "Ruby Documents" msgstr "Documents Ruby" #: ../SCRIBES/internationalization.py:575 msgid "Perl Documents" msgstr "Documents Perl" #: ../SCRIBES/internationalization.py:576 msgid "C Documents" msgstr "Documents C" #: ../SCRIBES/internationalization.py:577 msgid "C++ Documents" msgstr "Documents C++" #: ../SCRIBES/internationalization.py:578 msgid "C# Documents" msgstr "Documents C#" #: ../SCRIBES/internationalization.py:579 msgid "Java Documents" msgstr "Documents Java" #: ../SCRIBES/internationalization.py:580 msgid "PHP Documents" msgstr "Documents PHP" #: ../SCRIBES/internationalization.py:581 msgid "HTML Documents" msgstr "Documents HTML" #: ../SCRIBES/internationalization.py:582 msgid "XML Documents" msgstr "Documents XML" #: ../SCRIBES/internationalization.py:583 msgid "Haskell Documents" msgstr "Documents Haskell" #: ../SCRIBES/internationalization.py:584 msgid "Scheme Documents" msgstr "Documents Scheme" #. From textview.py #: ../SCRIBES/internationalization.py:587 msgid "INS" msgstr "INS" #: ../SCRIBES/internationalization.py:588 msgid "OVR" msgstr "OVR" #. From remotedialog.py #: ../SCRIBES/internationalization.py:591 msgid "Enter the location (URI) of the file you _would like to open:" msgstr "Entrer l'adresse du fichier que vous _désirez ouvrir:" #: ../SCRIBES/internationalization.py:592 msgid "Type URI for loading" msgstr "Taper une adresse à charger" #. From loader.py #: ../SCRIBES/internationalization.py:595 msgid "" "Open Error: An error occurred while opening the file. Try opening the file " "again or file a bug report." msgstr "" "Erreur lors de l'ouverture du fichier. Essayez encore ou reportez un bogue." #: ../SCRIBES/internationalization.py:597 #, python-format msgid "Info Error: Information on %s cannot be retrieved." msgstr "Erreur Info: Impossible d'obtenir des informations sur %s." #: ../SCRIBES/internationalization.py:598 msgid "Info Error: Access has been denied to the requested file." msgstr "Erreur Info: Accès refusé au fichier." #: ../SCRIBES/internationalization.py:599 msgid "Permission Error: Access has been denied to the requested file." msgstr "Erreur de Permission: Accès refusé au fichier." #: ../SCRIBES/internationalization.py:600 msgid "Cannot open file" msgstr "Impossible d'ouvrir le fichier" #. From save.py #: ../SCRIBES/internationalization.py:603 msgid "" "You do not have permission to save the file. Try saving the file to your " "desktop, or to a folder you own. Automatic saving has been disabled until " "the file is saved correctly without errors." msgstr "" "" #: ../SCRIBES/internationalization.py:606 msgid "" "A saving operation failed. Could not create swap area. Make sure you have " "permission to save to your home folder. Also check to see that you have not " "run out of disk space. Automatic saving will be disabled until the document " "is properly saved." msgstr "" "La sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée." #: ../SCRIBES/internationalization.py:610 msgid "" "An error occured while creating the file. Automatic saving has been disabled " "until the file is saved correctly without errors." msgstr "" "Une erreur est survenue lors de la création du fichier. La sauvegarde automatique sera rétablie quand le fichier sera sauvé sans erreurs." #: ../SCRIBES/internationalization.py:612 msgid "" "A saving error occured. The document could not be transfered from its " "temporary location. Automatic saving has been disabled until the file is " "saved correctly without errors." msgstr "" "La sauvegarde a échouée. Impossible de déplacer le fichier temporaire. La sauvegarde automatique sera désormais désactivée." #: ../SCRIBES/internationalization.py:615 msgid "" "You do not have permission to save the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Vous n'avez pas la permission d'écrire ce fichier. La sauvegarde automatique sera désormais désactivée." #: ../SCRIBES/internationalization.py:617 msgid "" "A decoding error occured while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "La sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée." #: ../SCRIBES/internationalization.py:619 msgid "" "An encoding error occurred while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Erreur d'encodage lors de la sauvegarde du fichier. La sauvegarde automatique sera désormais désactivée." #. From findprevious.py #: ../SCRIBES/internationalization.py:623 #, python-format msgid "Match %d of %d" msgstr "Correspondance %d de %d" #. From regexbar.py #: ../SCRIBES/internationalization.py:626 msgid "Search for text using regular expression" msgstr "Recherche dans le texte par expression régulière." #: ../SCRIBES/internationalization.py:627 msgid "Close regular expression bar" msgstr "Masquer la barre d'expression régulière" #. From incsearchbar.py #: ../SCRIBES/internationalization.py:630 msgid "Incrementally search for text" msgstr "Rechercher dans le texte à la volée" #: ../SCRIBES/internationalization.py:631 msgid "Close incremental search bar" msgstr "Masquer la barre de recherche" #. From findbar.py #: ../SCRIBES/internationalization.py:634 msgid "Searching please wait..." msgstr "Recherche, patientez SVP..." #. From findstopbutton.py #: ../SCRIBES/internationalization.py:637 msgid "Stopped operation" msgstr "Operation arretée" #. From findnextbutton.py #: ../SCRIBES/internationalization.py:640 msgid "No next match found" msgstr "Pas de correspondance suivante trouvée" #. From replacebar.py #: ../SCRIBES/internationalization.py:643 msgid "Replacing please wait..." msgstr "Remplacement, patientez SVP..." #. From replacestopbutton.py #: ../SCRIBES/internationalization.py:646 msgid "Stopped replacing" msgstr "Remplacement arrété" #. From popupindent.py #: ../SCRIBES/internationalization.py:649 msgid "I_ndentation" msgstr "I_ndentation" #. From actions.py #: ../SCRIBES/internationalization.py:652 msgid "Replacing spaces please wait..." msgstr "Remplacement des espaces, patientez SVP..." #: ../SCRIBES/internationalization.py:653 msgid "Replaced spaces with tabs" msgstr "Remplacé les tabulations par des espaces" #: ../SCRIBES/internationalization.py:654 msgid "No spaces found to replace" msgstr "Aucun espace à remplacer n'a été trouvé" #: ../SCRIBES/internationalization.py:656 msgid "Replaced tabs with spaces" msgstr "Remplacé les tabulations par des espaces" #: ../SCRIBES/internationalization.py:657 msgid "No tabs found to replace" msgstr "Pas de tabulations à remplacer" #: ../SCRIBES/internationalization.py:658 msgid "Removed spaces at end of lines" msgstr "Les espaces de fin de la ligne ont été supprimés" #. From popupspaces.py #: ../SCRIBES/internationalization.py:661 msgid "S_paces" msgstr "E_spaces" #: ../SCRIBES/internationalization.py:662 msgid "_Tabs to Spaces" msgstr "_Tabs en espaces" #: ../SCRIBES/internationalization.py:663 msgid "_Spaces to Tabs" msgstr "E_spaces en Tabs" #: ../SCRIBES/internationalization.py:664 msgid "_Remove Trailing Spaces" msgstr "_Enlever les espaces en fin de ligne" #. From popupselection.py #: ../SCRIBES/internationalization.py:667 msgid "S_election" msgstr "S_electionner" #: ../SCRIBES/internationalization.py:668 msgid "Select _Word" msgstr "Sélectionner _Mot" #: ../SCRIBES/internationalization.py:669 msgid "Select _Line" msgstr "Sélectionne ligne" #. From popuplines.py #: ../SCRIBES/internationalization.py:672 msgid "_Lines" msgstr "_Lignes" #: ../SCRIBES/internationalization.py:673 msgid "_Delete Line" msgstr "Ligne _effacée" #: ../SCRIBES/internationalization.py:674 msgid "_Join Line" msgstr "_Joindre Ligne" #: ../SCRIBES/internationalization.py:675 msgid "Free Line _Above" msgstr "Insérer une ligne _dessous" #: ../SCRIBES/internationalization.py:676 msgid "Free Line _Below" msgstr "Insérer une ligne _au dessus" #: ../SCRIBES/internationalization.py:677 msgid "Delete Cursor to Line _End" msgstr "Supprimer le curseur à la fin de la ligne" #: ../SCRIBES/internationalization.py:678 msgid "Delete _Cursor to Line Begin" msgstr "Supprimer le _curseur au début de la ligne" #. From popupselection.py #: ../SCRIBES/internationalization.py:681 msgid "Select _Sentence" msgstr "Sélectionner _Phrase" #: ../SCRIBES/internationalization.py:682 msgid "Select _Paragraph" msgstr "Sélectionner Paragraphe" #. From popupbookmarks.py #: ../SCRIBES/internationalization.py:685 msgid "_Bookmark" msgstr "_Signet" #: ../SCRIBES/internationalization.py:686 msgid "Bookmark _Line" msgstr "Placer un signet sur la ligne" #: ../SCRIBES/internationalization.py:687 msgid "_Remove Bookmark" msgstr "Supprimer signet" #: ../SCRIBES/internationalization.py:688 msgid "Remove _All Bookmarks" msgstr "Suppression de tous les signets" #: ../SCRIBES/internationalization.py:689 msgid "Move to _Next Bookmark" msgstr "Aller au prochain signet" #: ../SCRIBES/internationalization.py:690 msgid "Move to _Previous Bookmark" msgstr "Aller au Signet _Précedent" #: ../SCRIBES/internationalization.py:691 msgid "Move to _First Bookmark" msgstr "Aller au P_remier Signet" #: ../SCRIBES/internationalization.py:692 msgid "Move to Last _Bookmark" msgstr "Aller au _dernier signet" #: ../SCRIBES/internationalization.py:693 msgid "_Show Bookmark Browser" msgstr "_Afficher la liste des Signets" #. From bookmarktriggers.py #: ../SCRIBES/internationalization.py:696 msgid "Moved to first bookmark" msgstr "Curseur placé sur le premier signet" #: ../SCRIBES/internationalization.py:697 msgid "Moved to last bookmark" msgstr "Curseur placé sur le dernier signet" #: ../SCRIBES/internationalization.py:698 msgid "Already on first bookmark" msgstr "Déjà sur le premier Signet" #: ../SCRIBES/internationalization.py:699 msgid "Already on last bookmark" msgstr "Déjà sur le dernier Signet" #. From bookmarkbrowser.py #: ../SCRIBES/internationalization.py:702 msgid "Move to bookmarked line" msgstr "Curseur placé sur le signet à la ligne %d" #. From replaceincrementalbutton.py #: ../SCRIBES/internationalization.py:705 msgid "Incre_mental" msgstr "Incré_mental" #. templateeditorexportbutton.py #: ../SCRIBES/internationalization.py:708 msgid "E_xport" msgstr "E_xport" #. templateeditorimportbutton.py #: ../SCRIBES/internationalization.py:711 msgid "I_mport" msgstr "I_mport" #. templateadddialog.py #: ../SCRIBES/internationalization.py:714 msgid "Error: Name field must contain a string." msgstr "Erreur: Le champ doit contenir une chaîne." #: ../SCRIBES/internationalization.py:715 #, python-format msgid "Error: '%s' already in use. Please choose another string." msgstr "Erreur: '%s' déjà en cours d'utilisation. Choisissez une autre chaîne." #: ../SCRIBES/internationalization.py:716 msgid "Error: Name field cannot have any spaces." msgstr "Erreur: Le champ ne doit pas contenir d'espaces." #: ../SCRIBES/internationalization.py:717 msgid "Error: Template editor can only have one '${cursor}' placeholder." msgstr "Erreur: Le gestionnaire d'extraits de code ne peut avoir qu'un élément '${cursor}'" #. importdialog.py #: ../SCRIBES/internationalization.py:720 msgid "Error: Invalid template file." msgstr "Erreur: Fichier invalide" #: ../SCRIBES/internationalization.py:721 msgid "Import Template" msgstr "Importer des extraits de code" #. exportdialog.py #: ../SCRIBES/internationalization.py:724 msgid "Export Template" msgstr "Exporter des extraits de code" #. actions.py #: ../SCRIBES/internationalization.py:730 msgid "Could not open help browser" msgstr "Impossible d'afficher l'aide" #. preftabcheckbutton.py #: ../SCRIBES/internationalization.py:733 msgid "_Use spaces instead of tabs" msgstr "_Utiliser des espaces au lieu des tabulations" #: ../SCRIBES/internationalization.py:734 msgid "Use tabs for indentation" msgstr "Utiliser des tabulations pour l'indentation" #: ../SCRIBES/internationalization.py:735 msgid "Use spaces for indentation" msgstr "Utiliser des espaces pour l'indentation" #: ../SCRIBES/internationalization.py:739 msgid "Use spaces instead of tabs for indentation" msgstr "Utiliser des espaces au lieu des tabulations pour l'indentation" #: ../SCRIBES/internationalization.py:741 msgid "Using theme colors" msgstr "Utiliser les couleurs du thème" #: ../SCRIBES/internationalization.py:742 msgid "Using custom colors" msgstr "Utilise les couleurs modifiées" #: ../SCRIBES/internationalization.py:744 msgid "Select foreground color" msgstr "Couleur d'_avant-plan" #: ../SCRIBES/internationalization.py:745 msgid "Select background color" msgstr "Couleur d'a_rrière-plan" #: ../SCRIBES/internationalization.py:746 msgid "Select foreground syntax color" msgstr "Choisir la couleur d'avant-plan" #: ../SCRIBES/internationalization.py:747 msgid "Select background syntax color" msgstr "Choisissez la Couleur de _Fond" #: ../SCRIBES/internationalization.py:748 msgid "_Foreground:" msgstr "_Avant plan:" #: ../SCRIBES/internationalization.py:749 msgid "Back_ground:" msgstr "Couleur de _Fond:" #: ../SCRIBES/internationalization.py:752 msgid "_Underline" msgstr "_Souligner" #: ../SCRIBES/internationalization.py:753 msgid "Select to underline language syntax element" msgstr "Cocher pour souligner l'élément de syntaxe" #: ../SCRIBES/internationalization.py:755 msgid "Select document to focus" msgstr "Selectionner le document" #: ../SCRIBES/internationalization.py:756 msgid "Open Documents" msgstr "Ouvrir documents" #: ../SCRIBES/internationalization.py:757 msgid "File _Type" msgstr "_Type de fichier" #: ../SCRIBES/internationalization.py:758 msgid "File _Name" msgstr "_Nom du fichier" #: ../SCRIBES/internationalization.py:759 msgid "Full _Path Name" msgstr "_Chemin d'accès complet" #: ../SCRIBES/internationalization.py:760 msgid "No documents open" msgstr "Pas de documents ouverts" #: ../SCRIBES/internationalization.py:761 msgid "Current document is focused" msgstr "Le document courant est actif" #: ../SCRIBES/internationalization.py:763 msgid "_Case" msgstr "_Casse" #: ../SCRIBES/internationalization.py:764 msgid "_Uppercase" msgstr "_Majuscule" #: ../SCRIBES/internationalization.py:765 msgid "_Lowercase" msgstr "_Minuscule" #: ../SCRIBES/internationalization.py:766 msgid "_Titlecase" msgstr "Majuscule en _début de mot" #: ../SCRIBES/internationalization.py:767 msgid "_Swapcase" msgstr "_Inverser la casse" #: ../SCRIBES/internationalization.py:769 msgid "Open recently used files" msgstr "Ouvrir les fichiers récents" #: ../SCRIBES/internationalization.py:770 msgid "No previous match found" msgstr "Pas de correspondance précedente trouvée" #: ../SCRIBES/internationalization.py:771 msgid "Replace found match" msgstr "Occurence trouvée" #: ../SCRIBES/internationalization.py:772 msgid "Replaced all found matches" msgstr "Toutes les occurences ont été remplacées·" #: ../SCRIBES/internationalization.py:774 msgid "Inserted template" msgstr "Insérer un patron" #: ../SCRIBES/internationalization.py:775 msgid "Selected next placeholder" msgstr "Élement suivant sélectionné" #: ../SCRIBES/internationalization.py:776 msgid "Selected previous placeholder" msgstr "Emplacement précedent selectionné" #: ../SCRIBES/internationalization.py:777 msgid "Template mode is active" msgstr "Patrons activés" scribes-0.4~r910/po/.intltool-merge-cache0000644000175000017500000060106111242100540020047 0ustar andreasandreasnlMatch _case_HoofdlettergevoelignlHebrewHebreeuwsdeScribes version %sScribes Version %snlC# DocumentsC#-documentendeThe file "%s" is open in readonly modeDie Datei "%s" wurde im Nur-Lesen Modus geöffnetitAll Languages (BMP only)Tutte le lingue (solo BMP)zh_CNDelete Cursor to Line _End删除从光标到行尾(_E)frScribes is a text editor for GNOME.Scribes est un éditeur de texte pour GNOME.zh_CNPara_graph段è½(_g)itMenu for advanced configurationMenu per la configurazione avanzatanlYou do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.U heeft geen rechten om het bestand op te slaan. Probeer het bestand op te slaan op uw bureaublad of een map die u bezit. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.nlClosed goto line barGa naar-balk geslotenfrDanish, NorwegianDanois, Norvégienpt_BRError: Name field cannot have any spaces.Erro: Campo Nome não pode conter espaço.deXML DocumentsXML DokumentedeLoad Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Fehler beim Laden: Konnte die Datei nicht dekodieren. Versuchen Sie sie es bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahl des richtigen Zeichensatzes erneut.svLoad Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Inläsningsfel: Misslyckades med att koda filen för inläsning. Prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen.frFile _Type_Type de fichierdeSelection indentedMarkierung eingerücktfrAll Languages (BMP only)Toutes les langues (BMP uniquement)pt_BR_Replace_Substituirzh_CNoutput version information of Scribes输出 Scribes 的版本信æ¯nlUnrecognized option: '%s'Onbekende optie: '%s'fr"%s" has been replaced with "%s""%s" a été remplacé par "%s"deUse tabs for indentationTabulatoren für die Einrückung verwendenfrOpen a fileOuvrir un fichiernlInformation about the text editorInformatie over de tekst-editordeCannot undo actionKann die letzte Aktion nicht rückgängig machensvB_old_FetfrClosed error dialogFenêtre d'erreur ferméept_BRStopped replacingSubstituição interrompidazh_CNPerl DocumentsPerl 文件svDamn! Unknown ErrorArgh! Okänt felnlUkrainianOekraïensnlSaved "%s""%s" opgeslagendeWord completion occurredWortvervollständigung wurde durchgeführtpt_BRJoined line %d to line %dLinha %d unida à linha %dnlLn %d col %dRg %d, Kol %dfrPrint fileImprimer fichierpt_BR_Name_Nomept_BRSave Error: Failed to close swap file for saving.Erro ao Salvar: Não foi possível fechar arquivo temporário para salvar.svRedo undone actionGör om Ã¥ngrad Ã¥tgärdpt_BRNo spaces found to replaceNenhum espaço encontrado para ser substituídosvNo next bookmark to move toInget nästa bokmärke att flytta tillpt_BROpen DocumentAbrir Documentopt_BRPermission Error: Access has been denied to the requested file.Erro de Permissão: Acesso negado ao arquivo solicitado.nlLoad Error: Failed to close file for loading.Fout bij laden: sluiten van bestand om te laden is mislukt.zh_CNClosed search bar关闭了æœç´¢æ¡itUndid last actionAnnulatozh_CNC# DocumentsC# 文件deSelect to use themes' foreground and background colorsAktiviert die Benutzung der Vorder- und Hintergrundfarbe des verwendeten ThemasfrNo sentence to selectPas de phrase à sélectionnersvSearch for text using regular expressionSök efter text med hjälp av reguljärt uttryckfrScheme DocumentsDocuments SchemefrLanguage ElementsElements de LanguagesvEnglishEngelskazh_CNCursor is already at the beginning of line光标已ç»åœ¨è¡Œé¦–了nlLoad Error: Failed to get file information for loading. Please try loading the file again.Fout bij laden: verkrijgen van bestandsinformatie om te laden is mislukt. Probeer het bestand a.u.b. nogmaals te laden.svSelected previous placeholderValde föregÃ¥ende platshÃ¥llarede_Spaces to Tabs_Leerzeichen zu TabulatorensvEnables or disables right marginAktiverar eller inaktiverar högermarginalennlNo indentation selection foundGeen inspringing geselecteerdsvMove to _Previous BookmarkFlytta till _föregÃ¥ende bokmärkenlLine number:Regelnummer:de_Highlight Mode_HervorhebungsmodusdeInformation about the text editorInformationen über den Texteditornlloading...Laden...svReloading %sLäser om %sdeAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.Ein Kodierungsfehler ist beim Speichern der Datei aufgetreten. Automatisches Speichern wurde deaktiviert, bis es wieder fehlerfrei möglich ist.pt_BRThe file "%s" is openO documento "%s" está abertozh_CNSave Error: Failed to write swap file for saving.ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å†™å…¥äº¤æ¢æ–‡ä»¶ã€‚zh_CNError: Trigger name already in use. Please use another trigger name.错误:触å‘器åç§°å·²ç»è¢«ä½¿ç”¨ï¼Œè¯·å¦æ¢ä¸€ä¸ªå称。deFound %d matches%d mal gefundennlScribes only supports using one option at a timeScribes ondersteunt enkel het gebruik van één optie tegelijksvScribes version %sScribes version %snlgtk-helpgtk-helpitShift _Left_Dimunuisci l'indentazionezh_CNReflowed selected textæ•´ç†äº†é€‰æ‹©çš„æ–‡æœ¬deClosed dialog windowDer Dialog wurde geschlossenitCanadianCanadesefrSave password in _keyringSauver le mot de passe dans le _trousseauitNoneNessunoitSelect to display a vertical line that indicates the right margin.Seleziona per mostrare una linea verticale che indichi il margine destrosvSelect to use themes' foreground and background colorsVälj för att använda temats förgrund- och bakgrundsfärgerzh_CNRight Marginå³ç©ºç™½zh_CNTraditional Chineseç¹ä½“中文deSelection unindentedEinrückung Markierung entferntfrReplace all found matchesRemplacer toutes les occurencesitdisplay this help screenmostra questo helpnlType in the text you want to search forVoer de tekst in waarnaar u wilt zoekenpt_BREdit TemplateEditar Modeloit_Search for: _Cerca: svHide toolbarDölj verktygsraddeError: Name field cannot have any spaces.Fehler: Der Name darf keine Leerzeichen enthalten:zh_CNUsing custom colors使用自定义颜色pt_BRNo indentation selection foundNenhuma seleção de recuo encontradazh_CN_Tab width: Tab宽度(_T)frThe file "%s" is open in readonly modeLe fichier "%s" est ouvert en lecture seuleitClosed replacebarBarra di sostituzione chiusapt_BRStopped operationOperação interrompidanlSave DocumentDocument opslaanzh_CNUnrecognized option: '%s'ä¸è¯†åˆ«çš„选项:'%s'pt_BRDisabled spellcheckingVerificação ortográfica desativadasvSelectVäljpt_BRReplac_e with:S_ubstituir por:pt_BRHide right marginMargem direita escondidapt_BR_Use spaces instead of tabs_Usar espaços em vez de tabulaçõesdeA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.Ein Dekodierungsfehler ist beim Speichern der Datei aufgetreten. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.pt_BRBookmark _LineMarcar _Linhazh_CNTemplate Editor模æ¿ç¼–辑器itA text editor for GNOME.Un editor di testo per GNOMEzh_CNAlready on first bookmarkå·²ç»åœ¨ç¬¬ä¸€ä¸ªä¹¦ç­¾äº†itVietnameseVietnamitanlSelect background syntax colorAchtergrondkleur voor syntaxiskleuring selecterenitThaiThaisvReplaced '%s' with '%s'Ersatte "%s" med "%s"nlS_electionS_electienloutput version information of Scribesversie-informatie van Scribes tonende_Next_Nächstespt_BRTry 'scribes --help' for more informationTente "scribes --help" para mais informaçõesnlReplacing please wait...Aan het vervangen, even wachten a.u.b...svCursor is already at the beginning of lineMarkören är redan pÃ¥ början av radenpt_BRSelectSelecionarfrCopied selected textLe texte sélectionné a été copiépt_BRSelect background colorSelecionar Cor do Plano de Fundopt_BREditor background colorCor do plano de fundo do editorpt_BR_Name:_Nome:zh_CNNo more lines to join没有更多行å¯ä»¥åˆå¹¶äº†frBulgarian, Macedonian, Russian, SerbianBulgare, Macédonien, Russe, SerbesvLaunching help browserStartar hjälpvisarenpt_BRError: File not foundErro: Arquivo não localizadodeNo brackets found for selectionKeine Klammer zum Markieren gefundenfrTurkishTurcnlAdd TemplateVoeg sjabloon toezh_CN_Abbreviations缩写(_A)pt_BRAll languagesTodas as línguasnlNo brackets found for selectionGeen haakjes gevonden voor selectiezh_CNChanged font to "%s"将字体å˜ä¸º "%s"frJoined line %d to line %dCollé la ligne %d à la ligne %dpt_BRSearch for text using regular expressionPesquisar texto usando expressão regulardeThe editor's font. Must be a string valueThe Editorschriftart. Muss ein String sein.zh_CNCharacter _Encoding: 字符编ç (_E):pt_BRPerl DocumentsDocumentos PerlfrMove to _Next BookmarkAller au prochain signetfrOptions:Options:itPython DocumentsDocumenti Pythonzh_CNSearch for next occurrence of the string寻找下一个nlEnable text _wrapping_Regelafbreking inschakelenpt_BRRedid undone actionAção refeitafrThe MIME type of the file you are trying to open is not for a text file. MIME type: %sErreur lors de la vérification du fichier. Le fichier que vous essayez d'ouvrir n'est pas un fichier texte. Type MIME : %spt_BRUnindentation is not possibleImpossível desfazer recuodeMenu for advanced configurationMenü für die erweiterte KonfigurationitChange editor colorsCambia i colori dell'editornl_Remember password for this session_Onthoud wachtwoord voor deze sessiefrError: Name field must contain a string.Erreur: Le champ doit contenir une chaîne.svFailed to load file.Misslyckades med att läsa filen.itAn error occurred while saving this file.C'e' stato un errore durante il salvataggio di questo filenlAdd or Remove Encoding ...Codering toevoegen of verwijderen...pt_BRMove cursor to a specific lineMove o cursor para uma determinada linhafrerrorerreurfrIcelandicIcelandaisitCannot redo actionImpossibile ripeterenlNo selection to cutGeen selectie om te knippenitUkrainianUcrainonlRussianRussischnlCut selected textGeselecteerde tekst gekniptsv_Description_BeskrivningsvError: '%s' already in use. Please choose another string.Fel: "%s" används redan. Välj en annan sträng.svloading...läser in...pt_BRSelect _ParagraphSelecionar Pa_rágrafosvError: Invalid template fileFel: Ogiltig mallfilpt_BRgtk-savegtk-savedeFile: %sDatei: %spt_BRBack_ground:Plano de _fundo:frLanguage and RegionLangue et Régionnl_ReplaceVe_rvangenpt_BRCould not find Scribes' data folderNão foi possível encontrar o diretório de dados do ScribesdeCentral and Eastern EuropeZentral- und Osteuropapt_BR_Remove Trailing Spaces_Remover Espaços ao Fim da Linhazh_CNNo documents open没有打开文档svOVRSRÖpt_BRRename the current fileRenomeia o arquivo atualzh_CNNo next bookmark to move to䏋颿²¡æœ‰ä¹¦ç­¾äº†itCentral and Eastern EuropeEuropa centrale ed Europa orientalefrKazakhKazaksvSelect to underline language syntax elementVälj för att understryka sprÃ¥ksyntaxelementnlEditor foreground colorTekstkleur voor het tekstvensternlSelected encodingsGeselecteerde coderingendeSave Error: Failed to create swap location or file.Fehler beim Speichern: Konnte temporären Ordner oder Datei nicht erstellen.zh_CNMenu for advanced configuration更多设置frMoved cursor to line %dCurseur placé à la ligne %dnlEnabled spellcheckingSpellingscontrole ingeschakeldzh_CNSearch for and replace text查找并替æ¢deYou do not have permission to view this file.Sie haben nicht die nötigen Rechte, um die Datei anzusehen.pt_BRScribes Text EditorEditor de Texto Scribespt_BRFailed to load file.Não foi possível carregar o arquivo %spt_BRHaskell DocumentsDocumentos HaskellsvSelect _ParagraphMarkera _styckesvEdit TemplateRedigera mallzh_CNCannot redo actionä¸èƒ½é‡åšpt_BRReplaced all occurrences of "%s" with "%s"Todas ocorrências de "%s" substituídas por "%s"nlAdd New TemplateVoeg nieuw sjabloon toenlShift _RightVe_rgroot inspringingnlText wrappingRegelafbrekingzh_CNShowed toolbar显示工具æ¡deloading...Öffne...svNo previous bookmark to move toInget föregÃ¥ende bokmärke att flytta tillpt_BRLine number:Linha número:deSyntax Color EditorFarbschema Editorzh_CNRedo undone actioné‡åšæ“作deWestern EuropeWesteuropazh_CNEnable text _wrapping激活自动æ¢è¡ŒsvRemove _All BookmarksTa bort _alla bokmärkenpt_BRType in the text you want to search forDigite o texto pelo qual deseja pesquisade_Delete Line_Lösche Zeilede_Template:_Vorlage:frChange editor colorsChanger les couleurs de l'éditeurfrRemoved pair character completionAutocompletion de parenthèse annuléesvGo to a specific lineGÃ¥ till en specifik raddeNo word to selectKein Wort zum MarkierenfrRemoved all bookmarksTous les signets ont été supprimésfrINSINSpt_BRCannot perform operation in readonly modeImpossível realizar operação em modo somente leituradeSelect to reset the language syntax element to its default settingsStellt die Standarteinstellungen des Sprachelementes wieder herpt_BRSelected paragraphParágrafo selecionadodeFound matching bracket on line %dZugehörige Klamme in Zeile %d gefundensvSave Error: Failed to close swap file for saving.Fel vid sparande: Misslyckades med att stänga växlingsfil för sparandet.pt_BRPrint DocumentImprimir Documentopt_BRRemoved spaces at beginning of selected linesEspaços removidos do começo das linhas selecionadasdeType in the text you want to replace withGeben Sie die Zeichenfolge ein, die Sie ersetzen wollenzh_CNNo previous match foundä¸Šé¢æ²¡æœ‰äº†nlNo spaces were found at end of lineGeen spaties gevonden aan het einde van de regelfrAuthentication RequiredAuthentification requisefrEnglishAnglaispt_BRChanged tab width to %dLargura de tabulação alterada para %ditReplace the selected found matchSostituisci il risultato della ricerca selezionatodeAll LanguagesAlle SprachenfrCut selected textCouper le texte sélectionnésverrorfelnlEdit TemplateBewerk sjabloonnlRuby DocumentsRuby-documentenfr_Name:_Nom:pt_BRLoad Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Erro ao Carregar: Não foi possível codificar o arquivo para carregá-lo. Tente abri-lo com a codificação correta através do diálogo Abrir Arquivo. Pressione (Control - o) para mostrar o diálogo.deAuto Replace EditorAutomatische ErsetzungendeEditor background colorHintergrundfarbefrMove to Last _BookmarkAller au _dernier signetnlThe file "%s" is open in readonly modeHet bestand "%s" is in alleen-lezen modus geopenddeDetermines whether to show or hide the toolbar.Legt fest, ob die Werkzeugleiste angezeigt wird.zh_CNType in the text you want to search for输入您想寻找的文本pt_BRClosed search barBarra "pesquisar" fechadazh_CNBookmark Browser书签æµè§ˆå™¨itRussianRussonlConfigure the editorDe editor configurerenzh_CN_Titlecaseè¯é¦–大写(_T)deLaunch the help browserStarte die Hilfept_BRClose incremental search barFechar barra de pesquisa incrementalnlError: Name field cannot be emptyFout: naamveld mag niet leeg zijnnlXML DocumentsXML-documentenfrMoved to most recently bookmarked lineCurseur placé sur le signet le plus récentnlError: Invalid template fileFout: ongeldig sjabloonbestanddeLoad Error: Failed to open file for loading.Fehler beim Laden: Konnte Datei nicht öffnen.nlClosed replace barVervangbalk geslotenpt_BRINSINSpt_BRKoreanCoreanopt_BR_PreviousA_nteriorpt_BRShow or hide the toolbar.Mostrar ou ocultar a barra de ferramentas.deKazakhKasachischpt_BRSave Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Erro ao Salvar: Não foi possível codificar o conteúdo do arquivo. Certifique-se de que a codificação do arquivo esteja configurada adequadamente no diálogo Salvar Arquivo. Pressione (Ctrl - s_ para exibi-lo.nlDetermines whether to show or hide the toolbar.Bepaalt of de werkbalk getoond wordt of niet.pt_BRNo documents openNenhum documento abertosvAutomatic ReplacementAutomatisk ersättningdeMoved to last bookmarkZum letzten Lesezeichen gegangenzh_CNEnabled text wrapping激活了自动æ¢è¡ŒfrSelection indentedSélection indentéesv'%s' has been modified by another program"%s" har ändrats av ett annat programnlFile has not been saved to diskBestand is niet opgeslagen op schijffrSearch for previous occurrence of the stringRechercher des occurences précédentes de la chainesvClick to choose a new color for the language syntax elementKlicka för att välja en ny färg för sprÃ¥ksyntaxelementetdeClosed goto line barDie Zeilauswahlleiste geschlossenfr_Search for:_Rechercher:nlIndenting please wait...Inspringen, even wachten a.u.b...zh_CNTab Stops Tab宽度deMatch _wordNur vollständige _WörterdeUnified ChineseVereinheitliches Chinesischzh_CNModify words for auto-replacement编辑自动替æ¢svExport TemplateExportera mallsvNo selection to cutIngen markering att klippa utnlSets the width of tab stops within the editorBreedte van de tabstops in tekstvenster instellenpt_BRAlready on first bookmarkCursor já no primeiro marcadorfrNo tabs found in selected textPas de tabulations dans le texte sélectionnénlNo next bookmark to move toGeen volgende bladwijzernlLanguage and RegionTaal en regiodeIndented line %dZeile %d eingerücktnlCould not find Scribes' data folderKon Scribes' datamap niet vindensvThe file you are trying to open is not a text file.Filen som du försöker att öppna är inte en textfil.itClosed goto line barBarra spostamento di riga chiusasv_Tabs to Spaces_Tabulatorer till blankstegnlReplaced '%s' with '%s''%s' vervangen door '%s'nlFound %d match%d zoekresultaat gevondenfrReplacing please wait...Remplacement, patientez SVP...nlAlready on first bookmarkReeds op eerste bladwijzerpt_BROpen DocumentsDocumentos Abertoszh_CNUse tabs for indentation使用tabæ¥ç¼©è¿›nlNo next match foundGeen volgend zoekresultaatzh_CNS_election选择(_S)deFile _TypeDatei_typzh_CNSave Error: Failed to create swap location or file.ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢ä½ç½®æˆ–文件。itNo indentation selection foundNon e' stata trovata nessuna selezione da indentarefrSelect to make the language syntax element italicCocher pour mettre l'élément de syntaxe en italiquedeNo paragraph to selectKein Absatz zum Markieren vorhandenfrMatch %d of %dCorrespondance %d de %dzh_CNSave Error: Failed to close swap file for saving.ä¿å­˜å¤±è´¥:æœªèƒ½å…³é—­äº¤æ¢æ–‡ä»¶ã€‚frSimplified ChineseChinois Simplifiésvgtk-saveSparazh_CNFound %d matches找到 %d 项deMove to _Next BookmarkGehe zum _nächsten LesezeichenfrOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Erreur lors de l'ouverture du fichier. Essayez encore ou reportez un bogue.itCould not find Scribes' data folderImpossibile trovare la cartella dati di ScribesitClosed dialog windowFinestra di dialogo chiusazh_CNJava DocumentsJava 文件deThe file you are trying to open does not exist.Die Datei, die Sie zu öffnen versuchen, existiert nicht.nlYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.U heeft geen rechten om het bestand op te slaan. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.zh_CNReplacing please wait...正在替æ¢ï¼Œè¯·ç¨å€™â€¦â€¦frMatch _wordMot entiersvAdd New TemplateLägg till ny mallnlMove to _Next BookmarkVolge_nde bladwijzerfr_Use spaces instead of tabs_Utiliser des espaces au lieu des tabulationszh_CNLanguage and Region语言和地区deShift _Right_Rechts EinrückenitSearch for textCerca testoitThe file you are trying to open does not exist.Il file che stai cercando di aprire non esiste.deRemoved pair character completionZeichenpaarvervollständigung entferntsvAlready on most recently bookmarked lineRedan pÃ¥ den senaste bokmärkta radenitNameNomefr_Remove Trailing Spaces_Enlever les espaces en fin de lignenl_Name_NaamsvOpen a fileÖppna en fildeThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.Der Zeichensatz mit dem Sie versucht haben die Datei zu öffnen, konnte nicht erkannt werden. Versuchen sie es erneut mit einem anderen.itSelect to make the language syntax element boldSeleziona per rendere in grassetto gli elementi di sintassi del linguaggiosvBookmark _LineBokmärk _radzh_CNFile: %s文件: %ssv_Use spaces instead of tabs_Använd blanksteg istället för tabulatorernlUse spaces for indentationSpaties voor inspringing gebruikennl"%s" has been replaced with "%s""%s" is vervangen door "%s"pt_BRReplaced tabs with spacesTabulações subtituídas por espaçoszh_CNNo spaces found to replaceæœªæ‰¾åˆ°å¯æ›¿æ¢çš„空格deA text editor for GNOME.Ein Texteditor für GNOMEde_Tabs to Spaces_Tabulator zu LeerzeichendeSwapped the case of selected textGroßschreibung des markierten Textes getauschtpt_BRNo paragraph to selectNão há parágrafo para selecionarfrEnable text _wrappingActiver la mise a la _lignefrAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.Erreur d'encodage lors de la sauvegarde du fichier. La sauvegarde automatique sera désormais désactivée.pt_BRheredaquizh_CNReplac_e with:替æ¢ä¸º(_e):frLaunching help browserLancement de l'aidenlUnindentation is not possibleInspringing verkleinen is onmogelijkpt_BRRecommended (UTF-8)UTF-8 (recommendado)svNo tabs found to replaceInga tabulatorer hittades att ersättapt_BRCreate, modify or manage templatesCriar, modificar ou gerenciar modelosfrPHP DocumentsDocuments PHPitBulgarian, Macedonian, Russian, SerbianBulgaro, Macedone, Russo, SerbonlSpell CheckingSpellingscontrolept_BRInserted templateModelo inseridode'%s' has been modified by another program'%s' wurde von einem anderen Programm verändertitSwapped the case of selected textScambiato il case del testo selezionato.nlReplace _All_Alles vervangenzh_CNClick to choose a new color for the language syntax element选择一个新的颜色deCurrent document is focusedAktueller Text wurde hervorgehobensvLanguage ElementsSprÃ¥kelementzh_CNActivated '%s' syntax color激活了 '%s' 的语法高亮pt_BR_Password:_Senha:pt_BR_Template:_Modelo:deError: Invalid template fileFehler: Ungültige VorlagendateiitAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141C'e' stato un errore di codifica. Compila un bug report su http://openusability.org/forum/?group_id=141. Grazie.pt_BRPrint the current fileImprime o arquivo atualnlFull _Path NameVolledige _padnaamdeRecommended (UTF-8)Empfohlen (UTF-8)nlFreed line %dNieuwe regel ingevoegd op regel %dpt_BRUrduUrdunlAlready on last bookmarkReeds op laatste bladwijzerdeNo selection to copyKeine Markierung zum Kopieren vorhandenpt_BRConfigure the editor's foreground, background or syntax colorsConfigurar as cores de primeiro plano, plano de fundo ou destaque de sintaxept_BRLaunch the help browserLança o navegador da ajudadeSets the width of tab stops within the editorÄndert die Länge von Tabulatoren im EditorsvConfigure the editorKonfigurera redigerarennlFree Line _BelowRegel er_onder invoegenpt_BRLanguage and RegionLíngua e Regiãopt_BRScribes version %sScribes versão %spt_BRNo next bookmark to move toNão há marcador seguirfrSelectSelectionnernlSave Error: Failed to transfer file from swap to permanent location.Fout bij opslaan: bestand overzetten van wisselbestand naar permanente locatie is mislukt.itSelect to use themes' foreground and background colorsSeleziona per usare i colori di foreground e background del temasvS_election_MarkeringfrSelect document to focusSelectionner le documentsvUsing theme colorsAnvänder temafärgernlHide toolbarWerkbalk verborgenpt_BRHebrewJudaico pt_BROpen a new windowAbre uma nova janelafrUnified ChineseChinois Unifiépt_BR_Show Bookmark Browser_Mostrar Navegador de MarcadoressvConfigure the editor's foreground, background or syntax colorsKonfigurera redigerarens förgrunds-, bakgrunds- eller syntaxfärgernlFind occurrences of the string that match the entire word onlyEnkel complete woorden als zoekresultaat weergevennlUse Tabs instead of spacesTabs in plaats van spaties gebruikendeDamn! Unknown ErrorVerdammt! Unbekannter FehleritTry 'scribes --help' for more information'scribes --help' per maggiori informazioni.nlBookmark BrowserBladwijzer-browserde_Case_Großschreibungzh_CNSelect _Word选择è¯(_W)deNo more lines to joinKeine Zeilen zum Zusammenführen übrignlA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.Er heeft zich een decoderingsfout voorgedaan bij het opslaan van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.nlTrue to use tabs instead of spaces, false otherwise.Schakel dit in om tabs in plaats van spaties te gebruiken.nlSearch for textTekst zoekendeFailed to load file.Laden der Datei fehlgeschlagen.svSelect _LineMarkera _radnl_Foreground:_Voorgrond:nl_Bookmark_BladwijzersvStopped replacingStoppade ersättningenzh_CNUsing theme colors使用主题颜色svMove cursor to a specific lineFlytta markören till en specifik radfrFull _Path Name_Chemin d'accès completdeC DocumentsC QuelltextenlPreferencesVoorkeurenzh_CN_Tabs to Spaceså°†tabè½¬æ¢æˆç©ºæ ¼(_T)nlPython DocumentsPython-documenten svOpen a new windowÖppna ett nytt fönsterpt_BRFree Line _AboveAbrir Linha _Acimade_Search for:_Suche nach:itPrinting "%s"Stampa di "%s" in corsonlMoved cursor to line %dCursor verplaatst naar regel %dsvC DocumentsC-dokumentpt_BRChanged selected text to uppercaseSeleção de texto alterada minúsculas para maiúsculasnlSelect to enable spell checkingSelecteer om de spellingscontrole in te schakelendeLn %d col %dZ %d Sp %dfrUsing custom colorsUtilise les couleurs modifiéespt_BROpen a fileAbre um arquivopt_BR'%s' has been modified by another program"%s" foi midificado por outro programanlSyntax Color EditorSyntaxiskleuren configurerendeNo text content in the clipboardKein Text in der ZwischenablagedeLoading "%s"...Lade "%s"...nlRemoved spaces at end of selected linesSpaties aan het einde van de geselecteerde regels verwijderdpt_BRSelect file for loadingSeleciona o arquivo a ser abertonlSelect to use themes' foreground and background colorsSelecteer om voorgrond- en achtergrondkleuren van thema te gebruikenpt_BRFound matching bracket on line %dParêntese correspondente encontrado na linha %dpt_BRSelect to wrap text onto the next line when you reach the text window boundary.Quebra a linha quando o texto alcançar o limite da janela.zh_CNError: No template information found错误:没有找到模æ¿ä¿¡æ¯frReplaced tabs with spaces on selected linesLes espaces de fin de ligne ont été supprimés sur les lignes sélectionnéespt_BRSelected text is already uppercaseO texto selecionado já está em letras maiúsculassvThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.Kodningen för filen som du försöker att öppna kunde inte fastställas. Prova att öppna filen med en annan kodning.frThe file "%s" is openLe fichier "%s" est ouvertpt_BRDownload templates fromBaixar modelospt_BRAuthentication RequiredAutenticação Necessáriapt_BRMove to _First Bookmark_Primeiro MarcadoritCreate, modify or manage templatesCrea, modifica o gestisci i templatenlDetach Scribes from the shell terminalKoppel Scribes los van de shell-terminalnlLoading "%s"..."%s" wordt geladen...deClosed replace barDie Ersetzenleiste wurde geschlossenfr_Use default themeUtiliser le thème par défa_utsvIcelandicIsländskafrNo word to selectPas de mot à sélectionnerdeNo text to select on line %dKein Text zum auswählen in Zeile %d vorhandenitAll DocumentsTutti i documentisvDeleted text from cursor to end of line %dTog bort text frÃ¥n markören till slutet av rad %dsv_Replacements_ErsättningaritEnabled spellcheckingIl controllo ortografico e' stato abilitatopt_BRShift _LeftRecuar para a _Esquerdapt_BRSelected previous placeholderEspaço reservado anterior selecionadofrHaskell DocumentsDocuments Haskellzh_CN_Nameåç§°(_N)itSelection unindentedLa selezione e' stata disindentatadeLexical scope highlight colorHervorhebungsfarbe für den "lexical scope"deMove to bookmarked lineGehe zu Lesezeichenpt_BRAlready on last bookmarkCursor já no último marcadorzh_CN_Descriptionæè¿°(_D)itThe MIME type of the file you are trying to open is not for a text file. MIME type: %sIl tipo MIME del file che stai cercando di aprire non e' di un file di testo. Tipo MIME: %sfrNo previous match foundPas de correspondance précedente trouvéenlE_xport_ExporterenitText WrappingDivisione del testopt_BRMoved cursor to line %dCursor movido para linha %dzh_CNFreed line %dæ–°æ’入了第 %d 行frReplaced tabs with spacesRemplacé les tabulations par des espacesnlSelect background colorAchtergrondkleur selecterenzh_CNChanged selected text to lowercaseå°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å°å†™frCannot perform operation in readonly modeImpossible d'effectuer cette opération en mode lecture seulept_BRA list of encodings selected by the user.Uma lista de codificações selecionada pelo usuário.zh_CNLine number:行å·ï¼šsvRemoved spaces at end of line %dTog bort blanksteg pÃ¥ slutet av rad %dsvI_gnoreI_gnoreranlWest EuropeWest-Europapt_BRSelect to display a vertical line that indicates the right margin.Exibe uma linha vertical indicando a margem direita.zh_CNRemoved pair character completion删除了一对字符it_Normal text color: Colore del testo _normaledeChange name of file and saveDatei unter einem neuem Namen speichernsvLaunch the help browserStarta hjälpvisarenpt_BR_Tab width: _Largura da tabulação: pt_BRFile: %sArquivo: %spt_BRSelect foreground syntax colorSelecionar Cor do do Primeiro Plano da Sintaxept_BRUnrecognized option: '%s'Opção não reconhecida: "%s"nlLoaded file "%s"Bestand "%s" geladennl_Enable spell checkingSpellingscontrole inschak_elenfrChange name of file and saveChanger le nom du fichier et le sauverpt_BRVietnameseVietnamitadeWest EuropeWesteuropaitFontCaratterenlTab widthTabbreedtenlClick to choose a new color for the editor's backgroundKlik om een nieuwe kleur te kiezen voor de achtergrond van de editordeMatch wordNur vollständige _WörtersvPrint DocumentSkriv ut dokumentzh_CNLoading "%s"...正在加载 "%s" ……zh_CNSelect to underline language syntax element加下滑线frThe file you are trying to open does not exist.Le fichier que vous essayez d'ouvrir n'existe pas.frRemoved bookmark on line %dLe signet sur la ligne %s a été supprimépt_BRThe color used to render normal text in the text editor's buffer.A cor usada para renderizar texto normal no buffer to editor de texto.deCannot open fileKann den Text nicht öffnenfrInfo Error: Access has been denied to the requested file.Erreur Info: Accès refusé au fichier.itSyntax Color EditorEditor dei colori di sintassipt_BRExport TemplateExporta o ModelonlSelect _LineSelecteer rege_litNo selection to cutNessuna selezione da tagliarezh_CNLaunch the help browser打开帮助pt_BR_Find Matching BracketLocalizar _Parêntese Correspondentezh_CNXML DocumentsXML 文件nlEditor background colorAchtergrondkleur voor het tekstvensterzh_CNDuplicated lineå¤åˆ¶äº†è¡ŒsvRemoved spaces at end of linesTog bort blanksteg pÃ¥ slutet av radernanlUrduUrdufrWest EuropeEurope OccidentaleitNo bookmark on line %d to removeNessun segnalibro da rimuovere alla riga %ddeC++ DocumentsC++ QuelltextesvSelect background colorVälj bakgrundsfärgdePrint the current fileDrucke aktuelle Dateipt_BRReplacing please wait...Substituindo, por favor aguarde...deInserted templateVorlage eingefügtitCannot open %sImpossibile aprire %snl_Highlight Mode_AccentueermodusfrA saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.La sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée.nlText DocumentsTekstdocumentenitSelected characters inside bracketSelezionati i caratteri all'interno della parentesidePrint DocumentText druckenitRedid undone actionRipetutosvDisabled syntax colorInaktiverade syntaxfärgnlDelete Cursor to Line _EndVan cursor tot _einde regel verwijderendeMove to Last _BookmarkGehe zum _letzten LesezeichenfrCursor is already at the beginning of lineLe curseur est déjà au début de la lignenlI_mport_Importerensvgtk-cancelAvbrytitDeleted text from cursor to beginning of line %dIl testo dal cursore all'inizio della riga %d e' stato cancellatofrPreferencesPréférencespt_BRThe file "%s" is open in readonly modeO documento "%s" está aberto em modo somente leituranlCursor is already at the end of lineCursor is reeds aan het einde van de regelzh_CN_Delete Line删除行(_D)pt_BRNo selection to change caseNão há texto selecionado para alterar maiúsculas/minúsculaszh_CNAutomatic Replacement自动替æ¢zh_CNCapitalized selected text将选中的文本è¯é¦–大写了itPrint fileStampa filefrSearch for text using regular expressionRecherche dans le texte par expression régulière.pt_BRAdd New TemplateAdicionar ModelodeRemoved spaces at end of linesLeerzeichen am Ende der Zeile entferntnl_Abbreviations_Afkortingenpt_BRSelect character _encodingSelecionar _codificaçãoitEnclosed selected textIl testo selezionato e' stato racchiusonlSearch for previous occurrence of the stringVorig zoekresultaat weergevenpt_BRToggled readonly mode onModo somente leitura ativadoit_NextP_rossimosvText WrappingRadbrytningfr_Swapcase_Inverser la cassefrEdit text filesEdite les fichiers textespt_BRNo permission to modify fileVocê não tem permissão para modificar este documentonlTab StopsTabstopsnlAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141Er heeft zich een coderingsfout voorgedaan. Vul a.u.b. een foutrapport in op http://openusability.org/forum/?group_id=141pt_BRScribes only supports using one option at a timeScribes só dá suporte a uma opção por vezde_Find Matching Bracket_Finde zugehörige KlammersvScheme DocumentsScheme-dokumentitBaltic languagesLingue BalticheitUnindented line %dLa riga %d e' stata disindentatanlherehiersvPrint PreviewFörhandsvisningfrScribes only supports using one option at a timeScribes ne supporte qu'une option à la foissvMenu for advanced configurationMeny för avancerad konfigurationpt_BRReplace _AllSubstituir _TodassvEsperanto, MalteseEsperanto, Maltesiskazh_CNReloading %s釿–°è½½å…¥ %s zh_CNBookmark _Line用书签标记这一行(_L)svError: Name field cannot have any spaces.Fel: Namnfältet fÃ¥r inte innehÃ¥lla blanksteg.zh_CNSwapped the case of selected text交æ¢é€‰ä¸­æ–‡æœ¬çš„大å°å†™deClick to choose a new color for the editor's textKlicken Sie hier um eine neue Textfarbe auszuwählenfrError: Template editor can only have one '${cursor}' placeholder.Erreur: Le gestionnaire d'extraits de code ne peut avoir qu'un élément '${cursor}'zh_CNMove to bookmarked line转到书签标记的行frNo spaces were found at end of lineAucun espace n'a été trouvé à la fin de la lignedeHide toolbarWerkzeugleiste versteckenitNo previous bookmark to move toNessun segnalibro precedente verso cui spostarsifrBookmarked line %dUn signet a été placé sur la ligne %dzh_CNCentered current line当å‰è¡Œå±…中itType in the text you want to replace withScrivi il testo con cui vuoi sostituiresvNordic languagesNordiska sprÃ¥kpt_BR_Reset to Default_Restaurar PadrãonlError: Name field must contain a string.Fout: naamveld moet een tekenreeks bevatten.svChange name of file and saveÄndra namn pÃ¥ filen och sparafrExport TemplateExporter des extraits de codept_BRDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Usar ou não cores do tema GTK no primeiro plano e no plano de fundo do editor de texto. Se o valor for verdadeiro, as cores do tema GTK serão usadas; se não, as cores determinadas pelo usuário.itCursor is already at the end of lineIl cursore e' già alla fine della rigafrMove to _Previous BookmarkAller au Signet _PrécedentsvOpen recently used filesÖppna tidigare använda filersvSelected sentenceMarkerad meningde_Normal text color: _Textfarbept_BRClick to choose a new color for the editor's textEscolhe a cor do texto do editorde_Abbreviations_AbkürzungennlKazakhKazachssvBookmark BrowserBokmärkesbläddaresvTemplate mode is activeMalläget är aktivtfr_Lines_LignesdeUrduUrduzh_CNMove to _Previous Bookmark转到上一个书签(_P)itSelection indentedLa selezione e' stata indentatasvThis file has been modified by another programDen här filen har ändrats av ett annat programnlNordic languagesNoord-Europese talenzh_CND_uplicate lineå¤åˆ¶è¡Œ(_L)itNo text content in the clipboardNon c'e' testo negli appuntizh_CNSyntax Color Editor语法高亮编辑器pt_BRJapaneseJaponêssvNo selected lines can be indentedInga av de markerade raderna kan indenterasfrMove to _First BookmarkAller au P_remier SignetitUnsaved DocumentDocumento non salvatopt_BRLoad Error: Failed to open file for loading.Erro ao Carregar: Não foi possível abrir o arquivo para carregá-lo.nl_Template:_Sjabloon:frFile _Name_Nom du fichierpt_BRUse spaces instead of tabs for indentationUsar espaço ao invés de tabulação recuar o textosvDelete _Cursor to Line BeginTa bort frÃ¥n _markör till radens börjannlNo spaces found to replaceGeen spaties gevonden om te vervangenitCharacter EncodingCodifica di caratterept_BRCharacter _Encoding: C_odificação: svgtk-helpHjälpdePosition of marginPosition des rechten RandessvRemoved bookmark on line %dTog bort bokmärket pÃ¥ rad %dsvSearching please wait...Söker, vänta...itNo sentence to selectNessuna frase da selezionarezh_CNError: '%s' is already in use. Please use another abbreviation.错误:'%s' å·²ç»è¢«ä½¿ç”¨äº†ï¼Œè¯·ç”¨å¦ä¸€ä¸ªç¼©å†™pt_BRRemoved pair character completionFechamento de parêntese removidosvE_xportE_xporterasv_Foreground:_Förgrund:svUndo last actionÃ…ngra senaste Ã¥tgärdenpt_BRA text editor for GNOME.Um editor de texto para o GNOME.svEdit text filesRedigera textfilerzh_CNBookmarked line %d将第 %d 行打上书签frConfigure the editor's foreground, background or syntax colorsChanger les couleurs de l'éditeuritSave DocumentSalva documentoit_Description:_DescrizionefrFound %d matches%d correspondances trouvéespt_BRError: Invalid template file.Erro: Arquivo de modelos inválido.zh_CNOVR替æ¢zh_CNOpen a file打开一个文件itScribes version %sScribes, Versione: %sfrClose incremental search barMasquer la barre de recherchedeTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.Auf Wahr setzen, wenn Scribes im Hintergrund in einem eigenen Prozess ausgeführtwerden soll. Für Debug-Zwecke ist es eventuell nützlich dies auszuschalten.svNo spaces were found at beginning of lineInga blanksteg hittades i början av radpt_BR_Search for: Pesquisar por: svNo previous matchIngen tidigare sökträfffrUse spaces for indentationUtiliser des espaces pour l'indentationzh_CNLaunching help browser打开帮助æµè§ˆå™¨svSearch for textSök efter textdeA list of encodings selected by the user.Eine Liste der vom Benutzer ausgewählten Zeichensätze.nlRemove _All Bookmarks_Alle bladwijzers verwijderendeNo selection to cutKeine Markierung zum Ausschneiden vorhandenitTemplate EditorEditor per i templatefrSelect background syntax colorChoisissez la Couleur de _FonddeShift _Left_Links EinrückendeLeave FullscreenVollbild verlassensvCannot redo actionKan inte gör om Ã¥tgärdenpt_BRClosed replace barBarra "substituir" fechadazh_CNPair character completion occurred自动补全了一对字符pt_BRUsing custom colorsUsando cores personalizadaspt_BRSelect _SentenceSelecionar _SentençasvCannot perform operation in readonly modeKan inte genomföra Ã¥tgärden i skrivskyddat lägeitNo tabs found in selected textNessun tab trovato nel testo selezionatonlIcelandicIjslandsfrReplaced all found matchesToutes les occurences ont été remplacées·de_Tab width: _Tabulator Breite: frClick to specify the width of the space that is inserted when you press the Tab key.Cliquez pour specifier le nombre d'espaces à inserer lorsque vous pressez la touche Tabulation.nlMatch wordEnkel complete woordensvClose regular expression barStäng regulära uttryckdeCopied selected textMarkierten Text kopiertnlSave Error: Failed to create swap location or file.Fout bij opslaan: aanmaken van wisselbestand of bestand is mislukt.nlReplaced tabs with spacesTabs vervangen door spatiespt_BRCase sensitiveDif. maiúsc./minúsc.deCannot perform operation in readonly modeKann diese Aktion im Nur-Lesen Modus nicht ausführennlOpen recently used filesOnlangs gebruikte bestanden openendeYou must log in to access %sSie müssen sich einloggen um %s öffnen zu könnenzh_CNNo spaces were found at end of line未能在行尾找到空格sv_Template:_Mall:zh_CNDelete _Cursor to Line Begin删除从光标到行首(_C)fr_Tab width: _Taille des tabulations:nlInfo Error: Access has been denied to the requested file.Fout: toegang tot het gevraagde bestand is geweigerd.zh_CNRecommended (UTF-8)推è(UTF-8)nlStopped replacingVervangen gestoptfrReplac_e with:R_emplacer par:de_Swapcase_Vertausche GroßschreibungsvText DocumentsTextdokumentsv_Use default theme_Använd standardtemapt_BRSelect _WordSelecionar _PalavradeSelected text is already uppercaseMarkierter Text ist bereits in Großbuchstabenit_Character Encoding: _Codifica di carattere:nlPair character completion occurredOvereenkomstige haakjes aangevuldfrNo brackets found for selectionAucun crochet n'a été trouvépt_BRNo match foundNenhuma ocorrência encontradadeOpen DocumentText öffnendeSave Error: Failed to create swap file for saving.Fehler beim Speichern: Konnte temporäre Datei nicht erzeugen.pt_BREnglishInglêszh_CNMatch _wordç¬¦åˆæ•´è¯(_w)sv_Next_NästanlAll LanguagesAlle TalensvFailed to save fileMisslyckades med att spara filnlEsperanto, MalteseEsperanto, Malteeszh_CNPasted copied text粘贴nl_Template:_Sjabloon:svNo bookmarks foundInga bokmärken hittadesnlClosed search barZoekbalk geslotenzh_CNLine行å·zh_CNLoad Error: Failed to open file for loading.载入错误:未能打开文件。deDeleted text from cursor to end of line %dText hinter dem Cursor in Zeile %d gelöschtdescribes: %s takes no argumentsscribes: %s bekommt nur ein Argumentpt_BRNo more lines to joinNão há mais linhas para unirpt_BRNordic languagesLínguas nórdicassv_Spaces to Tabs_Blanksteg till tabulatorernlSearch for next occurrence of the stringVolgend zoekresultaat weergevenfrStopped operationOperation arretéefrAll DocumentsTous les documentsnlEdit text filesTekstbestanden bewerkensvTraditional ChineseTraditionell kinesiskazh_CN_Underline下划线(_U)deRuby DocumentsRuby QuelltextedeIncrementally search for textInkrementell nach Text suchenitFind occurrences of the string that match the entire word onlyCerca solo occorrenze della stringa che corrispondo all'intera paroladeConfigure the editor's foreground, background or syntax colorsKonfiguriert die Vordergrund- und Hintergrundfarbe sowie die SyntaxhervorhebungfrAn error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.Une erreur est survenue lors de la création du fichier. La sauvegarde automatique sera rétablie quand le fichier sera sauvé sans erreurs.nlPerl DocumentsPerl-documentenit  zh_CNNo previous bookmark to move toä¸Šé¢æ²¡æœ‰ä¹¦ç­¾äº†deLoad Error: File does not exist.Fehler beim Laden: Datei existiert nicht.nlJoined line %d to line %dRegel %d samengevoegd met regel %ditOpen a fileApri un filesvPython DocumentsPython-dokumentdeHebrewHebräischpt_BRSelect background syntax colorSelecionar Cor do Plano de Fundo da Sintaxezh_CNhere这里itClosed findbarBarra di ricerca chiusaitAdd or Remove Character EncodingAggiungi o rimuovi codifica di caratterezh_CNNo bookmarks found to remove没有找到书签frNo tabs found to replacePas de tabulations à remplacernlEnabled text wrappingRegelafbreking ingeschakeldpt_BRScribes is a text editor for GNOME.Scribes é um editor de texto para GNOME.nlAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.Er heeft zich een coderingsfout voorgedaan bij het opslaan van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.sv_Bookmark_Bokmärkpt_BRAuto Replace EditorEditor de Substituição AutomáticasvClosed goto line barStängde GÃ¥ till rad-radpt_BRCut selected textTexto cortadozh_CNTry 'scribes --help' for more information请å°è¯• 'scribes --help' 以获得更多信æ¯deSelect foreground syntax colorVordergrundfarbe auswählensvEnables or disables text wrappingAktiverar eller inaktiverar radbrytningsvNo selection to copyIngen markering att kopierapt_BRSelection indentedRecuo realizadozh_CNToggled readonly mode offåªè¯»æ¨¡å¼è§£é”frNo indentation selection foundPas de sélection à indenterfr_Template:_Patron:it of %d di %ditEditor _font: _Carattere dell'editordeBulgarian, Macedonian, Russian, SerbianBulgarisch, Mazedonisch, Russisch, SerbischsvAdd or Remove Encoding ...Lägg till eller ta bort kodning ...zh_CNSave Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.ä¿å­˜å¤±è´¥ï¼šæœªèƒ½ç¼–ç æ–‡ä»¶å†…容。请确认在ä¿å­˜å¯¹è¯æ¡†é‡Œè®¾ç½®äº†åˆé€‚的字符编ç ã€‚deType URI for loadingURL zum Laden eigebenfrClick to choose a new color for the language syntax elementCliquer pour choisir une couleur pour cet élément de syntaxesvChanged selected text to uppercaseÄndrade markerad text till versalernlPHP DocumentsPHP-documentendeEditor _font: Editor _Schriftart: deMoved to bookmark on line %dZum Lesezeichen in Zeile %d gesprungennlScribes is a text editor for GNOME.Scribes is een tekst-editor voor GNOME.nlStopped operationBewerking gestoptdeSelected line %dZeile %d ausgewähltsvNo spaces were found at end of lineInga blanksteg hittades pÃ¥ slutet av raditRemoved spaces at beginning of selected linesRimossi gli spazi all'inizio delle righe selezionatenlS_pacesS_patiessvFile _TypeFil_typsvSelect foreground colorVälj förgrundsfärgnlLoad Error: You do not have permission to view this file.Fout bij laden: u heeft geen rechten om dit bestand te bekijken.deSave DocumentText speichernnlLoad Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Fout bij laden: coderen van bestand om te laden is mislukt. Probeer het bestand te openen met de correcte codering via het openvenster. Druk (control - o) om het openvenster te tonen.deThe file "%s" is openDie Datei "%s" wurde geöffnetsvFind occurrences of the string that match upper and lower cases onlyHitta förekomster av strängen som endast matchar angivna versaler och gemenersvCopied selected textKopierade markerad textfrLeave FullscreenQuitter le plein écranitMatch _caseM_aiuscolo/minuscolozh_CNClosed replace barå…³é—­äº†æ›¿æ¢æ¡deRemoved spaces at beginning of selected linesLeerzeichen am Anfang der markierten Zeilen entferntsvShow or hide the status area.Visa eller dölj statusrutan.nlDeleted line %dRegel %d verwijderditPasted copied textIl testo copiato e' stato incollatodeThaiThailändischdeNo selected lines can be indentedKeine der markierten Zeilen kann eingerückt werdensv%d%% complete%d%% färdigpt_BRLanguage ElementsModo de destaquesvAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.Ett avkodningsfel inträffade vid sparande av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.nlSelected line %dRegel %d geselecteerddeHTML DocumentsHTML DokumentesvAn error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.Ett fel inträffade vid skapandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.itDeleted text from cursor to end of line %dIl testo dal cursore alla fine della riga %d e' stato cancellatopt_BR_Enable spell checking_Verificação ortográficapt_BRMoved to last bookmarkCursor movido para o último marcadornlRemoved bookmark on line %dBladwijzer voor regel %d verwijderdsvGreekGrekiskanlIncrementally search for textOplopend naar tekst zoekennlLoad Error: Failed to open file for loading.Fout bij laden: openen van bestand om te laden is mislukt.deNordic languagesNordische Sprachenzh_CNcreate a new file and open the file with Scribes新建一个文件并用 Scribes 打开zh_CNLoad Error: Failed to read file for loading.载入错误:未能读文件。frAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.Une erreur est apparue lors de l'encodage du fichier. Essayez de le sauver en utilisant un autre codage de caractère, de préférence UTF-8.svherehärpt_BRSpell CheckingVerificação Ortográgicasvgtk-addLägg tillnl_Description_BeschrijvingfrNo previous bookmark to move toPas de signet précédentnlShift _LeftVerk_lein inspringingdeError: Name field must contain a string.Fehler: Das Feld Name muss ein Wort enthalten.deherehier heruntergeladen werden.de_Name:_Namefr_Replace_RemplacerfrOpen DocumentOuvre documentzh_CNMoved to previous paragraph转到了上一段svSave Error: You do not have permission to modify this file or save to its location.Fel vid sparande: Du har inte behörighet att ändra den här filen eller att spara till dess plats.nlType URI for loadingVoer URI in om te ladenpt_BRJava DocumentsDocumentos Javazh_CNNo text found未能找到文本pt_BRReplace found matchOcorrência substituídadeNo sentence to selectKein Satz zum Markieren vorhandensvAn error occurred while saving this file.Ett fel inträffade vid sparandet av den här filen.deError: You do not have permission to save at the locationFehler: Sie haben nicht die nötigen Rechte, um die Datei dort zu speichern.svRight MarginHögermarginalsvPositioned margin line at column %dPositionerade marginalen pÃ¥ kolumn %dzh_CNClick to choose a new color for the editor's background为编辑器的背景选择一个新的颜色nlEnter the location (URI) of the file you _would like to open:Voer de locatie (URI) in van het bestand dat u _wilt openen:deReplaced '%s' with '%s''%s' durch '%s' ersetztfrSelect _ParagraphSélectionner ParagraphefrSelect background colorCouleur d'a_rrière-plandeNo permission to modify fileSie haben keine Berechtigung um die Datei zu ändernsvJoined line %d to line %dSammanförde rad %d till rad %dfrSelect to underline language syntax elementCocher pour souligner l'élément de syntaxeitNo spaces were found at end of lineNon sono stati trovati spazi alla fine della rigadeCeltic languagesKeltische Sprachenpt_BRSelection unindentedRecuo desfeitozh_CNC DocumentsC 文件nl of %d van %dzh_CN_Name:åç§°(_N)zh_CNC++ DocumentsC++ 文件de_Lines_ZeilennlB_old_Vetde pt_BRClick to specify the location of the vertical line.Especifica a localização da linha vertical.itPositioned margin line at column %dLa line del margine e' stata posizionata sulla colonna %dnlSave Error: You do not have permission to modify this file or save to its location.Fout bij opslaan: u heeft geen rechten om dit bestand aan te passen of op te slaan op zijn locatie.pt_BRAll Languages (BMP only)Todas as línguas (apenas BMP)zh_CNDeleted text from cursor to beginning of line %d将从光标到第 %d 行首的文本删除了svCurrent document is focusedAktuellt dokument är fokuseratsvSave Error: Failed to transfer file from swap to permanent location.Fel vid sparande: Misslyckades med att överföra filen frÃ¥n växlingsutrymme till permanent plats.pt_BRFile _Name_Nome de ArquivosvLoad Error: Failed to access remote file for permission reasons.Inläsningsfel: Misslyckades med att komma Ã¥t fjärrfilen pÃ¥ grund av behörighetsproblem.nlDanish, NorwegianDeens, NoorsnlClosed error dialogFoutmelding geslotenzh_CNText Documents文本文件frRemoved spaces at end of selected linesLes espaces de fin de ligne ont été supprimés sur les lignes sélectionnéesdeMatch %d of %dÜbereinstimmung %d von %dpt_BRInformation about the text editorInformação sobre o editor de textofrFontFontesvSelected encodingsValda kodningarsvLoad Error: Failed to close file for loading.Inläsningsfel: Misslyckades med att stänga filen för inläsning.pt_BRIncrementally search for textPesquisa enquanto digitadeSave Error: You do not have permission to modify this file or save to its location.Sie haben nicht die nötigen Rechte, um die Datei zu ändern oder sie am gewählten Ort zu speichern.svClosed dialog windowStängde dialogfönsternlChange name of file and saveBestandsnaam veranderen en opslaannlCannot open %sKan %s niet openendeToggled readonly mode onNur-Lesen Modus einschaltenpt_BRSelected text is already lowercaseO texto selecionado já está em letras minúsculasdeSave password in _keyringPasswort im Schlüsselbund _speichernpt_BRPreferencesPreferênciasitToggled readonly mode onEntrato nella modalità di sola letturazh_CNClosed dialog window关闭了对è¯çª—å£zh_CNMoved to last bookmark转到最åŽä¸€ä¸ªä¹¦ç­¾nlShow or hide the toolbar.Werkbalk tonen of verbergen.deNo bookmarks foundKeine Lesezeichen gefundenzh_CNMove to Last _Bookmark转到最åŽä¸€ä¸ªä¹¦ç­¾(_B)deS_election_MarkierungfrFreed line %dLigne %d libéréesvUnrecognized option: '%s'Okänd flagga: "%s"sv_Description:_Beskrivning:svFile has not been saved to diskFilen har inte sparats till disksvA list of encodings selected by the user.En lista över kodningar valda av användaren.frRename the current fileRenommer le fichierfrAlready on first bookmarkDéjà sur le premier SignetnlFound matching bracket on line %dOvereenkomstig haakje gevonden op regel %dpt_BRBookmarked line %dLinha %d marcadapt_BRDisabled text wrappingQuebra de texto desativadafrInformation about the text editorInformations à propos de l'éditeur de textesvClick to specify the location of the vertical line.Klicka för att ange platsen för den vertikala linjen.fr  pt_BRTab widthLargura da tabulaçãopt_BRDisabled syntax colorCor da sintaxe desativadapt_BRChanged font to "%s"Fonte alterada para "%s"deLoad Error: You do not have permission to view this file.Fehler beim Laden: Sie haben nicht die nötigen Rechte, um die Datei anzusehen.svLoad Error: Failed to open file for loading.Inläsningsfel: Misslyckades med att öppna filen för inläsning.deScheme DocumentsScheme Quelltextept_BR_Delete LineE_xcluir LinhafrNoneAucunnlRemoved spaces at beginning of line %dSpaties aan het begin van regel %d verwijderddeEnabled spellcheckingRechtschreibprüfung eingeschaltenpt_BRNo text to select on line %dSem texto para selecionar na linha %dsvSets the width of tab stops within the editorStäller in bredden pÃ¥ tabulatorstopp i redigerarendeJapanese, Korean, Simplified ChineseJapanisch, Koreanisch, Einfaches ChinesischdeArabicArabischsvSelected wordMarkerat ordnlError: Template editor can only have one '${cursor}' placeholder.Fout: sjabloon kan slechts één '${cursor}' placeholder hebben.nlClick to choose a new color for the editor's textKlik om een nieuwe kleur te kiezen voor de tekst van de editorpt_BRError: Trigger name already in use. Please use another trigger name.Erro: O nome do gatilho já está sendo usado. Por favor, use outro nome.svcompletedfärdigpt_BRReplaced all found matchesTodas as ocorrências substituídasitFile has not been saved to diskIl file non e' stato salvato sul discodeIncre_mental_InkrementelldeSelect _WordMarkiere _WortdeGo to a specific lineGehe zu einer bestimmten Zeilept_BR_NextPró_ximosvScribes Text EditorTextredigeraren ScribesdeClose incremental search barInkrementelle Suchleiste schließenitRecommended (UTF-8)Raccomandato (UTF-8)zh_CNPython DocumentsPython 文件svError: No selection to exportFel: Ingen markering att exporterade_Remove Trailing SpacesEntferne Leerzeichen am _Endezh_CNCut selected text剪切zh_CN 〈åªè¯»ã€‰frEdit TemplateEditer un PatronnlSelect _WordSelecteer _woordpt_BRLoad Error: Failed to get file information for loading. Please try loading the file again.Erro ao Carregar: Não foi possível obter informações do arquivo para carregamento. Por favor, tente carregá-lo novamente.pt_BRScheme DocumentsDocumentos SchemefrArabicArabept_BRSave Error: Failed to transfer file from swap to permanent location.Erro ao Salvar: Não foi possível transferir arquivo da localização temporária para a permanente.pt_BRI_mportI_mportarzh_CNJoined line %d to line %d将第 %d 行åˆå¹¶åˆ°äº†ç¬¬ %d 行pt_BRCursor is already at the end of lineO cursor já está no fim da linhadeNo previous bookmark to move toKein vorheriges Lesezeichen vorhandendeSave Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Fehler beim Speichern: Konnte den Inhalt der Datei nicht übersetzen. Bitte stellen siesicher, dass dass sich im Speichern-Dialog den richtigen Zeichensatz gewählt haben.Drücken sie (Strg - s) um den Speichern-Dialog zu öffnen.frJapaneseJaponaisdeFile _Name_Nameit_Replace_Sostituiscipt_BR of %d de %ddeAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netWährend des Öffnens ist ein Fehler aufgetreten. Bitte schreiben sie einen Fehlerbericht aufhttp://scribes.sourceforge.net (wenn möglich in Englisch)svUnified ChineseFörenad kinesiskasvAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netEtt fel inträffade vid öppnandet av filen. Skicka in en felrapport pÃ¥ http://scribes.sourceforge.netnlCannot undo actionActie kan niet ongedaan gemaakt wordenzh_CN_Bookmark书签(_B)nlPortuguesePortugeeszh_CN_Lowercaseå°å†™(_L)pt_BRUsing theme colorsUsando cores do temasvDetermines whether to show or hide the toolbar.Fastställer huruvida verktygsraden ska visas eller döljas.pt_BRReplace the selected found matchSubstituir a ocorrência selecionadadeFree Line _BelowLösche _nächste ZeiledeText DocumentsAlle TextdateiensvUnindented line %dAvindenterade rad %dsvPasted copied textKlistrade in kopierad textzh_CNScribes is a text editor for GNOME.Scribes 是 GNOME 的一个文本编辑器deSelect to enable spell checkingAktiviert die automatische RechtschreibprüfungfrNo permission to modify fileVous n'avez pas la permission d'écrire dans ce fichier.itReplace _AllS_ostituisci tuttoitFound matching bracket on line %dTrovata la parentesi corrispondente sulla riga %dnl_Name:_Naam:svOptions:Flaggor:zh_CNFile _Type文档类型(_T)zh_CNLoad Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚您所加载的文件å¯èƒ½å¹¶ä¸æ˜¯ä¸€ä¸ªæ–‡æœ¬æ–‡ä»¶ã€‚如果您确信它是文本文件,请您从打开对è¯çª—å£ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)显示打开对è¯çª—å£ã€‚nlError: '%s' already in use. Please choose another string.Fout: %s is reeds in gebruik. Kies a.u.b. een andere tekenreeks.nlI_talic_Cursiefzh_CNConfigure the editor's foreground, background or syntax colorsè®¾ç½®ç¼–è¾‘å™¨çš„å‰æ™¯è‰²ï¼ŒèƒŒæ™¯è‰²æˆ–者语法高亮deAlready on first bookmarkSie sind bereits beim ersten Lesezeichensv_Name:_Namn:svError: File not foundFel: Filen hittades intept_BRPasted copied textTexto coladonlLaunching help browserHelp-browser wordt opgestartdeI_mportI_mportierenpt_BRChange name of file and saveAltera o nome do arquivo e o salvapt_BRThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sNão foi possível determinar o tipo de arquivo que você está tentando abrir. Certifique-se de que seja um arquivo de texto. Tipo MIME: %snlShow marginKantlijn tonensvCould not find Scribes' data folderKunde inte hitta Scribes datamappsvdisplay this help screenvisa den här hjälpskärmenfrReplace _AllRemplacer _ToutitSelect to make the language syntax element italicSeleziona per rendere in corsivo gli elementi di sintassi del linguaggioitRemoved all bookmarksTutti i segnalibri sono stati rimossinlFile: %sBestand: %spt_BRSelect to enable spell checkingAtiva a verificação ortográficapt_BR%d%% complete%d%% completozh_CNDisplay right _margin显示å³ç©ºç™½(_m)nlToggled readonly mode offAlleen-lezen modus uitgeschakeldfrscribes: %s takes no argumentsscribes: %s ne prend pas de paramètresit%d matches were foundSono state trovate %d corrispondenzefrOpen DocumentsOuvrir documentsitClick to specify the font type, style, and size to use for text.Clicca per specificare il tipo, lo stile e la dimensione del carattere da utilizzare per il testozh_CN_Previous Paragraph上一个段è½(_P)frRuby DocumentsDocuments Rubypt_BRCursor is already at the beginning of lineO cursor já está no começo da linhazh_CNLoad Error: Failed to close file for loading.载入错误:未能关闭文件。frNo selected lines can be indentedLes lignes sélectionnées ne peuvent être indentéesnlAn error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.Er heeft zich een fout voorgedaan bij het aanmaken van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.deOpen a new windowÖffne ein neues Fensterpt_BRCentral and Eastern EuropeEuropa Central e Orientalde_Titlecase_TitelmodusnlSearching please wait...Aan het zoeken, even wachten a.u.b...nlReplaced all occurrences of "%s" with "%s"Alle zoekresultaten van "%s" zijn vervangen door "%s"svRename the current fileByt namn pÃ¥ aktuell filnlReloading %s%s herladennlUsing theme colorsThemakleuren gebruikennlNo matching bracket foundGeen overeenkomstig haakje gevondenfrSelect file for loadingSelectionner le fichier à chargersvDisplay right _marginVisa höger_marginaldeNo matching bracket foundKeine zugehörige Klammer gefundenitThe file "%s" is openIl file "%s" e' apertozh_CNCursor is already at the end of line光标已ç»åœ¨è¡Œå°¾äº†frUnindentation is not possibleDésindentation impossiblept_BRError: No template information foundErro: Não foram encontradas informações sobre o modelofrC# DocumentsDocuments C#deSelect to wrap text onto the next line when you reach the text window boundary.Sollen zu lange Zeilen in die nächste Zeile umgebrochen werden?frUrduOurdoudeType in the text you want to search forGeben Sie die Zeichenfolge ein, nach der Sie suchen wollensvUse spaces instead of tabs for indentationAnvänd blanksteg istället för tabulatorer för indenteringsvMoved to most recently bookmarked lineFlyttade till senaste bokmärkta radsvBulgarian, Macedonian, Russian, SerbianBulgariska, makedonska, ryska, serbiskasvA saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.En sparningsÃ¥tgärd misslyckades. Kunde inte skapa växlingsutrymme. Försäkra dig om att du har behörighet att spara till din hemmapp. Kontrollera även att du inte har slut pÃ¥ diskutrymme. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.itSearch for previous occurrence of the stringCerca l'occorrenza precedente della stringadePHP DocumentsPHP QuelltextenlTemplate EditorSjablonen configurerenitArabicArabosvNo documents openInga dokument öppnadefr_Search for: _Rechercher: itScribes Text EditorScribes - Editor di testofrFile has not been saved to diskLe fichier n'a pas été sauvé sur le disquenlSwapped the case of selected textHoofd- en kleine letters van geselecteerde tekst omgewisseldpt_BR_Name:_Nome:svIncre_mentalInkre_mentellsv_Reset to Default_Ã…terställ till standardfrType URI for loadingTaper une adresse à chargerfrTry 'scribes --help' for more informationEssayez 'scribes --help' pour plus d'informationde_Enable spell checkingRechtschreibprüfung _einschaltennlSelected text is already uppercaseGeselecteerde tekst bestaat reeds uit hoofdletterszh_CNSelected previous placeholder上一个ä½ç½®zh_CNNo sentence to select没有找到å¥å­deopen file in readonly modeDatei im Nur-Lesen Modues öffnenpt_BR_Description:_Descrição:zh_CNRuby DocumentsRuby 文件svFreed line %dFrigjorde rad %dnlRedo undone actionDe ongedaan gemaakte actie opnieuw uitvoerensv_Search for: _Sök efter: nlgtk-addgtk-adddeEdit text filesTextdateien bearbeitenfrEnabled spellcheckingCorrection orthographique activéefr_TitlecaseMajuscule en _début de motzh_CNE_xport导出(_x)frAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netErreur lors de l'ouverture du fichier. Reportez le bogue sur notre site:http://scribes.sourceforge.netpt_BRSets the margin's position within the editorConfigura a posição da margem no editoritAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"C'e' stato un errore durante la decodifica del tuo file. Compila un bug report su "http://openusability.org/forum/?group_id=141". Grazie.nlThe editor's font. Must be a string valueHet lettertype voor het tekstvenster.zh_CNMoved to bookmark on line %d转到书签标记的第 %d 行deGreekGriechischpt_BRCanadianCanadenseitUndo last actionAnnullapt_BRFile has not been saved to diskO documento não foi salvado em discopt_BR_LowercaseMi_núsculaszh_CN_Next Paragraph下一个段è½(_N)zh_CNNo text content in the clipboard剪贴æ¿é‡Œæ²¡æœ‰æ–‡æœ¬deAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"Beim Dekodieren Ihres Textes ist ein Fehler aufgetreten. Bitte schreiben Sieauf "http://openusability.org/forum/?group_id=141" einen Fehlerbericht (wenn möglich in Englisch).deFind occurrences of the string that match upper and lower cases onlyFinde nur Zeichenfolgen mit der gleichen Großschreibungzh_CNMoved to next paragraph转到了下一段itLanguage and RegionLingua e RegionesvSelect to make the language syntax element italicVälj för att göra sprÃ¥ksyntaxelementet i kursiv textpt_BRPrint fileImprimir documentozh_CNFull _Path Name完整路径frUse spaces instead of tabs for indentationUtiliser des espaces au lieu des tabulations pour l'indentationdeSelected encodingsAusgewählte ZeichensätzefrPasted copied textLe texte a été collépt_BRAdd or Remove Encoding ...Adicionar ou Remover Codificação...svShift _LeftDra in _vänsternlSave Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Fout bij opslaan: bestandsinhoud coderen is mislukt. Controleer of de codering van het bestand juist is ingesteld in het opslaanvenster. Druk (Ctrl - s) om het opslaanvenster te tonen.pt_BRTemplate EditorEditor de Modelospt_BRopen file in readonly modeabrir um documento em modo somente leiturafr_Join Line_Joindre LignedeShow or hide the status area.Statusleiste zeigen oder verbergenit_Tab width: Larghezza della _Tabulatura: deSelect _ParagraphMarkiere _AbsatzsvKoreanKoreanskapt_BRUkrainianUcranianodeRename the current fileBenenne aktuelle Datei umitDescriptionDescrizionept_BR_Language_Idiomazh_CNOpen Documents打开文档frPrint the current fileImprimer le fichiernlSelect document to focusSelecteer document voor focussvThe file you are trying to open does not exist.Filen som du försöker att öppna finns inte.frFile: Fichier: nlNo permission to modify fileGeen rechten om,bestand aan te passennl_Normal text color: _Normale tekstkleur:svReplacing tabs please wait...Ersätter tabulatorer, vänta...zh_CNSelected text is already uppercaseé€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å¤§å†™äº†deCursor is already at the end of lineDer Cursor ist bereits am Ende der ZeilefrError: Invalid template file.Erreur: Fichier invalidefrSelect to wrap text onto the next line when you reach the text window boundary.Activer la coupure du texte lorsque vous atteignez la marge à droite.zh_CNSelected sentence选择了å¥å­zh_CNChange editor settings更改编辑器设置pt_BRgtk-addgtk-addfrE_xportE_xportzh_CNNo matching bracket found没有找到对应的括å·zh_CNDeleted line %d删除了第 %d 行deUnrecognized option: '%s'Unbekannte Option: '%s'deMove to _First BookmarkGehe zum _ersten LesezeichendeOptions:Optionen:svThe editor's font. Must be a string valueRedigerarens typsnitt. MÃ¥ste vara ett strängvärdept_BRChange editor settingsMudar configurações do editordeSelected sentenceSatz markiertsvMove to Last _BookmarkFlytta till _sista bokmärketfrCannot open %sImpossible d'ouvrir %sdeNo spaces were found at end of lineAm Ende der Zeile wurden keine Leerzeichen gefundendeSelected previous placeholderVorherigen Platzhalter ausgewähltdeExport TemplateVorlagen exportierendeChanged selected text to lowercaseMarkierten Text von Groß- zu Kleinschreibung geändertdeLoaded file "%s"Datei "%s" geöffnetfrBookmark _LinePlacer un signet sur la lignenlError: File not foundFout: bestand niet gevondenzh_CN of %d之 %ddeB_old_FettdeOVRÜBSdeTab StopsTabulatorensvSelect document to focusVälj dokument att fokuseradeoutput version information of ScribesGibt die Version von Scribes ausfrThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.Erreur de décodage. L'encodage de caractères du fichier que vous essayez d'ouvrir n'est pas reconnu. Essayez d'ouvrir le fichier avec un autre encodage de caractères.pt_BRDelete Cursor to Line _EndExcluir do Cursor até o _Fim da LinhafrSaved "%s""%s" sauvédeUsing theme colorsFarben des aktuellen Themas benutzensvClick to choose a new color for the editor's backgroundKlicka för att välja en ny färg för redigerarens bakgrunditSearch for and replace textCerca e sostituisci testonlRemoved spaces at end of line %dSpaties aan het einde van regel %d verwijderdpt_BRSearch for previous occurrence of the stringPesquisa pela ocorrência anterior da expressãosvAll DocumentsAlla dokumentitReplaced tabs with spaces on selected linesSostituiti i tabs con gli spazi sulle linee selezionatefrNo next match foundPas de correspondance suivante trouvéept_BRCannot open fileNão foi possível abrir o arquivozh_CNNo text to select on line %d在第 %d 行里没有文本å¯é€‰deBookmarked line %dLesezeichen für Zeile %d hinzugefügtdeIcelandicIsländischsvJava DocumentsJava-dokumentde_Name:_Namept_BRNo selection to copyNão há texto selecionado para copiardeE_xportE_xportierennl_LinesRege_lszh_CN%s does not exist%s ä¸å­˜åœ¨frSearching please wait...Recherche, patientez SVP...nlRemoved spaces at end of linesSpaties verwijderd aan het einde van de regelsdeCapitalized selected textMarkierten Text in Großbuchstaben geändertdeScribes is a text editor for GNOME.Scribes ist ein Texteditor für GNOMEsvEnter the location (URI) of the file you _would like to open:Ange platsen (URI) till filen som du _vill öppna:frSave DocumentSauver le DocumentfrClose regular expression barMasquer la barre d'expression régulièrenl%d%% complete%d%% voltooidzh_CNInserted templateæ’入了模æ¿zh_CNSearch for previous occurrence of the string寻找å‰ä¸€ä¸ªdeOpen recently used filesÖffne zuletzt benutzte DateiennlGreekGriekssvChange editor colorsÄndra redigerarfärgerfrGreekGrecdeSelected wordMarkiertes WortdeMatch _case_Großschreibung beachtenzh_CNUnindentation is not possible必须缩进zh_CNFile: 文件:zh_CNSelect document to focus选择文档itSelected line %dRiga %d selezionatasvCould not open help browserKunde inte öppna hjälpvisarensvError: No template information foundFel: Ingen mallinformation hittadesfrChange editor settingsModifier les paramètres de l'éditeurpt_BRLoad Error: File does not exist.Erro ao Carregar: O arquivo não existe.pt_BRError: Name field cannot be emptyErro: O campo nome não pode ficar vaziosvNo text to select on line %dIngen text att markera pÃ¥ rad %dnl_Underline_Onderstrepende_Background color: _HintergrundfarbesvError: Template editor can only have one '${cursor}' placeholder.Fel: Mallredigeraren kan endast ha en "${cursor}"-platshÃ¥llare.frCursor is already at the end of lineLe curseur est déjà à la fin de la ligneitRemoved spaces at end of selected linesRimossi gli spazi alla fine delle righe selezionatesvFound %d matchesHittade %d sökträffarfrFree Line _AboveInsérer une ligne _dessoussvUse tabs for indentationAnvänd tabulatorer för indenteringfrDelete Cursor to Line _EndSupprimer le curseur à la fin de la lignesvSave password in _keyringSpara lösenordet i _nyckelringnlOpen DocumentDocument openennlYou do not have permission to view this file.U heeft geen rechten om dit bestand te bekijken.frNo bookmarks found to removeAucun signets n'a été trouvésvMoved to first bookmarkFlyttade till första bokmärketsvLoad Error: Failed to get file information for loading. Please try loading the file again.Inläsningsfel: Misslyckades med att fÃ¥ information om filen för inläsning. Prova att läsa in filen igen.deSearch for text using regular expressionSuche mit Hilfe von Regulären AusdrückensvThe MIME type of the file you are trying to open is not for a text file. MIME type: %sMIME-typen för filen som du försöker att öppna är inte för en textfil. MIME-typ: %spt_BRTab StopsParadas de tabulaçãodeNo indentation selection foundKeine Einrückung in der Markierung gefundenpt_BRHide toolbarOcultar barra de ferramentasfrLoaded file "%s"Fichier "%s" chargésvAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.Ett fel inträffade vid kodning av din fil. Prova att spara din fil med en annan teckenkodning, föredragsvis UTF-8.pt_BRText DocumentsDocumentos de TextoitSelected paragraphParagrafo selezionatozh_CNConfigure the editor编辑器设置itAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.C'e' stato un errore durante la codifica del tuo file. Prova a salvare il tuo file usando un'altr codifica, preferibilmente UTF-8.pt_BRAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.Ocorreu um erro de codificação ao salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.svEditor _font: Typsnitt för _redigerare: pt_BRIncre_mental_Incrementalzh_CN_Use spaces instead of tabs使用空格代替tab(_u)deTrue to use tabs instead of spaces, false otherwise.Wahr, wenn Tabulatoren anstatt Leerzeichen verwendet werden sollenzh_CNReplacing tabs please wait...正在替æ¢tab,请ç¨å€™â€¦â€¦svReplaced spaces with tabsErsatte blanksteg med tabulatorerpt_BRE_xportE_xportarzh_CNExport Template导出模æ¿svHaskell DocumentsHaskell-dokumentsvMoved cursor to line %dFlyttade markören till rad %dpt_BRThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.A codificação do arquivo que você está tentando abrir não pôde ser reconhecida. Tente abrir o arquivo com outra codificação.fr_Underline_Soulignerzh_CNReflowed paragraphæ•´ç†äº†é€‰æ‹©çš„æ®µsv of %d av %dnlOpen a fileEen bestand openennlScheme DocumentsScheme-documentensvTemplate EditorMallredigerarept_BRCopied selected textTexto copiadopt_BROpen recently used filesAbre arquivos usados recentementenlUndo last actionLaatste actie ongedaan makennlSelect _Sentence_Selecteer zinsvModify words for auto-replacementÄndra ord för automatisk ersättningitNo matching bracket foundNon e' stata trovata una parentesi corrispondentedeNo bookmarks found to removeKeine Lesezeichen zum entfernen gefundenzh_CNusage: scribes [OPTION] [FILE] [...]用途:scribes [选项] [文件] [...]frUnrecognized option: '%s'Option non reconnue: '%s'pt_BRgtk-helpgtk-helpfrDelete _Cursor to Line BeginSupprimer le _curseur au début de la lignept_BRClick to specify the width of the space that is inserted when you press the Tab key.Especifica a largura do espaço inserido quando você pressiona a tecla Tab.fr_Tabs to Spaces_Tabs en espacessvScribes is a text editor for GNOME.Scribes är en textredigerare för GNOME.nlSearch for and replace textTekst zoeken en vervangenzh_CNUse spaces for indentation使用空格缩进pt_BRgtk-cancelgtk-cancelsvInformation about the text editorInformation om textredigerarensv_Background color: _Bakgrundsfärg: fr_Background color: Couleur de _FondsvUnsaved DocumentOsparat dokumentnlJapaneseJapansitNordic languagesLingue NordicheitRemoved bracket completionIl completamento di parentesi e' stato rimossodeStopped operationSuche abgebrochenpt_BREnabled text wrappingQuebra de texto ativadafrSelect _LineSélectionne lignenlBaltic languagesBaltische talendeCo_lor: _FarbefrRecommended (UTF-8)Recommandé (UTF-8)svScribes only supports using one option at a timeScribes har endast stöd för en flagga Ã¥t gÃ¥ngensvSave Error: Failed to write swap file for saving.Fel vid sparande: Misslyckades med att skriva växlingsfil för sparandet.nl_Spaces to Tabs_Spaties naar tabssvCut selected textKlipp ut markerad textdePreferencesEinstellungenzh_CNSelect to display a vertical line that indicates the right margin.显示一æ¡ç«–çº¿æ¥æŒ‡ç¤ºå³ç©ºç™½ã€‚nlDeleted text from cursor to end of line %dTekst verwijderd vanaf cursor tot einde van regel %ditNo tabs found on line %dNessun tab trovato sulla riga %dfrRedo undone actionRefaire l'action annuléenlFree Line _AboveRegel er_boven invoegenpt_BRJapanese, Korean, Simplified ChineseJaponês, Coreano, Chinês SimplificadodePositioned margin line at column %dDer Rechte Rand ist nun in Spalte %dfrAdd or Remove Character EncodingAjouter ou Supprimer l'Encodage de CaractèrenlSelected wordGeselecteerd woordzh_CNHide toolbaréšè—工具æ¡frHide right marginCache la marge à droitedeFind occurrences of the string that match the entire word onlyFinde nur Zeichenfolgen, die dem gesamten Wort entsprechensvImport TemplateImportera mallnlAn error occurred while saving this file.Er heeft zich een fout voorgedaan bij het opslaan van dit bestand.sv_Join Line_Sammanför radzh_CNPreferences使用å好nl_Search for: _Zoek naar: it_Reset to Default_Ripristina i valori inizialipt_BRThe file you are trying to open does not exist.O documento que você está tentando abrir não existe.zh_CNSelect _Sentence选择å¥å­(_S)frSelection unindentedSélection désindentéesvLoad Error: You do not have permission to view this file.Inläsningsfel: Du har inte behörighet att visa den här filen.itMoved to bookmark on line %dSpostato sul segnalibro alla riga %sfrReplacing spaces please wait...Remplacement des espaces, patientez SVP...pt_BRFailed to save fileNão foi possível salvar arquivopt_BRIndenting please wait...Fazendo recuos, por favor aguarde...zh_CNReplace found matchæ›¿æ¢æ‰¾åˆ°çš„短语deChanged tab width to %dTabulatorenweite zu $d geändertdeThe color used to render normal text in the text editor's buffer.Die Farbe von normalem TextsvReplaced tabs with spaces on selected linesErsatte tabulatorer med blanksteg pÃ¥ markerade raderpt_BRSelect foreground colorSelecionar Cor do Primeiro Planozh_CNMove to _First Bookmark转到第一个书签(_F)svFile: Fil: pt_BRThe MIME type of the file you are trying to open is not for a text file. MIME type: %sO arquivo que você está tentando abrir não é de texto. Tipo MIME: %ssvReplac_e with:Ersät_t med:fr_Delete LineLigne _effacéept_BR_Normal text color: Corpo de _texto: zh_CNClosed goto line bar关闭了跳转æ¡frCurrent document is focusedLe document courant est actifnlNo previous match foundGeen vorig zoekresultaatpt_BRCeltic languagesLíngas célticassvMove to _First BookmarkFlytta till _första bokmärketfrSearch for next occurrence of the stringRechercher la prochaine occurence de la chaineitOptions:Opzioni:nlError: You do not have permission to save at the locationFout: u heeft geen rechten om op de locatie op te slaanpt_BRThe color used to render the text editor buffer background.A cor usada para renderizar o plano de fundo do buffer do editor de texto.svSave Error: Failed to create swap location or file.Fel vid sparande: Misslyckades med att skapa växlingsplats eller fil.frPermission Error: Access has been denied to the requested file.Erreur de Permission: Accès refusé au fichier.pt_BRSearch for textPesquisa por textofrReplaced all occurrences of "%s" with "%s"Toutes les occurences de "%s" ont été remplacées par "%s"fr_Uppercase_MajusculeitSpell CheckingControllo OrtograficodeAdd or Remove Character EncodingZeichensatz hnzufügen oder entfernennlReplaced all found matchesAlle zoekresultaten zijn vervangensvFind occurrences of the string that match the entire word onlyHitta förekomster av strängen som endast matchar hela ordetfrAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"Une erreur est arrivée lors du décodage du fichier. Reportez le bogue sur notre site:"http://openusability.org/forum/?group_id=141"frCannot open fileImpossible d'ouvrir le fichieritChange the name of current file and save itSalva con nomefrWestern EuropeEurope OccidentalenlShowed toolbarWerkbalk getoonddeThe file you are trying to open is not a text file.Die Datei, die Sie zu öffnen versuchen, ist keine Textdatei.deSearch for next occurrence of the stringSuche nach dem nächsten Auftreten der ZeichenfolgedeRussianRussischitSelectSelezionapt_BRDisplay right _marginExibir _margem direitazh_CNSelect to reset the language syntax element to its default settings将语法显示全部é‡è®¾ä¸ºé»˜è®¤å€¼zh_CNFree Line _Aboveåœ¨ä¸Šé¢æ’入一行(_A)itLn %d col %dLinea %d colonna %dsvLoading "%s"...Läser in "%s"...pt_BRError: Name field must contain a string.Erro: Campo nome deve conter uma expressão.pt_BRFind occurrences of the string that match the entire word onlyProcurar ocorrências da expressão coincidindo com palavra inteiradeMoved to first bookmarkZum ersten Lesezeichen gegangenpt_BROptions:Opções:deAutomatic ReplacementAutomatische Ersetzungfr_Right margin position: _Position de la marge à droite: frSelect foreground colorCouleur d'_avant-planitGreekGrecofrThaiThaïfrEnter the location (URI) of the file you _would like to open:Entrer l'adresse du fichier que vous _désirez ouvrir:svFile _NameFil_namnfrSpell CheckingCorrection orthographiqueitEnglishInglesefrClosed dialog windowFenêtre de dialogue ferméeitThe file you are trying to open is not a text file.Il file che stai cercando di aprire non e' un file di testo.nlRename the current fileHet huidige bestand hernoemennlOpen a new windowEen nieuw venster openenpt_BRClose regular expression barFechar barra de expressão regularpt_BRThe editor's font. Must be a string valueA fonte do editor. Precisa ser uma "string"pt_BRBaltic languagesLínguas bálticaszh_CNMoved to first bookmark转到了第一个书签zh_CNThe file "%s" is open文件 "%s" 已打开sv_Titlecase_TiteltypnlCreate, modify or manage templatesSjablonen aanmaken, wijzigen of beherenpt_BRPair character completion occurredParêntese fechadopt_BRLoad Error: Failed to access remote file for permission reasons.Erro ao Carregar: Não foi possível acessar arquivo remoto por motivos de permissão.itAll LanguagesTutte le linguept_BRClosed error dialogDiálogo de erro fechadozh_CNNo word to select未找到è¯frType in the text you want to search forEntrez le texte que vous désirez cherchernlBaltic languaguesBaltische talenitSelected sentenceFrase selezionatanlThe file "%s" is openHet bestand "%s" is geopendfrcompletedterminésv_Show Bookmark Browser_Visa bokmärkenpt_BRSelected encodingsCodificações selecionadasnl_Right margin position: Positie van _rechterkantlijnnlNoneGeenpt_BRToggled readonly mode offModo somente leitura desativadosvRemoved spaces at beginning of selected linesTog bort blanksteg frÃ¥n början av markerade raderitNo more lines to joinNon ci sono altre righe da uniresvA text editor for GNOME.En textredigerare för GNOME.frcreate a new file and open the file with Scribescréer un nouveau fichier et l'ouvrir avec Scribespt_BRReplaced tabs with spaces on selected linesTabulações substituídas por espaços nas linhas selecionadasdeAll DocumentsAlle DateiensvThe color used to render the text editor buffer background.Färgen som används för att rita textredigerarens buffertbakgrund.svMatch _wordMatcha _orddeFile has not been saved to diskDatei wurde nicht gespeichertpt_BR_Template:_Modelo:frClick to specify the location of the vertical line.Cliquer pour spécifier la position de la marge à droite.deAll Languages (BMP only)All Languages (nur BMP)itIndented line %dLa riga %d e' stata indentatafrChanged tab width to %dTaille des tabulations: %dpt_BR_Right margin position: _Posição da margem direita: deJoined line %d to line %dHabe die Zeilen %d und %d zusamengeführtitIndenting please wait...Indentazione in corso. Attendere prego...pt_BRBulgarian, Macedonian, Russian, SerbianBúlgaro, Macedoniano, Russo, Sérviozh_CNNo paragraph found未能找到段è½zh_CNI_talic斜体(_t)svYou must log in to access %sDu mÃ¥ste logga in för att komma Ã¥t %szh_CNStopped operationæ“作被中止svStopped operationStoppade Ã¥tgärdenpt_BRAn error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.Ocorreu um erro ao criar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.zh_CN_Foreground:剿™¯(_F):dePython DocumentsPython Quelltextede%d%% complete%d%% erledigtfr_Remove BookmarkSupprimer signetnlSelected text is already capitalizedGeselecteerde tekst is al gekapitaliseerdpt_BRSelect to use themes' foreground and background colorsUsa as cores do tema padrão para primeiro plano e plano de fundonlThe color used to render normal text in the text editor's buffer.De tekstkleur voor het tekstvenster.deChanged font to "%s"Schriftart in "%s" geändertdeError: File not foundFehler beim Laden: Datei nicht gefunden.deSelect foreground colorVordergrundfarbe auswählenfrAll languagesToutes les languessvSelect _WordMarkera _ordpt_BRSelected line %dLinha %d selecionadasvSelected paragraphMarkerade styckedeError: Name field cannot be emptyFehler: Sie müssen einen Dateinamen angebensvRuby DocumentsRuby-dokumentnlLaunch the help browserDe help-browser startensvTrue to use tabs instead of spaces, false otherwise.Sant för att använda tabulatorer istället för blanksteg, falskt om inte.pt_BRSave Error: Failed to create swap location or file.Erro ao Salvar: Não foi possível criar localização ou arquivo temporário.pt_BRType in the text you want to replace withDigite o texto pelo qual deseja substituirzh_CNRedid undone actioné‡åšäº†æ’¤æ¶ˆçš„动作nlCapitalized selected textGeselecteerde tekst gekapitaliseerddeError: Invalid template file.Fahler: Ungültige VorlagendateinlUndid last actionLaatste actie is ongedaan gemaaktnlMove to bookmarked lineNaar regel met bladwijzer gaansvNo permission to modify fileIngen behörighet att ändra filenzh_CNNo selection to change case没有选择frNo match foundPas de correspondance trouvéenlNo selected lines can be indentedInspringing van geselecteerde regels kan niet worden vergrootfrAlready on last bookmarkDéjà sur le dernier SignetsvAll LanguagesAlla sprÃ¥kzh_CNUnsaved Document未ä¿å­˜æ–‡æ¡£deReplace found matchGefundenen Übereinstimmung ersetzenitRemoving spaces please wait...Spazi in rimozione. Attendere prego...zh_CNError: Invalid template fileé”™è¯¯ï¼šæ— æ•ˆçš„æ¨¡æ¿æ–‡ä»¶svDisabled spellcheckingInaktiverade stavningskontrollitLine %d is already bookmarkedLa riga %d ha già un segnalibronlRemoved spaces at beginning of selected linesSpaties aan het begin van de geselecteerde regels verwijderditYou do not have permission to view this file.Non hai i permessi per vedere questo file.pt_BRDanish, NorwegianDinamarquês, NorueguêsdeChange editor settingsEditor einrichtendeTab width_TabulatorbreitedeOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Fehler beim Öffnen: Ein Fehler ist beim Öffnen der Datei aufgetreten. Versuchen Sie es erneut oderschicken Sie uns bitte einen Fehlerbericht.pt_BRThe file you are trying to open is not a text file.O arquivo que você está tentando abrir não é um arquivo de texto.zh_CN_Select Paragraph选择段è½(_S)nlReplace found matchGeselecteerd zoekresultaat is vervangennlAll Languages (BMP only)Alle talen (enkel BMP)svNo paragraph to selectInget stycke att markerazh_CNSelected text is already lowercaseé€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å°å†™äº†decompletedFertigdeError: '%s' already in use. Please choose another string.Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie ein anderes Wort.frClick to choose a new color for the editor's textCliquer pour choisir une couleur pour le textede of %d von %dfrNo selection to change casePas de sélection pour appliquer un changement de cassezh_CNCreate, modify or manage templatesåˆ›å»ºï¼Œä¿®æ”¹æˆ–ç®¡ç†æ¨¡æ¿deVietnameseVietnamesischsvThaiThaideThe color used to render the text editor buffer background.Die normale HintergrundfarbedeA saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.Das Speichern ist fehlgeschlagen. Konnte keine Swap-Datei anlegen. Bitte versichern Siesich, dass sie das Recht haben in Ihrem Persönlichen Ordner zu speichern.Versichern Sie sich auch, dass Sie noch freien Speicherplatz haben. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.nlSelect to make the language syntax element italicSelecteer om het syntaxiselement cursief te makenzh_CN_Replace替æ¢(_R)deNo documents openKein Text geöffnetsvThe file "%s" is openFilen "%s" är öppnaditNo permission to modify fileNon hai i permessi per modificare questo file.svShift _RightDra in _högersvRemoving spaces please wait...Tar bort blanksteg, vänta...svRecommended (UTF-8)Rekommenderad (UTF-8)nlC++ DocumentsC++-documentensvReplaced all found matchesErsatte alla funna sökträffarpt_BR_Description:_Descrição:frDisabled spellcheckingCorrection orthographique désactivéede_Underline_Unterstreichenpt_BRInfo Error: Information on %s cannot be retrieved.Erro de Informação: Não foi possível recuperar informações de %s.frRemoved spaces at beginning of selected linesLes espaces de début de ligne ont été supprimés sur les lignes sélectionnéeszh_CNNo previous match没有找到上一个deUse GTK theme colorsFarben des aktuellen Themas verwendendeOpen DocumentsGeöffnete Textede_Replacements_Ersetzungenpt_BRImport TemplateImporta o ModelosvI_mportI_mporterafr_Name_NomnlSelected characters inside bracketTekens binnen haakjes geselecteerdpt_BRLaunching help browserObtendo ajudazh_CNPrint Documentæ‰“å°æ–‡æ¡£deError: Template editor can only have one '${cursor}' placeholder.Fehler: Eine Vorlage kann nur einen '${cursor}' Platzhalter besitzen.nlcreate a new file and open the file with Scribeseen nieuw bestand aanmaken en openen met Scribesnlgtk-editgtk-editnl'%s' has been modified by another program%s is aangepast door een ander programma.nlEnables or disables text wrappingRegelafbreking in- of uitschakelensvCanadianKanadensiskadeChange editor colorsÄndere EditorfarbennlFailed to load file.Laden van bestand is mislukt.nlKoreanKoreaanspt_BREnclosed selected textTexto incluído em parênteseszh_CNEnter the location (URI) of the file you _would like to open:输入文件的URInlClick to specify the location of the vertical line.Klik om de plaats van de verticale lijn te bepalen.nlCopied selected textGeselecteerde tekst gekopieerditEnable text _wrappingAbilita la _divisione del testoitClick to choose a new color for the editor's backgroundClicca per selzionare un nuovo colore per lo sfondo dell'editordeLanguage ElementsSprachelementenlSelected text is already lowercaseGeselecteerde tekst bestaat al uit kleine letterssvShow right marginVisa högermarginalfrRedid undone actionAction annulée réactivéept_BR_Tabs to Spaces_Tabulações para Espaçosnl_Swapcase_Verwissel hoofd- en kleine lettersfrClick to specify the font type, style, and size to use for text.Cliquez pour specifier les caractéristiques de la fonte à utiliser pour le textefrDeleted text from cursor to end of line %dLe texte a été supprimé du curseur à la fin de la ligne à la ligne %dfrError: Name field cannot have any spaces.Erreur: Le champ ne doit pas contenir d'espaces.deTraditional ChineseTraditionelles ChinesischdeReplaced all found matchesAlle gefundenen Übereinstimmungen ersetzendeDelete _Cursor to Line BeginLösche zum Zeilen_anfangpt_BRWestern EuropeEuropa OcidentalnlChanged tab width to %dTabbreedte gewijzigd in %dfrI_mportI_mportnlRecommended (UTF-8)Aanbevolen (UTF-8) frCo_lor: Cou_leur:deCharacter _Encoding: _Zeichensatzsv_Case_SkiftlägeitClick to specify the width of the space that is inserted when you press the Tab key.Clicca per specificare la larghezza della spazio da inserire con il tasto Tabpt_BRDeleted text from cursor to end of line %dTexto removido do cursor até o fim da linha %dfrPositioned margin line at column %dMarge à droite placée à la colonne %dnlNo selection to change caseGeen selectie om hoofd- en kleine letters te verwisselenfr_Case_CasseitSelected text is already lowercaseIl testo selezionato e' già minuscolodeAn error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.Ein Fehler ist beim Erstellen der Datei aufgetreten. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.deText WrappingTextumbruchsvNo word to selectInget ord att markerade_Previous_VorherigesitTurkishTurcosvCentral and Eastern EuropeCentrala och ÖsteuropasvChanged font to "%s"Ändrade typsnitt till "%s"pt_BRAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141Ocorreu um erro ao abrir esse arquivo. Por favor, envie um relatório de erro através de http://openusability.org/forum/?group_id=141nl_Reset to DefaultStandaardwaarden he_rstellenpt_BRLoading "%s"...Carregando "%s"...deLoad Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Fehler beim Laden: Konnte die Datei nicht dekodieren. Die Datei, die Sie versuchen zu öffnen ist eventuell keine Textdatei. Wenn Sie sich sicher sind, dass es doch eine ist, versuchen Sie sie es bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahldes richtigen Zeichensatzes erneut.itDisabled spellcheckingIl controllo ortografico e' stato disabilitatofrDescriptionDescriptionsvPreferencesInställningarnlAuto Replace EditorAutomatisch vervangen editorzh_CNReplaced all found matchesæ›¿æ¢æ‰€æœ‰æ‰¾åˆ°çš„短语pt_BRNo matching bracket foundParêntese correspondente não encontradofrInserted templateInsérer un patronzh_CNSelected word选择了一个è¯nlCentral and Eastern EuropeCentraal- en Oost-EuropeesnlError: Name field cannot have any spaces.Fout: naamveld mag geen spaties bevatten.svAdd or Remove Character EncodingLägg till eller ta bort teckenkodningsvLn %d col %dRad %d kol %dsvHide right marginDölj högermarginalde_Bookmark_Lesezeichenpt_BRNo selection to cutNão há texto selecionado para cortardeScribes Text EditorScribes TexteditordePair character completion occurredZeichenpaarkomplettierung wurde durchgeführtpt_BRRuby DocumentsDocumentos RubyitNo selection to copyNessuna selezione da copiarefrEnclosed selected textLe texte sélectionné a été entouréfrSyntax Color EditorConfiguration de la Coloration SyntaxiquedeSimplified ChineseEinfaches ChinesischfrJapanese, Korean, Simplified ChineseJaponais, Koréen, Chinois SImplifiésvEditor's fontTypsnitt för redigerarennlCeltic languagesKeltische talenfrTemplate mode is activePatrons activészh_CNRemoved bookmark on line %d将第 %d 行的书签删除了nlReplaced spaces with tabsSpaties vervangen door tabsnlEnable or disable spell checkingSpellingscontrole in- of uitschakelenfrNo next bookmark to move toPas de signet suivantzh_CNCould not open help browser未能打开帮助æµè§ˆå™¨deAdd New TemplateNeue Vorlagept_BRA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.Ocorreu um erro de decodificação ao salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.pt_BRError: '%s' already in use. Please choose another string.Erro: "%s" já em uso. Por favor, escolha outra expressão.pt_BRCharacter EncodingCodificaçãodeUse Tabs instead of spacesLeerzeichen anstatt Tabulatoren verwendenpt_BRSearching please wait...Pesquisando, por favor aguarde...deDisabled text wrappingTextumbruch deaktiviertnlActivated '%s' syntax color'%s' syntaxiskleuren geactiveerdsvSelect background syntax colorVälj bakgrundsfärg för syntaxitOpen DocumentApri DocumentosvKazakhKazakiskanl_Background color: _Achtergrondkleur:frReplace the selected found matchRemplacer cette occurencedeFailed to save fileDatei speichern fehlgeschlagendeLoad Error: Failed to read file for loading.Fehler beim Laden: Konnte Datei nicht lesen.frSelected previous placeholderEmplacement précedent selectionnédeMove cursor to a specific lineSpringe in eine bestimmte Zeilezh_CNerror错误nlAutomatic ReplacementAutomatische vervangingpt_BRSearch for and replace textPesquisa por texto e o substituinlImport TemplateImporteer sjabloonzh_CNSimplified Chinese简体中文zh_CNLoad Error: Failed to access remote file for permission reasons.载入错误:因为æƒé™åŽŸå› ï¼Œæœªèƒ½è®¿é—®è¿œç¨‹æ–‡ä»¶ã€‚itCo_lor: Co_lori: itCannot perform operation in readonly modeImpossibile compiere questa operazione in modalità di sola letturapt_BRSelected sentenceFrase selecionadazh_CNDeleted text from cursor to end of line %d将从光标到第 %d 行尾的文本删除了zh_CN_Join Lineåˆå¹¶è¡Œ(_J)frSelected wordMot sélectionnénlSelect foreground colorVoorgrondkleur selecterendeCase sensitiveGroßschreibung beachtennlBack_ground:Achter_grond:pt_BRFull _Path Name_Caminho Completopt_BRFree Line _BelowAbrir Linha A_baixonlSelect character _encodingSelecteer tekencoderingpt_BRMatch _word_Coinc. palavrasvNo previous match foundIngen föregÃ¥ende sökträff hittadesnlFind occurrences of the string that match upper and lower cases onlyZoekresultaat hoofdlettergevoeligpt_BRNo spaces were found at beginning of lineNão há espaços no começo da linhafrSelected paragraphParagraphe sélectionnésvThe file "%s" is open in readonly modeFilen "%s" är öppnad i skrivskyddat lägesvPermission Error: Access has been denied to the requested file.Rättighetsfel: Ã…tkomst till den begärda filen nekades.deSpell CheckingRechtschreibprüfungpt_BRReplace all found matchesSubstituir todas as ocorrências encontradassvError: Name field must contain a string.Fel: Namnfältet mÃ¥ste innehÃ¥lla en sträng.pt_BRSelected text is already capitalizedTexto selecionado já está em caixa altapt_BRPython DocumentsDocumentos PythonnlTurkishTurkssvMatch _caseMatcha _skiftlägeitThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.L'encoding del file che stai tentando di aprire non può essere determinato.Prova ad aprire il file con un altro encodingdeReplace _All_Alle ersetzennlNo selection to copyGeen selectie om te kopiërenpt_BRClick to specify the font type, style, and size to use for text.Especifica família, estilo e tamanho de fonte usados no texto.deFontSchriftartsvEnable or disable spell checkingAktivera eller inaktivera stavningskontrollnl_Join LineRegels samen_voegennlLoading file please wait...Bestand wordt geladen, even wachten a.u.b...nlMenu for advanced configurationMenu voor geavanceerde instellingenzh_CNIncrementally search for textå‘下æœç´¢pt_BRCannot redo actionImpossível refazer açãodeAll languagesAlle Sprachenzh_CNSelect to use themes' foreground and background colorsä½¿ç”¨ä¸»é¢˜çš„å‰æ™¯å’ŒèƒŒæ™¯è‰²frDeleted line %dLigne effacée %dsvSelect file for loadingVälj fil för inläsningzh_CNSaved "%s"文件 "%s" å·²ä¿å­˜pt_BRThe highlight color when the cursor is around opening or closing pair characters.A cor de seleção usada quando o cursor está ao redor de caracteres abrindo ou fechando parênteses, colchetes, chaves etc..nlAlready on most recently bookmarked lineReeds op regel met meest recente bladwijzerfr_Normal text color: Couleur du texte _normalpt_BRSave Error: Failed decode contents of file from "UTF-8" to Unicode.Erro ao Salvar: Não foi possível decodificar o conteúdo do arquivo de "UTF-8" para Unicode.deSelect background colorHintergrundfarbe auswählendeReplace the selected found matchDie gefundene Zeichenfolge ersetzennlShow or hide the status area.Statusbalk tonen of verbergen.frCannot undo actionImpossible d'annuler l'actionfrUnsaved DocumentDocument non sauvépt_BRNo selected lines can be indentedNão há recuo para desfazer nas linha selecionadassvPHP DocumentsPHP-dokumentdeSpell checkingRechtschreibprüfungfrI_ndentationI_ndentationnlgtk-savegtk-saveitusage: scribes [OPTION] [FILE] [...]utilizzo: scribes [OPZIONI] [FILE] [...]pt_BRSelect to make the language syntax element boldNegrita o elemento de sintaxesv_Delete Line_Ta bort radzh_CN_Description:æè¿°(_D):deC# DocumentsC# QuelltextenlClick to specify the width of the space that is inserted when you press the Tab key.Klik om de breedte in te stellen van de ruimte die wordt ingevoegd wanneer u op de Tab-toets drukt.pt_BRNo spaces were found at end of lineNão foram encontrados espaços no fim das linhaszh_CN_Normal text color: 普通文本颜色(_N):zh_CNFailed to load file.未能载入文件。zh_CN_Reset to Default还原为默认(_R)sv_Swapcase_Växla skiftlägefr_Remember password for this session_Enregistrer le mot de passe pour cette sessionnlRedid undone actionLaatste ongedaan gemaakte actie is opnieuw uitgevoerditIcelandicIslandesede_Lowercase_Kleinschreibungit_Previous_PrecedentenlFile _TypeBestands_typezh_CNClick to specify the width of the space that is inserted when you press the Tab key.指定tab的宽度。svReplaced all occurrences of "%s" with "%s"Ersatte alla förekomster av "%s" med "%s"nl deLaunching help browserStarte HilfefrText WrappingMise à la lignedeusage: scribes [OPTION] [FILE] [...]Verwendung: scribes [OPTION] [DATEI [...]frSelect to display a vertical line that indicates the right margin.Afficher la ligne verticale qui indique la marge à droite.frKoreanKoréenitAll languagesTutte le linguedeTry 'scribes --help' for more informationVersuchen Sie 'scribes --help' für weitere Informationenpt_BRLoad Error: Failed to close file for loading.Erro ao Carregar: Não foi possível fechar o arquivo para carregá-lo.pt_BRUse Tabs instead of spacesUsar tabulações em vez de espaçoszh_CNFont字体frUndid last actionAction précédente annuléenlSelect foreground syntax colorVoorgrondkleur voor syntaxiskleuring selecterenitDisabled text wrappingDivisione testo disattivatazh_CNSelect to wrap text onto the next line when you reach the text window boundary.自动æ¢è¡Œã€‚deShow right marginZeige rechten Randpt_BR_CaseM_aiusculizaçãosvCharacter EncodingTeckenkodningpt_BRReplacing spaces please wait...Substituindo espaços, por favor aguarde...frXML DocumentsDocuments XMLzh_CNOpen recently used files打开最近用过的文件svSelect character _encodingVälj tecken_kodningpt_BRCurrent document is focusedDocumento atual já focadoitRemoved spaces at beginning of line %dRimossi gli spazi all'inizio della riga %ditChange editor settingsCambia i settaggi dell'editorpt_BRText WrappingQuebra de Textozh_CNSave Documentä¿å­˜æ–‡æ¡£pt_BRTraditional ChineseChinês TradicionalsvError: Name field cannot be emptyFel: Namnfältet fÃ¥r inte vara blanktdeLineZeilept_BRNo word to selectNão há palavra para selecionarsvDeleted text from cursor to beginning of line %dTog bort text frÃ¥n markören till början av rad %dnlAuthentication RequiredVerificatie vereistsvSelect foreground syntax colorVälj förgrundsfärg för syntaxitReplac_e with:S_ostituisci con:svNo more lines to joinInga fler rader att sammanföranlSearch for text using regular expressionZoek naar tekst met reguliere uitdrukkingenzh_CN_Remove Trailing Spaces删除行尾的空格(_R)nlRemoving spaces please wait...Spaties worden verwijderd, even wachten a.u.b...pt_BRerrorerrofrLaunch the help browserAfficher l'aidede_Remember password for this session_Passwort für diese Sitzung merkensv"%s" has been replaced with "%s""%s" har ersatts med "%s"nlChanged selected text to uppercaseGeselecteerde tekst gewijzigd in hoofdlettersnlSets the margin's position within the editorPositie van de kantlijn in het tekstvenster instellenpt_BRUndo last actionDesfaz a última açãosv_Abbreviations_FörkortningardeCreate, modify or manage templatesVorlagen erzeugen, ändern und verwaltenzh_CNBookmarked Text书签标记的文本frNo paragraph to selectPas de paragraphe à sélectionnerfrNo text to select on line %dPas de texte à sélectionner dans la ligne %dnlScribes version %sScribes versie %snlAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netEr heeft zich een fout voorgedaan tijdens het openen van het bestand. Vul a.u.b. een foutrapport in op http://scribes.sourceforge.netfrCapitalized selected textLe texte sélectionné a été capitalisédeINSEINdeFile: Datei: nl_Titlecase_Eerste letter hoofdletteritLeave FullscreenEsci dal fullscreennlMove to _First Bookmark_Eerste bladwijzerdeError: No selection to exportFehler: Keine Markierung zum Exportieren vorhandennlMoved to most recently bookmarked lineNaar regel met meest recente bladwijzer gegaanitWestern EuropeEuropa occidentalept_BRMatch wordCoincidir palavraitLaunching help browserAvvio dell'help browser in corsozh_CNPrint the current file打å°å½“剿–‡ä»¶deFull _Path NameVoller _Pfadnamezh_CNLoad Error: Failed to get file information for loading. Please try loading the file again.载入错误:未能å–得文件信æ¯ï¼Œè¯·é‡æ–°è½½å…¥ã€‚frMatch _caseRespecter la cassedeImport TemplateVorlagen importierenzh_CNLanguage Elements语言pt_BRcreate a new file and open the file with Scribescriar um documento novo e abri-lo com o Scribesit_Name:_NomenlInserted templateSjabloon ingevoegdsvOpen DocumentÖppna dokumentpt_BR"%s" has been replaced with "%s""%s" foi substituído por "%s"frUnindented line %dLa ligne %d a été désindentéezh_CNSave Error: Failed to create swap file for saving.ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢æ–‡ä»¶ã€‚nlCannot perform operation in readonly modeKan deze actie niet uitvoeren in alleen-lezen modusnlChanged selected text to lowercaseGeselecteerde tekst gewijzigd in kleine letterssvNoneIngendeCanadianKanadischpt_BRPrint PreviewVisualizar ImpressãosvI_ndentationI_ndenteringdeSearching please wait...Suche - bitte warten...svA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.Ett avkodningsfel inträffade vid sparandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.itSelect to reset the language syntax element to its default settingsSeleziona per ripristinare i valori iniziali degli elementi di sintassi del linguaggiodeTurkishTürkischdeSelect background syntax colorHintergrundfarbe auswählennlScribes Text EditorScribes tekst-editoritNo brackets found for selectionNon sono state trvate parentesi per la selezionezh_CNSelect _Line选择行(_L)zh_CNSpell Checking拼写检查nlError: Invalid template file.Fout: ongeldig sjabloonbestand.svSelected next placeholderValde nästa platshÃ¥llarept_BRNo bookmarks found to removeNão há marcador para removerfr_Next_SuivantfrChanged selected text from uppercase to lowercaseLe texte sélectionné a été changé de majuscules en minusculesfrSearch for textRechercher dans le textenlRemoved all bookmarksAlle bladwijzers verwijderdnlModify words for auto-replacementWijzig woorden voor automatisch vervangenfrNo spaces were found at beginning of lineAucun espace n'a été trouvé au début de la lignenlUnified ChineseEengemaakt Chineeszh_CNScribes only supports using one option at a timeScribesåªæ”¯æŒä¸€æ¬¡ä½¿ç”¨ä¸€ä¸ªé€‰é¡¹pt_BRTemplate mode is activeModo de modelo ativadosvJapanese, Korean, Simplified ChineseJapanska, koreanska, förenklad kinesiskaitSelect to enable spell checkingSeleziona per attivare il controllo ortograficopt_BRCould not open help browserNão foi possível abrir o navegador da ajudanlReplacing spaces please wait...Spaties worden vervangen, even wachten a.u.b...svBookmarked line %dBokmärkte rad %dfrReplacing tabs please wait...Changement des tabulations, patientez SVP...svIndenting please wait...Indenterar, vänta...pt_BRIcelandicIslandêsdeError: Trigger name already in use. Please use another trigger name.Fehler: Diese Zeichenkette wird bereits als Vorlage verwendet. Bitte benutzen Sie eine andere.svAlready on first bookmarkRedan pÃ¥ det första bokmärketfr of %d de %dzh_CNWord completion occurred自动补全了å•è¯itScribes only supports using one option at a timeScribes supporta l'uso di una sola opzione alla volta.zh_CNChanged selected text to uppercaseå°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å¤§å†™frError: '%s' already in use. Please choose another string.Erreur: '%s' déjà en cours d'utilisation. Choisissez une autre chaîne.frSelected characters inside bracketLes caractères à l'intérieur des parenthèses ont été sélectionnésdeDisabled spellcheckingRechtschreibprüfung ausgeschaltensvNo selection to change caseIngen markering att ändra skiftläge pÃ¥frMenu for advanced configurationMenu de configuration avancéefrSelect to use themes' foreground and background colorsSélectionner pour utiliser les couleurs du thème par défautzh_CNDisabled text wrappingç¦ç”¨è‡ªåЍæ¢è¡ŒitConfigure the editor's foreground, background or syntax colorsConfigura i colori di foreground, di background o di sintassi dell'editorpt_BRRedo undone actionRefaz a ação desfeitade"%s" has been replaced with "%s""%s" wurde durch "%s" ersetztsvYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.Du har inte behörighet att spara filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.deSave Error: Failed to transfer file from swap to permanent location.Fehler beim Speichern. Übertragung der Datei vom temporären zum endgültigen Platz fehlgeschlagen.nlLeave FullscreenSchermvullend verlatenpt_BR_Use default theme_Usar tema padrãofrYou must log in to access %sVous devez vous identifier pour acceder à %spt_BRUnindented line %dRecuo desfeito na linha %dfrIncre_mentalIncré_mentaldeSave Error: Failed decode contents of file from "UTF-8" to Unicode.Fehler beim Speichern: Konnte den Inhalt der Datei nicht von "UTF-8" zu Unicode konvertieren.deSearch for previous occurrence of the stringSuche nach einem vorherigen Auftreten der ZeichenfolgesvMoved to last bookmarkFlyttade till sista bokmärketfrC DocumentsDocuments CfrPython DocumentsDocument PythonnlSave Error: Failed decode contents of file from "UTF-8" to Unicode.Fout bij opslaan: bestandsinhoud decoderen van "UTF-8" naar Unicode is mislukt.nlYou must log in to access %sU moet inloggen om %s te openendeRemoved bookmark on line %dLesezeichen in Zeile %d entferntdeCursor is already at the beginning of lineDer Cursor ist bereits am Anfang der ZeilesvSearch for and replace textSök och ersätt textde_Uppercase_Großschreibungsvgtk-editRedigeradeNoneKeinenlWord completion occurredWoord is aangevuldsvSelect to make the language syntax element boldVälj för att göra sprÃ¥ksyntaxelementet i fet textfrJava DocumentsDocuments JavadeClick to specify the location of the vertical line.Ändert die Position der vertikalen LiniefrSelected text is already uppercaseLe texte sélectionné est déjà en majusculesfrSelected text is already capitalizedLe texte sélectionné est déjà capitaliséde%s does not exist%s existiert nichtnlTemplate mode is activeSjabloonmodus is actiefpt_BRAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"Surgiu um erro ao codificar o seu documento. Por favor, envie um relatório de erro através de "http://openusability.org/forum/?group_id=141"zh_CNdisplay this help screen显示帮助deRedid undone actionLetzte Änderung wiederhergestelltzh_CNGo to a specific line转到指定行nlText WrappingRegelafbrekingpt_BRC DocumentsDocumentos Czh_CNChange name of file and save更改文件åå¹¶ä¿å­˜svNo sentence to selectIngen mening att markerapt_BR  deSelect _SentenceMarkiere _SatzitSelect character _encodingSeleziona la codifica di caratt_erezh_CNShift _Left左移ä½(_L)pt_BRFound %d matches%d ocorrências encontradasfrDeleted text from cursor to beginning of line %dLe texte a été supprimé du curseur au début de la ligne, à la ligne %dnl_Search for:_Zoeken naar:nlSave Error: Failed to write swap file for saving.Fout bij opslaan: schrijven wisselbestand om op te slaan is mislukt.pt_BRLoading file please wait...Abrindo o documento, por favor aguarde...zh_CNNo permission to modify file没有修改文件的æƒé™zh_CNPositioned margin line at column %då°†å³ç©ºç™½çº¿ç½®äºŽç¬¬ %d 列svShow or hide the toolbar.Visa eller dölj verktygsraden.frSwapped the case of selected textLa casse du texte sélectionné a été inverséesvText wrappingRadbrytningzh_CNNo bookmarks found没有找到书签pt_BRError: No selection to exportErro: Nenhuma seleção para exportarsvopen file in readonly modeöppna filen i skrivskyddat lägezh_CNFree Line _Belowåœ¨ä¸‹é¢æ’入一行(_B)itCapitalized selected textIl testo selezionato e' stato capitalizzato.zh_CNLoad Error: You do not have permission to view this file.载入错误:您没有阅读这个文件的æƒé™ã€‚zh_CNI_ndentation缩进(_n)nlBookmarked line %dBladwijzer voor regel %d toegevoegdpt_BRReplaced '%s' with '%s'"%s" substituído por "%s"deAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.Ein Fehler ist beim Kodieren Ihrer Datei aufgetreten. Bitte versuchenSie einen anderen Zeichensatz (bevorzugt UTF-8) zu verwenden.nlSelection indentedInspringing van selectie vergrootsvCursor is already at the end of lineMarkören är redan pÃ¥ slutet av radenzh_CNCannot undo actionä¸èƒ½æ’¤æ¶ˆçš„动作nlClosed dialog windowDialoogvenster geslotendeAlready on most recently bookmarked lineSie sind bereits in der zuletzt mit einem Lesezeichen versehenen ZeilesvPrint the current fileSkriv ut aktuell filitReplacing tabs please wait...Tab in sostituzione. Attendere prego...itMove cursor to a specific lineSposta il cursore su una riga specificanlCursor is already at the beginning of lineCursor is reeds aan het begin van de regelnlBookmarked TextTekst van bladwijzerpt_BRB_old_NegritodeYou do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.Sie haben nicht die nötigen Rechte um die Datei zu speichern. Versuchen Sie die Dateiauf Ihrem Desktop oder einem eigenen Ordner zu speichern. Automatisches Speichernwurde deaktiviert bis es möglich ist ohne Fehler zu speichern.zh_CNLn %d col %d第 %d 行,第 %d 列nlPrint PreviewAfdrukvoorbeelditloading...caricamento...itDanish, NorwegianDanese, NorvegiesedeAdd TemplateNeue Vorlagesv_Right margin position: Position för _högermarginal: frMove to bookmarked lineCurseur placé sur le signet à la ligne %ditNo selection to change caseNessuna seleziona a cui cambiare il casezh_CNHaskell DocumentsHaskell 文件dePasted copied textMarkierten Text eingefügtzh_CN_Lines行(_L)zh_CNSave Error: Failed decode contents of file from "UTF-8" to Unicode.ä¿å­˜å¤±è´¥ï¼šæœªèƒ½æŠŠæ–‡ä»¶ä¸­"UTF-8"çš„å†…å®¹è§£ç æˆUnicode。frOpen recently used filesOuvrir les fichiers récentsitJoined line %d to line %dLe righe %d e %d sono state unitedeA saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.Ein Fehler beim Speichern ist aufgetreten. Die Datei konnte nicht aus dem temporären Ordner kopiert werden. Automatisches Speichern wurde deaktiviert, bis es wieder fehlerfrei möglich ist.svShow marginVisa marginalfrShift _LeftDéplacer à _Gauchept_BRSelect _LineSelecionar _LinhanlPrinting "%s""%s" wordt afgedruktpt_BRUnified ChineseChinês UnificadosvFontTypsnittitoutput version information of Scribesstampa la versione di ScribesnlINSINVzh_CNSelected characters inside bracket选择了括å·å†…所有的è¯frClosed search barBarre de recherche masquéeit%s does not exist%s non esistezh_CNError: File not found错误:文件未找到nlFontLettertypezh_CNSelect file for loading选择è¦è½½å…¥çš„æ–‡ä»¶nlCannot redo actionActie kan niet ongedaan gemaakt wordendeReplace all found matchesAlle gefundenen Zeichenfolgen ersetzenzh_CNEdit Template编辑模æ¿nlReplacing tabs please wait...Tabs worden vervangen, even wachten a.u.b...deThe MIME type of the file you are trying to open is not for a text file. MIME type: %sDie Datei, die Sie zu öffnen versuchen ist keine Textdatei. MIME-Type: %szh_CNSelected text is already capitalizedé€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯è¯é¦–大写了pt_BR_Bookmark_MarcadoresdeRemove _All BookmarksEntferne _alle LesezeichensvUrduUrdufrNo selection to cutPas de sélection à couperdeNo selection to change caseNichts markiert um die Großschreibung zu ändernitHide right marginNascondi il margine destropt_BRMove to bookmarked lineMover cursor para linha marcadaitNo match was foundNessuna corrispondenza trovatadeNo tabs found to replaceKeine Tabulatoren zum Ersetzen gefundensvVietnameseVietnamesiskanlscribes: %s takes no argumentsscribes: %s heeft geen argumentenpt_BRPrinting "%s"Imprimindo "%s"frSelect to reset the language syntax element to its default settingsCliquer pour remettre a zéro les paramètres de l'élement de syntaxefrFind occurrences of the string that match upper and lower cases onlyRechercher des occurences de la chaine en respectant la cassept_BRError: You do not have permission to save at the locationErro: Você não tem permissão para salvar na localizaçãodeLoad Error: Failed to close file for loading.Fehler beim Laden: Konnte Datei nicht schließen.zh_CNNo selection to cut没有选择svReplace _AllErsätt _allasvS_pacesB_lankstegde_Use spaces instead of tabs_Leerzeichen anstatt Tabulatoren verwendenitKoreanCoreanozh_CN_Right margin position: å³ç©ºç™½ä½ç½®(_R):svMove to _Next BookmarkFlytta till _nästa bokmärkesvCo_lor: Fä_rg: nlOVROVRnl_Lowercase_Kleine letterspt_BRArabicÃrabesvCreate, modify or manage templatesSkapa, ändra eller hantera mallaritPrint the current fileStampa il file correntefrRussianRussedePrint fileDatei druckenfrRemoved spaces at end of line %dLes espaces de fin de la ligne ont été supprimés à la ligne %ddeNo previous match foundKeine Übereinstimmung gefundenitPortuguesePortoghesezh_CNB_old粗体(_o)svRussianRyskafrCharacter EncodingEncodage de CaractèrenlToggled readonly mode onAlleen-lezen modus ingeschakeldsvUse GTK theme colorsAnvänd GTK-temafärgerdeEnabled text wrappingTextumbruch aktiviertpt_BRPositioned margin line at column %dLinha de margem posicionada na coluna %dsv_Remove Bookmark_Ta bort bokmärkezh_CN_Uppercase大写(_U)pt_BRUnsaved DocumentDocumento NovoitChanged selected text from uppercase to lowercaseIl testo selezionato e' stato cambiato da maiuscolo in minuscolozh_CNBack_ground:背景(_g):frSelect to enable spell checkingActiver la correction orthographiquept_BRAll LanguagesTodas as línguaszh_CNScheme DocumentsScheme 文件pt_BRloading...abrindo...itDisplay right _marginMostra il _margine destroitDeleted line %dRiga %d cancellatapt_BRDetach Scribes from the shell terminalDestaca o Scribes do terminalpt_BR_Description_Descriçãofr_Lowercase_Minusculept_BRLoad Error: Failed to read file for loading.Erro ao Carregar: Não foi possível ler o arquivo para carregá-lo.pt_BRDetermines whether to show or hide the status area.Mostrar ou ocultar a área de estado.deOpen a fileEine Datei öffnendeRemoved spaces at beginning of line %dLeerzeichen am Anfang von Zeile %d entferntdeInfo Error: Access has been denied to the requested file.Fehler: Der Zugriff auf die gewünschte Datei wurde verweigert.deMoved cursor to line %dIn Zeile %d gesprungenpt_BRType URI for loadingDigite a URI a ser carregadafrLoading "%s"...chargement de "%s"...pt_BREditor foreground colorCor de primeiro plano do editornl_Language_TaalsvClick to choose a new color for the editor's textKlicka för att välja en ny färg för redigerarens textfrUse tabs for indentationUtiliser des tabulations pour l'indentationitLoading file please wait...Caricamento file in corso. Attendere prego...itChanged tab width to %dCambiata la larghezza del tab a %dpt_BRNo brackets found for selectionNão há parêntese para removerzh_CNSelection unindentedå–æ¶ˆäº†ç¼©è¿›deNo spaces found to replaceKeine Leerzeichen zum Ersetzen gefundenpt_BRShift _RightRecuar para a _DireitasvError: You do not have permission to save at the locationFel: Du har inte behörighet att spara pÃ¥ platsenfrCharacter _Encoding: _Codage des caractères: nlTraditional ChineseTraditioneel Chineessv_Search for:_Sök efter:frLine number:Numéro de ligne:pt_BRFreed line %dLinha %d apagadapt_BR_Join Line_Unir LinhaitSearch for next occurrence of the stringCerca la prossima occorrenza della stringanlgtk-cancelgtk-cancelsvError: Invalid template file.Fel: Ogiltig mallfil.itChange name of file and saveCambia il nome del file e salvalodeDelete Cursor to Line _EndLösche zum Zeilen_endenlUnindented line %dInspringing van regel %d verkleinddeShowed toolbarWerkzeugleiste eingeschaltenfrStopped replacingRemplacement arrétédeShow or hide the toolbar.Werkzeugleiste zeigen oder verbergennl_Find Matching Bracket_Zoek overeenkomstig haakjept_BRAdd or Remove Character EncodingAdicionar ou Remover Codificaçãozh_CNHTML DocumentsHTML 文件nlDisabled text wrappingRegelafbreking uitgeschakelddeError: No template information foundFehler: Keine Information über die Vorlagen gefundensvBaltic languaguesBaltiska sprÃ¥kit%d%% complete%d%% completoitcompletedcompletatodeSelected text is already capitalizedMarkierter Text ist bereits in Großbuchstabenpt_BRDamn! Unknown ErrorDroga! Erro desconhecidopt_BRdisplay this help screenexibir essa tela de ajudafrRemoving spaces please wait...Effacement des espaces, patientez SVP...pt_BRBookmarked TextTexto Marcadopt_BRSyntax Color EditorEditor de CoresnlMoved to first bookmarkNaar eerste bladwijzer gegaanpt_BRNo previous matchNenhuma ocorrência préviapt_BRNoneNenhumapt_BRgtk-editgtk-editsvTab widthTabulatorbreddpt_BRShow marginMostrar margempt_BRGo to a specific lineVai até uma determinada linhadeSelect character _encodingZeichensatz auswählenzh_CNPrint Preview打å°é¢„览pt_BRCannot open %sImpossível abrir %ssv%s does not exist%s finns inteitBookmarked line %dAggiunto segnalibro alla riga %dsvSave DocumentSpara dokumentpt_BRUse tabs for indentationUsar tabulação para recuosvMatch %d of %dSökträff %d av %dsvSelect _SentenceMarkera _meningsvLoaded file "%s"Läste in filen "%s"frdisplay this help screenaffiche cette page d'aidept_BRText wrappingQuebra automática de textosvNeither reload nor overwrite fileLäs varken om eller skriv över filennlDisabled syntax colorSyntaxiskleuren uitgeschakeldnlAll DocumentsAlle documentenzh_CNSelected next placeholder下一个ä½ç½®nl_Tab width: _Tabbreedte:zh_CNSelect选择deReplacing please wait...Ersetze - bitte warten...deThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sDer MIME-Typ der Datei, die Sie zu öffnen versuchen,konnte nicht ermitelt werden. Bitte versichern Sie sich, dasses eine Textdatei ist MIME-Typ: %snlSelect to display a vertical line that indicates the right margin.Selecteer om de rechterkantlijn aan te duiden met een verticale lijn.pt_BR_Spaces to Tabs_Espaços para Tabulaçõeszh_CNA text editor for GNOME.GNOME 的一个文本编辑器。itCut selected textIl testo selezionato e' stato tagliatosvWest EuropeVästeuropasvPosition of marginMarginalens positiondeShow marginRand zeigennlCannot open fileKan bestand niet openenzh_CNINSæ’å…¥frEditor _font: _Fonte de l'éditeur:deLoading file please wait...Lade die Datei.- Bitte warten...zh_CNEnabled spellchecking激活了拼写检查frClosed goto line barBarre 'aller à la ligne' masquéesv_Remove Trailing SpacesTa bort _efterliggande blankstegsvThe color used to render normal text in the text editor's buffer.Färgen som används för att rita normal text i textredigerarens buffert.zh_CNNo brackets found for selection没有找到括å·frAn error occurred while saving this file.Une erreur est arrivée lors de la sauvegarde du fichier.itSimplified ChineseCinese semplificatozh_CNPrint fileæ‰“å°æ–‡ä»¶frUndo last actionDéfaire l'action précédentedeTemplate mode is activeVorlagenmodus ist aktivfrChanged font to "%s"La fonte est maintenant: "%s"frAll LanguagesToutes les languespt_BRError: Template editor can only have one '${cursor}' placeholder.Erro: Editor de modelos pode conter apenas um espaço reservado "${cursor}".zh_CNSelect background syntax color选择语法高亮背景色pt_BREnable text _wrapping_Quebrar texto automaticamentenlNo more lines to joinGeen regels meer om samen te voegennlIndented line %dRegel %d ingesprongensv_Reload FileLäs _om filfrThe file you are trying to open is not a text file.Le fichier que vous essayez d'ouvrir n'est pas un fichier textedeClick to specify the font type, style, and size to use for text.Bestimmen Sie die verwendete Schriftart, den Stil und die GrößedeI_ndentation_EinzugsvLineRaddeS_paces_LeerzeichensvBookmarked TextBokmärkt textsvFound %d matchHittade %d sökträffarzh_CNUnindented line %då–æ¶ˆäº†ç¬¬ %d 行的缩进deAlready on last bookmarkSie sind bereits beim letzten Lesezeichenzh_CN_Spaces to Tabså°†ç©ºæ ¼è½¬æ¢æˆtab(_S)svReplacing spaces please wait...Ersätter blanksteg, vänta ...frNo selection to copyPas de sélection à copierpt_BRC++ DocumentsDocumentos C++pt_BRNo bookmarks foundNenhum marcador encontradonlCurrent document is focusedHuidige document heeft de focusnlCase sensitiveHoofdlettergevoeligsv_Description:_Beskrivning:pt_BREnable or disable spell checkingAtiva ou desativa a verificação ortográficanlNo tabs found to replaceGeen tabs gevonden om te vervangendeEnable or disable spell checkingRechtschreibprüfung einschaltendeUse spaces instead of tabs for indentationLeerzeichen anstatt Tabulatoren für die Einrückung verwendenfrSelected next placeholderÉlement suivant sélectionnédeCharacter EncodingZeichensatzzh_CN_Show Bookmark Browser显示书签æµè§ˆå™¨(_S)itText DocumentsDocumenti di testodeError: '%s' is already in use. Please use another abbreviation.Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie eine andere Abkürzung.frEsperanto, MalteseEsperanto, Maltaispt_BRYou do not have permission to view this file.Você não tem permissão para leitura deste documento.pt_BRMove to _Next BookmarkPró_ximo MarcadorsvTurkishTurkiskaitCeltic languagesLingue CeltichenlClick to choose a new color for the language syntax elementKlik om een nieuwe kleur te kiezen voor het syntaxiselementzh_CNIndenting please wait...正在缩进,请ç¨å€™â€¦â€¦pt_BR_Background color: _Plano de fundo: pt_BRThaiTailandêsitUnified ChineseCinese unificatodeSelected characters inside bracketZeichen innerhalb der Klammern markiertfrNo bookmark on line %d to removePas de signet à supprimer sur la ligne %dfrLoading file please wait...Chargement du fichier, patientez SVP...zh_CN_Swapcase交æ¢å¤§å°å†™(_S)frBaltic languagesLangues Baltiquesde_Reset to Default_Zurücksetzen auf Standartwertept_BRWest EuropeEuropa OcidentalsvEditor foreground colorFörgrundsfärg för redigerarenpt_BRSave Error: Failed to create swap file for saving.Erro ao Salvar: Não foi possível criar arquivo temporário para salvar.nlReplac_e with:V_ervangen door:nlMoved to last bookmarkNaar laatste bladwijzer gegaanzh_CNClick to choose a new color for the editor's text为编辑器的文本选择一个新的颜色nlBookmark _LineBladwijzer aan_maken voor regelsvUkrainianUkrainskafrNo more lines to joinPlus de lignes à colleritJapanese, Korean, Simplified ChineseGiapponese, Coreano, Cinese semplificatopt_BRSelect document to focusSelecione documento a focarzh_CNClose incremental search bar关闭å‘下æœç´¢æ¡pt_BRSets the width of tab stops within the editorConfigura a largura das tabulações no editorfrPrinting "%s"Impression de "%s"pt_BR_Remove Bookmark_Remover MarcadordeSelect to display a vertical line that indicates the right margin.Aktiviert eine vertikale Linie, die einen rechten Rand markiert.zh_CNHide right marginéšè—å³ç©ºç™½deSelected text is already lowercaseMarkierter Text ist bereits in KleinbuchstabennlLoad Error: Failed to access remote file for permission reasons.Fout bij laden: toegang tot bestand op afstand is geweigerd.nlI_ndentationI_nspringenfropen file in readonly modeouvrir le fichier en lecture seulept_BR_Remember password for this session_Lembrar senha durante essa sessãozh_CNAlready on last bookmarkå·²ç»åœ¨æœ€åŽä¸€ä¸ªä¹¦ç­¾äº†pt_BRMenu for advanced configurationMenu para configuração avançadasvINSINFpt_BRNo previous bookmark to move toNão marcador préviozh_CNThe file "%s" is open in readonly mode文件 "%s" 以åªè¯»æ¨¡å¼æ‰“å¼€frRight MarginMarge à droitept_BRShowed toolbarBarra de ferramentas exibidasvSelect to enable spell checkingAktivera stavningskontrollenfrClick to choose a new color for the editor's backgroundCliquer pour choisir une couleur pour le fonddeEditor's fontEditor _SchriftartfrReplaced spaces with tabsRemplacé les tabulations par des espacesitNo paragraph to selectNessun paragrafo da selezionarezh_CNSelect background color选择背景色nlPrint fileBestand afdrukkenpt_BRFile: Documento: itPrint PreviewAnteprima di stampanlNo match foundGeen zoekresultatenfrSelect character _encodingEncodage de caractèrezh_CNMatch %d of %d第 %d 个,共 %d 个frGo to a specific lineAller à une ligne spécifiéedeEnables or disables right marginRechten _Rand anzeigennlA saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.Opslaan is mislukt. Kon geen wisselbestand aanmaken. Controleer of u rechten heeft om in uw thuismap op te slaan. Kijk ook na of u nog voldoende schijfruimte hebt. Automatisch opslaan is uitgeschakeld totdat het document foutloos is opgeslagen.svcreate a new file and open the file with Scribesskapa en ny fil och öppna filen med Scribesde_Description_Beschreibungpt_BRAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netOcorreu um erro ao abrir esse documento. Por favor, envie um relatório de erro através de http://scribes.sourceforge.netdeClick to choose a new color for the editor's backgroundKlicken Sie hier um eine neue Hintergrundfarbe auszuwählennlJapanese, Korean, Simplified ChineseJapans, Koreaans, Vereenvoudigd ChineesnlAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.Er heeft zich een fout voorgedaan tijdens het coderen van uw bestand. Probeer uw bestand op te slaan met een andere tekencodering, bij voorkeur UTF-8.sv  frToggled readonly mode onMode lecture seule activépt_BRWord completion occurredPalavra completadapt_BRMatch _caseCoinc. _maiúsc./minúsc.frRemoved spaces at beginning of line %dLes espaces de début de ligne ont été supprimés, à la ligne %dzh_CNLeave Fullscreenå…¨å±deActivated '%s' syntax colorFarbschema für '%s' aktiviertnlReplace the selected found matchGeselecteerde zoekresultaat vervangendeNo match foundKein mal gefundenfrTab StopsUtilisation des TabulationsnlHTML DocumentsHTML-documentenzh_CNCopied selected textå¤åˆ¶äº†é€‰ä¸­çš„æ–‡æœ¬svAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141Ett kodningsfel inträffade. Skicka in en felrapport pÃ¥ http://openusability.org/forum/?group_id=141nlSelected paragraphParagraaf geselecteerdfrRemoved spaces at end of linesLes espaces de fin de la ligne ont été supprimésdeNo previous matchKeine vorherige Übereinstimmung gefundennlEnclosed selected textGeselecteerde tekst omringd door haakjesnlSelection unindentedInspringing van selectie verkleinditRemoved spaces at end of line %dRimossi gli spazi alla fine della riganlPasted copied textGeselecteerde tekst geplaktpt_BR_Titlecase_Iniciais em MaiúsculasfrBaltic languaguesLangues BaltiquesiterrorerroredeBaltic languagesBaltische Sprachenzh_CNSelected paragraph选择了段è½deKoreanKoreanischpt_BRKazakhCazaquefr_Password:Mot de _passe:deSelected next placeholderNächsten Platzhalter ausgewähltnlopen file in readonly modebestand in alleen-lezen modus openenpt_BRError: Invalid template fileErro: Arquivo de modelo inválidozh_CNIndented line %d缩进了第 %d 行deCannot redo actionKann die Aktion nicht WiederholensvMatch wordMatcha hela orditScribes is a text editor for GNOME.Scribes e' un editor di testo per GNOMEnlDelete _Cursor to Line BeginVan _cursor tot begin regel verwijderensv_Enable spell checkingA_ktivera stavningskontrollzh_CNSave Error: You do not have permission to modify this file or save to its location.ä¿å­˜å¤±è´¥ï¼šæ‚¨æ²¡æœ‰æƒé™åœ¨æ­¤ç›®å½•下修改或ä¿å­˜è¿™ä¸ªæ–‡ä»¶ã€‚sv_Name:_Namn:svSpell checkingStavningskontrolldePermission Error: Access has been denied to the requested file.Fehler: Der Zugriff auf die gewünschte Datei wurde verweigert.svAuto Replace EditorAutomatisk ersättningsvHebrewHebreiskasvSelect to reset the language syntax element to its default settingsVälj för att Ã¥terställa sprÃ¥ksyntaxelementet till dess standardinställningarsvRemoved spaces at end of selected linesTog bort blanksteg pÃ¥ slutet av markerade radernlSpell checkingSpellingscontrolenlConfigure the editor's foreground, background or syntax colorsStel de voorgrond-, achtergrond- en syntaxiskleur voor het tekstvenster inde_Use default theme_Standartfarben des aktuellen Themas benutzendeUsing custom colorsEigene Farben benutzendeUnsaved DocumentUngespeicherter TextnlNo previous bookmark to move toGeen vorige bladwijzerpt_BRInfo Error: Access has been denied to the requested file.Erro de Informação: Acesso negado ao arquivo solicitado.itChanged selected text from lowercase to uppercaseIl testo selezionato e' stato cambiato da minuscolo in maiuscoloitNo spaces were found at beginning of lineNon sono stati trovati spazi all'inizio della rigasvInserted templateInfogade mallpt_BRDeleted line %dLinha %d excluídafr_Enable spell checking_Activer la correction orthographiquezh_CNAdd or Remove Encoding ...添加或删除编ç â€¦â€¦sv_Uppercase_VersalsvSelected text is already lowercaseMarkerad text är redan gemenfrYou do not have permission to view this file.Vous n'avez pas la permission d'ouvrir ce fichier.deIndenting please wait...Rücke ein - bitte warten...deReplac_e with:Ersetzen _mit:pt_BRAutomatic ReplacementSubstituição Automáticapt_BREditor _font: _Corpo de texto: deModify words for auto-replacementÄndere das Wort für die automatische Ersetzungpt_BRSelect to reset the language syntax element to its default settingsReverte o elemento da sintaxe da linguagem para sua configuração padrãofrMove cursor to a specific lineDéplacer le curseur à une ligne spécifiéenlSelected next placeholderVolgende placeholder geselecteerdde_Show Bookmark BrowserZeige die Lesezeichen_übersichtsvUse spaces for indentationAnvänd blanksteg för indenteringpt_BRTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.Verdadeiro para destacar o Scribes do terminal e executá-lo em seu próprio processo, senão falso. Para propósitos de depuração, pode ser útil definir esta opção para falso.itNo selected lines can be indentedNessuna delle righe selezionate può essere indentatadeReplaced spaces with tabsLeerzeichen durch Tabulatoren ersetztzh_CN_Background color: 背景色(_B):svAll Languages (BMP only)Alla sprÃ¥k (endast BMP)svSelection indentedMarkeringen indenteradesitCursor is already at the beginning of lineIl cursore e' già all'inizio della riganlEnables or disables right marginRechterkantlijn in- of uitschakelenpt_BRError: '%s' is already in use. Please use another abbreviation.Erro: "%s" já está sendo usada. Por favor, utilize outra abreviação.itSelected wordParola selezionatapt_BRLoad Error: You do not have permission to view this file.Erro ao Carrgar: Você não tem permissão para ver este arquivo.pt_BRDeleted text from cursor to beginning of line %dTexto excluído do cursor até o começo da linha %dnlGo to a specific lineNaar een bepaalde regel gaande_Search for: _Suche nach: pt_BRConfigure the editorConfigura o editorfrUsing theme colorsUtiliser les couleurs du thèmesvscribes: %s takes no argumentsscribes: %s tar inga argumentsvEnabled spellcheckingAktiverade stavningskontrollfrCould not open help browserImpossible d'afficher l'aidedeInfo Error: Information on %s cannot be retrieved.Fehler; Information von %s konnte nicht empfangen werden.pt_BRSelect to underline language syntax elementSublinha o elemento da sintaxe da linguagemitWord completion occurredC'e' stato un completamento di parolanlError: Trigger name already in use. Please use another trigger name.Fout: Naam van trigger is al in gebruik. Gebruik a.u.b. een andere naam voor de trigger.zh_CNopen file in readonly mode以åªè¯»æ¨¡å¼æ‰“开文件itLine number:Numero di riga:nlNo previous matchGeen vorig zoekresultaatpt_BRNo sentence to selectNão há frase para selecionarzh_CNToggled readonly mode onåªè¯»æ¨¡å¼é”定frWord completion occurredAutocompletion de motdeEnglishEnglischpt_BREditor's fontFonte do editorsvFile: %sFil: %snlUse GTK theme colorsGTK themakleuren gebruikenpt_BR_Lines_LinhasitUrduUrdupt_BRS_paces_EspaçosnlWestern EuropeWest-Europeeszh_CNChanged tab width to %då°†tab宽度å˜ä¸º %dnl_Use default theme_Standaardthema gebruikenfrCould not find Scribes' data folderImpossible de trouver le répertoire de données de ScribesnlLineRegelpt_BRcompletedcompletadosvDelete Cursor to Line _EndTa bort frÃ¥n markör till rad_slutde_Language_SprachefrMoved to first bookmarkCurseur placé sur le premier signetdeLoad Error: Failed to get file information for loading. Please try loading the file again.Fehler beim Laden: Konnte die Dateinformationen für das Laden nicht bekommen.Bitte versuchen Sie erneut die Datei zu öffnen.frLine %d is already bookmarkedLa ligne %d a déjà un signetde_Foreground:_Vordergrundpt_BR_Highlight ModeModo de _DestaquenlerrorfoutnlThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.De codering van het bestand dat u wilt openen kan niet worden vastgesteld. Probeer het bestand met een andere codering te openen.pt_BRCo_lor: _Cor: itSaved "%s""%s" e' stato salvatonlMove to Last _Bookmark_Laatste bladwijzerpt_BROVRSEfrVietnameseVietnamiensv_Previous_FöregÃ¥endesvC++ DocumentsC++-dokumentitTab StopsSpazi di TabulaturadeCannot open %sKann %s nicht öffnendeFree Line _AboveLösche _vorherige ZeileitBaltic languaguesLingue Baltichenl_NextV_olgendedeSelect document to focusText auswählen um ihn hervorzuheben zh_CNLoad Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚请您从 æ‰“å¼€å¯¹è¯æ¡† ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)æ˜¾ç¤ºæ‰“å¼€å¯¹è¯æ¡†ã€‚deSelectAuswählenpt_BRRemoved bookmark on line %dMarcador removido da linha %dzh_CNOpen Document打开文档zh_CNSelect to make the language syntax element italicå˜ä¸ºæ–œä½“frConfigure the editorConfigurer l'éditeursvActivated '%s' syntax colorAktiverade färg för "%s"-syntaxpt_BRDetermines whether to show or hide the toolbar.Mostrar ou ocultar a barra de ferramentas.itUnrecognized option: '%s'Opzione sconosciuta: '%s'deDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Legt fest, ob die Farben des GTK-Themas für das Textfenster verwendet werden sollen. Wenn dies aktiviert ist, werden Themenfarben verwendet, ansonsten die vom Benutzerfestgelegten.itSelected text is already capitalizedIl testo selezionato e' già capitalizzatosv_Lines_RadernlLoad Error: File does not exist.Fout bij laden: bestand bestaat niet.itClosed error dialogDialog d'errore chiusonlOpen DocumentsDocumenten openenpt_BRActivated '%s' syntax colorCor da sintaxe "%s" ativadazh_CNOptions:选项:zh_CNUse spaces instead of tabs for indentation使用空格代替tab缩进pt_BRscribes: %s takes no argumentsscribes: %s não leva argumentossvPortuguesePortugisiskapt_BRFound %d match%d ocorrência encontradanlThe file you are trying to open is not a text file.Het bestand dat u probeert te openen is geen tekstbestand.pt_BRUndid last actionAção desfeitapt_BRgtk-removegtk-removeitKazakhKazacozh_CNNo paragraph to select未找到段è½svType in the text you want to search forAnge texten som du vill söka efteritNo text to select in line %dNon c'e' testo da selezionare nella riga %ditThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sIl tipo MIME del file che stai cercando di aprire non può essere determinato. Assicurati che si tratti di un file di testo. Tipo MIME: %sitMatch _word_Tutta la parolanlPrint DocumentDocument afdrukkennl_Uppercase_HoofdlettersnlDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Bepaalt of de GTK themakleuren gebruikt worden voor de tekst en de achtergrond van het tekstvenster. Deselecteer deze optie om zelf de kleuren te bepalen.svNo spaces found to replaceInga blanksteg hittades att ersättazh_CNError: You do not have permission to save at the location错误:您没有此ä½ç½®çš„写æƒé™svSelected line %dMarkerade rad %dnlSelected sentenceGeselecteerde zinpt_BRSave Error: Failed to write swap file for saving.Erro ao Salvar: Não foi possível gravar no arquivo temporário para salvar.nlRemoved pair character completionOvereenkomstig haakje verwijderditEnabled text wrappingDivisione testo attivatazh_CN_Enable spell checking激活拼写检查(_E)svType URI for loadingAnge URI för inläsningitCopied selected textIl testo selezionato e' stato copiatopt_BRPHP DocumentsDocumentos PHPnlRight MarginRechterkantlijnitopen file in readonly modeapre il file in modalità di sola letturanlSelect to reset the language syntax element to its default settingsSelecteer om het syntaxiselement te herstellen naar zijn standaardwaardenzh_CNFound matching bracket on line %d在第 %d 行找到了对应的括å·de_Description:_BeschreibungsvIndented line %dDrog in rad %dpt_BR_Foreground:_Primeiro plano:nlNo sentence to selectGeen zin om te selecterensvAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"Ett fel inträffade vid avkodning av din fil. Skicka in en felrapport pÃ¥ "http://openusability.org/forum/?group_id=141"svSave current file and overwrite changes made by other programSpara aktuell fil och skriv över ändringarna gjorda av det andra programmetpt_BRLineLinhapt_BRSave DocumentSalvar Comofr_Language_Languept_BRC# DocumentsDocumentos C#deHaskell DocumentsHaskell QuelltextedeEdit TemplateVorlage bearbeitennlError: No template information foundFout: geen sjablooninformatie gevondennl%s does not exist%s bestaat nietsvCannot open fileKan inte öppna filennlMatch _wordEnkel complete _woordendeMoved to most recently bookmarked lineZur zuletzt mit einem Lesezeichen versehenen Zeile gegangendeRemoved all bookmarksAlle Lesezeichen entferntsvusage: scribes [OPTION] [FILE] [...]användning: scribes [FLAGGA] [FIL] [...]frOpen a new windowOuvrir une nouvelle fenêtresvLoad Error: Failed to read file for loading.Inläsningsfel: Misslyckades med att läsa filen för inläsning.nlError: '%s' is already in use. Please use another abbreviation.Fout: %s is reeds in gebruik. Gebruik a.u.b. een andere afkorting.itEdit TemplateModifica Templatezh_CNReplace all found matches替æ¢äº†æ‰€æœ‰æ‰¾åˆ°çš„短语svNo match foundIngen sökträff hittadespt_BRIndented line %dLinha %d recuadafrTemplate EditorEditeur de Patronsit_Use default theme_usa il tema inizialesvA saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.Ett fel vid sparandet inträffade. Dokumentet kunde inte överföras frÃ¥n sin temporära plats. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.pt_BRFind occurrences of the string that match upper and lower cases onlyProcurar ocorrências da expressão diferenciando maiúsculas/minúsculasfrFound matching bracket on line %dParenthèse correspondante trouvée à la ligne %dsvDetermines whether to show or hide the status area.Bestämmer huruvida statusrutan ska visas eller döljas.zh_CNNo selection to copy没有选择nlA saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.Er heeft zich een fout bij het opslaan voorgedaan. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.frType in the text you want to replace withEntrez le texte que vous désirez remplacersvXML DocumentsXML-dokumentzh_CNMoved cursor to line %d光标转到了第 %d 行itEsperanto, MalteseEsperanto, Maltesede_Join Line_Verbinde Zeilennl_Delete LineRegel verwij_derenfr_Description:_Description:deDanish, NorwegianDänisch, Norwegischpt_BRRemoved all bookmarksTodos marcadores removidospt_BRI_ndentationRec_uosvDetach Scribes from the shell terminalKoppla loss Scribes frÃ¥n skalterminalende_Password:_Passwortpt_BRClick to choose a new color for the editor's backgroundEscolhe a cor do plano de fundo do editorpt_BR%s does not exist%s não existezh_CNDamn! Unknown Errorå¤©å•Šï¼æœªçŸ¥é”™è¯¯svYou do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.Du har inte behörighet att spara filen. Prova att spara filen pÃ¥ ditt skrivbord eller till en annan mapp. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.pt_BRModify words for auto-replacementSubstitua palavras automaticamentept_BRSelect to make the language syntax element italicItaliciza o elemento de linguagemdeRedo undone actionWiederhole die Rückgängig gemachte Änderungpt_BRClosed goto line barBarra "ir para linha" fechadaitFind occurrences of the string that match upper and lower cases onlyCerca solo occorrenze della stringa corrispondenti per maiuscolo e minuscolofrLineLignept_BRA saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.Ocorreu um erro de gravação. Não foi possível transferir o documento de sua localização temporária. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.frSelected line %dLigne %d sélectionnéedeBack_ground:Hinter_grundpt_BRSpell checkingVerificação ortográficasvPrinting "%s"Skriver ut "%s"svChanged selected text to lowercaseÄndrade markerad text till gemenerdeDetermines whether to show or hide the status area.Legt fest, ob die Statusleiste angezeigt wird.pt_BRMoved to most recently bookmarked lineCursor movido para o marcador mais recentenlNo spaces were found at beginning of lineEr zijn geen spaties gevonden aan het begin van de regelzh_CN_Use default theme使用默认主题(_U)frHebrewHébreufrIncrementally search for textRechercher dans le texte à la voléeit_Background color: Colore di _backgroundzh_CNType URI for loading输入è¦è½½å…¥çš„URIdeSelect _Line_Markiere _Zeilept_BRClick to choose a new color for the language syntax elementEscolhe a cor do elemento da sintaxe da linguagemsvBaltic languagesBaltiska sprÃ¥kfrText DocumentsDocument textezh_CNInformation about the text editor文本编辑器的信æ¯svSave Error: Failed to create swap file for saving.Fel vid sparande: Misslyckades med att skapa växlingsplats för sparandet.nlEditor's fontLettertype voor het tekstvensterpt_BRRemoved spaces at end of selected linesEspaços removidos do fim das linhas selecionadasfrNo spaces found to replaceAucun espace à remplacer n'a été trouvésvBack_ground:Bak_grund:deDeleted line %dHabe die Zeile %d gelöschtsvFree Line _BelowFrigör _underliggande radpt_BRRemoved spaces at end of linesEspaços removidos ao fim das linhaspt_BRFile _Type_Tipo de ArquivofrSelected sentencePhrase sélectionnéedeJava DocumentsJava QuelltextedeReplaced tabs with spacesTabulatoren durch Leerzeichen ersetztpt_BR_Replacements_SubstituiçõesdeConfigure the editorEditor einrichtendeCould not find Scribes' data folderKonnte Scribes' Datenordner nicht findennlArabicArabischfrNo text content in the clipboardPas de texte dans le presse-papiersvTry 'scribes --help' for more informationProva "scribes --help" för mer informationzh_CNAll Documents所有文件nlTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.Schakel dit in om Scribes los te koppelen van de shell-terminal en in zijn eigen proces te draaien. Om fouten op te sporen kan het nuttig zijn om dit uit te schakelen.pt_BRYou must log in to access %sVocê precisa identificar-se para acessar %ssvClick to specify the font type, style, and size to use for text.Klicka för att ange typsnittstypen, stil och storlek att använda för text.nlSave password in _keyring_Sla wachtwoord op in sleutelhangerpt_BRS_electionSe_leçãopt_BRLeave FullscreenDeixar Tela CheianlThe highlight color when the cursor is around opening or closing pair characters.De accentueerkleur wanneer de cursor naast overeenkomstige haakjes staat.deAuthentication RequiredAuthentifizierung benötigtpt_BRReplaced spaces with tabsEspaços substituídos por tabulaçõesnldisplay this help screendit helpvenster tonenzh_CNShow right margin显示å³ç©ºç™½it_Enable spell checking_Abilita il controllo ortograficozh_CNI_mport导入(_m)deUndid last actionLetzte Aktion rückgängig gemachtdeRight MarginRechter Randzh_CNTemplate mode is activeæ¿€æ´»äº†æ¨¡æ¿æ¨¡å¼fr_Spaces to TabsE_spaces en TabssvSelected text is already uppercaseMarkerad text är redan versalzh_CNChange editor colors更改编辑器颜色svPerl DocumentsPerl-dokumentsvHTML DocumentsHTML-dokumentdeToggled readonly mode offDeaktiviert den Nur-Lesen Moduspt_BRSelected next placeholderPróximo espaço reservado selecionadofrAdd or Remove Encoding ...Ajouter ou Supprimer le codage ...svDiscard current file and load modified fileFörkasta aktuell fil och läs in den ändrade filendeDisabled syntax colorFarbschema ausgeschaltendeClose regular expression barSchließe Reguläre Ausdruck SuchleisteitCannot undo actionImpossibile annullarenlPosition of marginPositie van de kantlijnsv_Highlight Mode_Uppmärkningslägezh_CNSelection indented缩进完æˆäº†zh_CNUndo last action撤消上一次æ“作nlClose incremental search barOplopende zoekbalk sluitendeTemplate EditorVorlagen EditorfrShift _RightDéplacer à _DroitefrFound %d match%d correspondance trouvéefrShow right marginAffiche la marge à droitesvSaved "%s"Sparade "%s"nlPermission Error: Access has been denied to the requested file.Fout bij toegang: toegang tot het gevraagde bestand is geweigerd.zh_CN_Reflow Paragraphæ•´ç†æ®µè½(_R)zh_CNNo next match found䏋颿²¡æœ‰äº†pt_BRFontFontefr_Bookmark_SignetitEdit text filesModifica file di testode_Template:_Vorlage:svReplaced tabs with spacesErsatte tabulatorer med blankstegzh_CNMatch _case符åˆå¤§å°å†™(_c)nlIncre_mental_Oplopendzh_CN_Case大å°å†™(_C)svReplace all found matchesErsätt alla sökträffarnlThaiThaisnlOptions:Opties:svNo text content in the clipboardInget textinnehÃ¥ll i urklippsvDisabled text wrappingInaktiverade radbrytningfrFree Line _BelowInsérer une ligne _au dessuszh_CNAuto Replace Editor自动替æ¢ç¼–辑器pt_BRLoaded file "%s"Documento "%s" abertofrDisplay right _marginAfficher la marge à _droitefrIndenting please wait...Indentation en cours, patientez SVP...itBracket completion occurredC'e' stato un completamento di parentesideCould not open help browserKonnte die Hilfe nicht öffnenpt_BREnter the location (URI) of the file you _would like to open:Digite a localização (URI) do arquivo que você gostaria de abrir:nl_Show Bookmark Browser_Bladwijzer-browserfr_Show Bookmark Browser_Afficher la liste des Signetssv_Underline_Understrukenpt_BRPortuguesePortuguêsdeUse spaces for indentationLeerzeichen für die Einrückung verwendennlFile _NameBestands_naamfrusage: scribes [OPTION] [FILE] [...]usage: scribes [OPTION] [FILE] [...]nlShow right marginRechterkantlijn tonendeStopped replacingErsetzen abgebrochensvInfo Error: Access has been denied to the requested file.Informationsfel: Ã…tkomst till den begärda filen nekades.deReplaced tabs with spaces on selected linesTabulatoren durch Leerzeichen in der markierten Zeile ersetztzh_CNFailed to save fileä¿å­˜æ–‡ä»¶å¤±è´¥frYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.Vous n'avez pas la permission d'écrire ce fichier. La sauvegarde automatique sera désormais désactivée.deNo next bookmark to move toKein weiteres Lesezeichen vorhandendeEsperanto, MalteseEsperanto, MaltesischdeReplaced all occurrences of "%s" with "%s"Alle Vorkommen von "%s" wurden durch "%s" ersetztzh_CNPHP DocumentsPHP 文件pt_BRRemoving spaces please wait...Removendo espaços, por favor aguarde...nlA text editor for GNOME.Een tekst-editor voor GNOME.svLine number:Radnummer:svRemoved all bookmarksTog bort alla bokmärkenitRemoved bookmark on line %dRimosso segnalibro dalla riga &dfrSearch for and replace textChercher et Remplacer dans le textesv_Language_SprÃ¥knlDetermines whether to show or hide the status area.Bepaalt of de statusbalk getoond wordt of niet.it%d match was foundE' stata trovate %d corrispondenzafrClosed replace barBarre de remplacement masquéenl_CaseHoofd- of kleine _letterspt_BRYou do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.Você não tem permissão para salvar o arquivo. Tente salvá-lo em sua Ãrea de Trabalho, ou para outra pasta que você possua. O recurso de salvar automaticamente permanecerá desativado até que o arquivo seja salvo sem erros.dedisplay this help screenZeigt diese Hilfe anpt_BREnables or disables text wrappingAtiva ou desativa quebra de textofrS_pacesE_spacesitChanged font to "%s"Carrattere combiato a "%s"frC++ DocumentsDocuments C++itConfigure the editorConfigura l'editordecreate a new file and open the file with ScribesErzeuge eine neue Datei und öffne sienlSelect file for loadingSelecteer bestand om te ladenitType in the text you want to search forScrivi il testo che vuoi cercarefrInfo Error: Information on %s cannot be retrieved.Erreur Info: Impossible d'obtenir des informations sur %s.deSelect to make the language syntax element italicÄndert denitReplaced tabs with spaces on line %dSostituiti i tab con gli spazi alla riga %dsvTab StopsTabulatorstoppitMoved cursor to line %dIl cursore e' stato spostato sulla riga %dfrPortuguesePortugaisnlLexical scope highlight colorAccentueerkleur voor lexicaal bereikfrMoved to bookmark on line %dCurseur placé sur le signet de la ligne %ddeSelect to make the language syntax element boldÄndert den Schriftstil dieses Sprachelementes in Fett umfrNo bookmarks foundAucun signet n'a été trouvéitRedo undone actionRipetifrCentral and Eastern EuropeEurope Centrale et Orientalenl_Remove Trailing SpacesSpaties aan einde regel ve_rwijderenfrAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141Une erreur d'encodage est apparue.pt_BRMoved to bookmark on line %dCursor movido para marcador da linha %dfroutput version information of Scribesaffiche les informations de version de ScribesitHebrewEbraicopt_BRA saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.Uma operação de gravação falhou. Não foi possível criar área de troca. Certifique-se de ter permissão para salvar em sua pasta pessoal. Verifique também de ter espaço em disco. O recurso de salvar automaticamente será desativado até que o arquivo seja salvado sem erros.pt_BRI_talic_ItálicodeChanged selected text to uppercaseMarkierten Text von Klein- zu Großschreibung geändertpt_BRBookmark BrowserNavegador dos MarcadoresdeBookmarked TextText mit einem Lesezeichen versehennlDamn! Unknown ErrorVerdomd! Onbekende foutnlPrint the current fileHet huidige bestand afdrukkenfr_Reset to Default_Remise à zérozh_CNShift _Rightå³ç§»ä½(_R)nlThe color used to render the text editor buffer background.De achtergrondkleur voor het tekstvenster.pt_BRRussianRussozh_CN_Replacements替æ¢ä¸º(_R)nlLanguage ElementsTaalelementendeLanguage and RegionSprache und Regionpt_BRRemoved spaces at end of line %dEspaços removidos ao fim da linha %dnlNo bookmarks foundGeen bladwijzers gevondenzh_CNSearching please wait...正在æœç´¢ï¼Œè¯·ç¨å€™â€¦â€¦svAlready on last bookmarkRedan pÃ¥ det sista bokmärketdeClick to choose a new color for the language syntax elementKlicken Sie hier um eine neue Farbe für dieses Sprachelement auszuwählendeI_talic_Kursivzh_CNMove cursor to a specific line将光标转到指定行zh_CNLoading file please wait...正在载入文件,请ç¨å€™â€¦â€¦itWest EuropeEuropa occidentalesvError: '%s' is already in use. Please use another abbreviation.Fel: "%s" används redan. Använd en annan förkortning.zh_CNNo tabs found to replaceæœªæ‰¾åˆ°å¯æ›¿æ¢çš„tabfrScribes Text EditorScribes Editeur de TextedeAn error occurred while saving this file.Beim Speichern dieses Textes ist ein Fehler aufgetreten.frPerl DocumentsDocuments PerldeSelect file for loadingEine Datei zum öffnen auswählenfrPrint PreviewAperçu avant impressiondeClosed search barDie Suchleiste wurde geschlossenzh_CNUndid last action撤消了上一个动作nlChange editor colorsKleuren van het tekstvenster veranderenpt_BRSearch for next occurrence of the stringPesquisa pela próxima ocorrência da expressãodeEnables or disables text wrappingAutomatischen Text_umbruch einschaltendeBaltic languaguesBaltische Sprachenpt_BRSaved "%s""%s" salvadofrI_talic_Italiquept_BRusage: scribes [OPTION] [FILE] [...]uso: scribes [OPÇÃO] [ARQUIVO] [...]svNo next match foundIngen nästa sökträff hittadesnlLoad Error: Failed to read file for loading.Fout bij laden: lezen van bestand om te laden is mislukt.svCeltic languagesKeltiska sprÃ¥knlClose regular expression barReguliere uitdrukkingenbalk sluitenitLanguage ElementsElementi del linguaggiodeEnclosed selected textDer ausgewählte Text wurde eingefügtsvUse Tabs instead of spacesAnvänd tabulatorer istället för blankstegfrSelect to make the language syntax element boldCocher pour mettre l'élément de syntaxe en grassv_Replace_Ersättzh_CNMove to _Next Bookmark转到下一个书签(_N)deScribes only supports using one option at a timeScribes unterstützt nur eine Option gleichzeitignlA list of encodings selected by the user.Een lijst van door de gebruiker geselecteerde coderingen.itI_talic_Corsivozh_CNAdd or Remove Character Encoding添加或删除字符编ç pt_BRPosition of marginPosição da margemnlChanged font to "%s"Lettertype gewijzigd in "%s"svYou do not have permission to view this file.Du har inte behörighet att visa den här filen.pt_BRAn error occurred while saving this file.Surgiu um erro ao salvar esse documento.deRemoved spaces at end of line %dLeerzeichen am Ende von Zeile %d entferntnlClick to specify the font type, style, and size to use for text.Klik hier om de stijl en de grootte van het tekstlettertype in te stellen.nl_Replacements_Vervangen doornl_Description:_Beschrijving:pt_BRMove to _Previous BookmarkMarcador A_nteriornlNo text content in the clipboardGeen tekstinhoud in het klembordde_Right margin position: _Position des rechten Randes: zh_CNNo match found短语未找到nlcompletedVoltooidnl_Name:_Naam:itNo next bookmark to move toNessun segnalibro verso cui muoverede_Description:_Beschreibungzh_CNText Wrapping自动æ¢è¡Œzh_CNType in the text you want to replace withè¾“å…¥æ‚¨æƒ³æ›¿æ¢æˆçš„æ–‡æœ¬nlFailed to save fileOpslaan van bestand is misluktpt_BRAdd TemplateAdicionar ModelosvFree Line _AboveFrigör _överliggande radfrBack_ground:Couleur de _Fond:pt_BRSave password in _keyringSalvar a senha no c_haveirosvoutput version information of Scribesskriv ut versionsinformation för ScribessvIncrementally search for textInkrementell sökning efter textnlAn error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"Er heeft zich een fout voorgedaan tijdens het decoderen van het bestand. Vul a.u.b. een foutrapport in op"http://openusability.org/forum/?group_id=141"pt_BRRemoved spaces at beginning of line %dEspaços removidos do começo da linha %dsvDanish, NorwegianDanska, norskasvLanguage and RegionSprÃ¥k och regiondeSelect to underline language syntax elementUnterstreicht dieses SprachelementnlNo documents openGeen documenten geopendpt_BRReplacing tabs please wait...Substituindo tabulações, por favor aguarde...frloading...chargement...zh_CNFile _Name文件å(_N)svShowed toolbarVisade verktygsradennl_Tabs to Spaces_Tabs naar spatiesdeReplacing spaces please wait...Ersetze Leerzeichen - bitte warten...frToggled readonly mode offMode lecture seule désactivésvOpen DocumentsÖppna dokumentdeLoad Error: Failed to access remote file for permission reasons.Fehler beim Laden: Konnte die entfernte Datei wegen unzureichenden Rechten nicht Öffnen.nlChange editor settingsInstellingen van de editor wijzigenpt_BR_AbbreviationsA_breviaçõesdeReloading %sLade "%s" erneut...deUnindentation is not possibleEinrückung entfernen ist nicht möglichit"%s" has been replaced with "%s""%s" e' stato sostutuito con "%s"zh_CNSelect to make the language syntax element boldå˜ä¸ºç²—体nlSelectSelecteerpt_BRBaltic languaguesLínguas bálticasdeFound %d match%d mal gefundennlDisplay right _marginRechter_kantlijn weergevenitPrint DocumentStampa documentopt_BRYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.Você não tem permissão para salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.frNo tabs found on line %dPas de tabulations dans la ligne %dnlThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sHet MIME-type van het bestand dat u probeert te openen kon niet worden vastgesteld. Controleer of dit bestand wel een tekstbestand is. MIME type: %szh_CN_Search for:æœç´¢(_S):nlJava DocumentsJava-documentenpt_BRRemove _All BookmarksRemover _Todos os Marcadorespt_BRNo next match foundNenhuma ocorrência a seguirsvCharacter _Encoding: Tecken_kodning: itShow right marginMostra il margine destropt_BRUse spaces for indentationUsar espaço para recuosvJapaneseJapanskanl_Previous_Vorigept_BRShow right marginMargem direita mostradasvEnable text _wrappingAktivera text_brytningzh_CNSelect foreground syntax coloré€‰æ‹©è¯­æ³•é«˜äº®å‰æ™¯è‰²pt_BRSelected wordPalavra selecionadapt_BRRight MarginMargem DireitasvI_talicK_ursivfrS_electionS_electionnerfrBookmark BrowserGestionnaire de signetssvDeleted line %dTog bort rad %dnlCo_lor: K_leur:nlHide right marginRechterkantlijn verbergendeDisplay right _marginRechten _Rand anzeigennlSave Error: Failed to close swap file for saving.Fout bij opslaan: sluiten wisselbestand om te slaan is mislukt.nlInfo Error: Information on %s cannot be retrieved.Fout: informatie over %s kan niet opgehaald worden.svAdd TemplateLägg till mallfrFind occurrences of the string that match the entire word onlyRechercher des occurences de la chaine par mot entier seulementzh_CNDownload templates from您å¯ä»¥ä»Žè¿™é‡Œä¸‹è½½æ¨¡æ¿:nlTry 'scribes --help' for more informationProbeer 'scribes --help' voor meer informatiept_BRSelected characters inside bracketCaracteres selecionados dentro dos parêntesesfrScribes version %sScribes version %snlEditor _font: _Lettertype van de editor:svSimplified ChineseFörenklad kinesiskazh_CNSelect to enable spell checking激活拼写检查svSearch for next occurrence of the stringSök efter nästa förekomst av strängensv_Normal text color: _Normal textfärg: deEnter the location (URI) of the file you _would like to open:Geben Sie den Ort (URL) der Datei, die Sie _öffnen wollen an:pt_BR_Uppercase_MaiúsculasfrBookmarked TextSignet ajouténlUnsaved DocumentNiet-opgeslagen documentpt_BRCannot undo actionImpossível desfazer açãodeJapaneseJapanischnlReplaced tabs with spaces on selected linesTabs vervangen door spaties op de geselecteerde regelsfrTraditional ChineseChinois TraditionnelitAdd or Remove EncodingAggiungi o rimuovi codificapt_BRXML DocumentsDocumentos XMLzh_CNError: Name field cannot be empty错误: åç§°ä¸èƒ½ä¸ºç©ºzh_CNS_paces空格(_S)frEnabled text wrappingMise à la ligne activéefr_Foreground:_Avant plan:deFreed line %dZeile %d gelöschtdeThe highlight color when the cursor is around opening or closing pair characters.Die Hintergrundfarbe, wenn der Cursor an einer öffnenden oder schließenden Klammer ist.frDisabled text wrappingMise à la _ligne désactivéenlAdd or Remove Character EncodingTekencodering toevoegen of verwijderenzh_CN'%s' has been modified by another program'%s' å·²ç»è¢«å…¶ä»–程åºä¿®æ”¹nlMove cursor to a specific lineCursor naar een bepaalde regel verplaatsensvWestern EuropeVästra Europazh_CNSelect foreground coloré€‰æ‹©å‰æ™¯è‰²itShift _Right_Aumenta l'indentazionedeUndo last actionDie letzte Aktion rückgängig machenzh_CNCharacter Encoding字符编ç nlThe MIME type of the file you are trying to open is not for a text file. MIME type: %sHet MIME-type van het bestand dat u probeert te openen is niet dat van een tekstbestand. MIME type: %spt_BRCapitalized selected textTexto alternado para caixa altapt_BRMatch %d of %dOcorrência %d de %dnlNo word to selectGeen woord om te selecterennlPositioned margin line at column %dKantlijn geplaatst op kolom %ditReplaced all occurrences of "%s" with "%s"Tuttele occorrenze di "%s" sono state sostituite con "%s"frChanged selected text from lowercase to uppercaseLe texte sélectionné a été changé de minuscules en majusculeszh_CNImport Template导入模æ¿deAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141Ein Fehler beim Kodieren ist aufgetreten. Bitte senden Sie einen Fehlerbericht(möglichst in Englisch) an http://openusability.org/forum/?group_id=141svNo bookmarks found to removeInga bokmärken hittades att ta bortnlType in the text you want to replace withVoer de tekst in waardoor u de zoekresultaten wilt vervangensvCase sensitiveSkiftlägeskänsligdeHide right marginVerstecke rechten RandfrOVROVRitAdd New TemplateAggiungi nuovo templatefr%s does not exist%s n'existe passvChanged tab width to %dÄndrade tabulatorbredd till %dnlFound %d matches%d zoekresultatendeUkrainianUkrainischfrLn %d col %dLi %d col %dpt_BRAll DocumentsTodos os DocumentossvMoved to bookmark on line %dFlyttade till bokmärke pÃ¥ rad %dde_ReplaceE_rsetzenzh_CNRename the current fileé‡å‘½å当剿–‡ä»¶nlAll languagesAlle talenitSelected text is already uppercaseIl testo selezionato e' già maiuscolosvAll languagesAlla sprÃ¥ksvSave Error: Failed decode contents of file from "UTF-8" to Unicode.Fel vid sparande: Misslyckades med att avkoda innehÃ¥llet i filen frÃ¥n "UTF-8" till Unicode.deAdd or Remove Encoding ...Zeichensatz hinzufügen oder entfernennlDownload templates fromDownload sjablonenpt_BRReloading %sRecarregando %sdeEnable text _wrappingAutomatischen Text_umbruch einschaltendeLine number:Gehe zu Zeile:deSets the margin's position within the editorÄndert the Position des rechten Randes im Editorfensterpt_BRAn error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.Ocorreu um erro ao codificar o seu documento. Tente salvar seu documento usando outra codificação, de preferência UTF-8.deRemoved spaces at end of selected linesLeerzeichen am Ende der markierten Zeilen entferntpt_BRTurkishTurcoitLanguageLinguaggionl_Use spaces instead of tabs_Spaties in plaats van tabs gebruikennlCharacter EncodingTekencoderingpt_BR_Swapcase_Trocar Minúsculas/MaiúsculasdeText wrappingTextumbruchpt_BRChanged selected text to lowercaseSeleção de texto alterada de maiúsculas para maiúsculasitAn error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netC'e' stato un errore durante l'apertura del file. Compila un bug report su http://scribes.sourceforge.net. Grazie.itRight MarginMargine destrofrCannot redo actionImpossible de refaire l'actionsv_Tab width: _Tabulatorbredd: zh_CNReplaced tabs with spaces用空格替æ¢äº†tabfr_Previous_PrécédentdeEditor foreground colorVordergrundfarbenlSimplified ChineseVereenvoudigd ChineessvClosed error dialogStängde feldialogde_Name_NamesvPrint fileSkriv ut fildeDeleted text from cursor to beginning of line %dText vor dem Cursor in Zeile %d gelöschtnlUsing custom colorsAangepaste kleuren gebruikensv_Lowercase_GemennlCharacter _Encoding: T_ekencodering:pt_BRClosed dialog windowJanela de diálogo fechadafrThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sLe type MIME du fichier que vous essayez d'ouvrir ne peut être déterminé,Verifiez que le fichier est bien un format texte type MIME: %sdeClosed error dialogFehlermeldung geschlossendePerl DocumentsPerl QuelltextesvAuthentication RequiredAutentisering krävspt_BROpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Erro ao Abrir: Ocorreu um erro ao abrir o arquivo. Tente abri-lo novamente ou faça um relatório de erro.frB_old_Graszh_CN_Language语言(_L)zh_CNSelect _Paragraph选择段è½(_P)zh_CNDisabled syntax colorç¦ç”¨äº†è¯­æ³•高亮deNo spaces were found at beginning of lineAm Anfang der Zeile wurden keine Leerzeichen gefundennlThe file you are trying to open does not exist.Het bestand dat u probeert te openen bestaat niet.nlError: No selection to exportFout: geen selectie om te exporterendeBookmark _LineLesezeichen _hinzufügenzh_CN_Remove Bookmark删除书签(_R)nl_Description:_Beschrijving:frMoved to last bookmarkCurseur placé sur le dernier signetfrUkrainianUkrainiendePrint PreviewDruckvorschausvInfo Error: Information on %s cannot be retrieved.Informationsfel: Information om %s kan inte hämtas.nl_Remove BookmarkBladwijzer verwijde_renzh_CNLoaded file "%s"载入的文件 "%s"pt_BRTrue to use tabs instead of spaces, false otherwise.Verdadeiro para usar tabulações ao invés de falso; falso para não.pt_BRAlready on most recently bookmarked lineCursor já está no marcador mais recentenlHaskell DocumentsHaskell-documentendeCut selected textMarkierten Text ausgeschnittennlLoad Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Fout bij laden: decoderen van bestand om te laden is mislukt. Het bestand dat u probeert te openen is misschien geen tekstbestand. Indien u zeker bent dat het een tekstbestand is, probeer het bestand dan te openen met de correcte codering via de het openvenster. Druk (control - o) om het openvenster te tonen.pt_BRNo tabs found to replaceNenhuma tabulação encontrada para ser substituídanlExport TemplateExporteer sjabloonfrSelect _SentenceSélectionner _PhrasesvSelect to display a vertical line that indicates the right margin.Välj för att visa en vertikal linje som indikerar högermarginalen.nlBulgarian, Macedonian, Russian, SerbianBulgaars, Macedonisch, Russich, ServischsvReplacing please wait...Ersätter, vänta...itClick to specify the location of the vertical line.Clicca per specificare la posizione della linea verticaledeRemoving spaces please wait...Entferne Leerzeichen - bitte warten...zh_CNRemoved all bookmarks删除了所有的书签pt_BRSave Error: You do not have permission to modify this file or save to its location.Erro ao Salvar: Você não tem permissão para modificar este arquivo ou salvar em sua localização.itFreed line %dRiga %d liberatasv_Overwrite FileS_kriv över fildeReplacing tabs please wait...Ersetze Tabulatoren - bitte warten...frAdd New TemplateAjouter un PatrondeClick to specify the width of the space that is inserted when you press the Tab key.Ändert die Breite des Leerraums, wenn Sie die Tabulatortaste betätigen.sv_Password:_Lösenord:pt_BRSimplified ChineseChinês SimplificadodeSearch for and replace textText suchen und ErsetzensvLoad Error: File does not exist.Inläsningsfel: Filen finns inte.zh_CN_Previous上一个(_P)itPreferencesPreferenzesvSets the margin's position within the editorStäller in marginalens position i redigerarenzh_CNClick to specify the location of the vertical line.指定竖线的ä½ç½®ã€‚frCanadianCanadienfrImport TemplateImporter des extraits de codesvNo indentation selection foundIngen indenteringsmarkering hittadesnlCould not open help browserHelp-browser kon niet geopend wordenfrSelected text is already lowercaseLe texte sélectionné est déjà en minusculesdeSearch for textText suchenzh_CNIncre_mentalå‘下(_m)pt_BRNo text content in the clipboardNão há texto na área de transferênciafrA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.La sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée.pt_BRMove to Last _BookmarkÚltim_o MarcadornlNo paragraph to selectGeen paragraaf om te selecterenfrSelect foreground syntax colorChoisir la couleur d'avant-plandeNo next match foundKeine weitere Übereinstimmung gefundenzh_CNSearch for text查找it_Search for:_Cerca:zh_CNLoad Error: File does not exist.载入错误:文件ä¸å­˜åœ¨ã€‚zh_CNRemoved spaces at end of lines删除了行尾的空格itscribes: %s takes no argumentsscribes: %s non necessita di argomentiit_Find Matching Bracket_Cerca parentesi corrispondentefrNo documents openPas de documents ouvertssvLoad Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Inläsningsfel: Misslyckades med att avkoda filen för inläsning. Filen som du läser in kanske inte är en textfil. Om du är säker pÃ¥ att den är en textfil kan du prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen.nlSelect to underline language syntax elementSelecteer om syntaxiselement te onderstrepennlReplace all found matchesAlle zoekresultaten vervangenzh_CNReplaced spaces with tabs用tab替æ¢äº†ç©ºæ ¼zh_CNReplace the selected found match替æ¢äº†æ‰¾åˆ°çš„短语pt_BREdit text filesEdite documentos de textosvArabicArabiskait_Right margin position: Posizione del ma_rgine destro: svSearch for previous occurrence of the stringSök efter föregÃ¥ende förekomst av strängennlDisabled spellcheckingSpellingscontrole uitgeschakelditReplace all found matchesSostituisci tutti i risultati della ricercazh_CN_Highlight Mode高亮模å¼(_H)nlCanadianCanadeesnlSelect to wrap text onto the next line when you reach the text window boundary.Selecteer om de tekst op het einde van een regel af te breken, zodat die binnen de grens van het tekstvenster blijft.svEditor background colorBakgrundsfärg för redigerarensvRemoved spaces at beginning of line %dTog bort blanksteg frÃ¥n början av rad %dsvC# DocumentsC#-dokumentnlgtk-removegtk-removezh_CNAdd Template添加模æ¿svEnabled text wrappingAktiverade radbrytningnlSelect _ParagraphSelecteer _paragraafitB_old_GrassettodeDetach Scribes from the shell terminalScribes im Hintergrund ausführennl_Password:_Wachtwoord:pt_BRUse GTK theme colorsUsar cores do tema GTKnlOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Fout bij openen: er heeft zich een fout voorgedaan bij het openen van het bestand. Probeer het bestand opnieuw te openen of vul een foutrapport in.svCannot undo actionKan inte Ã¥ngra Ã¥tgärdsvMove to bookmarked lineFlytta till bokmärkt raditTraditional ChineseCinese TradizionalenlMoved to bookmark on line %dVerplaatst naar bladwijzer op regel %dsv_Template:_Mall:deSave Error: Failed to close swap file for saving.Fehler beim Speichern: Konnte temporäre Datei nicht schließen.nlMatch %d of %dZoekresultaat %d van %dnlUse spaces instead of tabs for indentationSelecteer om spaties in plaats van tabs te gebruiken voor inspringingnlC DocumentsC-documentenitcreate a new file and open the file with Scribescrea un nuovo file e lo apre con ScribesfrPair character completion occurredAutocompletion de parenthèsept_BRShow or hide the status area.Mostrar ou ocultar a área de estado.itNo bookmarks found to removeNon e' stato trovato alcun segnalibro da rimuoveredeSaved "%s""%s" gespeichertzh_CNReplacing spaces please wait...正在替æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦svLoading file please wait...Läser in filen, vänta...zh_CNRemove _All Bookmarks删除所有书签(_A)frPrint DocumentImprimer le DocumentnlMove to _Previous Bookmark_Vorige bladwijzeritNo word to selectNessuna parola da selezionaredePrinting "%s"Drucke "%s"deMove to _Previous BookmarkGehe zum _vorherigen LesezeichennlNo bookmarks found to removeGeen bladwijzer gevonden om te verwijderenpt_BRChange editor colorsMudar as cores do editoritClick to choose a new color for the editor's textClicca per selezionare un nuovo colo per il testo dell'editorfrA saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.La sauvegarde a échouée. Impossible de déplacer le fichier temporaire. La sauvegarde automatique sera désormais désactivée.svType in the text you want to replace withAnge texten som du vill ersätta medsvSyntax Color EditorRedigerare för syntaxfärgernlSave Error: Failed to create swap file for saving.Fout bij opslaan: aanmaken van wisselbestand om op te slaan is mislukt.itThe file "%s" is open in readonly modeIl file "%s" e' aperto in modalità di sola letturadeUnindented line %dEinrückung in Zeile %d entferntpt_BRNo previous match foundNenhuma ocorrência anteriornlNo text to select on line %dGeen tekst om te selecteren op regel %dnlFile: Bestand:pt_BR_Underline_SublinhadoitCreate a new fileNuovo filept_BREnabled spellcheckingVerificação ortográfica ativadafrSelect _WordSélectionner _Motzh_CNDisabled spellcheckingç¦ç”¨äº†æ‹¼å†™æ£€æŸ¥nlVietnameseVietnameesnlusage: scribes [OPTION] [FILE] [...]gebruik: scribes [OPTIE] [BESTAND] [...]itToggled readonly mode offUscito dalla modalità di sola letturazh_CNOpen a new window打开一个新窗å£zh_CNFile has not been saved to disk文件还未存盘svLeave FullscreenLämna helskärmslägefrIndented line %dLa ligne %d a été indentéefrRemove _All BookmarksSuppression de tous les signetsdeerrorFehlersvOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Öppningsfel: Ett fel inträffade vid öppnandet av filen. Prova att öppna filen igen eller skicka in en felrapport.de_Remove Bookmark_Entferne das Lesezeichenzh_CN_Next下一个(_N)pt_BREnables or disables right marginAtiva ou desativa a margem direitaitLaunch the help browserAvvia l'help browseritGo to a specific lineVai ad una riga specificaitInformation about the text editorInformazioni sull'editordeSave Error: Failed to write swap file for saving.Fehler beim Speichern: Konnte temporäre Datei nicht beschreiben.frNo matching bracket foundPas de parenthèse correspondante trouvéedeSelected paragraphAbsatz markiertitSelect to wrap text onto the next line when you reach the text window boundary.Seleziona per dividere il testo quando raggiungi il limite della finestra.frHTML DocumentsDocuments HTMLitClick to choose a new color for the language syntax elementClicca per selezionare un nuovo colore per gli elementi di sintassi del linguaggionlUse tabs for indentationTabs voor inspringing gebruikendeYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.Sie haben nicht die nötigen Rechte, um die Datei zu speichern. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.fr_Find Matching Bracket_Rechercher la parenthèse correspondantefrCreate, modify or manage templatesCréer, et modifier les Patronspt_BRGreekGregopt_BRLoad Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Erro ao Carregar: Não foi possível decodificar o arquivo para carregá-lo. O arquivo que você está carregando pode não ser um arquivo de texto. Se você tiver certeza de que o mesmo seja um arquivo de texto, tente abrir o arquivo com a codificação correta através do diálogo Abrir Arquivo. Pressione (Control - o) para mostrar o diálogo.itUnindentation is not possibleImpossibile disindentarefr%d%% complete%d%% effectuésvChange editor settingsÄndra redigerarinställningarzh_CNRemoving spaces please wait...正在替æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦svWarningVarningnlDeleted text from cursor to beginning of line %dTekst verwijderd vanaf cursor tot het begin van regel %dfrAlready on most recently bookmarked lineDéjà sur le signet le plus récentsvUsing custom colorsAnvänder anpassade färgersvCannot open %sKan inte öppna %ssvSpell CheckingStavningskontrollpt_BRLexical scope highlight colorCor para destaque de escopo léxicopt_BRMoved to first bookmarkCursor movido para o primeiro marcadorpt_BRoutput version information of Scribesexibir informação sobre a versão do Scribeszh_CNSelected line %d选择了第 %d 行pt_BRHTML DocumentsDocumentos HTMLdeBookmark BrowserLesezeichenübersichtzh_CNClick to specify the font type, style, and size to use for text.指定文本的字体,风格和字å·ã€‚itSelect file for loadingSeleziona il file da caricarezh_CNEditor _font: 编辑器字体(_f):frReplaced tabs with spaces on line %dRemplacé les tabulations par des espaces à la ligne %dsv_Remember password for this session_Kom ihÃ¥g lösenordet under sessionenpt_BRLn %d col %dLi %d col %dsvgtk-removeTa bortdeDownload templates fromVorlagen können z.B. vonsvDownload templates fromHämta ner mallarnlSelect to make the language syntax element boldSelecteer om het syntaxiselement vet te makenzh_CNScribes version %sScribes 版本 %sitJapaneseGiapponesept_BRSwapped the case of selected textMaiúsculas/minúsculas alternadas no texto selecionadofrReplace found matchOccurence trouvéezh_CNReplace _Allæ›¿æ¢æ‰€æœ‰(_A)sv_Name_NamnfrNordic languagesLangues Nordiquespt_BR_Search for:_Pesquisar por:dePortuguesePortugiesischnlSelected previous placeholderVorige placeholder geselecteerditLoaded file "%s"Il file "%s" e' stato caricatonlEnglishEngelspt_BRDelete _Cursor to Line BeginExcluir do Cursor até o _Começo da LinhafrCeltic languagesLangues CeltiquesfrA text editor for GNOME.Un éditeur de texte pour GNOMEsvThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sMIME-typen för filen som du försöker att öppna kunde inte fastställas. Kontrollera att filen är en textfil. MIME-typ: %spt_BREsperanto, MalteseEsperando, Maltêsscribes-0.4~r910/po/POTFILES.in0000644000175000017500000002155211242100540015622 0ustar andreasandreasExamples/GenericPluginExample/Foo/Trigger.py GenericPlugins/About/AboutDialog.glade GenericPlugins/About/AboutDialog.py GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade GenericPlugins/AdvancedConfiguration/MenuItem.py GenericPlugins/AutoReplace/GUI/TreeView.py GenericPlugins/AutoReplace/GUI/Window.glade GenericPlugins/AutoReplace/GUI/Window.py GenericPlugins/AutoReplace/GUI/i18n.py GenericPlugins/AutoReplace/MenuItem.py GenericPlugins/AutoReplace/TextColorer.py GenericPlugins/AutoReplace/TextInserter.py GenericPlugins/AutoReplace/i18n.py GenericPlugins/Bookmark/Feedback.py GenericPlugins/Bookmark/GUI/GUI.glade GenericPlugins/Bookmark/Trigger.py GenericPlugins/BracketCompletion/Manager.py GenericPlugins/BracketSelection/Feedback.py GenericPlugins/BracketSelection/Trigger.py GenericPlugins/Case/CaseProcessor.py GenericPlugins/Case/Marker.py GenericPlugins/Case/PopupMenuItem.py GenericPlugins/Case/Trigger.py GenericPlugins/CloseReopen/Trigger.py GenericPlugins/DocumentBrowser/DocumentBrowser.glade GenericPlugins/DocumentBrowser/TreeView.py GenericPlugins/DocumentBrowser/Trigger.py GenericPlugins/DocumentBrowser/Window.py GenericPlugins/DocumentInformation/DocumentStatistics.glade GenericPlugins/DocumentInformation/SizeLabel.py GenericPlugins/DocumentInformation/Trigger.py GenericPlugins/DocumentInformation/Window.py GenericPlugins/DocumentSwitcher/Trigger.py GenericPlugins/DrawWhitespace/Trigger.py GenericPlugins/EscapeQuotes/Escaper.py GenericPlugins/EscapeQuotes/Trigger.py GenericPlugins/FilterThroughCommand/Feedback.py GenericPlugins/FilterThroughCommand/GUI/ComboBox.py GenericPlugins/FilterThroughCommand/GUI/GUI.glade GenericPlugins/FilterThroughCommand/Trigger.py GenericPlugins/Indent/IndentationProcessor.py GenericPlugins/Indent/PopupMenuItem.py GenericPlugins/Indent/Trigger.py GenericPlugins/LastSessionLoader/Trigger.py GenericPlugins/LineEndings/Converter.py GenericPlugins/LineEndings/PopupMenuItem.py GenericPlugins/LineEndings/Trigger.py GenericPlugins/LineJumper/GUI/GUI.glade GenericPlugins/LineJumper/GUI/LineLabel.py GenericPlugins/LineJumper/LineJumper.py GenericPlugins/LineJumper/Trigger.py GenericPlugins/Lines/LineOperator.py GenericPlugins/Lines/PopupMenuItem.py GenericPlugins/Lines/Trigger.py GenericPlugins/MatchingBracket/Manager.py GenericPlugins/MatchingBracket/Trigger.py GenericPlugins/MultiEdit/FeedbackManager.py GenericPlugins/MultiEdit/Trigger.py GenericPlugins/NewWindow/Trigger.py GenericPlugins/OpenFile/NewFileDialogGUI/FeedbackLabel.py GenericPlugins/OpenFile/NewFileDialogGUI/FileCreator.py GenericPlugins/OpenFile/NewFileDialogGUI/InfoLabel.py GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade GenericPlugins/OpenFile/NewFileDialogGUI/Validator.py GenericPlugins/OpenFile/NewFileDialogGUI/Window.py GenericPlugins/OpenFile/OpenDialogGUI/GUI/GUI.glade GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Displayer.py GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade GenericPlugins/OpenFile/RemoteDialogGUI/Window.py GenericPlugins/OpenFile/Trigger.py GenericPlugins/Paragraph/Manager.py GenericPlugins/Paragraph/PopupMenuItem.py GenericPlugins/Paragraph/Trigger.py GenericPlugins/PreferencesGUI/GUI/GUI.glade GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/DataModelGenerator.py GenericPlugins/PreferencesGUI/Trigger.py GenericPlugins/Printing/Feedback.py GenericPlugins/Printing/Trigger.py GenericPlugins/QuickOpen/Feedback.py GenericPlugins/QuickOpen/GUI/GUI.glade GenericPlugins/QuickOpen/Trigger.py GenericPlugins/Readonly/Trigger.py GenericPlugins/RecentOpen/ExternalProcess/DataGenerator.py GenericPlugins/RecentOpen/ExternalProcess/Feedback.py GenericPlugins/RecentOpen/ExternalProcess/GUI/GUI.glade GenericPlugins/RecentOpen/ExternalProcess/__init__.py GenericPlugins/RecentOpen/ProcessCommunicator.py GenericPlugins/RecentOpen/Trigger.py GenericPlugins/SaveDialog/GUI/FeedbackUpdater.py GenericPlugins/SaveDialog/GUI/FileChooser/URISelector.py GenericPlugins/SaveDialog/GUI/GUI.glade GenericPlugins/SaveDialog/Trigger.py GenericPlugins/SaveFile/Trigger.py GenericPlugins/ScrollNavigation/Manager.py GenericPlugins/ScrollNavigation/Trigger.py GenericPlugins/SearchSystem/GUI/Bar.py GenericPlugins/SearchSystem/GUI/ComboBox.py GenericPlugins/SearchSystem/GUI/FindBar.glade GenericPlugins/SearchSystem/GUI/MenuComboBox.py GenericPlugins/SearchSystem/MatchIndexer.py GenericPlugins/SearchSystem/PatternCreator.py GenericPlugins/SearchSystem/ReplaceManager.py GenericPlugins/SearchSystem/Searcher.py GenericPlugins/SearchSystem/Trigger.py GenericPlugins/Selection/PopupMenuItem.py GenericPlugins/Selection/Selector.py GenericPlugins/Selection/Trigger.py GenericPlugins/SelectionSearcher/MatchIndexer.py GenericPlugins/SelectionSearcher/MatchNavigator.py GenericPlugins/SelectionSearcher/PatternCreator.py GenericPlugins/SelectionSearcher/Trigger.py GenericPlugins/ShortcutWindow/Trigger.py GenericPlugins/Spaces/PopupMenuItem.py GenericPlugins/Spaces/SpaceProcessor.py GenericPlugins/Spaces/Trigger.py GenericPlugins/SwitchCharacter/Switcher.py GenericPlugins/SwitchCharacter/Trigger.py GenericPlugins/TemplateEditor/EditorGUI/GUI.glade GenericPlugins/TemplateEditor/EditorGUI/Window.py GenericPlugins/TemplateEditor/Export/GUI/FileChooser.py GenericPlugins/TemplateEditor/Export/GUI/GUI.glade GenericPlugins/TemplateEditor/Import/GUI/FileChooser.py GenericPlugins/TemplateEditor/Import/GUI/GUI.glade GenericPlugins/TemplateEditor/Import/TemplateDataValidator.py GenericPlugins/TemplateEditor/Import/XMLTemplateValidator.py GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeView.py GenericPlugins/TemplateEditor/MainGUI/GUI.glade GenericPlugins/TemplateEditor/MainGUI/LanguageTreeView.py GenericPlugins/TemplateEditor/MenuItem.py GenericPlugins/TemplateEditor/Trigger.py GenericPlugins/Templates/utils.py GenericPlugins/ThemeSelector/Feedback.py GenericPlugins/ThemeSelector/GUI/FileChooserGUI/FileChooser.py GenericPlugins/ThemeSelector/GUI/FileChooserGUI/GUI.glade GenericPlugins/ThemeSelector/GUI/MainGUI/GUI.glade GenericPlugins/ThemeSelector/MenuItem.py GenericPlugins/ThemeSelector/Trigger.py GenericPlugins/TriggerArea/GUI/GUI.glade GenericPlugins/TriggerArea/MenuItem.py GenericPlugins/TriggerArea/Trigger.py GenericPlugins/UndoRedo/Trigger.py GenericPlugins/UserGuide/Trigger.py GenericPlugins/WordCompletion/Manager.py GenericPlugins/WordCompletion/SuggestionProcess/__init__.py GenericPlugins/WordCompletion/Trigger.py LanguagePlugins/HashComments/Trigger.py LanguagePlugins/HashComments/i18n.py LanguagePlugins/JavaScriptComment/FeedbackManager.py LanguagePlugins/JavaScriptComment/Trigger.py LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/ScribesPylint/logilab/common/cli.py LanguagePlugins/PythonErrorChecker/ErrorCheckerProcess/__init__.py LanguagePlugins/PythonErrorChecker/Feedback.py LanguagePlugins/PythonErrorChecker/Trigger.py LanguagePlugins/PythonNavigationSelection/Trigger.py LanguagePlugins/PythonSymbolBrowser/SymbolBrowser.glade LanguagePlugins/PythonSymbolBrowser/Trigger.py LanguagePlugins/Sparkup/Feedback.py LanguagePlugins/Sparkup/GUI/GUI.glade LanguagePlugins/Sparkup/Trigger.py LanguagePlugins/zencoding/GUI/GUI.glade LanguagePlugins/zencoding/Trigger.py SCRIBES/CommandLineParser.py SCRIBES/DialogFilters.py SCRIBES/EncodingSystem/ComboBoxData/Generator.py SCRIBES/EncodingSystem/Error/GUI/GUI.glade SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py SCRIBES/EncodingSystem/SupportedEncodings/GUI/GUI.glade SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py SCRIBES/GUI/InformationWindow/MessageWindow.glade SCRIBES/GUI/InformationWindow/WindowTitleUpdater.py SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ClipboardHandler.py SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/FileLoadHandler.py SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ReadonlyHandler.py SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/SavedHandler.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/GotoToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/HelpToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/NewToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/OpenToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PreferenceToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PrintToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RecentMenu.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RedoToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/ReplaceToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SaveToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SearchToolButton.py SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/UndoToolButton.py SCRIBES/GUI/MainGUI/Window/TitleUpdater.py SCRIBES/PluginInitializer/ErrorManager.py SCRIBES/SaveSystem/FileNameGenerator.py SCRIBES/SaveSystem/ReadonlyHandler.py SCRIBES/URILoader/ErrorManager.py SCRIBES/Utils.py SCRIBES/i18n.py data/Editor.glade data/EncodingErrorWindow.glade data/EncodingSelectionWindow.glade data/MessageWindow.glade data/ModificationDialog.glade data/scribes.desktop.in scribes-0.4~r910/po/LINGUAS0000644000175000017500000000003211242100540015060 0ustar andreasandreasde fr nl it pt_BR sv zh_CNscribes-0.4~r910/po/de.po0000644000175000017500000022217611242100540015002 0ustar andreasandreas# translation of Scribes. # Copyright (C) 2006 Free Software Foundation, Inc. # This file is distributed under the same license as the Scribes package. # <>, 2006. # , fuzzy # <>, 2006. # "Document" wurde (fast) immer mit "Text" übersetzt # Template wurde zu Vorlagen # Ansonsten habe ich mich recht nahe in Gedit gehalten # # msgid "" msgstr "" "Project-Id-Version: Scribes VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-03-13 08:12+0100\n" "PO-Revision-Date: 2007-03-13 08:21+0100\n" "Last-Translator: Steffen Klemer \n" "Language-Team: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit" #. .decode(encoding).encode("utf-8") #: ../data/scribes.desktop.in.h:1 ../SCRIBES/internationalization.py:321 msgid "Edit text files" msgstr "Textdateien bearbeiten" #. .decode(encoding).encode("utf-8") #. From scribes.desktop #: ../data/scribes.desktop.in.h:2 ../SCRIBES/internationalization.py:320 msgid "Scribes Text Editor" msgstr "Scribes Texteditor" #: ../data/scribes.schemas.in.h:1 msgid "A list of encodings selected by the user." msgstr "Eine Liste der vom Benutzer ausgewählten Zeichensätze." #: ../data/scribes.schemas.in.h:2 msgid "Case sensitive" msgstr "Großschreibung beachten" #: ../data/scribes.schemas.in.h:3 msgid "Detach Scribes from the shell terminal" msgstr "Scribes im Hintergrund ausführen" #: ../data/scribes.schemas.in.h:4 msgid "" "Determines whether or not to use GTK theme colors when drawing the text " "editor buffer foreground and background colors. If the value is true, the " "GTK theme colors are used. Otherwise the color determined by one assigned by " "the user." msgstr "" "Legt fest, ob die Farben des GTK-Themas für das Textfenster verwendet werden " "sollen. Wenn dies aktiviert ist, werden Themenfarben verwendet, ansonsten " "die vom Benutzerfestgelegten." #: ../data/scribes.schemas.in.h:5 msgid "Determines whether to show or hide the status area." msgstr "Legt fest, ob die Statusleiste angezeigt wird." #: ../data/scribes.schemas.in.h:6 msgid "Determines whether to show or hide the toolbar." msgstr "Legt fest, ob die Werkzeugleiste angezeigt wird." #: ../data/scribes.schemas.in.h:7 msgid "Editor background color" msgstr "Hintergrundfarbe" #: ../data/scribes.schemas.in.h:8 msgid "Editor foreground color" msgstr "Vordergrundfarbe" #: ../data/scribes.schemas.in.h:9 msgid "Editor's font" msgstr "Editor _Schriftart" #: ../data/scribes.schemas.in.h:10 msgid "Enable or disable spell checking" msgstr "Rechtschreibprüfung einschalten" #: ../data/scribes.schemas.in.h:11 msgid "Enables or disables right margin" msgstr "Rechten _Rand anzeigen" #: ../data/scribes.schemas.in.h:12 msgid "Enables or disables text wrapping" msgstr "Automatischen Text_umbruch einschalten" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:13 ../SCRIBES/internationalization.py:138 msgid "Find occurrences of the string that match the entire word only" msgstr "Finde nur Zeichenfolgen, die dem gesamten Wort entsprechen" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:14 ../SCRIBES/internationalization.py:136 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "Finde nur Zeichenfolgen mit der gleichen Großschreibung" #: ../data/scribes.schemas.in.h:15 msgid "Lexical scope highlight color" msgstr "Hervorhebungsfarbe für den \"lexical scope\"" #: ../data/scribes.schemas.in.h:16 msgid "Match word" msgstr "Nur vollständige _Wörter" #: ../data/scribes.schemas.in.h:17 msgid "Position of margin" msgstr "Position des rechten Randes" #: ../data/scribes.schemas.in.h:18 msgid "Selected encodings" msgstr "Ausgewählte Zeichensätze" #: ../data/scribes.schemas.in.h:19 msgid "Sets the margin's position within the editor" msgstr "Ändert the Position des rechten Randes im Editorfenster" #: ../data/scribes.schemas.in.h:20 msgid "Sets the width of tab stops within the editor" msgstr "Ändert die Länge von Tabulatoren im Editor" #: ../data/scribes.schemas.in.h:21 msgid "Show margin" msgstr "Rand zeigen" #: ../data/scribes.schemas.in.h:22 msgid "Show or hide the status area." msgstr "Statusleiste zeigen oder verbergen" #: ../data/scribes.schemas.in.h:23 msgid "Show or hide the toolbar." msgstr "Werkzeugleiste zeigen oder verbergen" #: ../data/scribes.schemas.in.h:24 msgid "Spell checking" msgstr "Rechtschreibprüfung" #: ../data/scribes.schemas.in.h:25 msgid "Tab width" msgstr "_Tabulatorbreite" #: ../data/scribes.schemas.in.h:26 msgid "Text wrapping" msgstr "Textumbruch" #: ../data/scribes.schemas.in.h:27 msgid "The color used to render normal text in the text editor's buffer." msgstr "Die Farbe von normalem Text" #: ../data/scribes.schemas.in.h:28 msgid "The color used to render the text editor buffer background." msgstr "Die normale Hintergrundfarbe" #: ../data/scribes.schemas.in.h:29 msgid "The editor's font. Must be a string value" msgstr "The Editorschriftart. Muss ein String sein." #: ../data/scribes.schemas.in.h:30 msgid "" "The highlight color when the cursor is around opening or closing pair " "characters." msgstr "" "Die Hintergrundfarbe, wenn der Cursor an einer öffnenden oder schließenden " "Klammer ist." #: ../data/scribes.schemas.in.h:31 msgid "" "True to detach Scribes from the shell terminal and run it in its own " "process, false otherwise. For debugging purposes, it may be useful to set " "this to false." msgstr "" "Auf Wahr setzen, wenn Scribes im Hintergrund in einem eigenen Prozess " "ausgeführtwerden soll. Für Debug-Zwecke ist es eventuell nützlich dies " "auszuschalten." #: ../data/scribes.schemas.in.h:32 msgid "True to use tabs instead of spaces, false otherwise." msgstr "Wahr, wenn Tabulatoren anstatt Leerzeichen verwendet werden sollen" #: ../data/scribes.schemas.in.h:33 msgid "Use GTK theme colors" msgstr "Farben des aktuellen Themas verwenden" #: ../data/scribes.schemas.in.h:34 msgid "Use Tabs instead of spaces" msgstr "Leerzeichen anstatt Tabulatoren verwenden" #. From module accelerators.py #: ../SCRIBES/internationalization.py:41 ../plugins/UndoRedo/i18n.py:27 msgid "Cannot redo action" msgstr "Kann die Aktion nicht Wiederholen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:44 msgid "Leave Fullscreen" msgstr "Vollbild verlassen" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py, fileloader.py, timeout.py #: ../SCRIBES/internationalization.py:47 ../plugins/SaveDialog/i18n.py:25 msgid "Unsaved Document" msgstr "Ungespeicherter Text" #. .decode(encoding).encode("utf-8") #. From module filechooser.py #: ../SCRIBES/internationalization.py:51 msgid "All Documents" msgstr "Alle Dateien" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:52 msgid "Python Documents" msgstr "Python Quelltexte" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:53 msgid "Text Documents" msgstr "Alle Textdateien" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:56 #, python-format msgid "Loaded file \"%s\"" msgstr "Datei \"%s\" geöffnet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:57 msgid "" "The encoding of the file you are trying to open could not be determined. Try " "opening the file with another encoding." msgstr "" "Der Zeichensatz mit dem Sie versucht haben die Datei zu öffnen, konnte nicht " "erkannt werden. Versuchen sie es erneut mit einem anderen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:59 msgid "Loading file please wait..." msgstr "Lade die Datei.- Bitte warten..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:60 msgid "" "An error occurred while openning the file. Please file a bug report at " "http://scribes.sourceforge.net" msgstr "" "Während des Öffnens ist ein Fehler aufgetreten. Bitte schreiben sie einen " "Fehlerbericht aufhttp://scribes.sourceforge.net (wenn möglich in Englisch)" #. .decode(encoding).encode("utf-8") #. From module fileloader.py, savechooser.py #: ../SCRIBES/internationalization.py:64 msgid " " msgstr "" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:67 msgid "You do not have permission to view this file." msgstr "Sie haben nicht die nötigen Rechte, um die Datei anzusehen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:68 msgid "The file you are trying to open is not a text file." msgstr "Die Datei, die Sie zu öffnen versuchen, ist keine Textdatei." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:69 msgid "The file you are trying to open does not exist." msgstr "Die Datei, die Sie zu öffnen versuchen, existiert nicht." #. .decode(encoding).encode("utf-8") #. From module main.py #: ../SCRIBES/internationalization.py:72 #, python-format msgid "Unrecognized option: '%s'" msgstr "Unbekannte Option: '%s'" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:73 msgid "Try 'scribes --help' for more information" msgstr "Versuchen Sie 'scribes --help' für weitere Informationen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:74 msgid "Scribes only supports using one option at a time" msgstr "Scribes unterstützt nur eine Option gleichzeitig" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:75 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s bekommt nur ein Argument" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:76 #, python-format msgid "Scribes version %s" msgstr "Scribes Version %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:77 #, python-format msgid "%s does not exist" msgstr "%s existiert nicht" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:80 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "Die Datei \"%s\" wurde im Nur-Lesen Modus geöffnet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:81 #, python-format msgid "The file \"%s\" is open" msgstr "Die Datei \"%s\" wurde geöffnet" #. .decode(encoding).encode("utf-8") #. From modules findbar.py #: ../SCRIBES/internationalization.py:84 #, python-format msgid "Found %d match" msgstr "%d mal gefunden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:85 msgid "_Search for: " msgstr "_Suche nach: " #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:89 msgid "No indentation selection found" msgstr "Keine Einrückung in der Markierung gefunden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:90 ../plugins/Indent/i18n.py:25 msgid "Selection indented" msgstr "Markierung eingerückt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:91 ../plugins/Indent/i18n.py:27 msgid "Unindentation is not possible" msgstr "Einrückung entfernen ist nicht möglich" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:92 ../plugins/Indent/i18n.py:28 msgid "Selection unindented" msgstr "Einrückung Markierung entfernt" #. .decode(encoding).encode("utf-8") #. From module modes.py #: ../SCRIBES/internationalization.py:95 msgid "loading..." msgstr "Öffne..." #. .decode(encoding).encode("utf-8") #. From module preferences.py #. From module replace.py #: ../SCRIBES/internationalization.py:100 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" wurde durch \"%s\" ersetzt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:101 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Alle Vorkommen von \"%s\" wurden durch \"%s\" ersetzt" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:104 msgid "An error occurred while saving this file." msgstr "Beim Speichern dieses Textes ist ein Fehler aufgetreten." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:105 msgid "" "An error occurred while decoding your file. Please file a bug report at " "\"http://openusability.org/forum/?group_id=141\"" msgstr "" "Beim Dekodieren Ihres Textes ist ein Fehler aufgetreten. Bitte schreiben " "Sieauf \"http://openusability.org/forum/?group_id=141\" einen Fehlerbericht " "(wenn möglich in Englisch)." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:107 #, python-format msgid "Saved \"%s\"" msgstr "\"%s\" gespeichert" #. .decode(encoding).encode("utf-8") #. From module textview.py #: ../SCRIBES/internationalization.py:110 msgid "_Find Matching Bracket" msgstr "_Finde zugehörige Klammer" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:111 msgid "Copied selected text" msgstr "Markierten Text kopiert" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:112 msgid "No selection to copy" msgstr "Keine Markierung zum Kopieren vorhanden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:113 msgid "Cut selected text" msgstr "Markierten Text ausgeschnitten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:114 msgid "No selection to cut" msgstr "Keine Markierung zum Ausschneiden vorhanden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:115 msgid "Pasted copied text" msgstr "Markierten Text eingefügt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:116 msgid "No text content in the clipboard" msgstr "Kein Text in der Zwischenablage" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:119 #, python-format msgid "%d%% complete" msgstr "%d%% erledigt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:120 msgid "completed" msgstr "Fertig" #. .decode(encoding).encode("utf-8") #. From module tooltips.py #: ../SCRIBES/internationalization.py:123 msgid "Open a new window" msgstr "Öffne ein neues Fenster" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:124 msgid "Open a file" msgstr "Eine Datei öffnen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:125 msgid "Rename the current file" msgstr "Benenne aktuelle Datei um" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:126 msgid "Print the current file" msgstr "Drucke aktuelle Datei" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:127 msgid "Undo last action" msgstr "Die letzte Aktion rückgängig machen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:128 msgid "Redo undone action" msgstr "Wiederhole die Rückgängig gemachte Änderung" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:129 ../plugins/IncrementalBar/i18n.py:28 #: ../plugins/FindBar/i18n.py:28 ../plugins/ReplaceBar/i18n.py:28 msgid "Search for text" msgstr "Text suchen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:130 ../plugins/ReplaceBar/i18n.py:31 msgid "Search for and replace text" msgstr "Text suchen und Ersetzen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:131 msgid "Go to a specific line" msgstr "Gehe zu einer bestimmten Zeile" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:132 msgid "Configure the editor" msgstr "Editor einrichten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:133 msgid "Launch the help browser" msgstr "Starte die Hilfe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:134 msgid "Search for previous occurrence of the string" msgstr "Suche nach einem vorherigen Auftreten der Zeichenfolge" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:135 msgid "Search for next occurrence of the string" msgstr "Suche nach dem nächsten Auftreten der Zeichenfolge" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:139 msgid "Type in the text you want to search for" msgstr "Geben Sie die Zeichenfolge ein, nach der Sie suchen wollen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:140 msgid "Type in the text you want to replace with" msgstr "Geben Sie die Zeichenfolge ein, die Sie ersetzen wollen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:141 msgid "Replace the selected found match" msgstr "Die gefundene Zeichenfolge ersetzen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:142 msgid "Replace all found matches" msgstr "Alle gefundenen Zeichenfolgen ersetzen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:143 msgid "Click to specify the font type, style, and size to use for text." msgstr "Bestimmen Sie die verwendete Schriftart, den Stil und die Größe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:144 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" "Ändert die Breite des Leerraums, wenn Sie die Tabulatortaste betätigen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:146 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "Sollen zu lange Zeilen in die nächste Zeile umgebrochen werden?" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:148 msgid "Select to display a vertical line that indicates the right margin." msgstr "Aktiviert eine vertikale Linie, die einen rechten Rand markiert." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:150 msgid "Click to specify the location of the vertical line." msgstr "Ändert die Position der vertikalen Linie" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:151 msgid "Select to enable spell checking" msgstr "Aktiviert die automatische Rechtschreibprüfung" #. .decode(encoding).encode("utf-8") #. From module usage.py #: ../SCRIBES/internationalization.py:155 msgid "A text editor for GNOME." msgstr "Ein Texteditor für GNOME" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:156 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "Verwendung: scribes [OPTION] [DATEI [...]" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:157 msgid "Options:" msgstr "Optionen:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:158 msgid "display this help screen" msgstr "Zeigt diese Hilfe an" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:159 msgid "output version information of Scribes" msgstr "Gibt die Version von Scribes aus" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:160 msgid "create a new file and open the file with Scribes" msgstr "Erzeuge eine neue Datei und öffne sie" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:161 msgid "open file in readonly mode" msgstr "Datei im Nur-Lesen Modues öffnen" #. .decode(encoding).encode("utf-8") #. From module utility.py #: ../SCRIBES/internationalization.py:164 msgid "Could not find Scribes' data folder" msgstr "Konnte Scribes' Datenordner nicht finden" #. .decode(encoding).encode("utf-8") #. From preferences.py #. From error.py #: ../SCRIBES/internationalization.py:170 msgid "error" msgstr "Fehler" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:173 #, python-format msgid "Removed spaces at end of line %d" msgstr "Leerzeichen am Ende von Zeile %d entfernt" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:176 msgid "No spaces were found at beginning of line" msgstr "Am Anfang der Zeile wurden keine Leerzeichen gefunden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:177 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Leerzeichen am Anfang von Zeile %d entfernt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:178 msgid "Removed spaces at beginning of selected lines" msgstr "Leerzeichen am Anfang der markierten Zeilen entfernt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:179 msgid "Removed spaces at end of selected lines" msgstr "Leerzeichen am Ende der markierten Zeilen entfernt" #. .decode(encoding).encode("utf-8") #. From module actions.py #: ../SCRIBES/internationalization.py:182 ../plugins/Indent/i18n.py:23 #: ../plugins/Selection/i18n.py:23 ../plugins/Lines/i18n.py:23 #: ../plugins/SaveFile/i18n.py:23 ../plugins/UndoRedo/i18n.py:23 #: ../plugins/Spaces/i18n.py:23 msgid "Cannot perform operation in readonly mode" msgstr "Kann diese Aktion im Nur-Lesen Modus nicht ausführen" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:185 ../plugins/Indent/i18n.py:29 #, python-format msgid "Unindented line %d" msgstr "Einrückung in Zeile %d entfernt" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:186 msgid "No selected lines can be indented" msgstr "Keine der markierten Zeilen kann eingerückt werden" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:189 msgid "" "An error occurred while encoding your file. Try saving your file using " "another character encoding, preferably UTF-8." msgstr "" "Ein Fehler ist beim Kodieren Ihrer Datei aufgetreten. Bitte versuchenSie " "einen anderen Zeichensatz (bevorzugt UTF-8) zu verwenden." #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:193 msgid "" "An encoding error occurred. Please file a bug report at http://openusability." "org/forum/?group_id=141" msgstr "" "Ein Fehler beim Kodieren ist aufgetreten. Bitte senden Sie einen " "Fehlerbericht(möglichst in Englisch) an http://openusability.org/forum/?" "group_id=141" #. .decode(encoding).encode("utf-8") #. From autocomplete.py #: ../SCRIBES/internationalization.py:198 #: ../plugins/WordCompletionGUI/i18n.py:3 msgid "Word completion occurred" msgstr "Wortvervollständigung wurde durchgeführt" #. .decode(encoding).encode("utf-8") #. From encoding.py #: ../SCRIBES/internationalization.py:201 msgid "Character _Encoding: " msgstr "_Zeichensatz" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:202 msgid "Add or Remove Encoding ..." msgstr "Zeichensatz hinzufügen oder entfernen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:203 msgid "Recommended (UTF-8)" msgstr "Empfohlen (UTF-8)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:204 msgid "Add or Remove Character Encoding" msgstr "Zeichensatz hnzufügen oder entfernen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:205 msgid "Language and Region" msgstr "Sprache und Region" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:206 msgid "Character Encoding" msgstr "Zeichensatz" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:207 msgid "Select" msgstr "Auswählen" #. .decode(encoding).encode("utf-8") #. From filechooser.py, savechooser.py #: ../SCRIBES/internationalization.py:210 msgid "Select character _encoding" msgstr "Zeichensatz auswählen" #. .decode(encoding).encode("utf-8") #. From filechooser.py #: ../SCRIBES/internationalization.py:213 msgid "Closed dialog window" msgstr "Der Dialog wurde geschlossen" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:216 #, python-format msgid "Cannot open %s" msgstr "Kann %s nicht öffnen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:217 msgid "Closed error dialog" msgstr "Fehlermeldung geschlossen" #. .decode(encoding).encode("utf-8") #. From fileloader.py #: ../SCRIBES/internationalization.py:220 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. " "Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "Der MIME-Typ der Datei, die Sie zu öffnen versuchen,konnte nicht ermitelt " "werden. Bitte versichern Sie sich, dasses eine Textdatei ist\n" "\n" "MIME-Typ: %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:222 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "Die Datei, die Sie zu öffnen versuchen ist keine Textdatei.\n" "\n" "MIME-Type: %s" #. .decode(encoding).encode("utf-8") #. From printing.py #: ../SCRIBES/internationalization.py:226 #, python-format msgid "Printing \"%s\"" msgstr "Drucke \"%s\"" #. .decode(encoding).encode("utf-8") #. From encoding.py #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:229 #: ../SCRIBES/internationalization.py:232 #: ../SCRIBES/internationalization.py:234 msgid "English" msgstr "Englisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:230 #: ../SCRIBES/internationalization.py:231 #: ../SCRIBES/internationalization.py:255 msgid "Traditional Chinese" msgstr "Traditionelles Chinesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:233 #: ../SCRIBES/internationalization.py:241 #: ../SCRIBES/internationalization.py:245 #: ../SCRIBES/internationalization.py:264 #: ../SCRIBES/internationalization.py:290 msgid "Hebrew" msgstr "Hebräisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:235 #: ../SCRIBES/internationalization.py:238 #: ../SCRIBES/internationalization.py:258 #: ../SCRIBES/internationalization.py:261 #: ../SCRIBES/internationalization.py:295 #: ../SCRIBES/internationalization.py:303 msgid "Western Europe" msgstr "Westeuropa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:236 #: ../SCRIBES/internationalization.py:250 #: ../SCRIBES/internationalization.py:252 #: ../SCRIBES/internationalization.py:262 #: ../SCRIBES/internationalization.py:289 #: ../SCRIBES/internationalization.py:300 msgid "Greek" msgstr "Griechisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:237 #: ../SCRIBES/internationalization.py:266 #: ../SCRIBES/internationalization.py:293 msgid "Baltic languages" msgstr "Baltische Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:239 #: ../SCRIBES/internationalization.py:259 #: ../SCRIBES/internationalization.py:284 #: ../SCRIBES/internationalization.py:302 msgid "Central and Eastern Europe" msgstr "Zentral- und Osteuropa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:240 #: ../SCRIBES/internationalization.py:260 #: ../SCRIBES/internationalization.py:287 #: ../SCRIBES/internationalization.py:299 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgarisch, Mazedonisch, Russisch, Serbisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:242 #: ../SCRIBES/internationalization.py:257 #: ../SCRIBES/internationalization.py:263 #: ../SCRIBES/internationalization.py:291 #: ../SCRIBES/internationalization.py:304 msgid "Turkish" msgstr "Türkisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:243 msgid "Portuguese" msgstr "Portugiesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:244 #: ../SCRIBES/internationalization.py:301 msgid "Icelandic" msgstr "Isländisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:246 msgid "Canadian" msgstr "Kanadisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:247 #: ../SCRIBES/internationalization.py:265 #: ../SCRIBES/internationalization.py:288 msgid "Arabic" msgstr "Arabisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:248 msgid "Danish, Norwegian" msgstr "Dänisch, Norwegisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:249 #: ../SCRIBES/internationalization.py:297 msgid "Russian" msgstr "Russisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:251 msgid "Thai" msgstr "Thailändisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:253 #: ../SCRIBES/internationalization.py:268 #: ../SCRIBES/internationalization.py:269 #: ../SCRIBES/internationalization.py:270 #: ../SCRIBES/internationalization.py:276 #: ../SCRIBES/internationalization.py:277 #: ../SCRIBES/internationalization.py:279 #: ../SCRIBES/internationalization.py:280 #: ../SCRIBES/internationalization.py:281 #: ../SCRIBES/internationalization.py:306 #: ../SCRIBES/internationalization.py:307 #: ../SCRIBES/internationalization.py:308 msgid "Japanese" msgstr "Japanisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:254 #: ../SCRIBES/internationalization.py:271 #: ../SCRIBES/internationalization.py:282 #: ../SCRIBES/internationalization.py:296 msgid "Korean" msgstr "Koreanisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:256 msgid "Urdu" msgstr "Urdu" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:267 msgid "Vietnamese" msgstr "Vietnamesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:272 #: ../SCRIBES/internationalization.py:275 msgid "Simplified Chinese" msgstr "Einfaches Chinesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:273 #: ../SCRIBES/internationalization.py:274 msgid "Unified Chinese" msgstr "Vereinheitliches Chinesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:278 msgid "Japanese, Korean, Simplified Chinese" msgstr "Japanisch, Koreanisch, Einfaches Chinesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:283 msgid "West Europe" msgstr "Westeuropa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:285 msgid "Esperanto, Maltese" msgstr "Esperanto, Maltesisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:286 msgid "Baltic languagues" msgstr "Baltische Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:292 msgid "Nordic languages" msgstr "Nordische Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:294 msgid "Celtic languages" msgstr "Keltische Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:298 msgid "Ukrainian" msgstr "Ukrainisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:305 msgid "Kazakh" msgstr "Kasachisch" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:309 msgid "All languages" msgstr "Alle Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:310 #: ../SCRIBES/internationalization.py:311 msgid "All Languages (BMP only)" msgstr "All Languages (nur BMP)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:312 msgid "All Languages" msgstr "Alle Sprachen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:313 #: ../plugins/SyntaxColorSwitcher/i18n.py:24 msgid "None" msgstr "Keine" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:317 msgid "Replaced tabs with spaces on selected lines" msgstr "Tabulatoren durch Leerzeichen in der markierten Zeile ersetzt" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:325 msgid "Co_lor: " msgstr "_Farbe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:326 ../plugins/ColorEditor/i18n.py:37 msgid "B_old" msgstr "_Fett" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:327 ../plugins/ColorEditor/i18n.py:38 msgid "I_talic" msgstr "_Kursiv" #. .decode(encoding).encode("utf-8") #. From templateadd.py #: ../SCRIBES/internationalization.py:331 msgid "_Name:" msgstr "_Name" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:332 msgid "_Description:" msgstr "_Beschreibung" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:333 msgid "_Template:" msgstr "_Vorlage:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:334 msgid "Add New Template" msgstr "Neue Vorlage" #. .decode(encoding).encode("utf-8") #. From templateedit.py #: ../SCRIBES/internationalization.py:337 ../plugins/TemplateEditor/i18n.py:28 msgid "Edit Template" msgstr "Vorlage bearbeiten" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:340 msgid "Select to use themes' foreground and background colors" msgstr "" "Aktiviert die Benutzung der Vorder- und Hintergrundfarbe des verwendeten " "Themas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:341 msgid "Click to choose a new color for the editor's text" msgstr "Klicken Sie hier um eine neue Textfarbe auszuwählen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:342 msgid "Click to choose a new color for the editor's background" msgstr "Klicken Sie hier um eine neue Hintergrundfarbe auszuwählen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:343 msgid "Click to choose a new color for the language syntax element" msgstr "" "Klicken Sie hier um eine neue Farbe für dieses Sprachelement auszuwählen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:344 msgid "Select to make the language syntax element bold" msgstr "Ändert den Schriftstil dieses Sprachelementes in Fett um" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:345 msgid "Select to make the language syntax element italic" msgstr "Ändert den" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:346 msgid "Select to reset the language syntax element to its default settings" msgstr "Stellt die Standarteinstellungen des Sprachelementes wieder her" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #. From readonly.py #: ../SCRIBES/internationalization.py:353 msgid "Toggled readonly mode on" msgstr "Nur-Lesen Modus einschalten" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:354 msgid "Toggled readonly mode off" msgstr "Deaktiviert den Nur-Lesen Modus" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:357 msgid "Menu for advanced configuration" msgstr "Menü für die erweiterte Konfiguration" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:358 msgid "Configure the editor's foreground, background or syntax colors" msgstr "" "Konfiguriert die Vordergrund- und Hintergrundfarbe sowie die " "Syntaxhervorhebung" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:359 msgid "Create, modify or manage templates" msgstr "Vorlagen erzeugen, ändern und verwalten" #. .decode(encoding).encode("utf-8") #. From cursor.py #: ../SCRIBES/internationalization.py:362 #, python-format msgid "Ln %d col %d" msgstr "Z %d Sp %d" #. .decode(encoding).encode("utf-8") #. From passworddialog.py #: ../SCRIBES/internationalization.py:365 msgid "Authentication Required" msgstr "Authentifizierung benötigt" #: ../SCRIBES/internationalization.py:366 #, python-format msgid "You must log in to access %s" msgstr "Sie müssen sich einloggen um %s öffnen zu können" #: ../SCRIBES/internationalization.py:367 msgid "_Password:" msgstr "_Passwort" #: ../SCRIBES/internationalization.py:368 msgid "_Remember password for this session" msgstr "_Passwort für diese Sitzung merken" #: ../SCRIBES/internationalization.py:369 msgid "Save password in _keyring" msgstr "Passwort im Schlüsselbund _speichern" #. From fileloader.py #: ../SCRIBES/internationalization.py:372 #, python-format msgid "Loading \"%s\"..." msgstr "Lade \"%s\"..." # DAS ist mies - aber wie sonst? #. From bookmark.py #: ../SCRIBES/internationalization.py:375 msgid "Moved to most recently bookmarked line" msgstr "Zur zuletzt mit einem Lesezeichen versehenen Zeile gegangen" #: ../SCRIBES/internationalization.py:376 msgid "Already on most recently bookmarked line" msgstr "Sie sind bereits in der zuletzt mit einem Lesezeichen versehenen Zeile" #. bookmarktrigger.py #: ../SCRIBES/internationalization.py:377 #: ../SCRIBES/internationalization.py:452 #: ../plugins/BookmarkBrowser/i18n.py:27 msgid "No bookmarks found" msgstr "Keine Lesezeichen gefunden" #. From dialogfilter.py #: ../SCRIBES/internationalization.py:381 msgid "Ruby Documents" msgstr "Ruby Quelltexte" #: ../SCRIBES/internationalization.py:382 msgid "Perl Documents" msgstr "Perl Quelltexte" #: ../SCRIBES/internationalization.py:383 msgid "C Documents" msgstr "C Quelltexte" #: ../SCRIBES/internationalization.py:384 msgid "C++ Documents" msgstr "C++ Quelltexte" #: ../SCRIBES/internationalization.py:385 msgid "C# Documents" msgstr "C# Quelltexte" #: ../SCRIBES/internationalization.py:386 msgid "Java Documents" msgstr "Java Quelltexte" #: ../SCRIBES/internationalization.py:387 msgid "PHP Documents" msgstr "PHP Quelltexte" #: ../SCRIBES/internationalization.py:388 msgid "HTML Documents" msgstr "HTML Dokumente" #: ../SCRIBES/internationalization.py:389 ../plugins/TemplateEditor/i18n.py:27 msgid "XML Documents" msgstr "XML Dokumente" #: ../SCRIBES/internationalization.py:390 msgid "Haskell Documents" msgstr "Haskell Quelltexte" #: ../SCRIBES/internationalization.py:391 msgid "Scheme Documents" msgstr "Scheme Quelltexte" #. From textview.py #: ../SCRIBES/internationalization.py:394 msgid "INS" msgstr "EIN" #: ../SCRIBES/internationalization.py:395 msgid "OVR" msgstr "ÜBS" #. From loader.py #: ../SCRIBES/internationalization.py:398 msgid "" "Open Error: An error occurred while opening the file. Try opening the file " "again or file a bug report." msgstr "" "Fehler beim Öffnen: Ein Fehler ist beim Öffnen der Datei aufgetreten. " "Versuchen Sie es erneut oderschicken Sie uns bitte einen Fehlerbericht." #: ../SCRIBES/internationalization.py:400 #, python-format msgid "Info Error: Information on %s cannot be retrieved." msgstr "Fehler; Information von %s konnte nicht empfangen werden." #: ../SCRIBES/internationalization.py:401 msgid "Info Error: Access has been denied to the requested file." msgstr "Fehler: Der Zugriff auf die gewünschte Datei wurde verweigert." #: ../SCRIBES/internationalization.py:402 msgid "Permission Error: Access has been denied to the requested file." msgstr "Fehler: Der Zugriff auf die gewünschte Datei wurde verweigert." #: ../SCRIBES/internationalization.py:403 msgid "Cannot open file" msgstr "Kann den Text nicht öffnen" #. From save.py #: ../SCRIBES/internationalization.py:406 msgid "" "You do not have permission to save the file. Try saving the file to your " "desktop, or to a folder you own. Automatic saving has been disabled until " "the file is saved correctly without errors." msgstr "" "Sie haben nicht die nötigen Rechte um die Datei zu speichern. Versuchen Sie " "die Dateiauf Ihrem Desktop oder einem eigenen Ordner zu speichern. " "Automatisches Speichernwurde deaktiviert bis es möglich ist ohne Fehler zu " "speichern." #: ../SCRIBES/internationalization.py:409 msgid "" "A saving operation failed. Could not create swap area. Make sure you have " "permission to save to your home folder. Also check to see that you have not " "run out of disk space. Automatic saving will be disabled until the document " "is properly saved." msgstr "" "Das Speichern ist fehlgeschlagen. Konnte keine Swap-Datei anlegen. Bitte " "versichern Siesich, dass sie das Recht haben in Ihrem Persönlichen Ordner zu " "speichern.Versichern Sie sich auch, dass Sie noch freien Speicherplatz " "haben. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei " "möglich ist." #: ../SCRIBES/internationalization.py:413 msgid "" "An error occured while creating the file. Automatic saving has been disabled " "until the file is saved correctly without errors." msgstr "" "Ein Fehler ist beim Erstellen der Datei aufgetreten. " "Automatisches Speichern wurdedeaktiviert," " bis es wieder fehlerfrei möglich ist." #: ../SCRIBES/internationalization.py:415 msgid "" "A saving error occured. The document could not be transfered from its " "temporary location. Automatic saving has been disabled until the file is " "saved correctly without errors." msgstr "" "Ein Fehler beim Speichern ist aufgetreten. Die Datei konnte nicht aus dem " "temporären Ordner kopiert werden. Automatisches Speichern wurde deaktiviert," " bis es wieder fehlerfrei möglich ist." #: ../SCRIBES/internationalization.py:418 msgid "" "You do not have permission to save the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Sie haben nicht die nötigen Rechte, um die Datei zu speichern. " "Automatisches Speichern wurdedeaktiviert," " bis es wieder fehlerfrei möglich ist." #: ../SCRIBES/internationalization.py:420 msgid "" "A decoding error occured while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Ein Dekodierungsfehler ist beim Speichern der Datei aufgetreten. " "Automatisches Speichern wurdedeaktiviert," " bis es wieder fehlerfrei möglich ist." #: ../SCRIBES/internationalization.py:422 msgid "" "An encoding error occurred while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Ein Kodierungsfehler ist beim Speichern der Datei aufgetreten. Automatisches " "Speichern wurde deaktiviert, bis es wieder fehlerfrei möglich ist." #. From regexbar.py #: ../SCRIBES/internationalization.py:426 msgid "Search for text using regular expression" msgstr "Suche mit Hilfe von Regulären Ausdrücken" #: ../SCRIBES/internationalization.py:427 msgid "Close regular expression bar" msgstr "Schließe Reguläre Ausdruck Suchleiste" #. From replacestopbutton.py #: ../SCRIBES/internationalization.py:430 msgid "Stopped replacing" msgstr "Ersetzen abgebrochen" #. templateeditorexportbutton.py #: ../SCRIBES/internationalization.py:433 #: ../plugins/TemplateEditor/Template.glade.h:6 msgid "E_xport" msgstr "E_xportieren" #. templateeditorimportbutton.py #: ../SCRIBES/internationalization.py:436 #: ../plugins/TemplateEditor/Template.glade.h:8 msgid "I_mport" msgstr "I_mportieren" #. templateadddialog.py #: ../SCRIBES/internationalization.py:439 msgid "Error: Name field must contain a string." msgstr "Fehler: Das Feld Name muss ein Wort enthalten." #: ../SCRIBES/internationalization.py:440 #, python-format msgid "Error: '%s' already in use. Please choose another string." msgstr "" "Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie ein anderes Wort." #: ../SCRIBES/internationalization.py:441 msgid "Error: Name field cannot have any spaces." msgstr "Fehler: Der Name darf keine Leerzeichen enthalten:" #: ../SCRIBES/internationalization.py:442 msgid "Error: Template editor can only have one '${cursor}' placeholder." msgstr "Fehler: Eine Vorlage kann nur einen '${cursor}' Platzhalter besitzen." #. importdialog.py #: ../SCRIBES/internationalization.py:445 msgid "Error: Invalid template file." msgstr "Fahler: Ungültige Vorlagendatei" #. exportdialog.py #: ../SCRIBES/internationalization.py:449 #: ../plugins/TemplateEditor/Template.glade.h:7 msgid "Export Template" msgstr "Vorlagen exportieren" #. preftabcheckbutton.py #: ../SCRIBES/internationalization.py:457 msgid "Use spaces instead of tabs for indentation" msgstr "Leerzeichen anstatt Tabulatoren für die Einrückung verwenden" #: ../SCRIBES/internationalization.py:461 msgid "Select to underline language syntax element" msgstr "Unterstreicht dieses Sprachelement" #: ../SCRIBES/internationalization.py:464 #: ../plugins/DocumentBrowser/i18n.py:24 msgid "Open Documents" msgstr "Geöffnete Texte" #: ../SCRIBES/internationalization.py:466 msgid "Current document is focused" msgstr "Aktueller Text wurde hervorgehoben" #: ../SCRIBES/internationalization.py:467 msgid "Open recently used files" msgstr "Öffne zuletzt benutzte Dateien" #: ../SCRIBES/internationalization.py:469 msgid "Failed to save file" msgstr "Datei speichern fehlgeschlagen" #: ../SCRIBES/internationalization.py:470 msgid "" "Save Error: You do not have permission to modify this file or save to its " "location." msgstr "" "Sie haben nicht die nötigen Rechte, um die Datei zu ändern oder sie am " "gewählten Ort zu speichern." #: ../SCRIBES/internationalization.py:472 msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "Fehler beim Speichern. Übertragung der Datei vom temporären zum endgültigen Platz fehlgeschlagen." #: ../SCRIBES/internationalization.py:473 msgid "Save Error: Failed to create swap location or file." msgstr "Fehler beim Speichern: Konnte temporären Ordner oder Datei nicht erstellen." #: ../SCRIBES/internationalization.py:474 msgid "Save Error: Failed to create swap file for saving." msgstr "Fehler beim Speichern: Konnte temporäre Datei nicht erzeugen." #: ../SCRIBES/internationalization.py:475 msgid "Save Error: Failed to write swap file for saving." msgstr "Fehler beim Speichern: Konnte temporäre Datei nicht beschreiben." #: ../SCRIBES/internationalization.py:476 msgid "Save Error: Failed to close swap file for saving." msgstr "Fehler beim Speichern: Konnte temporäre Datei nicht schließen." #: ../SCRIBES/internationalization.py:477 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "Fehler beim Speichern: Konnte den Inhalt der Datei nicht von \"UTF-8\" zu Unicode konvertieren." #: ../SCRIBES/internationalization.py:478 msgid "" "Save Error: Failed to encode contents of file. Make sure the encoding of the " "file is properly set in the save dialog. Press (Ctrl - s) to show the save " "dialog." msgstr "" "Fehler beim Speichern: Konnte den Inhalt der Datei nicht übersetzen. Bitte " "stellen siesicher, dass dass sich im Speichern-Dialog den richtigen " "Zeichensatz gewählt haben.Drücken sie (Strg - s) um den Speichern-Dialog zu " "öffnen." #: ../SCRIBES/internationalization.py:482 #, python-format msgid "File: %s" msgstr "Datei: %s" #: ../SCRIBES/internationalization.py:484 msgid "Failed to load file." msgstr "Laden der Datei fehlgeschlagen." #: ../SCRIBES/internationalization.py:486 msgid "Load Error: You do not have permission to view this file." msgstr "" "Fehler beim Laden: Sie haben nicht die nötigen Rechte, um die Datei " "anzusehen." #: ../SCRIBES/internationalization.py:487 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "Fehler beim Laden: Konnte die entfernte Datei wegen unzureichenden Rechten nicht Öffnen." #: ../SCRIBES/internationalization.py:488 msgid "" "Load Error: Failed to get file information for loading. Please try loading " "the file again." msgstr "Fehler beim Laden: Konnte die Dateinformationen für das Laden nicht bekommen." "Bitte versuchen Sie erneut die Datei zu öffnen." #: ../SCRIBES/internationalization.py:490 msgid "Load Error: File does not exist." msgstr "Fehler beim Laden: Datei existiert nicht." #: ../SCRIBES/internationalization.py:491 msgid "Damn! Unknown Error" msgstr "Verdammt! Unbekannter Fehler" #: ../SCRIBES/internationalization.py:492 msgid "Load Error: Failed to open file for loading." msgstr "Fehler beim Laden: Konnte Datei nicht öffnen." #: ../SCRIBES/internationalization.py:493 msgid "Load Error: Failed to read file for loading." msgstr "Fehler beim Laden: Konnte Datei nicht lesen." #: ../SCRIBES/internationalization.py:494 msgid "Load Error: Failed to close file for loading." msgstr "Fehler beim Laden: Konnte Datei nicht schließen." #: ../SCRIBES/internationalization.py:495 msgid "" "Load Error: Failed to decode file for loading. The file your are loading may " "not be a text file. If you are sure it is a text file, try to open the file " "with the correct encoding via the open dialog. Press (control - o) to show " "the open dialog." msgstr "Fehler beim Laden: Konnte die Datei nicht dekodieren. Die Datei, die Sie versuchen " "zu öffnen ist eventuell keine Textdatei. Wenn Sie sich sicher sind, dass es doch eine " "ist, versuchen Sie sie es bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahl" "des richtigen Zeichensatzes erneut." #: ../SCRIBES/internationalization.py:499 msgid "" "Load Error: Failed to encode file for loading. Try to open the file with the " "correct encoding via the open dialog. Press (control - o) to show the open " "dialog." msgstr "Fehler beim Laden: Konnte die Datei nicht dekodieren. Versuchen Sie sie es " "bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahl des richtigen Zeichensatzes erneut." #: ../SCRIBES/internationalization.py:503 #, python-format msgid "Reloading %s" msgstr "Lade \"%s\" erneut..." #: ../SCRIBES/internationalization.py:504 #, python-format msgid "'%s' has been modified by another program" msgstr "'%s' wurde von einem anderen Programm verändert" #: ../plugins/BookmarkBrowser/i18n.py:23 msgid "Move to bookmarked line" msgstr "Gehe zu Lesezeichen" #: ../plugins/BookmarkBrowser/i18n.py:24 msgid "Bookmark Browser" msgstr "Lesezeichenübersicht" #: ../plugins/BookmarkBrowser/i18n.py:25 msgid "Line" msgstr "Zeile" #: ../plugins/BookmarkBrowser/i18n.py:26 msgid "Bookmarked Text" msgstr "Text mit einem Lesezeichen versehen" #: ../plugins/BookmarkBrowser/i18n.py:28 ../plugins/Bookmark/i18n.py:27 #, python-format msgid "Moved to bookmark on line %d" msgstr "Zum Lesezeichen in Zeile %d gesprungen" #: ../plugins/PrintDialog/i18n.py:23 msgid "Print Document" msgstr "Text drucken" #: ../plugins/PrintDialog/i18n.py:24 msgid "Print file" msgstr "Datei drucken" #: ../plugins/PrintDialog/i18n.py:25 msgid "File: " msgstr "Datei: " #: ../plugins/PrintDialog/i18n.py:26 msgid "Print Preview" msgstr "Druckvorschau" #: ../plugins/RemoteDialog/i18n.py:23 ../plugins/OpenDialog/i18n.py:23 msgid "Open Document" msgstr "Text öffnen" #: ../plugins/RemoteDialog/i18n.py:24 msgid "Type URI for loading" msgstr "URL zum Laden eigeben" #: ../plugins/RemoteDialog/i18n.py:25 msgid "Enter the location (URI) of the file you _would like to open:" msgstr "Geben Sie den Ort (URL) der Datei, die Sie _öffnen wollen an:" #: ../plugins/AutoReplace/i18n.py:23 #, python-format msgid "Replaced '%s' with '%s'" msgstr "'%s' durch '%s' ersetzt" #: ../plugins/Templates/i18n.py:23 msgid "Template mode is active" msgstr "Vorlagenmodus ist aktiv" #: ../plugins/Templates/i18n.py:24 msgid "Inserted template" msgstr "Vorlage eingefügt" #: ../plugins/Templates/i18n.py:25 msgid "Selected next placeholder" msgstr "Nächsten Platzhalter ausgewählt" #: ../plugins/Templates/i18n.py:26 msgid "Selected previous placeholder" msgstr "Vorherigen Platzhalter ausgewählt" #: ../plugins/About/i18n.py:23 msgid "Scribes is a text editor for GNOME." msgstr "Scribes ist ein Texteditor für GNOME" #: ../plugins/About/i18n.py:24 msgid "Information about the text editor" msgstr "Informationen über den Texteditor" #: ../plugins/TemplateEditor/Template.glade.h:1 msgid "here" msgstr "" "hier heruntergeladen " "werden." #: ../plugins/TemplateEditor/Template.glade.h:2 msgid "_Description:" msgstr "_Beschreibung" #: ../plugins/TemplateEditor/Template.glade.h:3 msgid "_Name:" msgstr "_Name" #: ../plugins/TemplateEditor/Template.glade.h:4 msgid "_Template:" msgstr "_Vorlage:" #: ../plugins/TemplateEditor/Template.glade.h:5 msgid "Download templates from" msgstr "Vorlagen können z.B. von" #: ../plugins/TemplateEditor/Template.glade.h:9 #: ../plugins/TemplateEditor/i18n.py:26 msgid "Import Template" msgstr "Vorlagen importieren" #: ../plugins/TemplateEditor/Template.glade.h:10 #: ../plugins/TemplateEditor/i18n.py:32 msgid "Template Editor" msgstr "Vorlagen Editor" #: ../plugins/TemplateEditor/Template.glade.h:11 msgid "gtk-add" msgstr "" #: ../plugins/TemplateEditor/Template.glade.h:12 msgid "gtk-cancel" msgstr "" #: ../plugins/TemplateEditor/Template.glade.h:13 msgid "gtk-edit" msgstr "" #: ../plugins/TemplateEditor/Template.glade.h:14 msgid "gtk-help" msgstr "" #: ../plugins/TemplateEditor/Template.glade.h:15 msgid "gtk-remove" msgstr "" #: ../plugins/TemplateEditor/Template.glade.h:16 msgid "gtk-save" msgstr "" #: ../plugins/TemplateEditor/i18n.py:23 msgid "_Language" msgstr "_Sprache" #: ../plugins/TemplateEditor/i18n.py:24 msgid "_Name" msgstr "_Name" #: ../plugins/TemplateEditor/i18n.py:25 msgid "_Description" msgstr "_Beschreibung" #: ../plugins/TemplateEditor/i18n.py:29 msgid "Error: Name field cannot be empty" msgstr "Fehler: Sie müssen einen Dateinamen angeben" #: ../plugins/TemplateEditor/i18n.py:30 msgid "Error: Trigger name already in use. Please use another trigger name." msgstr "" "Fehler: Diese Zeichenkette wird bereits als Vorlage verwendet. Bitte " "benutzen Sie eine andere." #: ../plugins/TemplateEditor/i18n.py:31 msgid "Add Template" msgstr "Neue Vorlage" #: ../plugins/TemplateEditor/i18n.py:33 msgid "Error: You do not have permission to save at the location" msgstr "" "Fehler: Sie haben nicht die nötigen Rechte, um die Datei dort zu speichern." #: ../plugins/TemplateEditor/i18n.py:34 msgid "Error: No selection to export" msgstr "Fehler: Keine Markierung zum Exportieren vorhanden" #: ../plugins/TemplateEditor/i18n.py:35 msgid "Error: File not found" msgstr "Fehler beim Laden: Datei nicht gefunden." #: ../plugins/TemplateEditor/i18n.py:36 msgid "Error: Invalid template file" msgstr "Fehler: Ungültige Vorlagendatei" #: ../plugins/TemplateEditor/i18n.py:37 msgid "Error: No template information found" msgstr "Fehler: Keine Information über die Vorlagen gefunden" #: ../plugins/AutoReplaceGUI/i18n.py:23 msgid "Auto Replace Editor" msgstr "Automatische Ersetzungen" #: ../plugins/AutoReplaceGUI/i18n.py:24 msgid "_Abbreviations" msgstr "_Abkürzungen" #: ../plugins/AutoReplaceGUI/i18n.py:25 msgid "_Replacements" msgstr "_Ersetzungen" #: ../plugins/AutoReplaceGUI/i18n.py:26 #, python-format msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "" "Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie eine andere " "Abkürzung." #: ../plugins/AutoReplaceGUI/i18n.py:27 msgid "Automatic Replacement" msgstr "Automatische Ersetzung" #: ../plugins/AutoReplaceGUI/i18n.py:28 msgid "Modify words for auto-replacement" msgstr "Ändere das Wort für die automatische Ersetzung" #: ../plugins/Indent/i18n.py:24 msgid "Indenting please wait..." msgstr "Rücke ein - bitte warten..." #: ../plugins/Indent/i18n.py:26 #, python-format msgid "Indented line %d" msgstr "Zeile %d eingerückt" #: ../plugins/Indent/i18n.py:30 msgid "I_ndentation" msgstr "_Einzug" #: ../plugins/Indent/i18n.py:31 msgid "Shift _Right" msgstr "_Rechts Einrücken" #: ../plugins/Indent/i18n.py:32 msgid "Shift _Left" msgstr "_Links Einrücken" #: ../plugins/Selection/i18n.py:24 msgid "Selected word" msgstr "Markiertes Wort" #: ../plugins/Selection/i18n.py:25 msgid "No word to select" msgstr "Kein Wort zum Markieren" #: ../plugins/Selection/i18n.py:26 msgid "Selected sentence" msgstr "Satz markiert" #: ../plugins/Selection/i18n.py:27 msgid "No sentence to select" msgstr "Kein Satz zum Markieren vorhanden" #: ../plugins/Selection/i18n.py:28 #, python-format msgid "No text to select on line %d" msgstr "Kein Text zum auswählen in Zeile %d vorhanden" #: ../plugins/Selection/i18n.py:29 #, python-format msgid "Selected line %d" msgstr "Zeile %d ausgewählt" #: ../plugins/Selection/i18n.py:30 msgid "Selected paragraph" msgstr "Absatz markiert" #: ../plugins/Selection/i18n.py:31 msgid "No paragraph to select" msgstr "Kein Absatz zum Markieren vorhanden" #: ../plugins/Selection/i18n.py:32 msgid "S_election" msgstr "_Markierung" #: ../plugins/Selection/i18n.py:33 msgid "Select _Word" msgstr "Markiere _Wort" #: ../plugins/Selection/i18n.py:34 msgid "Select _Line" msgstr "_Markiere _Zeile" #: ../plugins/Selection/i18n.py:35 msgid "Select _Sentence" msgstr "Markiere _Satz" #: ../plugins/Selection/i18n.py:36 msgid "Select _Paragraph" msgstr "Markiere _Absatz" #: ../plugins/Lines/i18n.py:24 #, python-format msgid "Deleted line %d" msgstr "Habe die Zeile %d gelöscht" #: ../plugins/Lines/i18n.py:25 #, python-format msgid "Joined line %d to line %d" msgstr "Habe die Zeilen %d und %d zusamengeführt" #: ../plugins/Lines/i18n.py:26 msgid "No more lines to join" msgstr "Keine Zeilen zum Zusammenführen übrig" #: ../plugins/Lines/i18n.py:27 #, python-format msgid "Freed line %d" msgstr "Zeile %d gelöscht" #: ../plugins/Lines/i18n.py:28 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Text hinter dem Cursor in Zeile %d gelöscht" #: ../plugins/Lines/i18n.py:29 msgid "Cursor is already at the end of line" msgstr "Der Cursor ist bereits am Ende der Zeile" #: ../plugins/Lines/i18n.py:30 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Text vor dem Cursor in Zeile %d gelöscht" #: ../plugins/Lines/i18n.py:31 msgid "Cursor is already at the beginning of line" msgstr "Der Cursor ist bereits am Anfang der Zeile" #: ../plugins/Lines/i18n.py:32 msgid "_Lines" msgstr "_Zeilen" #: ../plugins/Lines/i18n.py:33 msgid "_Delete Line" msgstr "_Lösche Zeile" #: ../plugins/Lines/i18n.py:34 msgid "_Join Line" msgstr "_Verbinde Zeilen" #: ../plugins/Lines/i18n.py:35 msgid "Free Line _Above" msgstr "Lösche _vorherige Zeile" #: ../plugins/Lines/i18n.py:36 msgid "Free Line _Below" msgstr "Lösche _nächste Zeile" #: ../plugins/Lines/i18n.py:37 msgid "Delete Cursor to Line _End" msgstr "Lösche zum Zeilen_ende" #: ../plugins/Lines/i18n.py:38 msgid "Delete _Cursor to Line Begin" msgstr "Lösche zum Zeilen_anfang" #: ../plugins/Preferences/i18n.py:23 msgid "Font" msgstr "Schriftart" #: ../plugins/Preferences/i18n.py:24 msgid "Editor _font: " msgstr "Editor _Schriftart: " #: ../plugins/Preferences/i18n.py:25 msgid "Tab Stops" msgstr "Tabulatoren" #: ../plugins/Preferences/i18n.py:26 msgid "_Tab width: " msgstr "_Tabulator Breite: " #: ../plugins/Preferences/i18n.py:27 msgid "Text Wrapping" msgstr "Textumbruch" #: ../plugins/Preferences/i18n.py:28 msgid "Right Margin" msgstr "Rechter Rand" #: ../plugins/Preferences/i18n.py:29 msgid "_Right margin position: " msgstr "_Position des rechten Randes: " #: ../plugins/Preferences/i18n.py:30 msgid "Spell Checking" msgstr "Rechtschreibprüfung" #: ../plugins/Preferences/i18n.py:31 msgid "Change editor settings" msgstr "Editor einrichten" #: ../plugins/Preferences/i18n.py:32 msgid "Preferences" msgstr "Einstellungen" #: ../plugins/Preferences/i18n.py:33 #, python-format msgid "Changed font to \"%s\"" msgstr "Schriftart in \"%s\" geändert" #: ../plugins/Preferences/i18n.py:34 #, python-format msgid "Changed tab width to %d" msgstr "Tabulatorenweite zu $d geändert" #: ../plugins/Preferences/i18n.py:35 msgid "_Use spaces instead of tabs" msgstr "_Leerzeichen anstatt Tabulatoren verwenden" #: ../plugins/Preferences/i18n.py:36 msgid "Use tabs for indentation" msgstr "Tabulatoren für die Einrückung verwenden" #: ../plugins/Preferences/i18n.py:37 msgid "Use spaces for indentation" msgstr "Leerzeichen für die Einrückung verwenden" #: ../plugins/Preferences/i18n.py:38 msgid "Enable text _wrapping" msgstr "Automatischen Text_umbruch einschalten" #: ../plugins/Preferences/i18n.py:39 msgid "Enabled text wrapping" msgstr "Textumbruch aktiviert" #: ../plugins/Preferences/i18n.py:40 msgid "Disabled text wrapping" msgstr "Textumbruch deaktiviert" #: ../plugins/Preferences/i18n.py:41 msgid "Display right _margin" msgstr "Rechten _Rand anzeigen" #: ../plugins/Preferences/i18n.py:42 msgid "Show right margin" msgstr "Zeige rechten Rand" #: ../plugins/Preferences/i18n.py:43 msgid "Hide right margin" msgstr "Verstecke rechten Rand" #: ../plugins/Preferences/i18n.py:44 msgid "_Enable spell checking" msgstr "Rechtschreibprüfung _einschalten" #: ../plugins/Preferences/i18n.py:45 ../plugins/SpellCheck/i18n.py:24 msgid "Enabled spellchecking" msgstr "Rechtschreibprüfung eingeschalten" #: ../plugins/Preferences/i18n.py:46 ../plugins/SpellCheck/i18n.py:23 msgid "Disabled spellchecking" msgstr "Rechtschreibprüfung ausgeschalten" #: ../plugins/Preferences/i18n.py:47 #, python-format msgid "Positioned margin line at column %d" msgstr "Der Rechte Rand ist nun in Spalte %d" #: ../plugins/BracketCompletion/i18n.py:23 msgid "Pair character completion occurred" msgstr "Zeichenpaarkomplettierung wurde durchgeführt" #: ../plugins/BracketCompletion/i18n.py:24 msgid "Enclosed selected text" msgstr "Der ausgewählte Text wurde eingefügt" #: ../plugins/BracketCompletion/i18n.py:25 msgid "Removed pair character completion" msgstr "Zeichenpaarvervollständigung entfernt" #: ../plugins/DocumentBrowser/i18n.py:23 msgid "Select document to focus" msgstr "Text auswählen um ihn hervorzuheben " #: ../plugins/DocumentBrowser/i18n.py:25 msgid "File _Type" msgstr "Datei_typ" #: ../plugins/DocumentBrowser/i18n.py:26 msgid "File _Name" msgstr "_Name" #: ../plugins/DocumentBrowser/i18n.py:27 msgid "Full _Path Name" msgstr "Voller _Pfadname" #: ../plugins/DocumentBrowser/i18n.py:28 msgid "No documents open" msgstr "Kein Text geöffnet" #: ../plugins/SearchPreviousNext/i18n.py:23 msgid "No previous match" msgstr "Keine vorherige Übereinstimmung gefunden" #: ../plugins/IncrementalBar/i18n.py:23 ../plugins/FindBar/i18n.py:23 #: ../plugins/ReplaceBar/i18n.py:23 msgid "Match _case" msgstr "_Großschreibung beachten" #: ../plugins/IncrementalBar/i18n.py:24 ../plugins/FindBar/i18n.py:24 #: ../plugins/ReplaceBar/i18n.py:24 msgid "Match _word" msgstr "Nur vollständige _Wörter" #: ../plugins/IncrementalBar/i18n.py:25 ../plugins/FindBar/i18n.py:25 #: ../plugins/ReplaceBar/i18n.py:25 msgid "_Previous" msgstr "_Vorheriges" #: ../plugins/IncrementalBar/i18n.py:26 ../plugins/FindBar/i18n.py:26 #: ../plugins/ReplaceBar/i18n.py:26 msgid "_Next" msgstr "_Nächstes" #: ../plugins/IncrementalBar/i18n.py:27 ../plugins/FindBar/i18n.py:27 #: ../plugins/ReplaceBar/i18n.py:27 msgid "_Search for:" msgstr "_Suche nach:" #: ../plugins/IncrementalBar/i18n.py:29 ../plugins/FindBar/i18n.py:29 #: ../plugins/ReplaceBar/i18n.py:29 msgid "Closed search bar" msgstr "Die Suchleiste wurde geschlossen" #: ../plugins/IncrementalBar/i18n.py:30 msgid "Incrementally search for text" msgstr "Inkrementell nach Text suchen" #: ../plugins/IncrementalBar/i18n.py:31 msgid "Close incremental search bar" msgstr "Inkrementelle Suchleiste schließen" #: ../plugins/OpenDialog/i18n.py:24 msgid "Select file for loading" msgstr "Eine Datei zum öffnen auswählen" #: ../plugins/ToolbarVisibility/i18n.py:23 msgid "Hide toolbar" msgstr "Werkzeugleiste verstecken" #: ../plugins/ToolbarVisibility/i18n.py:24 msgid "Showed toolbar" msgstr "Werkzeugleiste eingeschalten" #: ../plugins/MatchingBracket/i18n.py:23 #, python-format msgid "Found matching bracket on line %d" msgstr "Zugehörige Klamme in Zeile %d gefunden" #: ../plugins/MatchingBracket/i18n.py:24 msgid "No matching bracket found" msgstr "Keine zugehörige Klammer gefunden" #: ../plugins/BracketSelection/i18n.py:23 msgid "Selected characters inside bracket" msgstr "Zeichen innerhalb der Klammern markiert" #: ../plugins/BracketSelection/i18n.py:24 msgid "No brackets found for selection" msgstr "Keine Klammer zum Markieren gefunden" #: ../plugins/Case/i18n.py:23 msgid "No selection to change case" msgstr "Nichts markiert um die Großschreibung zu ändern" #: ../plugins/Case/i18n.py:24 msgid "Selected text is already uppercase" msgstr "Markierter Text ist bereits in Großbuchstaben" #: ../plugins/Case/i18n.py:25 msgid "Changed selected text to uppercase" msgstr "Markierten Text von Klein- zu Großschreibung geändert" #: ../plugins/Case/i18n.py:26 msgid "Selected text is already lowercase" msgstr "Markierter Text ist bereits in Kleinbuchstaben" #: ../plugins/Case/i18n.py:27 msgid "Changed selected text to lowercase" msgstr "Markierten Text von Groß- zu Kleinschreibung geändert" #: ../plugins/Case/i18n.py:28 msgid "Selected text is already capitalized" msgstr "Markierter Text ist bereits in Großbuchstaben" #: ../plugins/Case/i18n.py:29 msgid "Capitalized selected text" msgstr "Markierten Text in Großbuchstaben geändert" #: ../plugins/Case/i18n.py:30 msgid "Swapped the case of selected text" msgstr "Großschreibung des markierten Textes getauscht" #: ../plugins/Case/i18n.py:31 msgid "_Case" msgstr "_Großschreibung" #: ../plugins/Case/i18n.py:32 msgid "_Uppercase" msgstr "_Großschreibung" #: ../plugins/Case/i18n.py:33 msgid "_Lowercase" msgstr "_Kleinschreibung" #: ../plugins/Case/i18n.py:34 msgid "_Titlecase" msgstr "_Titelmodus" #: ../plugins/Case/i18n.py:35 msgid "_Swapcase" msgstr "_Vertausche Großschreibung" #: ../plugins/Bookmark/i18n.py:23 #, python-format msgid "Removed bookmark on line %d" msgstr "Lesezeichen in Zeile %d entfernt" #: ../plugins/Bookmark/i18n.py:24 #, python-format msgid "Bookmarked line %d" msgstr "Lesezeichen für Zeile %d hinzugefügt" #: ../plugins/Bookmark/i18n.py:25 msgid "No bookmarks found to remove" msgstr "Keine Lesezeichen zum entfernen gefunden" #: ../plugins/Bookmark/i18n.py:26 msgid "Removed all bookmarks" msgstr "Alle Lesezeichen entfernt" #: ../plugins/Bookmark/i18n.py:28 msgid "No next bookmark to move to" msgstr "Kein weiteres Lesezeichen vorhanden" #: ../plugins/Bookmark/i18n.py:29 msgid "No previous bookmark to move to" msgstr "Kein vorheriges Lesezeichen vorhanden" #: ../plugins/Bookmark/i18n.py:30 msgid "Already on first bookmark" msgstr "Sie sind bereits beim ersten Lesezeichen" #: ../plugins/Bookmark/i18n.py:31 msgid "Moved to first bookmark" msgstr "Zum ersten Lesezeichen gegangen" #: ../plugins/Bookmark/i18n.py:32 msgid "Already on last bookmark" msgstr "Sie sind bereits beim letzten Lesezeichen" #: ../plugins/Bookmark/i18n.py:33 msgid "Moved to last bookmark" msgstr "Zum letzten Lesezeichen gegangen" #: ../plugins/Bookmark/i18n.py:34 msgid "_Bookmark" msgstr "_Lesezeichen" #: ../plugins/Bookmark/i18n.py:35 msgid "Bookmark _Line" msgstr "Lesezeichen _hinzufügen" #: ../plugins/Bookmark/i18n.py:36 msgid "_Remove Bookmark" msgstr "_Entferne das Lesezeichen" #: ../plugins/Bookmark/i18n.py:37 msgid "Remove _All Bookmarks" msgstr "Entferne _alle Lesezeichen" #: ../plugins/Bookmark/i18n.py:38 msgid "Move to _Next Bookmark" msgstr "Gehe zum _nächsten Lesezeichen" #: ../plugins/Bookmark/i18n.py:39 msgid "Move to _Previous Bookmark" msgstr "Gehe zum _vorherigen Lesezeichen" #: ../plugins/Bookmark/i18n.py:40 msgid "Move to _First Bookmark" msgstr "Gehe zum _ersten Lesezeichen" #: ../plugins/Bookmark/i18n.py:41 msgid "Move to Last _Bookmark" msgstr "Gehe zum _letzten Lesezeichen" #: ../plugins/Bookmark/i18n.py:42 msgid "_Show Bookmark Browser" msgstr "Zeige die Lesezeichen_übersicht" #: ../plugins/SaveDialog/i18n.py:23 msgid "Save Document" msgstr "Text speichern" #: ../plugins/SaveDialog/i18n.py:24 msgid "Change name of file and save" msgstr "Datei unter einem neuem Namen speichern" #: ../plugins/UserGuide/i18n.py:23 msgid "Launching help browser" msgstr "Starte Hilfe" #: ../plugins/UserGuide/i18n.py:24 msgid "Could not open help browser" msgstr "Konnte die Hilfe nicht öffnen" #: ../plugins/ReadOnly/i18n.py:23 msgid "File has not been saved to disk" msgstr "Datei wurde nicht gespeichert" #: ../plugins/ReadOnly/i18n.py:24 msgid "No permission to modify file" msgstr "Sie haben keine Berechtigung um die Datei zu ändern" #: ../plugins/UndoRedo/i18n.py:24 msgid "Undid last action" msgstr "Letzte Aktion rückgängig gemacht" #: ../plugins/UndoRedo/i18n.py:25 msgid "Cannot undo action" msgstr "Kann die letzte Aktion nicht rückgängig machen" #: ../plugins/UndoRedo/i18n.py:26 msgid "Redid undone action" msgstr "Letzte Änderung wiederhergestellt" #: ../plugins/Spaces/i18n.py:24 msgid "Replacing spaces please wait..." msgstr "Ersetze Leerzeichen - bitte warten..." #: ../plugins/Spaces/i18n.py:25 msgid "No spaces found to replace" msgstr "Keine Leerzeichen zum Ersetzen gefunden" #: ../plugins/Spaces/i18n.py:26 msgid "Replaced spaces with tabs" msgstr "Leerzeichen durch Tabulatoren ersetzt" #: ../plugins/Spaces/i18n.py:27 msgid "Replacing tabs please wait..." msgstr "Ersetze Tabulatoren - bitte warten..." #: ../plugins/Spaces/i18n.py:28 msgid "Replaced tabs with spaces" msgstr "Tabulatoren durch Leerzeichen ersetzt" #: ../plugins/Spaces/i18n.py:29 msgid "No tabs found to replace" msgstr "Keine Tabulatoren zum Ersetzen gefunden" #: ../plugins/Spaces/i18n.py:30 msgid "Removing spaces please wait..." msgstr "Entferne Leerzeichen - bitte warten..." #: ../plugins/Spaces/i18n.py:31 msgid "No spaces were found at end of line" msgstr "Am Ende der Zeile wurden keine Leerzeichen gefunden" #: ../plugins/Spaces/i18n.py:32 msgid "Removed spaces at end of lines" msgstr "Leerzeichen am Ende der Zeile entfernt" #: ../plugins/Spaces/i18n.py:33 msgid "S_paces" msgstr "_Leerzeichen" #: ../plugins/Spaces/i18n.py:34 msgid "_Tabs to Spaces" msgstr "_Tabulator zu Leerzeichen" #: ../plugins/Spaces/i18n.py:35 msgid "_Spaces to Tabs" msgstr "_Leerzeichen zu Tabulatoren" #: ../plugins/Spaces/i18n.py:36 msgid "_Remove Trailing Spaces" msgstr "Entferne Leerzeichen am _Ende" #: ../plugins/GotoBar/i18n.py:23 msgid "Move cursor to a specific line" msgstr "Springe in eine bestimmte Zeile" #: ../plugins/GotoBar/i18n.py:24 msgid "Closed goto line bar" msgstr "Die Zeilauswahlleiste geschlossen" #: ../plugins/GotoBar/i18n.py:25 #, python-format msgid " of %d" msgstr " von %d" #: ../plugins/GotoBar/i18n.py:26 msgid "Line number:" msgstr "Gehe zu Zeile:" #: ../plugins/GotoBar/i18n.py:27 #, python-format msgid "Moved cursor to line %d" msgstr "In Zeile %d gesprungen" #: ../plugins/SearchReplace/i18n.py:23 msgid "Searching please wait..." msgstr "Suche - bitte warten..." #: ../plugins/SearchReplace/i18n.py:24 #, python-format msgid "Found %d matches" msgstr "%d mal gefunden" #: ../plugins/SearchReplace/i18n.py:25 #, python-format msgid "Match %d of %d" msgstr "Übereinstimmung %d von %d" #: ../plugins/SearchReplace/i18n.py:26 msgid "No match found" msgstr "Kein mal gefunden" #: ../plugins/SearchReplace/i18n.py:27 msgid "No next match found" msgstr "Keine weitere Übereinstimmung gefunden" #: ../plugins/SearchReplace/i18n.py:28 msgid "Stopped operation" msgstr "Suche abgebrochen" #: ../plugins/SearchReplace/i18n.py:29 msgid "Replacing please wait..." msgstr "Ersetze - bitte warten..." #: ../plugins/SearchReplace/i18n.py:30 msgid "Replace found match" msgstr "Gefundenen Übereinstimmung ersetzen" #: ../plugins/SearchReplace/i18n.py:31 msgid "Replaced all found matches" msgstr "Alle gefundenen Übereinstimmungen ersetzen" #: ../plugins/SearchReplace/i18n.py:32 msgid "No previous match found" msgstr "Keine Übereinstimmung gefunden" #: ../plugins/ReplaceBar/i18n.py:30 msgid "Replac_e with:" msgstr "Ersetzen _mit:" #: ../plugins/ReplaceBar/i18n.py:32 msgid "Closed replace bar" msgstr "Die Ersetzenleiste wurde geschlossen" #: ../plugins/ReplaceBar/i18n.py:33 msgid "_Replace" msgstr "E_rsetzen" #: ../plugins/ReplaceBar/i18n.py:34 msgid "Replace _All" msgstr "_Alle ersetzen" #: ../plugins/ReplaceBar/i18n.py:35 msgid "Incre_mental" msgstr "_Inkrementell" #: ../plugins/ColorEditor/i18n.py:23 msgid "Change editor colors" msgstr "Ändere Editorfarben" #: ../plugins/ColorEditor/i18n.py:24 msgid "Syntax Color Editor" msgstr "Farbschema Editor" #: ../plugins/ColorEditor/i18n.py:25 msgid "_Use default theme" msgstr "_Standartfarben des aktuellen Themas benutzen" #: ../plugins/ColorEditor/i18n.py:26 msgid "Using theme colors" msgstr "Farben des aktuellen Themas benutzen" #: ../plugins/ColorEditor/i18n.py:27 msgid "Using custom colors" msgstr "Eigene Farben benutzen" #: ../plugins/ColorEditor/i18n.py:28 msgid "Select foreground color" msgstr "Vordergrundfarbe auswählen" #: ../plugins/ColorEditor/i18n.py:29 msgid "_Normal text color: " msgstr "_Textfarbe" #: ../plugins/ColorEditor/i18n.py:30 msgid "_Background color: " msgstr "_Hintergrundfarbe" #: ../plugins/ColorEditor/i18n.py:31 msgid "_Foreground:" msgstr "_Vordergrund" #: ../plugins/ColorEditor/i18n.py:32 msgid "Back_ground:" msgstr "Hinter_grund" #: ../plugins/ColorEditor/i18n.py:33 msgid "Select background color" msgstr "Hintergrundfarbe auswählen" #: ../plugins/ColorEditor/i18n.py:34 msgid "Language Elements" msgstr "Sprachelemente" #: ../plugins/ColorEditor/i18n.py:35 msgid "Select foreground syntax color" msgstr "Vordergrundfarbe auswählen" #: ../plugins/ColorEditor/i18n.py:36 msgid "Select background syntax color" msgstr "Hintergrundfarbe auswählen" #: ../plugins/ColorEditor/i18n.py:39 msgid "_Underline" msgstr "_Unterstreichen" #: ../plugins/ColorEditor/i18n.py:40 msgid "_Reset to Default" msgstr "_Zurücksetzen auf Standartwerte" #: ../plugins/SyntaxColorSwitcher/i18n.py:23 msgid "_Highlight Mode" msgstr "_Hervorhebungsmodus" #: ../plugins/SyntaxColorSwitcher/i18n.py:25 #, python-format msgid "Activated '%s' syntax color" msgstr "Farbschema für '%s' aktiviert" #: ../plugins/SyntaxColorSwitcher/i18n.py:26 msgid "Disabled syntax color" msgstr "Farbschema ausgeschalten" #~ msgid "Description" #~ msgstr "Beschreibung" #~ msgid "Line %d is already bookmarked" #~ msgstr "Zeile %d hat bereits ein Lesezeichen" #~ msgid "No bookmark on line %d to remove" #~ msgstr "Keine Lesezeichen in Zeile %d, dass entfernt werden kann" #~ msgid "Replaced tabs with spaces on line %d" #~ msgstr "Tabulatoren durch Leerzeichen in Zeile %d ersetzt" #~ msgid "No tabs found on line %d" #~ msgstr "Keine Tabulatoren in Zeile %d gefunden" #~ msgid "No tabs found in selected text" #~ msgstr "Keine Tabulatoren im markierten Text gefunden" #~ msgid "Create a new file" #~ msgstr "Eine Neue Datei erstellen" #~ msgid "Change the name of current file and save it" #~ msgstr "Den aktuellen Text unter einem neuen Namen speichern" scribes-0.4~r910/po/zh_CN.gmo0000644000175000017500000006207211242100540015554 0ustar andreasandreasÞ•fL ß|ø ù )8H ¡·ÈÝ ò 5 Bc ~Œ¦¿Óé ïü  , ? K X f y Œ ¦ ¼ Ñ è !"!"=!`!x!‹!7¡!1Ù!; "@G"3ˆ"T¼"#.#C#X#k#}#>’#Ñ#æ#"$*%$$P$u$‡$—$«$Æ$ã$0ó$*$%O%f%|%“%©%Á%Ñ% Ù%ç%ö% &"&=8&?v&¶&Ì&!é&$ 'D0'9u'¯'¿'Ô' è' ó'þ'(%(.(!?(a(r( ƒ(‘(¡(·(Æ(Ø( ê(÷(û( ))) ()5)S)d)!})Ÿ)±)À)Ú)ì)**/*@* E* R*@_*- *ôÎ*ŸÃ+Zc,,¾,,ë, -99-s-„-”-°- ¿- Ë-×-!÷-.8.O.g.~.™.±.É.æ.þ./-/I/\/y/™/«/º/Ô/ê/00-0D0a00“0«0Ç0Ü0ð01#!1E1 ^1 11ª1¼1 À1Î1 Ý1é1û12 2"+2 N2Y2l2#{2 Ÿ2«2 º2 È2Ó2ê2û23#363I3 `3m3ƒ3™3!µ3×3ö34-4 <4I4c4 w4˜4³4Í4ç45 5>5 M5X5 `5Cn51²52ä536ŸK61ë6S7 q7|7#70±7â7õ7(8,:8g8w88 —8¤8¶8 Ç8Ô8ì8 9$9<9T9Bs9¶9/Ö91:C8:+|:6¨:Oß:"/;R;c;};;®;$À;"å;"< +<9<L< a< m<z<Œ<›<®<!À<â<ö<==-=&C=j=„==)±=Û=)ð='>B>T>e>ƒ>–>°>Á>*Ü>? ?4?G? `?n?}? ‘?›? ¡? ®?»? Ò?ß? ï? ú?@ @@@"@2@ G@Q@e@w@ˆ@ @ ©@·@É@ â@ï@AA (A 2A?A OA ZA eApAƒA0ŸAÐAéAïA% B$0B?UB •C¢C ©C ¶C:×C D D1DEDWDkD ~D!‰D«D ÊD×DóD EE8EWE mE zE …E‘E¡E¾EÔEîE ÷E F FF!/FQFaFwFF¦F$»F$àFG G(G-LTL gLuL†L ™L £L °L%¾LäLþLM /MTZTpT†T –T £T °T½TÐTìTU!U:U"MU pU}U „U ‘UžU±UÇU ãU íUøU VV &V2V RV _V lV yV†V ™V §VµV ÎVÛVñV WW2WKWkWW$šW¿WÕWæW÷WX,XEXaXwXX$¬X!ÑX óX ÿX Y YD"Y(gY*Y3»YŒïY*|ZK§ZóZ [*[(B[k[}[[[­[´[Ó[ Ú[è[ù[ \\(\ D\Q\j\z\'–\¾\ Ñ\ Þ\'ë\ ]! ]B]R]q]…]•]¥]µ]'Å]!í]!^1^D^T^ d^ r^€^^  ^­^½^Ü^ò^_ _%_!;_]_p_ ƒ_0_Á_×_ö_`+` A`N`k`…`•`¨`Ä`×`í`a a !a,a ;a Fa Ta bama „aa ¡a ¯aºa Âa Ía Øaæaúa b b4bEbVb pb {b‰bb ²b¾bÏbébc c%c?c Pc ^cic€c'šc ÂcÏcÖcòc(dQCb cì1œ4¼[µPß%OŸ)VTeHm [2§(`Ù4+6KSM^®ÿ1ú6öWd€r=—|KäÑyz0G± @R_:3ÂQÓP&#b³¹ù)Î/ÆóB}É» ýXp™-ü"åº <´¾0j·#DuéS'=^l¸AJ£A8á"¨¤Fx¥÷ W°ËØ9ŒHÜñR\!›kݽë>„CIa¦ê“{a†ƒBûG‡‰¶Xâh‚NÞ5,æÇZ‘>ôE+f@ã$ cž.ÒøïÊ…þ,]t2d?w$©: Èsq&*× ¿ À~Žª”à¢oÌE–ÍòÅç7‹¯¡D.«-;?<Ú IU3 Zí­UÏLe7* Û˜ngTf8îŠ\!;Ö/NÁ`MLvYV_]%õ²•¬ˆJOК'(Ô9iè’5ðÃFYÕÄ of %d%s does not exist'%s' has been modified by another programhereFontRight MarginSpell CheckingTab StopsText Wrapping_Description:_Name:A text editor for GNOME.Activated '%s' syntax colorAdd TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAlready on first bookmarkAlready on last bookmarkAuto Replace EditorAutomatic ReplacementB_oldBack_ground:Bookmark BrowserBookmark _LineBookmarked TextBookmarked line %dC DocumentsC# DocumentsC++ DocumentsCannot redo actionCannot undo actionCapitalized selected textCentered current lineChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text to lowercaseChanged selected text to uppercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Close incremental search barClosed dialog windowClosed goto line barClosed replace barClosed search barConfigure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not open help browserCreate, modify or manage templatesCursor is already at the beginning of lineCursor is already at the end of lineCut selected textD_uplicate lineDamn! Unknown ErrorDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDisabled spellcheckingDisabled syntax colorDisabled text wrappingDisplay right _marginDownload templates fromDuplicated lineE_xportEdit TemplateEditor _font: Enable text _wrappingEnabled spellcheckingEnabled text wrappingEnter the location (URI) of the file you _would like to open:Error: '%s' is already in use. Please use another abbreviation.Error: File not foundError: Invalid template fileError: Name field cannot be emptyError: No template information foundError: Trigger name already in use. Please use another trigger name.Error: You do not have permission to save at the locationExport TemplateFailed to load file.Failed to save fileFile _NameFile _TypeFile has not been saved to diskFile: File: %sFound %d matchesFound matching bracket on line %dFree Line _AboveFree Line _BelowFreed line %dFull _Path NameGo to a specific lineHTML DocumentsHaskell DocumentsHide right marginHide toolbarINSI_mportI_ndentationI_talicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Information about the text editorInserted templateJava DocumentsJoined line %d to line %dLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLineLine number:Ln %d col %dLoad Error: Failed to access remote file for permission reasons.Load Error: Failed to close file for loading.Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to get file information for loading. Please try loading the file again.Load Error: Failed to open file for loading.Load Error: Failed to read file for loading.Load Error: File does not exist.Load Error: You do not have permission to view this file.Loaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMenu for advanced configurationModify words for auto-replacementMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to next paragraphMoved to previous paragraphNo bookmarks foundNo bookmarks found to removeNo brackets found for selectionNo documents openNo match foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous matchNo previous match foundNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at end of lineNo tabs found to replaceNo text content in the clipboardNo text foundNo text to select on line %dNo word to selectOVROpen DocumentOpen DocumentsOpen a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPair character completion occurredPara_graphPasted copied textPerl DocumentsPositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePython DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionReflowed paragraphReflowed selected textReloading %sRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved pair character completionRemoved spaces at end of linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplace found matchReplace the selected found matchReplaced all found matchesReplaced spaces with tabsReplaced tabs with spacesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsS_electionS_pacesSave DocumentSave Error: Failed decode contents of file from "UTF-8" to Unicode.Save Error: Failed to close swap file for saving.Save Error: Failed to create swap file for saving.Save Error: Failed to create swap location or file.Save Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Save Error: Failed to write swap file for saving.Save Error: You do not have permission to modify this file or save to its location.Saved "%s"Scheme DocumentsScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedShift _LeftShift _RightShow right marginShowed toolbarSimplified ChineseStopped operationSwapped the case of selected textSyntax Color EditorTemplate EditorTemplate mode is activeText DocumentsThe file "%s" is openThe file "%s" is open in readonly modeToggled readonly mode offToggled readonly mode onTraditional ChineseTry 'scribes --help' for more informationType URI for loadingType in the text you want to replace withType in the text you want to search forUndid last actionUndo last actionUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsWord completion occurredXML Documents_Abbreviations_Background color: _Bookmark_Case_Delete Line_Description_Enable spell checking_Foreground:_Highlight Mode_Join Line_Language_Lines_Lowercase_Name_Next_Next Paragraph_Normal text color: _Previous_Previous Paragraph_Reflow Paragraph_Remove Bookmark_Remove Trailing Spaces_Replace_Replacements_Reset to Default_Right margin position: _Search for:_Select Paragraph_Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscreate a new file and open the file with Scribesdisplay this help screenerroropen file in readonly modeoutput version information of Scribesusage: scribes [OPTION] [FILE] [...]Project-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: chaos.proton@gmail.com POT-Creation-Date: 2007-10-01 21:44+0800 PO-Revision-Date: 2007-10-02 07:06+0800 Last-Translator: grissiom Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 〈åªè¯»ã€‰ä¹‹ %d%s ä¸å­˜åœ¨'%s' å·²ç»è¢«å…¶ä»–程åºä¿®æ”¹è¿™é‡Œå­—体å³ç©ºç™½æ‹¼å†™æ£€æŸ¥ Tab宽度自动æ¢è¡Œæè¿°(_D):åç§°(_N)GNOME 的一个文本编辑器。激活了 '%s' çš„è¯­æ³•é«˜äº®æ·»åŠ æ¨¡æ¿æ·»åŠ æˆ–åˆ é™¤å­—ç¬¦ç¼–ç æ·»åŠ æˆ–åˆ é™¤ç¼–ç â€¦â€¦æ‰€æœ‰æ–‡ä»¶å·²ç»åœ¨ç¬¬ä¸€ä¸ªä¹¦ç­¾äº†å·²ç»åœ¨æœ€åŽä¸€ä¸ªä¹¦ç­¾äº†è‡ªåŠ¨æ›¿æ¢ç¼–辑器自动替æ¢ç²—体(_o)背景(_g):书签æµè§ˆå™¨ç”¨ä¹¦ç­¾æ ‡è®°è¿™ä¸€è¡Œ(_L)书签标记的文本将第 %d 行打上书签C 文件C# 文件C++ 文件ä¸èƒ½é‡åšä¸èƒ½æ’¤æ¶ˆçš„动作将选中的文本è¯é¦–大写了当å‰è¡Œå±…中更改编辑器颜色更改编辑器设置更改文件åå¹¶ä¿å­˜å°†å­—体å˜ä¸º "%s"å°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å°å†™å°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å¤§å†™å°†tab宽度å˜ä¸º %d字符编ç å­—符编ç (_E):为编辑器的背景选择一个新的颜色为编辑器的文本选择一个新的颜色选择一个新的颜色指定文本的字体,风格和字å·ã€‚指定竖线的ä½ç½®ã€‚指定tab的宽度。关闭å‘下æœç´¢æ¡å…³é—­äº†å¯¹è¯çª—å£å…³é—­äº†è·³è½¬æ¡å…³é—­äº†æ›¿æ¢æ¡å…³é—­äº†æœç´¢æ¡ç¼–è¾‘å™¨è®¾ç½®è®¾ç½®ç¼–è¾‘å™¨çš„å‰æ™¯è‰²ï¼ŒèƒŒæ™¯è‰²æˆ–者语法高亮å¤åˆ¶äº†é€‰ä¸­çš„æ–‡æœ¬æœªèƒ½æ‰“开帮助æµè§ˆå™¨åˆ›å»ºï¼Œä¿®æ”¹æˆ–ç®¡ç†æ¨¡æ¿å…‰æ ‡å·²ç»åœ¨è¡Œé¦–了光标已ç»åœ¨è¡Œå°¾äº†å‰ªåˆ‡å¤åˆ¶è¡Œ(_L)å¤©å•Šï¼æœªçŸ¥é”™è¯¯åˆ é™¤ä»Žå…‰æ ‡åˆ°è¡Œå°¾(_E)删除从光标到行首(_C)删除了第 %d 行将从光标到第 %d 行首的文本删除了将从光标到第 %d 行尾的文本删除了ç¦ç”¨äº†æ‹¼å†™æ£€æŸ¥ç¦ç”¨äº†è¯­æ³•高亮ç¦ç”¨è‡ªåЍæ¢è¡Œæ˜¾ç¤ºå³ç©ºç™½(_m)您å¯ä»¥ä»Žè¿™é‡Œä¸‹è½½æ¨¡æ¿:å¤åˆ¶äº†è¡Œå¯¼å‡º(_x)编辑模æ¿ç¼–辑器字体(_f):激活自动æ¢è¡Œæ¿€æ´»äº†æ‹¼å†™æ£€æŸ¥æ¿€æ´»äº†è‡ªåЍæ¢è¡Œè¾“入文件的URI错误:'%s' å·²ç»è¢«ä½¿ç”¨äº†ï¼Œè¯·ç”¨å¦ä¸€ä¸ªç¼©å†™é”™è¯¯ï¼šæ–‡ä»¶æœªæ‰¾åˆ°é”™è¯¯ï¼šæ— æ•ˆçš„æ¨¡æ¿æ–‡ä»¶é”™è¯¯: åç§°ä¸èƒ½ä¸ºç©ºé”™è¯¯ï¼šæ²¡æœ‰æ‰¾åˆ°æ¨¡æ¿ä¿¡æ¯é”™è¯¯ï¼šè§¦å‘器åç§°å·²ç»è¢«ä½¿ç”¨ï¼Œè¯·å¦æ¢ä¸€ä¸ªå称。错误:您没有此ä½ç½®çš„写æƒé™å¯¼å‡ºæ¨¡æ¿æœªèƒ½è½½å…¥æ–‡ä»¶ã€‚ä¿å­˜æ–‡ä»¶å¤±è´¥æ–‡ä»¶å(_N)文档类型(_T)文件还未存盘文件:文件: %s找到 %d 项在第 %d 行找到了对应的括å·åœ¨ä¸Šé¢æ’入一行(_A)åœ¨ä¸‹é¢æ’入一行(_B)æ–°æ’入了第 %d 行完整路径转到指定行HTML 文件Haskell 文件éšè—å³ç©ºç™½éšè—å·¥å…·æ¡æ’入导入(_m)缩进(_n)斜体(_t)导入模æ¿å‘下(_m)å‘下æœç´¢ç¼©è¿›äº†ç¬¬ %d 行正在缩进,请ç¨å€™â€¦â€¦æ–‡æœ¬ç¼–è¾‘å™¨çš„ä¿¡æ¯æ’入了模æ¿Java 文件将第 %d 行åˆå¹¶åˆ°äº†ç¬¬ %d 行语言语言和地区打开帮助打开帮助æµè§ˆå™¨å…¨å±è¡Œå·è¡Œå·ï¼šç¬¬ %d 行,第 %d 列载入错误:因为æƒé™åŽŸå› ï¼Œæœªèƒ½è®¿é—®è¿œç¨‹æ–‡ä»¶ã€‚è½½å…¥é”™è¯¯ï¼šæœªèƒ½å…³é—­æ–‡ä»¶ã€‚è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚您所加载的文件å¯èƒ½å¹¶ä¸æ˜¯ä¸€ä¸ªæ–‡æœ¬æ–‡ä»¶ã€‚如果您确信它是文本文件,请您从打开对è¯çª—å£ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)显示打开对è¯çª—å£ã€‚è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚请您从 æ‰“å¼€å¯¹è¯æ¡† ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)æ˜¾ç¤ºæ‰“å¼€å¯¹è¯æ¡†ã€‚载入错误:未能å–得文件信æ¯ï¼Œè¯·é‡æ–°è½½å…¥ã€‚载入错误:未能打开文件。载入错误:未能读文件。载入错误:文件ä¸å­˜åœ¨ã€‚载入错误:您没有阅读这个文件的æƒé™ã€‚载入的文件 "%s"正在加载 "%s" ……正在载入文件,请ç¨å€™â€¦â€¦ç¬¬ %d 个,共 %d 个符åˆå¤§å°å†™(_c)ç¬¦åˆæ•´è¯(_w)更多设置编辑自动替æ¢å°†å…‰æ ‡è½¬åˆ°æŒ‡å®šè¡Œè½¬åˆ°æœ€åŽä¸€ä¸ªä¹¦ç­¾(_B)转到第一个书签(_F)转到下一个书签(_N)转到上一个书签(_P)转到书签标记的行光标转到了第 %d 行转到书签标记的第 %d 行转到了第一个书签转到最åŽä¸€ä¸ªä¹¦ç­¾è½¬åˆ°äº†ä¸‹ä¸€æ®µè½¬åˆ°äº†ä¸Šä¸€æ®µæ²¡æœ‰æ‰¾åˆ°ä¹¦ç­¾æ²¡æœ‰æ‰¾åˆ°ä¹¦ç­¾æ²¡æœ‰æ‰¾åˆ°æ‹¬å·æ²¡æœ‰æ‰“å¼€æ–‡æ¡£çŸ­è¯­æœªæ‰¾åˆ°æ²¡æœ‰æ‰¾åˆ°å¯¹åº”çš„æ‹¬å·æ²¡æœ‰æ›´å¤šè¡Œå¯ä»¥åˆå¹¶äº†ä¸‹é¢æ²¡æœ‰ä¹¦ç­¾äº†ä¸‹é¢æ²¡æœ‰äº†æœªèƒ½æ‰¾åˆ°æ®µè½æœªæ‰¾åˆ°æ®µè½æ²¡æœ‰ä¿®æ”¹æ–‡ä»¶çš„æƒé™ä¸Šé¢æ²¡æœ‰ä¹¦ç­¾äº†æ²¡æœ‰æ‰¾åˆ°ä¸Šä¸€ä¸ªä¸Šé¢æ²¡æœ‰äº†æ²¡æœ‰é€‰æ‹©æ²¡æœ‰é€‰æ‹©æ²¡æœ‰é€‰æ‹©æ²¡æœ‰æ‰¾åˆ°å¥å­æœªæ‰¾åˆ°å¯æ›¿æ¢çš„ç©ºæ ¼æœªèƒ½åœ¨è¡Œå°¾æ‰¾åˆ°ç©ºæ ¼æœªæ‰¾åˆ°å¯æ›¿æ¢çš„tab剪贴æ¿é‡Œæ²¡æœ‰æ–‡æœ¬æœªèƒ½æ‰¾åˆ°æ–‡æœ¬åœ¨ç¬¬ %d 行里没有文本å¯é€‰æœªæ‰¾åˆ°è¯æ›¿æ¢æ‰“å¼€æ–‡æ¡£æ‰“å¼€æ–‡æ¡£æ‰“å¼€ä¸€ä¸ªæ–‡ä»¶æ‰“å¼€ä¸€ä¸ªæ–°çª—å£æ‰“开最近用过的文件选项:PHP 文件自动补全了一对字符段è½(_g)粘贴Perl 文件将å³ç©ºç™½çº¿ç½®äºŽç¬¬ %d 列使用åå¥½æ‰“å°æ–‡æ¡£æ‰“å°é¢„è§ˆæ‰“å°æ–‡ä»¶æ‰“å°å½“剿–‡ä»¶Python 文件推è(UTF-8)é‡åšäº†æ’¤æ¶ˆçš„动作é‡åšæ“作整ç†äº†é€‰æ‹©çš„æ®µæ•´ç†äº†é€‰æ‹©çš„æ–‡æœ¬é‡æ–°è½½å…¥ %s 删除所有书签(_A)删除了所有的书签将第 %d 行的书签删除了删除了一对字符删除了行尾的空格正在替æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦é‡å‘½å当剿–‡ä»¶æ›¿æ¢ä¸º(_e)ï¼šæ›¿æ¢æ‰€æœ‰(_A)替æ¢äº†æ‰€æœ‰æ‰¾åˆ°çš„çŸ­è¯­æ›¿æ¢æ‰¾åˆ°çš„短语替æ¢äº†æ‰¾åˆ°çš„çŸ­è¯­æ›¿æ¢æ‰€æœ‰æ‰¾åˆ°çš„短语用tab替æ¢äº†ç©ºæ ¼ç”¨ç©ºæ ¼æ›¿æ¢äº†tab正在替æ¢ï¼Œè¯·ç¨å€™â€¦â€¦æ­£åœ¨æ›¿æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦æ­£åœ¨æ›¿æ¢tab,请ç¨å€™â€¦â€¦Ruby 文件选择(_S)空格(_S)ä¿å­˜æ–‡æ¡£ä¿å­˜å¤±è´¥ï¼šæœªèƒ½æŠŠæ–‡ä»¶ä¸­"UTF-8"çš„å†…å®¹è§£ç æˆUnicode。ä¿å­˜å¤±è´¥:æœªèƒ½å…³é—­äº¤æ¢æ–‡ä»¶ã€‚ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢æ–‡ä»¶ã€‚ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢ä½ç½®æˆ–文件。ä¿å­˜å¤±è´¥ï¼šæœªèƒ½ç¼–ç æ–‡ä»¶å†…容。请确认在ä¿å­˜å¯¹è¯æ¡†é‡Œè®¾ç½®äº†åˆé€‚的字符编ç ã€‚按(Ctrl+s)显示ä¿å­˜å¯¹è¯æ¡†ã€‚ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å†™å…¥äº¤æ¢æ–‡ä»¶ã€‚ä¿å­˜å¤±è´¥ï¼šæ‚¨æ²¡æœ‰æƒé™åœ¨æ­¤ç›®å½•下修改或ä¿å­˜è¿™ä¸ªæ–‡ä»¶ã€‚文件 "%s" å·²ä¿å­˜Scheme 文件Scribes 是 GNOME 的一个文本编辑器Scribesåªæ”¯æŒä¸€æ¬¡ä½¿ç”¨ä¸€ä¸ªé€‰é¡¹Scribes 版本 %s查找并替æ¢å¯»æ‰¾ä¸‹ä¸€ä¸ªå¯»æ‰¾å‰ä¸€ä¸ªæŸ¥æ‰¾æ­£åœ¨æœç´¢ï¼Œè¯·ç¨å€™â€¦â€¦é€‰æ‹©é€‰æ‹©è¡Œ(_L)选择段è½(_P)选择å¥å­(_S)选择è¯(_W)选择背景色选择语法高亮背景色选择文档选择è¦è½½å…¥çš„æ–‡ä»¶é€‰æ‹©å‰æ™¯è‰²é€‰æ‹©è¯­æ³•é«˜äº®å‰æ™¯è‰²æ˜¾ç¤ºä¸€æ¡ç«–çº¿æ¥æŒ‡ç¤ºå³ç©ºç™½ã€‚激活拼写检查å˜ä¸ºç²—体å˜ä¸ºæ–œä½“将语法显示全部é‡è®¾ä¸ºé»˜è®¤å€¼åŠ ä¸‹æ»‘çº¿ä½¿ç”¨ä¸»é¢˜çš„å‰æ™¯å’ŒèƒŒæ™¯è‰²è‡ªåЍæ¢è¡Œã€‚选择了括å·å†…所有的è¯é€‰æ‹©äº†ç¬¬ %d 行下一个ä½ç½®é€‰æ‹©äº†æ®µè½ä¸Šä¸€ä¸ªä½ç½®é€‰æ‹©äº†å¥å­é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯è¯é¦–å¤§å†™äº†é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å°å†™äº†é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å¤§å†™äº†é€‰æ‹©äº†ä¸€ä¸ªè¯ç¼©è¿›å®Œæˆäº†å–消了缩进左移ä½(_L)å³ç§»ä½(_R)显示å³ç©ºç™½æ˜¾ç¤ºå·¥å…·æ¡ç®€ä½“中文æ“作被中止交æ¢é€‰ä¸­æ–‡æœ¬çš„大å°å†™è¯­æ³•高亮编辑器模æ¿ç¼–è¾‘å™¨æ¿€æ´»äº†æ¨¡æ¿æ¨¡å¼æ–‡æœ¬æ–‡ä»¶æ–‡ä»¶ "%s" 已打开文件 "%s" 以åªè¯»æ¨¡å¼æ‰“å¼€åªè¯»æ¨¡å¼è§£é”åªè¯»æ¨¡å¼é”定ç¹ä½“中文请å°è¯• 'scribes --help' 以获得更多信æ¯è¾“å…¥è¦è½½å…¥çš„URIè¾“å…¥æ‚¨æƒ³æ›¿æ¢æˆçš„æ–‡æœ¬è¾“入您想寻找的文本撤消了上一个动作撤消上一次æ“ä½œå¿…é¡»ç¼©è¿›å–æ¶ˆäº†ç¬¬ %d 行的缩进ä¸è¯†åˆ«çš„选项:'%s'未ä¿å­˜æ–‡æ¡£ä½¿ç”¨ç©ºæ ¼ç¼©è¿›ä½¿ç”¨ç©ºæ ¼ä»£æ›¿tab缩进使用tabæ¥ç¼©è¿›ä½¿ç”¨è‡ªå®šä¹‰é¢œè‰²ä½¿ç”¨ä¸»é¢˜é¢œè‰²è‡ªåŠ¨è¡¥å…¨äº†å•è¯XML 文件缩写(_A)背景色(_B):书签(_B)大å°å†™(_C)删除行(_D)æè¿°(_D)激活拼写检查(_E)剿™¯(_F):高亮模å¼(_H)åˆå¹¶è¡Œ(_J)语言(_L)行(_L)å°å†™(_L)åç§°(_N)下一个(_N)下一个段è½(_N)普通文本颜色(_N):上一个(_P)上一个段è½(_P)æ•´ç†æ®µè½(_R)删除书签(_R)删除行尾的空格(_R)替æ¢(_R)替æ¢ä¸º(_R)还原为默认(_R)å³ç©ºç™½ä½ç½®(_R):æœç´¢(_S):选择段è½(_S)显示书签æµè§ˆå™¨(_S)å°†ç©ºæ ¼è½¬æ¢æˆtab(_S)交æ¢å¤§å°å†™(_S)Tab宽度(_T)å°†tabè½¬æ¢æˆç©ºæ ¼(_T)è¯é¦–大写(_T)下划线(_U)大写(_U)使用默认主题(_U)使用空格代替tab(_u)新建一个文件并用 Scribes 打开显示帮助错误以åªè¯»æ¨¡å¼æ‰“开文件输出 Scribes 的版本信æ¯ç”¨é€”:scribes [选项] [文件] [...]scribes-0.4~r910/po/Makefile.in0000644000175000017500000001545011242100540016112 0ustar andreasandreas# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = scribes PACKAGE = scribes VERSION = 0.4-dev-build910 SHELL = /bin/bash srcdir = . top_srcdir = .. top_builddir = .. prefix = /usr exec_prefix = ${prefix} datadir = ${datarootdir} datarootdir = ${prefix}/share libdir = ${exec_prefix}/lib DATADIRNAME = share itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = ${SHELL} /home/lateef/Dropbox/scribes/install-sh # Automake >= 1.8 provides /bin/mkdir -p. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 GMSGFMT = /usr/bin/msgfmt MSGFMT = /usr/bin/msgfmt XGETTEXT = /usr/bin/xgettext INTLTOOL_UPDATE = /usr/bin/intltool-update INTLTOOL_EXTRACT = /usr/bin/intltool-extract MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = de fr nl it pt_BR sv zh_CN PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-yes all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-yes install-data-no: all install-data-yes: all linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info ctags tags CTAGS TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/po/pt_BR.gmo0000644000175000017500000012507511242100540015564 0ustar andreasandreasÞ•êl¼ð( ñ(ý( ) %)3))E)8o) ¨)´)È)Þ)ï)* *'*s9*)­*®×*ô†+{,”,°, Á, Î,ï, - -&- ?-M-g-(€-u©-d.~„.v/tz/eï/)U00†0ž0²0È0 Î0Û0ì0þ011.1'A1 i1 u1 ‚11™1¨1)¹1ã1ö1 2#222C2^2s2Š2§2"¼2"ß233-37C31{3;­3@é33*4T^4³4Ð4í455+5>5P5Y5>n5­5#Â5æ5"6%6*A6$l6‘6£6·6É6ä6707*B7&m7è”73}8/±8á8ø89%9;9S9 [9i9y9ˆ9 9 ¸9 Æ9ç9ý9: ):!J:l:ƒ:=‹:9É:?;C;Y;v;!”;)¶;(à; <$'<AL<DŽ<9Ó< = =0=E= Y= d=o==–=>Ÿ=DÞ=#>2>!C>e>v> ‡>•>¥>»>Á>Ð>â>é> û>? ? ?!? )?3? C?P?n??9˜?2Ò?!@'@9@$B@g@v@@—@ž@°@Ä@Ü@ó@A"A 'A 4A@AA-‚Aô°AŸ¥BZEC, C,ÍC úC9DUDfDvD’D ¡D ­D ¹DÄD!äDE%EKKKaKwK!“K&µK-ÜK L+L'JLrL‘L©L ¸LÅLßL óLM,M*GMrMŒM+¦MÒMëM N)N8N @NKN SNCaN1¥N2×N3 OŸ>ODÞO1#PSUP©P ÃPÎPßP#óP0QHQ(wQ, QÍQ(ÝQRR &R3RER VRcR{RšRµRÎRæRþRBS`S/€S1°SCâS+&T6RTO‰T"ÙTüTU U:UMUkU$}U"¢U"ÅU èUöU V,V-KV yV …V ’VžV¼VÖVèV÷V WW+W!=W_W sW}WW¥W ´WÂW‚ÇW^JXA©X;ëX)'YtQYÆY&ÜY/Z33ZQgZ¹ZÓZìZ[4ž[)Ó[ý[\)\'D\ l\v\ˆ\™\©\Ç\Ú\ô\] ]]:]*U]€]™]­] À] Ë]×]æ] ÿ]p ^¾~^-=_k_ˆ_—_ «_µ_ »_ È_ Õ_ã_ú_ `` .` 9`C` J`U`[`b`h` }` ˆ`#’`¶`Ç`ß` è`ö`a !a.a?aVa fa pa}a a ˜a £a ®a¹aÌa èa0òa#bunuÅŒu%Rv*xv%£vÉvãvþvw $w .wcs'|¤´Ï×ßð€ €,€#>€b€h€ w€V„€GÛ€[#É‚~IƒFȃD„(T„A}„¿„Õ„)è„…'…A…Q…"c…"†…(©…Ò…ä…÷… ††=†'Y†&†%¨†*Άù†‡ 3‡T‡%l‡’‡)±‡Û‡ú‡ˆ#0ˆ7TˆŒˆ¢ˆ¾ˆ3Ûˆ?‰&O‰&v‰‰/¼‰%ì‰1Š4DŠ)yŠ%£Š ÉŠêŠòŠ‹‹‹j+‹–‹¦‹!»‹ Ý‹ç‹ö‹ ŒŒ8&Œ _ŒjŒ(~Œ §ŒµŒÈŒÞŒñŒ +@Ogw”¯!Í)ï5Ž%OŽ$uŽ1šŽ(ÌŽõŽ,1^$wœ#·1Û' &5?\"œ+¿/ë‘+‘ 1‘ <‘ F‘^R‘J±‘Iü‘NF’Õ•’ek“MÑ“e”…” ¡”®”À”)Ø”-•0• C•0d•0••Æ•)Ù•!– %–0–B–Y–o– ƒ–+¤–Жê– — '—.H—4w—"¬—Ï—!í—J˜+Z˜A†˜;Ș.™3™O™&d™‹™&¢™É™)Û™3š39šmšš‘š) š.Êšùš›(›%7›*]›ˆ› ›½›Ò›í›œ7!œYœiœ€œ’œ©œ½œ Ùœ”äœPyFÊJž+\ž„ˆž Ÿ5+Ÿ7aŸE™Ÿ~ߟ^ ~ › µ¯ Fe¡.¬¡Û¡á¡*þ¡()¢ R¢\¢l¢„¢–¢±¢Ì¢ë¢ú¢ÿ¢$£;£4S£ˆ£¤£À£ Õ£à£ñ£¤¤Ž$¤å³¤7™¥,Ñ¥þ¥ ¦ ¦+¦=¦ L¦ Y¦g¦$ƒ¦¨¦¹¦ ˦צߦ ç¦ô¦ú¦ § §§ %§#/§S§!e§ ‡§“§¤§·§Ö§æ§ ö§¨3¨S¨m¨‰¨’¨ «¨ ·¨Ĩ%ר ý¨/©8©R©W© _©j©s© |©‡© ©*›©.Æ© õ©&ªh»ëd7<)½ÇåÌG«ÙœÎ¯c;6 µ-€>ê„Íè þý¾sÀ6ßÞ¿çÆ­'™U™ÅC:òÉ xxSô+žX·Á|œ',ÕTNâ^NúñÂfB±–ÉÐ`Ü 1"@üR“ÔpJÃ9ؘ0c»‘FÌ&‡Vƒ¨"ØR¬éÏø®‚_¿¦íCãM£F²y·Ä‹ %¢°EÓ s*Ü j2&¥×u4ó¤–æ­Q¼ÒL@¡gÔÅ¡:È=MÄŽ;$!_‰±ŸÏ E(Qq²šµ7˜=8X”é\÷Lß#I—ŠŠV[jtö³rŒ—u…´ÈáÛªwÚgmS? ^{¾2oÝ Y|Ò*-Ã$/› ‘~[‚fæ¯i¶¸n…GB©¶8êPޏ3ÿ°(AÕ©Zài)yʪ£ÛÀv›,Ç`š³3nz¦ºÓ>ÁÎÝÙ}õûã? d4Hʉ]¢pƒDÍäÞùtŒOkkÂWJ§.«ZKT¨†59vËÑ!¼®ŸwqAI{D/%•॔앓„hÖÖ0W´a†’ˆ~ÐËbK×½çe5¬ §le<ˆo.#ârb€¹èÚzl1‹å¹+äžÑ\º’¤îa}Pá ïðÆmHU]YO‡ of %d"%s" has been replaced with "%s"%d%% complete%s does not exist'%s' has been modified by another programhereFontRight MarginSpell CheckingTab StopsText Wrapping_Description:_Name:_Template:A decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.A list of encodings selected by the user.A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.A text editor for GNOME.Activated '%s' syntax colorAdd New TemplateAdd TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAll LanguagesAll Languages (BMP only)All languagesAlready on first bookmarkAlready on last bookmarkAlready on most recently bookmarked lineAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicAuthentication RequiredAuto Replace EditorAutomatic ReplacementB_oldBack_ground:Baltic languagesBaltic languaguesBookmark BrowserBookmark _LineBookmarked TextBookmarked line %dBulgarian, Macedonian, Russian, SerbianC DocumentsC# DocumentsC++ DocumentsCanadianCannot open %sCannot open fileCannot perform operation in readonly modeCannot redo actionCannot undo actionCapitalized selected textCase sensitiveCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text to lowercaseChanged selected text to uppercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Close incremental search barClose regular expression barClosed dialog windowClosed error dialogClosed goto line barClosed replace barClosed search barCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCould not open help browserCreate, modify or manage templatesCurrent document is focusedCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDamn! Unknown ErrorDanish, NorwegianDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDetach Scribes from the shell terminalDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Determines whether to show or hide the status area.Determines whether to show or hide the toolbar.Disabled spellcheckingDisabled syntax colorDisabled text wrappingDisplay right _marginDownload templates fromE_xportEdit TemplateEdit text filesEditor _font: Editor background colorEditor foreground colorEditor's fontEnable or disable spell checkingEnable text _wrappingEnabled spellcheckingEnabled text wrappingEnables or disables right marginEnables or disables text wrappingEnclosed selected textEnglishEnter the location (URI) of the file you _would like to open:Error: '%s' already in use. Please choose another string.Error: '%s' is already in use. Please use another abbreviation.Error: File not foundError: Invalid template fileError: Invalid template file.Error: Name field cannot be emptyError: Name field cannot have any spaces.Error: Name field must contain a string.Error: No selection to exportError: No template information foundError: Template editor can only have one '${cursor}' placeholder.Error: Trigger name already in use. Please use another trigger name.Error: You do not have permission to save at the locationEsperanto, MalteseExport TemplateFailed to load file.Failed to save fileFile _NameFile _TypeFile has not been saved to diskFile: File: %sFind occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound %d matchFound %d matchesFound matching bracket on line %dFree Line _AboveFree Line _BelowFreed line %dFull _Path NameGo to a specific lineGreekHTML DocumentsHaskell DocumentsHebrewHide right marginHide toolbarINSI_mportI_ndentationI_talicIcelandicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Info Error: Access has been denied to the requested file.Info Error: Information on %s cannot be retrieved.Information about the text editorInserted templateJapaneseJapanese, Korean, Simplified ChineseJava DocumentsJoined line %d to line %dKazakhKoreanLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLexical scope highlight colorLineLine number:Ln %d col %dLoad Error: Failed to access remote file for permission reasons.Load Error: Failed to close file for loading.Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to get file information for loading. Please try loading the file again.Load Error: Failed to open file for loading.Load Error: Failed to read file for loading.Load Error: File does not exist.Load Error: You do not have permission to view this file.Loaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMatch wordMenu for advanced configurationModify words for auto-replacementMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to most recently bookmarked lineNo bookmarks foundNo bookmarks found to removeNo brackets found for selectionNo documents openNo indentation selection foundNo match foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous matchNo previous match foundNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found to replaceNo text content in the clipboardNo text to select on line %dNo word to selectNoneNordic languagesOVROpen DocumentOpen DocumentsOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Open a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPair character completion occurredPasted copied textPerl DocumentsPermission Error: Access has been denied to the requested file.PortuguesePosition of marginPositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionReloading %sRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved pair character completionRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of linesRemoved spaces at end of selected linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplace found matchReplace the selected found matchReplaced '%s' with '%s'Replaced all found matchesReplaced all occurrences of "%s" with "%s"Replaced spaces with tabsReplaced tabs with spacesReplaced tabs with spaces on selected linesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsRussianS_electionS_pacesSave DocumentSave Error: Failed decode contents of file from "UTF-8" to Unicode.Save Error: Failed to close swap file for saving.Save Error: Failed to create swap file for saving.Save Error: Failed to create swap location or file.Save Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Save Error: Failed to transfer file from swap to permanent location.Save Error: Failed to write swap file for saving.Save Error: You do not have permission to modify this file or save to its location.Save password in _keyringSaved "%s"Scheme DocumentsScribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearch for text using regular expressionSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect character _encodingSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected encodingsSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedSets the margin's position within the editorSets the width of tab stops within the editorShift _LeftShift _RightShow marginShow or hide the status area.Show or hide the toolbar.Show right marginShowed toolbarSimplified ChineseSpell checkingStopped operationStopped replacingSwapped the case of selected textSyntax Color EditorTab widthTemplate EditorTemplate mode is activeText DocumentsText wrappingThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe color used to render normal text in the text editor's buffer.The color used to render the text editor buffer background.The editor's font. Must be a string valueThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.The highlight color when the cursor is around opening or closing pair characters.Toggled readonly mode offToggled readonly mode onTraditional ChineseTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.True to use tabs instead of spaces, false otherwise.Try 'scribes --help' for more informationTurkishType URI for loadingType in the text you want to replace withType in the text you want to search forUkrainianUndid last actionUndo last actionUnified ChineseUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduUse GTK theme colorsUse Tabs instead of spacesUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsVietnameseWest EuropeWestern EuropeWord completion occurredXML DocumentsYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.You do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.You do not have permission to view this file.You must log in to access %s_Abbreviations_Background color: _Bookmark_Case_Delete Line_Description_Description:_Enable spell checking_Find Matching Bracket_Foreground:_Highlight Mode_Join Line_Language_Lines_Lowercase_Name_Name:_Next_Normal text color: _Password:_Previous_Remember password for this session_Remove Bookmark_Remove Trailing Spaces_Replace_Replacements_Reset to Default_Right margin position: _Search for:_Search for: _Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Template:_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscompletedcreate a new file and open the file with Scribesdisplay this help screenerrorgtk-addgtk-cancelgtk-editgtk-helpgtk-removegtk-saveloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: Scribes 0.2.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2007-05-07 01:52-0300 PO-Revision-Date: 2007-05-07 02:04-0300 Last-Translator: Leonardo Ferreira Fontenelle Language-Team: Brazilian Portuguese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); de %d"%s" foi substituído por "%s"%d%% completo%s não existe"%s" foi midificado por outro programadaquiFonteMargem DireitaVerificação OrtográgicaParadas de tabulaçãoQuebra de Texto_Descrição:_Nome:_Modelo:Ocorreu um erro de decodificação ao salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.Uma lista de codificações selecionada pelo usuário.Ocorreu um erro de gravação. Não foi possível transferir o documento de sua localização temporária. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.Uma operação de gravação falhou. Não foi possível criar área de troca. Certifique-se de ter permissão para salvar em sua pasta pessoal. Verifique também de ter espaço em disco. O recurso de salvar automaticamente será desativado até que o arquivo seja salvado sem erros.Um editor de texto para o GNOME.Cor da sintaxe "%s" ativadaAdicionar ModeloAdicionar ModeloAdicionar ou Remover CodificaçãoAdicionar ou Remover Codificação...Todos os DocumentosTodas as línguasTodas as línguas (apenas BMP)Todas as línguasCursor já no primeiro marcadorCursor já no último marcadorCursor já está no marcador mais recenteOcorreu um erro de codificação ao salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.Ocorreu um erro ao abrir esse arquivo. Por favor, envie um relatório de erro através de http://openusability.org/forum/?group_id=141Ocorreu um erro ao criar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.Surgiu um erro ao codificar o seu documento. Por favor, envie um relatório de erro através de "http://openusability.org/forum/?group_id=141"Ocorreu um erro ao codificar o seu documento. Tente salvar seu documento usando outra codificação, de preferência UTF-8.Ocorreu um erro ao abrir esse documento. Por favor, envie um relatório de erro através de http://scribes.sourceforge.netSurgiu um erro ao salvar esse documento.ÃrabeAutenticação NecessáriaEditor de Substituição AutomáticaSubstituição Automática_NegritoPlano de _fundo:Línguas bálticasLínguas bálticasNavegador dos MarcadoresMarcar _LinhaTexto MarcadoLinha %d marcadaBúlgaro, Macedoniano, Russo, SérvioDocumentos CDocumentos C#Documentos C++CanadenseImpossível abrir %sNão foi possível abrir o arquivoImpossível realizar operação em modo somente leituraImpossível refazer açãoImpossível desfazer açãoTexto alternado para caixa altaDif. maiúsc./minúsc.Língas célticasEuropa Central e OrientalMudar as cores do editorMudar configurações do editorAltera o nome do arquivo e o salvaFonte alterada para "%s"Seleção de texto alterada de maiúsculas para maiúsculasSeleção de texto alterada minúsculas para maiúsculasLargura de tabulação alterada para %dCodificaçãoC_odificação: Escolhe a cor do plano de fundo do editorEscolhe a cor do texto do editorEscolhe a cor do elemento da sintaxe da linguagemEspecifica família, estilo e tamanho de fonte usados no texto.Especifica a localização da linha vertical.Especifica a largura do espaço inserido quando você pressiona a tecla Tab.Fechar barra de pesquisa incrementalFechar barra de expressão regularJanela de diálogo fechadaDiálogo de erro fechadoBarra "ir para linha" fechadaBarra "substituir" fechadaBarra "pesquisar" fechada_Cor: Configura o editorConfigurar as cores de primeiro plano, plano de fundo ou destaque de sintaxeTexto copiadoNão foi possível encontrar o diretório de dados do ScribesNão foi possível abrir o navegador da ajudaCriar, modificar ou gerenciar modelosDocumento atual já focadoO cursor já está no começo da linhaO cursor já está no fim da linhaTexto cortadoDroga! Erro desconhecidoDinamarquês, NorueguêsExcluir do Cursor até o _Fim da LinhaExcluir do Cursor até o _Começo da LinhaLinha %d excluídaTexto excluído do cursor até o começo da linha %dTexto removido do cursor até o fim da linha %dDestaca o Scribes do terminalUsar ou não cores do tema GTK no primeiro plano e no plano de fundo do editor de texto. Se o valor for verdadeiro, as cores do tema GTK serão usadas; se não, as cores determinadas pelo usuário.Mostrar ou ocultar a área de estado.Mostrar ou ocultar a barra de ferramentas.Verificação ortográfica desativadaCor da sintaxe desativadaQuebra de texto desativadaExibir _margem direitaBaixar modelosE_xportarEditar ModeloEdite documentos de texto_Corpo de texto: Cor do plano de fundo do editorCor de primeiro plano do editorFonte do editorAtiva ou desativa a verificação ortográfica_Quebrar texto automaticamenteVerificação ortográfica ativadaQuebra de texto ativadaAtiva ou desativa a margem direitaAtiva ou desativa quebra de textoTexto incluído em parêntesesInglêsDigite a localização (URI) do arquivo que você gostaria de abrir:Erro: "%s" já em uso. Por favor, escolha outra expressão.Erro: "%s" já está sendo usada. Por favor, utilize outra abreviação.Erro: Arquivo não localizadoErro: Arquivo de modelo inválidoErro: Arquivo de modelos inválido.Erro: O campo nome não pode ficar vazioErro: Campo Nome não pode conter espaço.Erro: Campo nome deve conter uma expressão.Erro: Nenhuma seleção para exportarErro: Não foram encontradas informações sobre o modeloErro: Editor de modelos pode conter apenas um espaço reservado "${cursor}".Erro: O nome do gatilho já está sendo usado. Por favor, use outro nome.Erro: Você não tem permissão para salvar na localizaçãoEsperando, MaltêsExporta o ModeloNão foi possível carregar o arquivo %sNão foi possível salvar arquivo_Nome de Arquivo_Tipo de ArquivoO documento não foi salvado em discoDocumento: Arquivo: %sProcurar ocorrências da expressão coincidindo com palavra inteiraProcurar ocorrências da expressão diferenciando maiúsculas/minúsculas%d ocorrência encontrada%d ocorrências encontradasParêntese correspondente encontrado na linha %dAbrir Linha _AcimaAbrir Linha A_baixoLinha %d apagada_Caminho CompletoVai até uma determinada linhaGregoDocumentos HTMLDocumentos HaskellJudaico Margem direita escondidaOcultar barra de ferramentasINSI_mportarRec_uo_ItálicoIslandêsImporta o Modelo_IncrementalPesquisa enquanto digitaLinha %d recuadaFazendo recuos, por favor aguarde...Erro de Informação: Acesso negado ao arquivo solicitado.Erro de Informação: Não foi possível recuperar informações de %s.Informação sobre o editor de textoModelo inseridoJaponêsJaponês, Coreano, Chinês SimplificadoDocumentos JavaLinha %d unida à linha %dCazaqueCoreanoModo de destaqueLíngua e RegiãoLança o navegador da ajudaObtendo ajudaDeixar Tela CheiaCor para destaque de escopo léxicoLinhaLinha número:Li %d col %dErro ao Carregar: Não foi possível acessar arquivo remoto por motivos de permissão.Erro ao Carregar: Não foi possível fechar o arquivo para carregá-lo.Erro ao Carregar: Não foi possível decodificar o arquivo para carregá-lo. O arquivo que você está carregando pode não ser um arquivo de texto. Se você tiver certeza de que o mesmo seja um arquivo de texto, tente abrir o arquivo com a codificação correta através do diálogo Abrir Arquivo. Pressione (Control - o) para mostrar o diálogo.Erro ao Carregar: Não foi possível codificar o arquivo para carregá-lo. Tente abri-lo com a codificação correta através do diálogo Abrir Arquivo. Pressione (Control - o) para mostrar o diálogo.Erro ao Carregar: Não foi possível obter informações do arquivo para carregamento. Por favor, tente carregá-lo novamente.Erro ao Carregar: Não foi possível abrir o arquivo para carregá-lo.Erro ao Carregar: Não foi possível ler o arquivo para carregá-lo.Erro ao Carregar: O arquivo não existe.Erro ao Carrgar: Você não tem permissão para ver este arquivo.Documento "%s" abertoCarregando "%s"...Abrindo o documento, por favor aguarde...Ocorrência %d de %dCoinc. _maiúsc./minúsc._Coinc. palavraCoincidir palavraMenu para configuração avançadaSubstitua palavras automaticamenteMove o cursor para uma determinada linhaÚltim_o Marcador_Primeiro MarcadorPró_ximo MarcadorMarcador A_nteriorMover cursor para linha marcadaCursor movido para linha %dCursor movido para marcador da linha %dCursor movido para o primeiro marcadorCursor movido para o último marcadorCursor movido para o marcador mais recenteNenhum marcador encontradoNão há marcador para removerNão há parêntese para removerNenhum documento abertoNenhuma seleção de recuo encontradaNenhuma ocorrência encontradaParêntese correspondente não encontradoNão há mais linhas para unirNão há marcador seguirNenhuma ocorrência a seguirNão há parágrafo para selecionarVocê não tem permissão para modificar este documentoNão marcador prévioNenhuma ocorrência préviaNenhuma ocorrência anteriorNão há recuo para desfazer nas linha selecionadasNão há texto selecionado para alterar maiúsculas/minúsculasNão há texto selecionado para copiarNão há texto selecionado para cortarNão há frase para selecionarNenhum espaço encontrado para ser substituídoNão há espaços no começo da linhaNão foram encontrados espaços no fim das linhasNenhuma tabulação encontrada para ser substituídaNão há texto na área de transferênciaSem texto para selecionar na linha %dNão há palavra para selecionarNenhumaLínguas nórdicasSEAbrir DocumentoDocumentos AbertosErro ao Abrir: Ocorreu um erro ao abrir o arquivo. Tente abri-lo novamente ou faça um relatório de erro.Abre um arquivoAbre uma nova janelaAbre arquivos usados recentementeOpções:Documentos PHPParêntese fechadoTexto coladoDocumentos PerlErro de Permissão: Acesso negado ao arquivo solicitado.PortuguêsPosição da margemLinha de margem posicionada na coluna %dPreferênciasImprimir DocumentoVisualizar ImpressãoImprimir documentoImprime o arquivo atualImprimindo "%s"Documentos PythonUTF-8 (recommendado)Ação refeitaRefaz a ação desfeitaRecarregando %sRemover _Todos os MarcadoresTodos marcadores removidosMarcador removido da linha %dFechamento de parêntese removidoEspaços removidos do começo da linha %dEspaços removidos do começo das linhas selecionadasEspaços removidos ao fim da linha %dEspaços removidos ao fim das linhasEspaços removidos do fim das linhas selecionadasRemovendo espaços, por favor aguarde...Renomeia o arquivo atualS_ubstituir por:Substituir _TodasSubstituir todas as ocorrências encontradasOcorrência substituídaSubstituir a ocorrência selecionada"%s" substituído por "%s"Todas as ocorrências substituídasTodas ocorrências de "%s" substituídas por "%s"Espaços substituídos por tabulaçõesTabulações subtituídas por espaçosTabulações substituídas por espaços nas linhas selecionadasSubstituindo, por favor aguarde...Substituindo espaços, por favor aguarde...Substituindo tabulações, por favor aguarde...Documentos RubyRussoSe_leção_EspaçosSalvar ComoErro ao Salvar: Não foi possível decodificar o conteúdo do arquivo de "UTF-8" para Unicode.Erro ao Salvar: Não foi possível fechar arquivo temporário para salvar.Erro ao Salvar: Não foi possível criar arquivo temporário para salvar.Erro ao Salvar: Não foi possível criar localização ou arquivo temporário.Erro ao Salvar: Não foi possível codificar o conteúdo do arquivo. Certifique-se de que a codificação do arquivo esteja configurada adequadamente no diálogo Salvar Arquivo. Pressione (Ctrl - s_ para exibi-lo.Erro ao Salvar: Não foi possível transferir arquivo da localização temporária para a permanente.Erro ao Salvar: Não foi possível gravar no arquivo temporário para salvar.Erro ao Salvar: Você não tem permissão para modificar este arquivo ou salvar em sua localização.Salvar a senha no c_haveiro"%s" salvadoDocumentos SchemeEditor de Texto ScribesScribes é um editor de texto para GNOME.Scribes só dá suporte a uma opção por vezScribes versão %sPesquisa por texto e o substituiPesquisa pela próxima ocorrência da expressãoPesquisa pela ocorrência anterior da expressãoPesquisa por textoPesquisar texto usando expressão regularPesquisando, por favor aguarde...SelecionarSelecionar _LinhaSelecionar Pa_rágrafoSelecionar _SentençaSelecionar _PalavraSelecionar Cor do Plano de FundoSelecionar Cor do Plano de Fundo da SintaxeSelecionar _codificaçãoSelecione documento a focarSeleciona o arquivo a ser abertoSelecionar Cor do Primeiro PlanoSelecionar Cor do do Primeiro Plano da SintaxeExibe uma linha vertical indicando a margem direita.Ativa a verificação ortográficaNegrita o elemento de sintaxeItaliciza o elemento de linguagemReverte o elemento da sintaxe da linguagem para sua configuração padrãoSublinha o elemento da sintaxe da linguagemUsa as cores do tema padrão para primeiro plano e plano de fundoQuebra a linha quando o texto alcançar o limite da janela.Caracteres selecionados dentro dos parêntesesCodificações selecionadasLinha %d selecionadaPróximo espaço reservado selecionadoParágrafo selecionadoEspaço reservado anterior selecionadoFrase selecionadaTexto selecionado já está em caixa altaO texto selecionado já está em letras minúsculasO texto selecionado já está em letras maiúsculasPalavra selecionadaRecuo realizadoRecuo desfeitoConfigura a posição da margem no editorConfigura a largura das tabulações no editorRecuar para a _EsquerdaRecuar para a _DireitaMostrar margemMostrar ou ocultar a área de estado.Mostrar ou ocultar a barra de ferramentas.Margem direita mostradaBarra de ferramentas exibidaChinês SimplificadoVerificação ortográficaOperação interrompidaSubstituição interrompidaMaiúsculas/minúsculas alternadas no texto selecionadoEditor de CoresLargura da tabulaçãoEditor de ModelosModo de modelo ativadoDocumentos de TextoQuebra automática de textoTailandêsNão foi possível determinar o tipo de arquivo que você está tentando abrir. Certifique-se de que seja um arquivo de texto. Tipo MIME: %sO arquivo que você está tentando abrir não é de texto. Tipo MIME: %sA cor usada para renderizar texto normal no buffer to editor de texto.A cor usada para renderizar o plano de fundo do buffer do editor de texto.A fonte do editor. Precisa ser uma "string"A codificação do arquivo que você está tentando abrir não pôde ser reconhecida. Tente abrir o arquivo com outra codificação.O documento "%s" está abertoO documento "%s" está aberto em modo somente leituraO documento que você está tentando abrir não existe.O arquivo que você está tentando abrir não é um arquivo de texto.A cor de seleção usada quando o cursor está ao redor de caracteres abrindo ou fechando parênteses, colchetes, chaves etc..Modo somente leitura desativadoModo somente leitura ativadoChinês TradicionalVerdadeiro para destacar o Scribes do terminal e executá-lo em seu próprio processo, senão falso. Para propósitos de depuração, pode ser útil definir esta opção para falso.Verdadeiro para usar tabulações ao invés de falso; falso para não.Tente "scribes --help" para mais informaçõesTurcoDigite a URI a ser carregadaDigite o texto pelo qual deseja substituirDigite o texto pelo qual deseja pesquisaUcranianoAção desfeitaDesfaz a última açãoChinês UnificadoImpossível desfazer recuoRecuo desfeito na linha %dOpção não reconhecida: "%s"Documento NovoUrduUsar cores do tema GTKUsar tabulações em vez de espaçosUsar espaço para recuoUsar espaço ao invés de tabulação recuar o textoUsar tabulação para recuoUsando cores personalizadasUsando cores do temaVietnamitaEuropa OcidentalEuropa OcidentalPalavra completadaDocumentos XMLVocê não tem permissão para salvar o arquivo. O recurso de salvar automaticamente será desativado até que o arquivo seja salvo sem erros.Você não tem permissão para salvar o arquivo. Tente salvá-lo em sua Ãrea de Trabalho, ou para outra pasta que você possua. O recurso de salvar automaticamente permanecerá desativado até que o arquivo seja salvo sem erros.Você não tem permissão para leitura deste documento.Você precisa identificar-se para acessar %sA_breviações_Plano de fundo: _MarcadoresM_aiusculizaçãoE_xcluir Linha_Descrição_Descrição:_Verificação ortográficaLocalizar _Parêntese Correspondente_Primeiro plano:Modo de _Destaque_Unir Linha_Idioma_LinhasMi_núsculas_Nome_Nome:Pró_ximoCorpo de _texto: _Senha:A_nterior_Lembrar senha durante essa sessão_Remover Marcador_Remover Espaços ao Fim da Linha_Substituir_Substituições_Restaurar Padrão_Posição da margem direita: _Pesquisar por:Pesquisar por: _Mostrar Navegador de Marcadores_Espaços para Tabulações_Trocar Minúsculas/Maiúsculas_Largura da tabulação: _Tabulações para Espaços_Modelo:_Iniciais em Maiúsculas_Sublinhado_Maiúsculas_Usar tema padrão_Usar espaços em vez de tabulaçõescompletadocriar um documento novo e abri-lo com o Scribesexibir essa tela de ajudaerrogtk-addgtk-cancelgtk-editgtk-helpgtk-removegtk-saveabrindo...abrir um documento em modo somente leituraexibir informação sobre a versão do Scribesscribes: %s não leva argumentosuso: scribes [OPÇÃO] [ARQUIVO] [...]scribes-0.4~r910/po/sv.po0000644000175000017500000021422511242100540015036 0ustar andreasandreas# Swedish translation for scribes. # Copyright (C) 2007 Free Software Foundation, Inc. # This file is distributed under the same license as the scribes package. # Daniel Nylander , 2007. # msgid "" msgstr "" "Project-Id-Version: scribes\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-05-13 21:38+0200\n" "PO-Revision-Date: 2007-05-20 20:48+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. .decode(encoding).encode("utf-8") #: ../data/scribes.desktop.in.h:1 #: ../SCRIBES/internationalization.py:321 msgid "Edit text files" msgstr "Redigera textfiler" #. .decode(encoding).encode("utf-8") #. From scribes.desktop #: ../data/scribes.desktop.in.h:2 #: ../SCRIBES/internationalization.py:320 msgid "Scribes Text Editor" msgstr "Textredigeraren Scribes" #: ../data/scribes.schemas.in.h:1 msgid "A list of encodings selected by the user." msgstr "En lista över kodningar valda av användaren." #: ../data/scribes.schemas.in.h:2 msgid "Case sensitive" msgstr "Skiftlägeskänslig" #: ../data/scribes.schemas.in.h:3 msgid "Detach Scribes from the shell terminal" msgstr "Koppla loss Scribes frÃ¥n skalterminalen" #: ../data/scribes.schemas.in.h:4 msgid "Determines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user." msgstr "" #: ../data/scribes.schemas.in.h:5 msgid "Determines whether to show or hide the status area." msgstr "Bestämmer huruvida statusrutan ska visas eller döljas." #: ../data/scribes.schemas.in.h:6 msgid "Determines whether to show or hide the toolbar." msgstr "Fastställer huruvida verktygsraden ska visas eller döljas." #: ../data/scribes.schemas.in.h:7 msgid "Editor background color" msgstr "Bakgrundsfärg för redigeraren" #: ../data/scribes.schemas.in.h:8 msgid "Editor foreground color" msgstr "Förgrundsfärg för redigeraren" #: ../data/scribes.schemas.in.h:9 msgid "Editor's font" msgstr "Typsnitt för redigeraren" #: ../data/scribes.schemas.in.h:10 msgid "Enable or disable spell checking" msgstr "Aktivera eller inaktivera stavningskontroll" #: ../data/scribes.schemas.in.h:11 msgid "Enables or disables right margin" msgstr "Aktiverar eller inaktiverar högermarginalen" #: ../data/scribes.schemas.in.h:12 msgid "Enables or disables text wrapping" msgstr "Aktiverar eller inaktiverar radbrytning" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:13 #: ../SCRIBES/internationalization.py:138 msgid "Find occurrences of the string that match the entire word only" msgstr "Hitta förekomster av strängen som endast matchar hela ordet" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:14 #: ../SCRIBES/internationalization.py:136 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "Hitta förekomster av strängen som endast matchar angivna versaler och gemener" #: ../data/scribes.schemas.in.h:15 msgid "Lexical scope highlight color" msgstr "" #: ../data/scribes.schemas.in.h:16 msgid "Match word" msgstr "Matcha hela ord" #: ../data/scribes.schemas.in.h:17 msgid "Position of margin" msgstr "Marginalens position" #: ../data/scribes.schemas.in.h:18 msgid "Selected encodings" msgstr "Valda kodningar" #: ../data/scribes.schemas.in.h:19 msgid "Sets the margin's position within the editor" msgstr "Ställer in marginalens position i redigeraren" #: ../data/scribes.schemas.in.h:20 msgid "Sets the width of tab stops within the editor" msgstr "Ställer in bredden pÃ¥ tabulatorstopp i redigeraren" #: ../data/scribes.schemas.in.h:21 msgid "Show margin" msgstr "Visa marginal" #: ../data/scribes.schemas.in.h:22 msgid "Show or hide the status area." msgstr "Visa eller dölj statusrutan." #: ../data/scribes.schemas.in.h:23 msgid "Show or hide the toolbar." msgstr "Visa eller dölj verktygsraden." #: ../data/scribes.schemas.in.h:24 msgid "Spell checking" msgstr "Stavningskontroll" #: ../data/scribes.schemas.in.h:25 msgid "Tab width" msgstr "Tabulatorbredd" #: ../data/scribes.schemas.in.h:26 msgid "Text wrapping" msgstr "Radbrytning" #: ../data/scribes.schemas.in.h:27 msgid "The color used to render normal text in the text editor's buffer." msgstr "Färgen som används för att rita normal text i textredigerarens buffert." # Skum engelska? #: ../data/scribes.schemas.in.h:28 msgid "The color used to render the text editor buffer background." msgstr "Färgen som används för att rita textredigerarens buffertbakgrund." #: ../data/scribes.schemas.in.h:29 msgid "The editor's font. Must be a string value" msgstr "Redigerarens typsnitt. MÃ¥ste vara ett strängvärde" #: ../data/scribes.schemas.in.h:30 msgid "The highlight color when the cursor is around opening or closing pair characters." msgstr "" #: ../data/scribes.schemas.in.h:31 msgid "True to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false." msgstr "" #: ../data/scribes.schemas.in.h:32 msgid "True to use tabs instead of spaces, false otherwise." msgstr "Sant för att använda tabulatorer istället för blanksteg, falskt om inte." #: ../data/scribes.schemas.in.h:33 msgid "Use GTK theme colors" msgstr "Använd GTK-temafärger" #: ../data/scribes.schemas.in.h:34 msgid "Use Tabs instead of spaces" msgstr "Använd tabulatorer istället för blanksteg" #. From module accelerators.py #: ../SCRIBES/internationalization.py:41 #: ../plugins/UndoRedo/i18n.py:27 msgid "Cannot redo action" msgstr "Kan inte gör om Ã¥tgärden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:44 msgid "Leave Fullscreen" msgstr "Lämna helskärmsläge" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py, fileloader.py, timeout.py #: ../SCRIBES/internationalization.py:47 #: ../plugins/SaveDialog/i18n.py:25 msgid "Unsaved Document" msgstr "Osparat dokument" #. .decode(encoding).encode("utf-8") #. From module filechooser.py #: ../SCRIBES/internationalization.py:51 msgid "All Documents" msgstr "Alla dokument" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:52 msgid "Python Documents" msgstr "Python-dokument" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:53 msgid "Text Documents" msgstr "Textdokument" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:56 #, python-format msgid "Loaded file \"%s\"" msgstr "Läste in filen \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:57 msgid "The encoding of the file you are trying to open could not be determined. Try opening the file with another encoding." msgstr "Kodningen för filen som du försöker att öppna kunde inte fastställas. Prova att öppna filen med en annan kodning." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:59 msgid "Loading file please wait..." msgstr "Läser in filen, vänta..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:60 msgid "An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.net" msgstr "Ett fel inträffade vid öppnandet av filen. Skicka in en felrapport pÃ¥ http://scribes.sourceforge.net" #. .decode(encoding).encode("utf-8") #. From module fileloader.py, savechooser.py #: ../SCRIBES/internationalization.py:64 msgid " " msgstr " " #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:67 msgid "You do not have permission to view this file." msgstr "Du har inte behörighet att visa den här filen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:68 msgid "The file you are trying to open is not a text file." msgstr "Filen som du försöker att öppna är inte en textfil." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:69 msgid "The file you are trying to open does not exist." msgstr "Filen som du försöker att öppna finns inte." #. .decode(encoding).encode("utf-8") #. From module main.py #: ../SCRIBES/internationalization.py:72 #, python-format msgid "Unrecognized option: '%s'" msgstr "Okänd flagga: \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:73 msgid "Try 'scribes --help' for more information" msgstr "Prova \"scribes --help\" för mer information" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:74 msgid "Scribes only supports using one option at a time" msgstr "Scribes har endast stöd för en flagga Ã¥t gÃ¥ngen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:75 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s tar inga argument" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:76 #, python-format msgid "Scribes version %s" msgstr "Scribes version %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:77 #, python-format msgid "%s does not exist" msgstr "%s finns inte" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:80 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "Filen \"%s\" är öppnad i skrivskyddat läge" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:81 #, python-format msgid "The file \"%s\" is open" msgstr "Filen \"%s\" är öppnad" #. .decode(encoding).encode("utf-8") #. From modules findbar.py #: ../SCRIBES/internationalization.py:84 #, python-format msgid "Found %d match" msgstr "Hittade %d sökträffar" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:85 msgid "_Search for: " msgstr "_Sök efter: " #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:89 msgid "No indentation selection found" msgstr "Ingen indenteringsmarkering hittades" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:90 #: ../plugins/Indent/i18n.py:25 msgid "Selection indented" msgstr "Markeringen indenterades" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:91 #: ../plugins/Indent/i18n.py:27 msgid "Unindentation is not possible" msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:92 #: ../plugins/Indent/i18n.py:28 msgid "Selection unindented" msgstr "" #. .decode(encoding).encode("utf-8") #. From module modes.py #: ../SCRIBES/internationalization.py:95 msgid "loading..." msgstr "läser in..." #. .decode(encoding).encode("utf-8") #. From module preferences.py #. From module replace.py #: ../SCRIBES/internationalization.py:100 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" har ersatts med \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:101 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Ersatte alla förekomster av \"%s\" med \"%s\"" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:104 msgid "An error occurred while saving this file." msgstr "Ett fel inträffade vid sparandet av den här filen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:105 msgid "An error occurred while decoding your file. Please file a bug report at \"http://openusability.org/forum/?group_id=141\"" msgstr "Ett fel inträffade vid avkodning av din fil. Skicka in en felrapport pÃ¥ \"http://openusability.org/forum/?group_id=141\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:107 #, python-format msgid "Saved \"%s\"" msgstr "Sparade \"%s\"" #. .decode(encoding).encode("utf-8") #. From module textview.py #: ../SCRIBES/internationalization.py:110 msgid "_Find Matching Bracket" msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:111 msgid "Copied selected text" msgstr "Kopierade markerad text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:112 msgid "No selection to copy" msgstr "Ingen markering att kopiera" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:113 msgid "Cut selected text" msgstr "Klipp ut markerad text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:114 msgid "No selection to cut" msgstr "Ingen markering att klippa ut" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:115 msgid "Pasted copied text" msgstr "Klistrade in kopierad text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:116 msgid "No text content in the clipboard" msgstr "Inget textinnehÃ¥ll i urklipp" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:119 #, python-format msgid "%d%% complete" msgstr "%d%% färdig" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:120 msgid "completed" msgstr "färdig" #. .decode(encoding).encode("utf-8") #. From module tooltips.py #: ../SCRIBES/internationalization.py:123 msgid "Open a new window" msgstr "Öppna ett nytt fönster" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:124 msgid "Open a file" msgstr "Öppna en fil" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:125 msgid "Rename the current file" msgstr "Byt namn pÃ¥ aktuell fil" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:126 msgid "Print the current file" msgstr "Skriv ut aktuell fil" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:127 msgid "Undo last action" msgstr "Ã…ngra senaste Ã¥tgärden" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:128 msgid "Redo undone action" msgstr "Gör om Ã¥ngrad Ã¥tgärd" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:129 #: ../plugins/IncrementalBar/i18n.py:28 #: ../plugins/FindBar/i18n.py:28 #: ../plugins/ReplaceBar/i18n.py:28 msgid "Search for text" msgstr "Sök efter text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:130 #: ../plugins/ReplaceBar/i18n.py:31 msgid "Search for and replace text" msgstr "Sök och ersätt text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:131 msgid "Go to a specific line" msgstr "GÃ¥ till en specifik rad" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:132 msgid "Configure the editor" msgstr "Konfigurera redigeraren" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:133 msgid "Launch the help browser" msgstr "Starta hjälpvisaren" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:134 msgid "Search for previous occurrence of the string" msgstr "Sök efter föregÃ¥ende förekomst av strängen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:135 msgid "Search for next occurrence of the string" msgstr "Sök efter nästa förekomst av strängen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:139 msgid "Type in the text you want to search for" msgstr "Ange texten som du vill söka efter" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:140 msgid "Type in the text you want to replace with" msgstr "Ange texten som du vill ersätta med" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:141 msgid "Replace the selected found match" msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:142 msgid "Replace all found matches" msgstr "Ersätt alla sökträffar" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:143 msgid "Click to specify the font type, style, and size to use for text." msgstr "Klicka för att ange typsnittstypen, stil och storlek att använda för text." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:144 msgid "Click to specify the width of the space that is inserted when you press the Tab key." msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:146 msgid "Select to wrap text onto the next line when you reach the text window boundary." msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:148 msgid "Select to display a vertical line that indicates the right margin." msgstr "Välj för att visa en vertikal linje som indikerar högermarginalen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:150 msgid "Click to specify the location of the vertical line." msgstr "Klicka för att ange platsen för den vertikala linjen." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:151 msgid "Select to enable spell checking" msgstr "Aktivera stavningskontrollen" #. .decode(encoding).encode("utf-8") #. From module usage.py #: ../SCRIBES/internationalization.py:155 msgid "A text editor for GNOME." msgstr "En textredigerare för GNOME." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:156 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "användning: scribes [FLAGGA] [FIL] [...]" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:157 msgid "Options:" msgstr "Flaggor:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:158 msgid "display this help screen" msgstr "visa den här hjälpskärmen" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:159 msgid "output version information of Scribes" msgstr "skriv ut versionsinformation för Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:160 msgid "create a new file and open the file with Scribes" msgstr "skapa en ny fil och öppna filen med Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:161 msgid "open file in readonly mode" msgstr "öppna filen i skrivskyddat läge" #. .decode(encoding).encode("utf-8") #. From module utility.py #: ../SCRIBES/internationalization.py:164 msgid "Could not find Scribes' data folder" msgstr "Kunde inte hitta Scribes datamapp" #. .decode(encoding).encode("utf-8") #. From preferences.py #. From error.py #: ../SCRIBES/internationalization.py:170 msgid "error" msgstr "fel" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:173 #, python-format msgid "Removed spaces at end of line %d" msgstr "Tog bort blanksteg pÃ¥ slutet av rad %d" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:176 msgid "No spaces were found at beginning of line" msgstr "Inga blanksteg hittades i början av rad" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:177 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Tog bort blanksteg frÃ¥n början av rad %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:178 msgid "Removed spaces at beginning of selected lines" msgstr "Tog bort blanksteg frÃ¥n början av markerade rader" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:179 msgid "Removed spaces at end of selected lines" msgstr "Tog bort blanksteg pÃ¥ slutet av markerade rader" #. .decode(encoding).encode("utf-8") #. From module actions.py #: ../SCRIBES/internationalization.py:182 #: ../plugins/Indent/i18n.py:23 #: ../plugins/Selection/i18n.py:23 #: ../plugins/Lines/i18n.py:23 #: ../plugins/SaveFile/i18n.py:23 #: ../plugins/UndoRedo/i18n.py:23 #: ../plugins/Spaces/i18n.py:23 msgid "Cannot perform operation in readonly mode" msgstr "Kan inte genomföra Ã¥tgärden i skrivskyddat läge" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:185 #: ../plugins/Indent/i18n.py:29 #, python-format msgid "Unindented line %d" msgstr "Avindenterade rad %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:186 msgid "No selected lines can be indented" msgstr "Inga av de markerade raderna kan indenteras" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:189 msgid "An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8." msgstr "Ett fel inträffade vid kodning av din fil. Prova att spara din fil med en annan teckenkodning, föredragsvis UTF-8." #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:193 msgid "An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141" msgstr "Ett kodningsfel inträffade. Skicka in en felrapport pÃ¥ http://openusability.org/forum/?group_id=141" #. .decode(encoding).encode("utf-8") #. From autocomplete.py #: ../SCRIBES/internationalization.py:198 #: ../plugins/WordCompletionGUI/i18n.py:3 msgid "Word completion occurred" msgstr "" #. .decode(encoding).encode("utf-8") #. From encoding.py #: ../SCRIBES/internationalization.py:201 msgid "Character _Encoding: " msgstr "Tecken_kodning: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:202 msgid "Add or Remove Encoding ..." msgstr "Lägg till eller ta bort kodning ..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:203 msgid "Recommended (UTF-8)" msgstr "Rekommenderad (UTF-8)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:204 msgid "Add or Remove Character Encoding" msgstr "Lägg till eller ta bort teckenkodning" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:205 msgid "Language and Region" msgstr "SprÃ¥k och region" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:206 msgid "Character Encoding" msgstr "Teckenkodning" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:207 msgid "Select" msgstr "Välj" #. .decode(encoding).encode("utf-8") #. From filechooser.py, savechooser.py #: ../SCRIBES/internationalization.py:210 msgid "Select character _encoding" msgstr "Välj tecken_kodning" #. .decode(encoding).encode("utf-8") #. From filechooser.py #: ../SCRIBES/internationalization.py:213 msgid "Closed dialog window" msgstr "Stängde dialogfönster" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:216 #, python-format msgid "Cannot open %s" msgstr "Kan inte öppna %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:217 msgid "Closed error dialog" msgstr "Stängde feldialog" #. .decode(encoding).encode("utf-8") #. From fileloader.py #: ../SCRIBES/internationalization.py:220 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "MIME-typen för filen som du försöker att öppna kunde inte fastställas. Kontrollera att filen är en textfil.\n" "\n" "MIME-typ: %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:222 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "MIME-typen för filen som du försöker att öppna är inte för en textfil.\n" "\n" "MIME-typ: %s" #. .decode(encoding).encode("utf-8") #. From printing.py #: ../SCRIBES/internationalization.py:226 #, python-format msgid "Printing \"%s\"" msgstr "Skriver ut \"%s\"" #. .decode(encoding).encode("utf-8") #. From encoding.py #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:229 #: ../SCRIBES/internationalization.py:232 #: ../SCRIBES/internationalization.py:234 msgid "English" msgstr "Engelska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:230 #: ../SCRIBES/internationalization.py:231 #: ../SCRIBES/internationalization.py:255 msgid "Traditional Chinese" msgstr "Traditionell kinesiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:233 #: ../SCRIBES/internationalization.py:241 #: ../SCRIBES/internationalization.py:245 #: ../SCRIBES/internationalization.py:264 #: ../SCRIBES/internationalization.py:290 msgid "Hebrew" msgstr "Hebreiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:235 #: ../SCRIBES/internationalization.py:238 #: ../SCRIBES/internationalization.py:258 #: ../SCRIBES/internationalization.py:261 #: ../SCRIBES/internationalization.py:295 #: ../SCRIBES/internationalization.py:303 msgid "Western Europe" msgstr "Västra Europa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:236 #: ../SCRIBES/internationalization.py:250 #: ../SCRIBES/internationalization.py:252 #: ../SCRIBES/internationalization.py:262 #: ../SCRIBES/internationalization.py:289 #: ../SCRIBES/internationalization.py:300 msgid "Greek" msgstr "Grekiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:237 #: ../SCRIBES/internationalization.py:266 #: ../SCRIBES/internationalization.py:293 msgid "Baltic languages" msgstr "Baltiska sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:239 #: ../SCRIBES/internationalization.py:259 #: ../SCRIBES/internationalization.py:284 #: ../SCRIBES/internationalization.py:302 msgid "Central and Eastern Europe" msgstr "Centrala och Östeuropa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:240 #: ../SCRIBES/internationalization.py:260 #: ../SCRIBES/internationalization.py:287 #: ../SCRIBES/internationalization.py:299 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgariska, makedonska, ryska, serbiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:242 #: ../SCRIBES/internationalization.py:257 #: ../SCRIBES/internationalization.py:263 #: ../SCRIBES/internationalization.py:291 #: ../SCRIBES/internationalization.py:304 msgid "Turkish" msgstr "Turkiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:243 msgid "Portuguese" msgstr "Portugisiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:244 #: ../SCRIBES/internationalization.py:301 msgid "Icelandic" msgstr "Isländska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:246 msgid "Canadian" msgstr "Kanadensiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:247 #: ../SCRIBES/internationalization.py:265 #: ../SCRIBES/internationalization.py:288 msgid "Arabic" msgstr "Arabiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:248 msgid "Danish, Norwegian" msgstr "Danska, norska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:249 #: ../SCRIBES/internationalization.py:297 msgid "Russian" msgstr "Ryska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:251 msgid "Thai" msgstr "Thai" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:253 #: ../SCRIBES/internationalization.py:268 #: ../SCRIBES/internationalization.py:269 #: ../SCRIBES/internationalization.py:270 #: ../SCRIBES/internationalization.py:276 #: ../SCRIBES/internationalization.py:277 #: ../SCRIBES/internationalization.py:279 #: ../SCRIBES/internationalization.py:280 #: ../SCRIBES/internationalization.py:281 #: ../SCRIBES/internationalization.py:306 #: ../SCRIBES/internationalization.py:307 #: ../SCRIBES/internationalization.py:308 msgid "Japanese" msgstr "Japanska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:254 #: ../SCRIBES/internationalization.py:271 #: ../SCRIBES/internationalization.py:282 #: ../SCRIBES/internationalization.py:296 msgid "Korean" msgstr "Koreanska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:256 msgid "Urdu" msgstr "Urdu" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:267 msgid "Vietnamese" msgstr "Vietnamesiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:272 #: ../SCRIBES/internationalization.py:275 msgid "Simplified Chinese" msgstr "Förenklad kinesiska" # Traditionell? #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:273 #: ../SCRIBES/internationalization.py:274 msgid "Unified Chinese" msgstr "Förenad kinesiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:278 msgid "Japanese, Korean, Simplified Chinese" msgstr "Japanska, koreanska, förenklad kinesiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:283 msgid "West Europe" msgstr "Västeuropa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:285 msgid "Esperanto, Maltese" msgstr "Esperanto, Maltesiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:286 msgid "Baltic languagues" msgstr "Baltiska sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:292 msgid "Nordic languages" msgstr "Nordiska sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:294 msgid "Celtic languages" msgstr "Keltiska sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:298 msgid "Ukrainian" msgstr "Ukrainska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:305 msgid "Kazakh" msgstr "Kazakiska" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:309 msgid "All languages" msgstr "Alla sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:310 #: ../SCRIBES/internationalization.py:311 msgid "All Languages (BMP only)" msgstr "Alla sprÃ¥k (endast BMP)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:312 msgid "All Languages" msgstr "Alla sprÃ¥k" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:313 #: ../plugins/SyntaxColorSwitcher/i18n.py:24 msgid "None" msgstr "Ingen" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:317 msgid "Replaced tabs with spaces on selected lines" msgstr "Ersatte tabulatorer med blanksteg pÃ¥ markerade rader" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:325 msgid "Co_lor: " msgstr "Fä_rg: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:326 #: ../plugins/ColorEditor/i18n.py:37 msgid "B_old" msgstr "_Fet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:327 #: ../plugins/ColorEditor/i18n.py:38 msgid "I_talic" msgstr "K_ursiv" #. .decode(encoding).encode("utf-8") #. From templateadd.py #: ../SCRIBES/internationalization.py:331 msgid "_Name:" msgstr "_Namn:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:332 msgid "_Description:" msgstr "_Beskrivning:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:333 msgid "_Template:" msgstr "_Mall:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:334 msgid "Add New Template" msgstr "Lägg till ny mall" #. .decode(encoding).encode("utf-8") #. From templateedit.py #: ../SCRIBES/internationalization.py:337 #: ../plugins/TemplateEditor/i18n.py:28 msgid "Edit Template" msgstr "Redigera mall" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:340 msgid "Select to use themes' foreground and background colors" msgstr "Välj för att använda temats förgrund- och bakgrundsfärger" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:341 msgid "Click to choose a new color for the editor's text" msgstr "Klicka för att välja en ny färg för redigerarens text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:342 msgid "Click to choose a new color for the editor's background" msgstr "Klicka för att välja en ny färg för redigerarens bakgrund" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:343 msgid "Click to choose a new color for the language syntax element" msgstr "Klicka för att välja en ny färg för sprÃ¥ksyntaxelementet" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:344 msgid "Select to make the language syntax element bold" msgstr "Välj för att göra sprÃ¥ksyntaxelementet i fet text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:345 msgid "Select to make the language syntax element italic" msgstr "Välj för att göra sprÃ¥ksyntaxelementet i kursiv text" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:346 msgid "Select to reset the language syntax element to its default settings" msgstr "Välj för att Ã¥terställa sprÃ¥ksyntaxelementet till dess standardinställningar" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #. From readonly.py #: ../SCRIBES/internationalization.py:353 msgid "Toggled readonly mode on" msgstr "" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:354 msgid "Toggled readonly mode off" msgstr "" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:357 msgid "Menu for advanced configuration" msgstr "Meny för avancerad konfiguration" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:358 msgid "Configure the editor's foreground, background or syntax colors" msgstr "Konfigurera redigerarens förgrunds-, bakgrunds- eller syntaxfärger" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:359 msgid "Create, modify or manage templates" msgstr "Skapa, ändra eller hantera mallar" #. .decode(encoding).encode("utf-8") #. From cursor.py #: ../SCRIBES/internationalization.py:362 #, python-format msgid "Ln %d col %d" msgstr "Rad %d kol %d" #. .decode(encoding).encode("utf-8") #. From passworddialog.py #: ../SCRIBES/internationalization.py:365 msgid "Authentication Required" msgstr "Autentisering krävs" #: ../SCRIBES/internationalization.py:366 #, python-format msgid "You must log in to access %s" msgstr "Du mÃ¥ste logga in för att komma Ã¥t %s" #: ../SCRIBES/internationalization.py:367 msgid "_Password:" msgstr "_Lösenord:" #: ../SCRIBES/internationalization.py:368 msgid "_Remember password for this session" msgstr "_Kom ihÃ¥g lösenordet under sessionen" #: ../SCRIBES/internationalization.py:369 msgid "Save password in _keyring" msgstr "Spara lösenordet i _nyckelring" #. From fileloader.py #: ../SCRIBES/internationalization.py:372 #, python-format msgid "Loading \"%s\"..." msgstr "Läser in \"%s\"..." #. From bookmark.py #: ../SCRIBES/internationalization.py:375 msgid "Moved to most recently bookmarked line" msgstr "Flyttade till senaste bokmärkta rad" #: ../SCRIBES/internationalization.py:376 msgid "Already on most recently bookmarked line" msgstr "Redan pÃ¥ den senaste bokmärkta raden" #. bookmarktrigger.py #: ../SCRIBES/internationalization.py:377 #: ../SCRIBES/internationalization.py:452 #: ../plugins/BookmarkBrowser/i18n.py:27 msgid "No bookmarks found" msgstr "Inga bokmärken hittades" #. From dialogfilter.py #: ../SCRIBES/internationalization.py:381 msgid "Ruby Documents" msgstr "Ruby-dokument" #: ../SCRIBES/internationalization.py:382 msgid "Perl Documents" msgstr "Perl-dokument" #: ../SCRIBES/internationalization.py:383 msgid "C Documents" msgstr "C-dokument" #: ../SCRIBES/internationalization.py:384 msgid "C++ Documents" msgstr "C++-dokument" #: ../SCRIBES/internationalization.py:385 msgid "C# Documents" msgstr "C#-dokument" #: ../SCRIBES/internationalization.py:386 msgid "Java Documents" msgstr "Java-dokument" #: ../SCRIBES/internationalization.py:387 msgid "PHP Documents" msgstr "PHP-dokument" #: ../SCRIBES/internationalization.py:388 msgid "HTML Documents" msgstr "HTML-dokument" #: ../SCRIBES/internationalization.py:389 #: ../plugins/TemplateEditor/i18n.py:27 msgid "XML Documents" msgstr "XML-dokument" #: ../SCRIBES/internationalization.py:390 msgid "Haskell Documents" msgstr "Haskell-dokument" #: ../SCRIBES/internationalization.py:391 msgid "Scheme Documents" msgstr "Scheme-dokument" # Infoga #. From textview.py #: ../SCRIBES/internationalization.py:394 msgid "INS" msgstr "INF" # Skriv över #: ../SCRIBES/internationalization.py:395 msgid "OVR" msgstr "SRÖ" #. From loader.py #: ../SCRIBES/internationalization.py:398 msgid "Open Error: An error occurred while opening the file. Try opening the file again or file a bug report." msgstr "Öppningsfel: Ett fel inträffade vid öppnandet av filen. Prova att öppna filen igen eller skicka in en felrapport." #: ../SCRIBES/internationalization.py:400 #, python-format msgid "Info Error: Information on %s cannot be retrieved." msgstr "Informationsfel: Information om %s kan inte hämtas." #: ../SCRIBES/internationalization.py:401 msgid "Info Error: Access has been denied to the requested file." msgstr "Informationsfel: Ã…tkomst till den begärda filen nekades." #: ../SCRIBES/internationalization.py:402 msgid "Permission Error: Access has been denied to the requested file." msgstr "Rättighetsfel: Ã…tkomst till den begärda filen nekades." #: ../SCRIBES/internationalization.py:403 msgid "Cannot open file" msgstr "Kan inte öppna filen" #. From save.py #: ../SCRIBES/internationalization.py:406 msgid "You do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors." msgstr "Du har inte behörighet att spara filen. Prova att spara filen pÃ¥ ditt skrivbord eller till en annan mapp. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel." #: ../SCRIBES/internationalization.py:409 msgid "A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved." msgstr "En sparningsÃ¥tgärd misslyckades. Kunde inte skapa växlingsutrymme. Försäkra dig om att du har behörighet att spara till din hemmapp. Kontrollera även att du inte har slut pÃ¥ diskutrymme. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt." #: ../SCRIBES/internationalization.py:413 msgid "An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors." msgstr "Ett fel inträffade vid skapandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel." #: ../SCRIBES/internationalization.py:415 msgid "A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors." msgstr "Ett fel vid sparandet inträffade. Dokumentet kunde inte överföras frÃ¥n sin temporära plats. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel." #: ../SCRIBES/internationalization.py:418 msgid "You do not have permission to save the file. Automatic saving will be disabled until the file is properly saved." msgstr "Du har inte behörighet att spara filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt." #: ../SCRIBES/internationalization.py:420 msgid "A decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved." msgstr "Ett avkodningsfel inträffade vid sparandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt." #: ../SCRIBES/internationalization.py:422 msgid "An encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved." msgstr "Ett avkodningsfel inträffade vid sparande av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt." #. From regexbar.py #: ../SCRIBES/internationalization.py:426 msgid "Search for text using regular expression" msgstr "Sök efter text med hjälp av reguljärt uttryck" #: ../SCRIBES/internationalization.py:427 msgid "Close regular expression bar" msgstr "Stäng regulära uttryck" #. From replacestopbutton.py #: ../SCRIBES/internationalization.py:430 msgid "Stopped replacing" msgstr "Stoppade ersättningen" #. templateeditorexportbutton.py #: ../SCRIBES/internationalization.py:433 #: ../plugins/TemplateEditor/Template.glade.h:6 msgid "E_xport" msgstr "E_xportera" #. templateeditorimportbutton.py #: ../SCRIBES/internationalization.py:436 #: ../plugins/TemplateEditor/Template.glade.h:8 msgid "I_mport" msgstr "I_mportera" #. templateadddialog.py #: ../SCRIBES/internationalization.py:439 msgid "Error: Name field must contain a string." msgstr "Fel: Namnfältet mÃ¥ste innehÃ¥lla en sträng." #: ../SCRIBES/internationalization.py:440 #, python-format msgid "Error: '%s' already in use. Please choose another string." msgstr "Fel: \"%s\" används redan. Välj en annan sträng." #: ../SCRIBES/internationalization.py:441 msgid "Error: Name field cannot have any spaces." msgstr "Fel: Namnfältet fÃ¥r inte innehÃ¥lla blanksteg." #: ../SCRIBES/internationalization.py:442 msgid "Error: Template editor can only have one '${cursor}' placeholder." msgstr "Fel: Mallredigeraren kan endast ha en \"${cursor}\"-platshÃ¥llare." #. importdialog.py #: ../SCRIBES/internationalization.py:445 msgid "Error: Invalid template file." msgstr "Fel: Ogiltig mallfil." #. exportdialog.py #: ../SCRIBES/internationalization.py:449 #: ../plugins/TemplateEditor/Template.glade.h:7 msgid "Export Template" msgstr "Exportera mall" #. preftabcheckbutton.py #: ../SCRIBES/internationalization.py:457 msgid "Use spaces instead of tabs for indentation" msgstr "Använd blanksteg istället för tabulatorer för indentering" #: ../SCRIBES/internationalization.py:461 msgid "Select to underline language syntax element" msgstr "Välj för att understryka sprÃ¥ksyntaxelement" #: ../SCRIBES/internationalization.py:464 #: ../plugins/DocumentBrowser/i18n.py:24 msgid "Open Documents" msgstr "Öppna dokument" #: ../SCRIBES/internationalization.py:466 msgid "Current document is focused" msgstr "Aktuellt dokument är fokuserat" #: ../SCRIBES/internationalization.py:467 msgid "Open recently used files" msgstr "Öppna tidigare använda filer" #: ../SCRIBES/internationalization.py:469 msgid "Failed to save file" msgstr "Misslyckades med att spara fil" #: ../SCRIBES/internationalization.py:470 msgid "Save Error: You do not have permission to modify this file or save to its location." msgstr "Fel vid sparande: Du har inte behörighet att ändra den här filen eller att spara till dess plats." #: ../SCRIBES/internationalization.py:472 msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "Fel vid sparande: Misslyckades med att överföra filen frÃ¥n växlingsutrymme till permanent plats." #: ../SCRIBES/internationalization.py:473 msgid "Save Error: Failed to create swap location or file." msgstr "Fel vid sparande: Misslyckades med att skapa växlingsplats eller fil." #: ../SCRIBES/internationalization.py:474 msgid "Save Error: Failed to create swap file for saving." msgstr "Fel vid sparande: Misslyckades med att skapa växlingsplats för sparandet." #: ../SCRIBES/internationalization.py:475 msgid "Save Error: Failed to write swap file for saving." msgstr "Fel vid sparande: Misslyckades med att skriva växlingsfil för sparandet." #: ../SCRIBES/internationalization.py:476 msgid "Save Error: Failed to close swap file for saving." msgstr "Fel vid sparande: Misslyckades med att stänga växlingsfil för sparandet." #: ../SCRIBES/internationalization.py:477 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "Fel vid sparande: Misslyckades med att avkoda innehÃ¥llet i filen frÃ¥n \"UTF-8\" till Unicode." #: ../SCRIBES/internationalization.py:478 msgid "Save Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog." msgstr "" #: ../SCRIBES/internationalization.py:482 #, python-format msgid "File: %s" msgstr "Fil: %s" #: ../SCRIBES/internationalization.py:484 msgid "Failed to load file." msgstr "Misslyckades med att läsa filen." #: ../SCRIBES/internationalization.py:486 msgid "Load Error: You do not have permission to view this file." msgstr "Inläsningsfel: Du har inte behörighet att visa den här filen." #: ../SCRIBES/internationalization.py:487 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "Inläsningsfel: Misslyckades med att komma Ã¥t fjärrfilen pÃ¥ grund av behörighetsproblem." #: ../SCRIBES/internationalization.py:488 msgid "Load Error: Failed to get file information for loading. Please try loading the file again." msgstr "Inläsningsfel: Misslyckades med att fÃ¥ information om filen för inläsning. Prova att läsa in filen igen." #: ../SCRIBES/internationalization.py:490 msgid "Load Error: File does not exist." msgstr "Inläsningsfel: Filen finns inte." #: ../SCRIBES/internationalization.py:491 msgid "Damn! Unknown Error" msgstr "Argh! Okänt fel" #: ../SCRIBES/internationalization.py:492 msgid "Load Error: Failed to open file for loading." msgstr "Inläsningsfel: Misslyckades med att öppna filen för inläsning." #: ../SCRIBES/internationalization.py:493 msgid "Load Error: Failed to read file for loading." msgstr "Inläsningsfel: Misslyckades med att läsa filen för inläsning." #: ../SCRIBES/internationalization.py:494 msgid "Load Error: Failed to close file for loading." msgstr "Inläsningsfel: Misslyckades med att stänga filen för inläsning." #: ../SCRIBES/internationalization.py:495 msgid "Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog." msgstr "Inläsningsfel: Misslyckades med att avkoda filen för inläsning. Filen som du läser in kanske inte är en textfil. Om du är säker pÃ¥ att den är en textfil kan du prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen." #: ../SCRIBES/internationalization.py:499 msgid "Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog." msgstr "Inläsningsfel: Misslyckades med att koda filen för inläsning. Prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen." #: ../SCRIBES/internationalization.py:503 #, python-format msgid "Reloading %s" msgstr "Läser om %s" #: ../SCRIBES/internationalization.py:504 #, python-format msgid "'%s' has been modified by another program" msgstr "\"%s\" har ändrats av ett annat program" #: ../plugins/BookmarkBrowser/i18n.py:23 msgid "Move to bookmarked line" msgstr "Flytta till bokmärkt rad" #: ../plugins/BookmarkBrowser/i18n.py:24 msgid "Bookmark Browser" msgstr "Bokmärkesbläddare" #: ../plugins/BookmarkBrowser/i18n.py:25 msgid "Line" msgstr "Rad" #: ../plugins/BookmarkBrowser/i18n.py:26 msgid "Bookmarked Text" msgstr "Bokmärkt text" #: ../plugins/BookmarkBrowser/i18n.py:28 #: ../plugins/Bookmark/i18n.py:27 #, python-format msgid "Moved to bookmark on line %d" msgstr "Flyttade till bokmärke pÃ¥ rad %d" #: ../plugins/PrintDialog/i18n.py:23 msgid "Print Document" msgstr "Skriv ut dokument" #: ../plugins/PrintDialog/i18n.py:24 msgid "Print file" msgstr "Skriv ut fil" #: ../plugins/PrintDialog/i18n.py:25 msgid "File: " msgstr "Fil: " #: ../plugins/PrintDialog/i18n.py:26 msgid "Print Preview" msgstr "Förhandsvisning" #: ../plugins/RemoteDialog/i18n.py:23 #: ../plugins/OpenDialog/i18n.py:23 msgid "Open Document" msgstr "Öppna dokument" #: ../plugins/RemoteDialog/i18n.py:24 msgid "Type URI for loading" msgstr "Ange URI för inläsning" #: ../plugins/RemoteDialog/i18n.py:25 msgid "Enter the location (URI) of the file you _would like to open:" msgstr "Ange platsen (URI) till filen som du _vill öppna:" #: ../plugins/AutoReplace/i18n.py:23 #, python-format msgid "Replaced '%s' with '%s'" msgstr "Ersatte \"%s\" med \"%s\"" #: ../plugins/Templates/i18n.py:23 msgid "Template mode is active" msgstr "Malläget är aktivt" #: ../plugins/Templates/i18n.py:24 msgid "Inserted template" msgstr "Infogade mall" #: ../plugins/Templates/i18n.py:25 msgid "Selected next placeholder" msgstr "Valde nästa platshÃ¥llare" #: ../plugins/Templates/i18n.py:26 msgid "Selected previous placeholder" msgstr "Valde föregÃ¥ende platshÃ¥llare" #: ../plugins/About/i18n.py:23 msgid "Scribes is a text editor for GNOME." msgstr "Scribes är en textredigerare för GNOME." #: ../plugins/About/i18n.py:24 msgid "Information about the text editor" msgstr "Information om textredigeraren" #: ../plugins/TemplateEditor/Template.glade.h:1 msgid "here" msgstr "här" #: ../plugins/TemplateEditor/Template.glade.h:2 msgid "_Description:" msgstr "_Beskrivning:" #: ../plugins/TemplateEditor/Template.glade.h:3 msgid "_Name:" msgstr "_Namn:" #: ../plugins/TemplateEditor/Template.glade.h:4 msgid "_Template:" msgstr "_Mall:" #: ../plugins/TemplateEditor/Template.glade.h:5 msgid "Download templates from" msgstr "Hämta ner mallar" #: ../plugins/TemplateEditor/Template.glade.h:9 #: ../plugins/TemplateEditor/i18n.py:26 msgid "Import Template" msgstr "Importera mall" #: ../plugins/TemplateEditor/Template.glade.h:10 #: ../plugins/TemplateEditor/i18n.py:32 msgid "Template Editor" msgstr "Mallredigerare" #: ../plugins/TemplateEditor/Template.glade.h:11 msgid "gtk-add" msgstr "Lägg till" #: ../plugins/TemplateEditor/Template.glade.h:12 msgid "gtk-cancel" msgstr "Avbryt" #: ../plugins/TemplateEditor/Template.glade.h:13 msgid "gtk-edit" msgstr "Redigera" #: ../plugins/TemplateEditor/Template.glade.h:14 msgid "gtk-help" msgstr "Hjälp" #: ../plugins/TemplateEditor/Template.glade.h:15 msgid "gtk-remove" msgstr "Ta bort" #: ../plugins/TemplateEditor/Template.glade.h:16 msgid "gtk-save" msgstr "Spara" #: ../plugins/TemplateEditor/i18n.py:23 msgid "_Language" msgstr "_SprÃ¥k" #: ../plugins/TemplateEditor/i18n.py:24 msgid "_Name" msgstr "_Namn" #: ../plugins/TemplateEditor/i18n.py:25 msgid "_Description" msgstr "_Beskrivning" #: ../plugins/TemplateEditor/i18n.py:29 msgid "Error: Name field cannot be empty" msgstr "Fel: Namnfältet fÃ¥r inte vara blankt" #: ../plugins/TemplateEditor/i18n.py:30 msgid "Error: Trigger name already in use. Please use another trigger name." msgstr "" #: ../plugins/TemplateEditor/i18n.py:31 msgid "Add Template" msgstr "Lägg till mall" #: ../plugins/TemplateEditor/i18n.py:33 msgid "Error: You do not have permission to save at the location" msgstr "Fel: Du har inte behörighet att spara pÃ¥ platsen" #: ../plugins/TemplateEditor/i18n.py:34 msgid "Error: No selection to export" msgstr "Fel: Ingen markering att exportera" #: ../plugins/TemplateEditor/i18n.py:35 msgid "Error: File not found" msgstr "Fel: Filen hittades inte" #: ../plugins/TemplateEditor/i18n.py:36 msgid "Error: Invalid template file" msgstr "Fel: Ogiltig mallfil" #: ../plugins/TemplateEditor/i18n.py:37 msgid "Error: No template information found" msgstr "Fel: Ingen mallinformation hittades" #: ../plugins/AutoReplaceGUI/i18n.py:23 msgid "Auto Replace Editor" msgstr "Automatisk ersättning" #: ../plugins/AutoReplaceGUI/i18n.py:24 msgid "_Abbreviations" msgstr "_Förkortningar" #: ../plugins/AutoReplaceGUI/i18n.py:25 msgid "_Replacements" msgstr "_Ersättningar" #: ../plugins/AutoReplaceGUI/i18n.py:26 #, python-format msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "Fel: \"%s\" används redan. Använd en annan förkortning." #: ../plugins/AutoReplaceGUI/i18n.py:27 msgid "Automatic Replacement" msgstr "Automatisk ersättning" #: ../plugins/AutoReplaceGUI/i18n.py:28 msgid "Modify words for auto-replacement" msgstr "Ändra ord för automatisk ersättning" #: ../plugins/Indent/i18n.py:24 msgid "Indenting please wait..." msgstr "Indenterar, vänta..." #: ../plugins/Indent/i18n.py:26 #, python-format msgid "Indented line %d" msgstr "Drog in rad %d" #: ../plugins/Indent/i18n.py:30 msgid "I_ndentation" msgstr "I_ndentering" #: ../plugins/Indent/i18n.py:31 msgid "Shift _Right" msgstr "Dra in _höger" #: ../plugins/Indent/i18n.py:32 msgid "Shift _Left" msgstr "Dra in _vänster" #: ../plugins/Selection/i18n.py:24 msgid "Selected word" msgstr "Markerat ord" #: ../plugins/Selection/i18n.py:25 msgid "No word to select" msgstr "Inget ord att markera" #: ../plugins/Selection/i18n.py:26 msgid "Selected sentence" msgstr "Markerad mening" #: ../plugins/Selection/i18n.py:27 msgid "No sentence to select" msgstr "Ingen mening att markera" #: ../plugins/Selection/i18n.py:28 #, python-format msgid "No text to select on line %d" msgstr "Ingen text att markera pÃ¥ rad %d" #: ../plugins/Selection/i18n.py:29 #, python-format msgid "Selected line %d" msgstr "Markerade rad %d" #: ../plugins/Selection/i18n.py:30 msgid "Selected paragraph" msgstr "Markerade stycke" #: ../plugins/Selection/i18n.py:31 msgid "No paragraph to select" msgstr "Inget stycke att markera" #: ../plugins/Selection/i18n.py:32 msgid "S_election" msgstr "_Markering" #: ../plugins/Selection/i18n.py:33 msgid "Select _Word" msgstr "Markera _ord" #: ../plugins/Selection/i18n.py:34 msgid "Select _Line" msgstr "Markera _rad" #: ../plugins/Selection/i18n.py:35 msgid "Select _Sentence" msgstr "Markera _mening" #: ../plugins/Selection/i18n.py:36 msgid "Select _Paragraph" msgstr "Markera _stycke" #: ../plugins/Lines/i18n.py:24 #, python-format msgid "Deleted line %d" msgstr "Tog bort rad %d" #: ../plugins/Lines/i18n.py:25 #, python-format msgid "Joined line %d to line %d" msgstr "Sammanförde rad %d till rad %d" #: ../plugins/Lines/i18n.py:26 msgid "No more lines to join" msgstr "Inga fler rader att sammanföra" #: ../plugins/Lines/i18n.py:27 #, python-format msgid "Freed line %d" msgstr "Frigjorde rad %d" #: ../plugins/Lines/i18n.py:28 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Tog bort text frÃ¥n markören till slutet av rad %d" #: ../plugins/Lines/i18n.py:29 msgid "Cursor is already at the end of line" msgstr "Markören är redan pÃ¥ slutet av raden" #: ../plugins/Lines/i18n.py:30 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Tog bort text frÃ¥n markören till början av rad %d" #: ../plugins/Lines/i18n.py:31 msgid "Cursor is already at the beginning of line" msgstr "Markören är redan pÃ¥ början av raden" #: ../plugins/Lines/i18n.py:32 msgid "_Lines" msgstr "_Rader" #: ../plugins/Lines/i18n.py:33 msgid "_Delete Line" msgstr "_Ta bort rad" #: ../plugins/Lines/i18n.py:34 msgid "_Join Line" msgstr "_Sammanför rad" #: ../plugins/Lines/i18n.py:35 msgid "Free Line _Above" msgstr "Frigör _överliggande rad" #: ../plugins/Lines/i18n.py:36 msgid "Free Line _Below" msgstr "Frigör _underliggande rad" #: ../plugins/Lines/i18n.py:37 msgid "Delete Cursor to Line _End" msgstr "Ta bort frÃ¥n markör till rad_slut" #: ../plugins/Lines/i18n.py:38 msgid "Delete _Cursor to Line Begin" msgstr "Ta bort frÃ¥n _markör till radens början" #: ../plugins/Preferences/i18n.py:23 msgid "Font" msgstr "Typsnitt" #: ../plugins/Preferences/i18n.py:24 msgid "Editor _font: " msgstr "Typsnitt för _redigerare: " #: ../plugins/Preferences/i18n.py:25 msgid "Tab Stops" msgstr "Tabulatorstopp" #: ../plugins/Preferences/i18n.py:26 msgid "_Tab width: " msgstr "_Tabulatorbredd: " #: ../plugins/Preferences/i18n.py:27 msgid "Text Wrapping" msgstr "Radbrytning" #: ../plugins/Preferences/i18n.py:28 msgid "Right Margin" msgstr "Högermarginal" #: ../plugins/Preferences/i18n.py:29 msgid "_Right margin position: " msgstr "Position för _högermarginal: " #: ../plugins/Preferences/i18n.py:30 msgid "Spell Checking" msgstr "Stavningskontroll" #: ../plugins/Preferences/i18n.py:31 msgid "Change editor settings" msgstr "Ändra redigerarinställningar" #: ../plugins/Preferences/i18n.py:32 msgid "Preferences" msgstr "Inställningar" #: ../plugins/Preferences/i18n.py:33 #, python-format msgid "Changed font to \"%s\"" msgstr "Ändrade typsnitt till \"%s\"" #: ../plugins/Preferences/i18n.py:34 #, python-format msgid "Changed tab width to %d" msgstr "Ändrade tabulatorbredd till %d" #: ../plugins/Preferences/i18n.py:35 msgid "_Use spaces instead of tabs" msgstr "_Använd blanksteg istället för tabulatorer" #: ../plugins/Preferences/i18n.py:36 msgid "Use tabs for indentation" msgstr "Använd tabulatorer för indentering" #: ../plugins/Preferences/i18n.py:37 msgid "Use spaces for indentation" msgstr "Använd blanksteg för indentering" #: ../plugins/Preferences/i18n.py:38 msgid "Enable text _wrapping" msgstr "Aktivera text_brytning" #: ../plugins/Preferences/i18n.py:39 msgid "Enabled text wrapping" msgstr "Aktiverade radbrytning" #: ../plugins/Preferences/i18n.py:40 msgid "Disabled text wrapping" msgstr "Inaktiverade radbrytning" #: ../plugins/Preferences/i18n.py:41 msgid "Display right _margin" msgstr "Visa höger_marginal" #: ../plugins/Preferences/i18n.py:42 msgid "Show right margin" msgstr "Visa högermarginal" #: ../plugins/Preferences/i18n.py:43 msgid "Hide right margin" msgstr "Dölj högermarginal" #: ../plugins/Preferences/i18n.py:44 msgid "_Enable spell checking" msgstr "A_ktivera stavningskontroll" #: ../plugins/Preferences/i18n.py:45 #: ../plugins/SpellCheck/i18n.py:24 msgid "Enabled spellchecking" msgstr "Aktiverade stavningskontroll" #: ../plugins/Preferences/i18n.py:46 #: ../plugins/SpellCheck/i18n.py:23 msgid "Disabled spellchecking" msgstr "Inaktiverade stavningskontroll" #: ../plugins/Preferences/i18n.py:47 #, python-format msgid "Positioned margin line at column %d" msgstr "Positionerade marginalen pÃ¥ kolumn %d" #: ../plugins/BracketCompletion/i18n.py:23 msgid "Pair character completion occurred" msgstr "" #: ../plugins/BracketCompletion/i18n.py:24 msgid "Enclosed selected text" msgstr "" #: ../plugins/BracketCompletion/i18n.py:25 msgid "Removed pair character completion" msgstr "" #: ../plugins/DocumentBrowser/i18n.py:23 msgid "Select document to focus" msgstr "Välj dokument att fokusera" #: ../plugins/DocumentBrowser/i18n.py:25 msgid "File _Type" msgstr "Fil_typ" #: ../plugins/DocumentBrowser/i18n.py:26 msgid "File _Name" msgstr "Fil_namn" #: ../plugins/DocumentBrowser/i18n.py:27 msgid "Full _Path Name" msgstr "" #: ../plugins/DocumentBrowser/i18n.py:28 msgid "No documents open" msgstr "Inga dokument öppnade" #: ../plugins/SearchPreviousNext/i18n.py:23 msgid "No previous match" msgstr "Ingen tidigare sökträff" #: ../plugins/IncrementalBar/i18n.py:23 #: ../plugins/FindBar/i18n.py:23 #: ../plugins/ReplaceBar/i18n.py:23 msgid "Match _case" msgstr "Matcha _skiftläge" #: ../plugins/IncrementalBar/i18n.py:24 #: ../plugins/FindBar/i18n.py:24 #: ../plugins/ReplaceBar/i18n.py:24 msgid "Match _word" msgstr "Matcha _ord" #: ../plugins/IncrementalBar/i18n.py:25 #: ../plugins/FindBar/i18n.py:25 #: ../plugins/ReplaceBar/i18n.py:25 msgid "_Previous" msgstr "_FöregÃ¥ende" #: ../plugins/IncrementalBar/i18n.py:26 #: ../plugins/FindBar/i18n.py:26 #: ../plugins/ReplaceBar/i18n.py:26 msgid "_Next" msgstr "_Nästa" #: ../plugins/IncrementalBar/i18n.py:27 #: ../plugins/FindBar/i18n.py:27 #: ../plugins/ReplaceBar/i18n.py:27 msgid "_Search for:" msgstr "_Sök efter:" #: ../plugins/IncrementalBar/i18n.py:29 #: ../plugins/FindBar/i18n.py:29 #: ../plugins/ReplaceBar/i18n.py:29 msgid "Closed search bar" msgstr "" #: ../plugins/IncrementalBar/i18n.py:30 msgid "Incrementally search for text" msgstr "Inkrementell sökning efter text" #: ../plugins/IncrementalBar/i18n.py:31 msgid "Close incremental search bar" msgstr "" #: ../plugins/OpenDialog/i18n.py:24 msgid "Select file for loading" msgstr "Välj fil för inläsning" #: ../plugins/ToolbarVisibility/i18n.py:23 msgid "Hide toolbar" msgstr "Dölj verktygsrad" #: ../plugins/ToolbarVisibility/i18n.py:24 msgid "Showed toolbar" msgstr "Visade verktygsraden" #: ../plugins/MatchingBracket/i18n.py:23 #, python-format msgid "Found matching bracket on line %d" msgstr "" #: ../plugins/MatchingBracket/i18n.py:24 msgid "No matching bracket found" msgstr "" #: ../plugins/BracketSelection/i18n.py:23 msgid "Selected characters inside bracket" msgstr "" #: ../plugins/BracketSelection/i18n.py:24 msgid "No brackets found for selection" msgstr "" #: ../plugins/Case/i18n.py:23 msgid "No selection to change case" msgstr "Ingen markering att ändra skiftläge pÃ¥" #: ../plugins/Case/i18n.py:24 msgid "Selected text is already uppercase" msgstr "Markerad text är redan versal" #: ../plugins/Case/i18n.py:25 msgid "Changed selected text to uppercase" msgstr "Ändrade markerad text till versaler" #: ../plugins/Case/i18n.py:26 msgid "Selected text is already lowercase" msgstr "Markerad text är redan gemen" #: ../plugins/Case/i18n.py:27 msgid "Changed selected text to lowercase" msgstr "Ändrade markerad text till gemener" #: ../plugins/Case/i18n.py:28 msgid "Selected text is already capitalized" msgstr "" #: ../plugins/Case/i18n.py:29 msgid "Capitalized selected text" msgstr "" #: ../plugins/Case/i18n.py:30 msgid "Swapped the case of selected text" msgstr "" #: ../plugins/Case/i18n.py:31 msgid "_Case" msgstr "_Skiftläge" #: ../plugins/Case/i18n.py:32 msgid "_Uppercase" msgstr "_Versal" #: ../plugins/Case/i18n.py:33 msgid "_Lowercase" msgstr "_Gemen" #: ../plugins/Case/i18n.py:34 msgid "_Titlecase" msgstr "_Titeltyp" #: ../plugins/Case/i18n.py:35 msgid "_Swapcase" msgstr "_Växla skiftläge" #: ../plugins/Bookmark/i18n.py:23 #, python-format msgid "Removed bookmark on line %d" msgstr "Tog bort bokmärket pÃ¥ rad %d" #: ../plugins/Bookmark/i18n.py:24 #, python-format msgid "Bookmarked line %d" msgstr "Bokmärkte rad %d" #: ../plugins/Bookmark/i18n.py:25 msgid "No bookmarks found to remove" msgstr "Inga bokmärken hittades att ta bort" #: ../plugins/Bookmark/i18n.py:26 msgid "Removed all bookmarks" msgstr "Tog bort alla bokmärken" #: ../plugins/Bookmark/i18n.py:28 msgid "No next bookmark to move to" msgstr "Inget nästa bokmärke att flytta till" #: ../plugins/Bookmark/i18n.py:29 msgid "No previous bookmark to move to" msgstr "Inget föregÃ¥ende bokmärke att flytta till" #: ../plugins/Bookmark/i18n.py:30 msgid "Already on first bookmark" msgstr "Redan pÃ¥ det första bokmärket" #: ../plugins/Bookmark/i18n.py:31 msgid "Moved to first bookmark" msgstr "Flyttade till första bokmärket" #: ../plugins/Bookmark/i18n.py:32 msgid "Already on last bookmark" msgstr "Redan pÃ¥ det sista bokmärket" #: ../plugins/Bookmark/i18n.py:33 msgid "Moved to last bookmark" msgstr "Flyttade till sista bokmärket" #: ../plugins/Bookmark/i18n.py:34 msgid "_Bookmark" msgstr "_Bokmärk" #: ../plugins/Bookmark/i18n.py:35 msgid "Bookmark _Line" msgstr "Bokmärk _rad" #: ../plugins/Bookmark/i18n.py:36 msgid "_Remove Bookmark" msgstr "_Ta bort bokmärke" #: ../plugins/Bookmark/i18n.py:37 msgid "Remove _All Bookmarks" msgstr "Ta bort _alla bokmärken" #: ../plugins/Bookmark/i18n.py:38 msgid "Move to _Next Bookmark" msgstr "Flytta till _nästa bokmärke" #: ../plugins/Bookmark/i18n.py:39 msgid "Move to _Previous Bookmark" msgstr "Flytta till _föregÃ¥ende bokmärke" #: ../plugins/Bookmark/i18n.py:40 msgid "Move to _First Bookmark" msgstr "Flytta till _första bokmärket" #: ../plugins/Bookmark/i18n.py:41 msgid "Move to Last _Bookmark" msgstr "Flytta till _sista bokmärket" #: ../plugins/Bookmark/i18n.py:42 msgid "_Show Bookmark Browser" msgstr "_Visa bokmärken" #: ../plugins/SaveDialog/i18n.py:23 #: ../plugins/SaveDialog/Dialog.glade.h:1 msgid "Save Document" msgstr "Spara dokument" #: ../plugins/SaveDialog/i18n.py:24 msgid "Change name of file and save" msgstr "Ändra namn pÃ¥ filen och spara" #: ../plugins/UserGuide/i18n.py:23 msgid "Launching help browser" msgstr "Startar hjälpvisaren" #: ../plugins/UserGuide/i18n.py:24 msgid "Could not open help browser" msgstr "Kunde inte öppna hjälpvisaren" #: ../plugins/ReadOnly/i18n.py:23 msgid "File has not been saved to disk" msgstr "Filen har inte sparats till disk" #: ../plugins/ReadOnly/i18n.py:24 msgid "No permission to modify file" msgstr "Ingen behörighet att ändra filen" #: ../plugins/UndoRedo/i18n.py:24 msgid "Undid last action" msgstr "" #: ../plugins/UndoRedo/i18n.py:25 msgid "Cannot undo action" msgstr "Kan inte Ã¥ngra Ã¥tgärd" #: ../plugins/UndoRedo/i18n.py:26 msgid "Redid undone action" msgstr "" #: ../plugins/Spaces/i18n.py:24 msgid "Replacing spaces please wait..." msgstr "Ersätter blanksteg, vänta ..." #: ../plugins/Spaces/i18n.py:25 msgid "No spaces found to replace" msgstr "Inga blanksteg hittades att ersätta" #: ../plugins/Spaces/i18n.py:26 msgid "Replaced spaces with tabs" msgstr "Ersatte blanksteg med tabulatorer" #: ../plugins/Spaces/i18n.py:27 msgid "Replacing tabs please wait..." msgstr "Ersätter tabulatorer, vänta..." #: ../plugins/Spaces/i18n.py:28 msgid "Replaced tabs with spaces" msgstr "Ersatte tabulatorer med blanksteg" #: ../plugins/Spaces/i18n.py:29 msgid "No tabs found to replace" msgstr "Inga tabulatorer hittades att ersätta" #: ../plugins/Spaces/i18n.py:30 msgid "Removing spaces please wait..." msgstr "Tar bort blanksteg, vänta..." #: ../plugins/Spaces/i18n.py:31 msgid "No spaces were found at end of line" msgstr "Inga blanksteg hittades pÃ¥ slutet av rad" #: ../plugins/Spaces/i18n.py:32 msgid "Removed spaces at end of lines" msgstr "Tog bort blanksteg pÃ¥ slutet av raderna" #: ../plugins/Spaces/i18n.py:33 msgid "S_paces" msgstr "B_lanksteg" #: ../plugins/Spaces/i18n.py:34 msgid "_Tabs to Spaces" msgstr "_Tabulatorer till blanksteg" #: ../plugins/Spaces/i18n.py:35 msgid "_Spaces to Tabs" msgstr "_Blanksteg till tabulatorer" #: ../plugins/Spaces/i18n.py:36 msgid "_Remove Trailing Spaces" msgstr "Ta bort _efterliggande blanksteg" #: ../plugins/GotoBar/i18n.py:23 msgid "Move cursor to a specific line" msgstr "Flytta markören till en specifik rad" #: ../plugins/GotoBar/i18n.py:24 msgid "Closed goto line bar" msgstr "Stängde GÃ¥ till rad-rad" #: ../plugins/GotoBar/i18n.py:25 #, python-format msgid " of %d" msgstr " av %d" #: ../plugins/GotoBar/i18n.py:26 msgid "Line number:" msgstr "Radnummer:" #: ../plugins/GotoBar/i18n.py:27 #, python-format msgid "Moved cursor to line %d" msgstr "Flyttade markören till rad %d" #: ../plugins/SearchReplace/i18n.py:23 msgid "Searching please wait..." msgstr "Söker, vänta..." #: ../plugins/SearchReplace/i18n.py:24 #, python-format msgid "Found %d matches" msgstr "Hittade %d sökträffar" #: ../plugins/SearchReplace/i18n.py:25 #, python-format msgid "Match %d of %d" msgstr "Sökträff %d av %d" #: ../plugins/SearchReplace/i18n.py:26 msgid "No match found" msgstr "Ingen sökträff hittades" #: ../plugins/SearchReplace/i18n.py:27 msgid "No next match found" msgstr "Ingen nästa sökträff hittades" #: ../plugins/SearchReplace/i18n.py:28 msgid "Stopped operation" msgstr "Stoppade Ã¥tgärden" #: ../plugins/SearchReplace/i18n.py:29 msgid "Replacing please wait..." msgstr "Ersätter, vänta..." #: ../plugins/SearchReplace/i18n.py:30 msgid "Replace found match" msgstr "" #: ../plugins/SearchReplace/i18n.py:31 msgid "Replaced all found matches" msgstr "Ersatte alla funna sökträffar" #: ../plugins/SearchReplace/i18n.py:32 msgid "No previous match found" msgstr "Ingen föregÃ¥ende sökträff hittades" #: ../plugins/ReplaceBar/i18n.py:30 msgid "Replac_e with:" msgstr "Ersät_t med:" #: ../plugins/ReplaceBar/i18n.py:32 msgid "Closed replace bar" msgstr "" #: ../plugins/ReplaceBar/i18n.py:33 msgid "_Replace" msgstr "_Ersätt" #: ../plugins/ReplaceBar/i18n.py:34 msgid "Replace _All" msgstr "Ersätt _alla" #: ../plugins/ReplaceBar/i18n.py:35 msgid "Incre_mental" msgstr "Inkre_mentell" #: ../plugins/ColorEditor/i18n.py:23 msgid "Change editor colors" msgstr "Ändra redigerarfärger" #: ../plugins/ColorEditor/i18n.py:24 msgid "Syntax Color Editor" msgstr "Redigerare för syntaxfärger" #: ../plugins/ColorEditor/i18n.py:25 msgid "_Use default theme" msgstr "_Använd standardtema" #: ../plugins/ColorEditor/i18n.py:26 msgid "Using theme colors" msgstr "Använder temafärger" #: ../plugins/ColorEditor/i18n.py:27 msgid "Using custom colors" msgstr "Använder anpassade färger" #: ../plugins/ColorEditor/i18n.py:28 msgid "Select foreground color" msgstr "Välj förgrundsfärg" #: ../plugins/ColorEditor/i18n.py:29 msgid "_Normal text color: " msgstr "_Normal textfärg: " #: ../plugins/ColorEditor/i18n.py:30 msgid "_Background color: " msgstr "_Bakgrundsfärg: " #: ../plugins/ColorEditor/i18n.py:31 msgid "_Foreground:" msgstr "_Förgrund:" #: ../plugins/ColorEditor/i18n.py:32 msgid "Back_ground:" msgstr "Bak_grund:" #: ../plugins/ColorEditor/i18n.py:33 msgid "Select background color" msgstr "Välj bakgrundsfärg" #: ../plugins/ColorEditor/i18n.py:34 msgid "Language Elements" msgstr "SprÃ¥kelement" #: ../plugins/ColorEditor/i18n.py:35 msgid "Select foreground syntax color" msgstr "Välj förgrundsfärg för syntax" #: ../plugins/ColorEditor/i18n.py:36 msgid "Select background syntax color" msgstr "Välj bakgrundsfärg för syntax" #: ../plugins/ColorEditor/i18n.py:39 msgid "_Underline" msgstr "_Understruken" #: ../plugins/ColorEditor/i18n.py:40 msgid "_Reset to Default" msgstr "_Ã…terställ till standard" #: ../plugins/SyntaxColorSwitcher/i18n.py:23 msgid "_Highlight Mode" msgstr "_Uppmärkningsläge" #: ../plugins/SyntaxColorSwitcher/i18n.py:25 #, python-format msgid "Activated '%s' syntax color" msgstr "Aktiverade färg för \"%s\"-syntax" #: ../plugins/SyntaxColorSwitcher/i18n.py:26 msgid "Disabled syntax color" msgstr "Inaktiverade syntaxfärg" #: ../data/ModificationDialog.glade.h:1 msgid "This file has been modified by another program" msgstr "Den här filen har ändrats av ett annat program" #: ../data/ModificationDialog.glade.h:2 msgid "Discard current file and load modified file" msgstr "Förkasta aktuell fil och läs in den ändrade filen" #: ../data/ModificationDialog.glade.h:3 msgid "I_gnore" msgstr "I_gnorera" #: ../data/ModificationDialog.glade.h:4 msgid "Neither reload nor overwrite file" msgstr "Läs varken om eller skriv över filen" #: ../data/ModificationDialog.glade.h:5 msgid "Save current file and overwrite changes made by other program" msgstr "Spara aktuell fil och skriv över ändringarna gjorda av det andra programmet" #: ../data/ModificationDialog.glade.h:6 msgid "Warning" msgstr "Varning" #: ../data/ModificationDialog.glade.h:7 msgid "_Overwrite File" msgstr "S_kriv över fil" #: ../data/ModificationDialog.glade.h:8 msgid "_Reload File" msgstr "Läs _om fil" scribes-0.4~r910/po/pt_BR.po0000644000175000017500000022213111242100540015407 0ustar andreasandreas# Brazilian Portuguese translation of Scribes # Copyright (C) 2005 Lateef Alabi-Oki # This file is distributed under the same license as the Scribes package. # Leonardo Ferreira Fontenelle , 2006, 2007. # msgid "" msgstr "" "Project-Id-Version: Scribes 0.2.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-05-07 01:52-0300\n" "PO-Revision-Date: 2007-05-07 02:04-0300\n" "Last-Translator: Leonardo Ferreira Fontenelle \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. .decode(encoding).encode("utf-8") #: ../data/scribes.desktop.in.h:1 ../SCRIBES/internationalization.py:321 msgid "Edit text files" msgstr "Edite documentos de texto" #. .decode(encoding).encode("utf-8") #. From scribes.desktop #: ../data/scribes.desktop.in.h:2 ../SCRIBES/internationalization.py:320 msgid "Scribes Text Editor" msgstr "Editor de Texto Scribes" #: ../data/scribes.schemas.in.h:1 msgid "A list of encodings selected by the user." msgstr "Uma lista de codificações selecionada pelo usuário." #: ../data/scribes.schemas.in.h:2 msgid "Case sensitive" msgstr "Dif. maiúsc./minúsc." #: ../data/scribes.schemas.in.h:3 msgid "Detach Scribes from the shell terminal" msgstr "Destaca o Scribes do terminal" #: ../data/scribes.schemas.in.h:4 msgid "" "Determines whether or not to use GTK theme colors when drawing the text " "editor buffer foreground and background colors. If the value is true, the " "GTK theme colors are used. Otherwise the color determined by one assigned by " "the user." msgstr "" "Usar ou não cores do tema GTK no primeiro plano e no plano de fundo do " "editor de texto. Se o valor for verdadeiro, as cores do tema GTK serão " "usadas; se não, as cores determinadas pelo usuário." #: ../data/scribes.schemas.in.h:5 msgid "Determines whether to show or hide the status area." msgstr "Mostrar ou ocultar a área de estado." #: ../data/scribes.schemas.in.h:6 msgid "Determines whether to show or hide the toolbar." msgstr "Mostrar ou ocultar a barra de ferramentas." #: ../data/scribes.schemas.in.h:7 msgid "Editor background color" msgstr "Cor do plano de fundo do editor" #: ../data/scribes.schemas.in.h:8 msgid "Editor foreground color" msgstr "Cor de primeiro plano do editor" #: ../data/scribes.schemas.in.h:9 msgid "Editor's font" msgstr "Fonte do editor" #: ../data/scribes.schemas.in.h:10 msgid "Enable or disable spell checking" msgstr "Ativa ou desativa a verificação ortográfica" #: ../data/scribes.schemas.in.h:11 msgid "Enables or disables right margin" msgstr "Ativa ou desativa a margem direita" #: ../data/scribes.schemas.in.h:12 msgid "Enables or disables text wrapping" msgstr "Ativa ou desativa quebra de texto" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:13 ../SCRIBES/internationalization.py:138 msgid "Find occurrences of the string that match the entire word only" msgstr "Procurar ocorrências da expressão coincidindo com palavra inteira" #. .decode(encoding).encode("utf-8") #: ../data/scribes.schemas.in.h:14 ../SCRIBES/internationalization.py:136 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "Procurar ocorrências da expressão diferenciando maiúsculas/minúsculas" #: ../data/scribes.schemas.in.h:15 msgid "Lexical scope highlight color" msgstr "Cor para destaque de escopo léxico" #: ../data/scribes.schemas.in.h:16 msgid "Match word" msgstr "Coincidir palavra" #: ../data/scribes.schemas.in.h:17 msgid "Position of margin" msgstr "Posição da margem" #: ../data/scribes.schemas.in.h:18 msgid "Selected encodings" msgstr "Codificações selecionadas" #: ../data/scribes.schemas.in.h:19 msgid "Sets the margin's position within the editor" msgstr "Configura a posição da margem no editor" #: ../data/scribes.schemas.in.h:20 msgid "Sets the width of tab stops within the editor" msgstr "Configura a largura das tabulações no editor" #: ../data/scribes.schemas.in.h:21 msgid "Show margin" msgstr "Mostrar margem" #: ../data/scribes.schemas.in.h:22 msgid "Show or hide the status area." msgstr "Mostrar ou ocultar a área de estado." #: ../data/scribes.schemas.in.h:23 msgid "Show or hide the toolbar." msgstr "Mostrar ou ocultar a barra de ferramentas." #: ../data/scribes.schemas.in.h:24 msgid "Spell checking" msgstr "Verificação ortográfica" #: ../data/scribes.schemas.in.h:25 msgid "Tab width" msgstr "Largura da tabulação" #: ../data/scribes.schemas.in.h:26 msgid "Text wrapping" msgstr "Quebra automática de texto" #: ../data/scribes.schemas.in.h:27 msgid "The color used to render normal text in the text editor's buffer." msgstr "A cor usada para renderizar texto normal no buffer to editor de texto." #: ../data/scribes.schemas.in.h:28 msgid "The color used to render the text editor buffer background." msgstr "" "A cor usada para renderizar o plano de fundo do buffer do editor de texto." #: ../data/scribes.schemas.in.h:29 msgid "The editor's font. Must be a string value" msgstr "A fonte do editor. Precisa ser uma \"string\"" #: ../data/scribes.schemas.in.h:30 msgid "" "The highlight color when the cursor is around opening or closing pair " "characters." msgstr "" "A cor de seleção usada quando o cursor está ao redor de caracteres abrindo " "ou fechando parênteses, colchetes, chaves etc.." #: ../data/scribes.schemas.in.h:31 msgid "" "True to detach Scribes from the shell terminal and run it in its own " "process, false otherwise. For debugging purposes, it may be useful to set " "this to false." msgstr "" "Verdadeiro para destacar o Scribes do terminal e executá-lo em seu próprio " "processo, senão falso. Para propósitos de depuração, pode ser útil definir " "esta opção para falso." #: ../data/scribes.schemas.in.h:32 msgid "True to use tabs instead of spaces, false otherwise." msgstr "Verdadeiro para usar tabulações ao invés de falso; falso para não." #: ../data/scribes.schemas.in.h:33 msgid "Use GTK theme colors" msgstr "Usar cores do tema GTK" #: ../data/scribes.schemas.in.h:34 msgid "Use Tabs instead of spaces" msgstr "Usar tabulações em vez de espaços" #. From module accelerators.py #: ../SCRIBES/internationalization.py:41 ../plugins/UndoRedo/i18n.py:27 msgid "Cannot redo action" msgstr "Impossível refazer ação" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:44 msgid "Leave Fullscreen" msgstr "Deixar Tela Cheia" #. .decode(encoding).encode("utf-8") #. From module editor_ng.py, fileloader.py, timeout.py #: ../SCRIBES/internationalization.py:47 ../plugins/SaveDialog/i18n.py:25 msgid "Unsaved Document" msgstr "Documento Novo" #. .decode(encoding).encode("utf-8") #. From module filechooser.py #: ../SCRIBES/internationalization.py:51 msgid "All Documents" msgstr "Todos os Documentos" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:52 msgid "Python Documents" msgstr "Documentos Python" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:53 msgid "Text Documents" msgstr "Documentos de Texto" #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:56 #, python-format msgid "Loaded file \"%s\"" msgstr "Documento \"%s\" aberto" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:57 msgid "" "The encoding of the file you are trying to open could not be determined. Try " "opening the file with another encoding." msgstr "" "A codificação do arquivo que você está tentando abrir não pôde ser " "reconhecida. Tente abrir o arquivo com outra codificação." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:59 msgid "Loading file please wait..." msgstr "Abrindo o documento, por favor aguarde..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:60 msgid "" "An error occurred while openning the file. Please file a bug report at " "http://scribes.sourceforge.net" msgstr "" "Ocorreu um erro ao abrir esse documento. Por favor, envie um relatório de " "erro através de http://scribes.sourceforge.net" #. .decode(encoding).encode("utf-8") #. From module fileloader.py, savechooser.py #: ../SCRIBES/internationalization.py:64 msgid " " msgstr " " #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:67 msgid "You do not have permission to view this file." msgstr "Você não tem permissão para leitura deste documento." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:68 msgid "The file you are trying to open is not a text file." msgstr "O arquivo que você está tentando abrir não é um arquivo de texto." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:69 msgid "The file you are trying to open does not exist." msgstr "O documento que você está tentando abrir não existe." #. .decode(encoding).encode("utf-8") #. From module main.py #: ../SCRIBES/internationalization.py:72 #, python-format msgid "Unrecognized option: '%s'" msgstr "Opção não reconhecida: \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:73 msgid "Try 'scribes --help' for more information" msgstr "Tente \"scribes --help\" para mais informações" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:74 msgid "Scribes only supports using one option at a time" msgstr "Scribes só dá suporte a uma opção por vez" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:75 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s não leva argumentos" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:76 #, python-format msgid "Scribes version %s" msgstr "Scribes versão %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:77 #, python-format msgid "%s does not exist" msgstr "%s não existe" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:80 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "O documento \"%s\" está aberto em modo somente leitura" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:81 #, python-format msgid "The file \"%s\" is open" msgstr "O documento \"%s\" está aberto" #. .decode(encoding).encode("utf-8") #. From modules findbar.py #: ../SCRIBES/internationalization.py:84 #, python-format msgid "Found %d match" msgstr "%d ocorrência encontrada" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:85 msgid "_Search for: " msgstr "Pesquisar por: " #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:89 msgid "No indentation selection found" msgstr "Nenhuma seleção de recuo encontrada" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:90 ../plugins/Indent/i18n.py:25 msgid "Selection indented" msgstr "Recuo realizado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:91 ../plugins/Indent/i18n.py:27 msgid "Unindentation is not possible" msgstr "Impossível desfazer recuo" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:92 ../plugins/Indent/i18n.py:28 msgid "Selection unindented" msgstr "Recuo desfeito" #. .decode(encoding).encode("utf-8") #. From module modes.py #: ../SCRIBES/internationalization.py:95 msgid "loading..." msgstr "abrindo..." #. .decode(encoding).encode("utf-8") #. From module preferences.py #. From module replace.py #: ../SCRIBES/internationalization.py:100 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" foi substituído por \"%s\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:101 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Todas ocorrências de \"%s\" substituídas por \"%s\"" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:104 msgid "An error occurred while saving this file." msgstr "Surgiu um erro ao salvar esse documento." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:105 msgid "" "An error occurred while decoding your file. Please file a bug report at " "\"http://openusability.org/forum/?group_id=141\"" msgstr "" "Surgiu um erro ao codificar o seu documento. Por favor, envie um relatório " "de erro através de \"http://openusability.org/forum/?group_id=141\"" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:107 #, python-format msgid "Saved \"%s\"" msgstr "\"%s\" salvado" #. .decode(encoding).encode("utf-8") #. From module textview.py #: ../SCRIBES/internationalization.py:110 msgid "_Find Matching Bracket" msgstr "Localizar _Parêntese Correspondente" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:111 msgid "Copied selected text" msgstr "Texto copiado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:112 msgid "No selection to copy" msgstr "Não há texto selecionado para copiar" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:113 msgid "Cut selected text" msgstr "Texto cortado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:114 msgid "No selection to cut" msgstr "Não há texto selecionado para cortar" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:115 msgid "Pasted copied text" msgstr "Texto colado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:116 msgid "No text content in the clipboard" msgstr "Não há texto na área de transferência" #. .decode(encoding).encode("utf-8") #. From module timeout.py #: ../SCRIBES/internationalization.py:119 #, python-format msgid "%d%% complete" msgstr "%d%% completo" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:120 msgid "completed" msgstr "completado" #. .decode(encoding).encode("utf-8") #. From module tooltips.py #: ../SCRIBES/internationalization.py:123 msgid "Open a new window" msgstr "Abre uma nova janela" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:124 msgid "Open a file" msgstr "Abre um arquivo" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:125 msgid "Rename the current file" msgstr "Renomeia o arquivo atual" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:126 msgid "Print the current file" msgstr "Imprime o arquivo atual" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:127 msgid "Undo last action" msgstr "Desfaz a última ação" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:128 msgid "Redo undone action" msgstr "Refaz a ação desfeita" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:129 ../plugins/IncrementalBar/i18n.py:28 #: ../plugins/FindBar/i18n.py:28 ../plugins/ReplaceBar/i18n.py:28 msgid "Search for text" msgstr "Pesquisa por texto" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:130 ../plugins/ReplaceBar/i18n.py:31 msgid "Search for and replace text" msgstr "Pesquisa por texto e o substitui" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:131 msgid "Go to a specific line" msgstr "Vai até uma determinada linha" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:132 msgid "Configure the editor" msgstr "Configura o editor" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:133 msgid "Launch the help browser" msgstr "Lança o navegador da ajuda" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:134 msgid "Search for previous occurrence of the string" msgstr "Pesquisa pela ocorrência anterior da expressão" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:135 msgid "Search for next occurrence of the string" msgstr "Pesquisa pela próxima ocorrência da expressão" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:139 msgid "Type in the text you want to search for" msgstr "Digite o texto pelo qual deseja pesquisa" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:140 msgid "Type in the text you want to replace with" msgstr "Digite o texto pelo qual deseja substituir" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:141 msgid "Replace the selected found match" msgstr "Substituir a ocorrência selecionada" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:142 msgid "Replace all found matches" msgstr "Substituir todas as ocorrências encontradas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:143 msgid "Click to specify the font type, style, and size to use for text." msgstr "Especifica família, estilo e tamanho de fonte usados no texto." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:144 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" "Especifica a largura do espaço inserido quando você pressiona a tecla Tab." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:146 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "Quebra a linha quando o texto alcançar o limite da janela." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:148 msgid "Select to display a vertical line that indicates the right margin." msgstr "Exibe uma linha vertical indicando a margem direita." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:150 msgid "Click to specify the location of the vertical line." msgstr "Especifica a localização da linha vertical." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:151 msgid "Select to enable spell checking" msgstr "Ativa a verificação ortográfica" #. .decode(encoding).encode("utf-8") #. From module usage.py #: ../SCRIBES/internationalization.py:155 msgid "A text editor for GNOME." msgstr "Um editor de texto para o GNOME." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:156 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "uso: scribes [OPÇÃO] [ARQUIVO] [...]" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:157 msgid "Options:" msgstr "Opções:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:158 msgid "display this help screen" msgstr "exibir essa tela de ajuda" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:159 msgid "output version information of Scribes" msgstr "exibir informação sobre a versão do Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:160 msgid "create a new file and open the file with Scribes" msgstr "criar um documento novo e abri-lo com o Scribes" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:161 msgid "open file in readonly mode" msgstr "abrir um documento em modo somente leitura" #. .decode(encoding).encode("utf-8") #. From module utility.py #: ../SCRIBES/internationalization.py:164 msgid "Could not find Scribes' data folder" msgstr "Não foi possível encontrar o diretório de dados do Scribes" #. .decode(encoding).encode("utf-8") #. From preferences.py #. From error.py #: ../SCRIBES/internationalization.py:170 msgid "error" msgstr "erro" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:173 #, python-format msgid "Removed spaces at end of line %d" msgstr "Espaços removidos ao fim da linha %d" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:176 msgid "No spaces were found at beginning of line" msgstr "Não há espaços no começo da linha" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:177 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Espaços removidos do começo da linha %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:178 msgid "Removed spaces at beginning of selected lines" msgstr "Espaços removidos do começo das linhas selecionadas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:179 msgid "Removed spaces at end of selected lines" msgstr "Espaços removidos do fim das linhas selecionadas" #. .decode(encoding).encode("utf-8") #. From module actions.py #: ../SCRIBES/internationalization.py:182 ../plugins/Indent/i18n.py:23 #: ../plugins/Selection/i18n.py:23 ../plugins/Lines/i18n.py:23 #: ../plugins/SaveFile/i18n.py:23 ../plugins/UndoRedo/i18n.py:23 #: ../plugins/Spaces/i18n.py:23 msgid "Cannot perform operation in readonly mode" msgstr "Impossível realizar operação em modo somente leitura" #. .decode(encoding).encode("utf-8") #. From module indent.py #: ../SCRIBES/internationalization.py:185 ../plugins/Indent/i18n.py:29 #, python-format msgid "Unindented line %d" msgstr "Recuo desfeito na linha %d" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:186 msgid "No selected lines can be indented" msgstr "Não há recuo para desfazer nas linha selecionadas" #. .decode(encoding).encode("utf-8") #. From module savefile.py #: ../SCRIBES/internationalization.py:189 msgid "" "An error occurred while encoding your file. Try saving your file using " "another character encoding, preferably UTF-8." msgstr "" "Ocorreu um erro ao codificar o seu documento. Tente salvar seu documento " "usando outra codificação, de preferência UTF-8." #. .decode(encoding).encode("utf-8") #. From module fileloader.py #: ../SCRIBES/internationalization.py:193 msgid "" "An encoding error occurred. Please file a bug report at http://openusability." "org/forum/?group_id=141" msgstr "" "Ocorreu um erro ao abrir esse arquivo. Por favor, envie um relatório de erro " "através de http://openusability.org/forum/?group_id=141" #. .decode(encoding).encode("utf-8") #. From autocomplete.py #: ../SCRIBES/internationalization.py:198 #: ../plugins/WordCompletionGUI/i18n.py:3 msgid "Word completion occurred" msgstr "Palavra completada" #. .decode(encoding).encode("utf-8") #. From encoding.py #: ../SCRIBES/internationalization.py:201 msgid "Character _Encoding: " msgstr "C_odificação: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:202 msgid "Add or Remove Encoding ..." msgstr "Adicionar ou Remover Codificação..." #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:203 msgid "Recommended (UTF-8)" msgstr "UTF-8 (recommendado)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:204 msgid "Add or Remove Character Encoding" msgstr "Adicionar ou Remover Codificação" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:205 msgid "Language and Region" msgstr "Língua e Região" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:206 msgid "Character Encoding" msgstr "Codificação" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:207 msgid "Select" msgstr "Selecionar" #. .decode(encoding).encode("utf-8") #. From filechooser.py, savechooser.py #: ../SCRIBES/internationalization.py:210 msgid "Select character _encoding" msgstr "Selecionar _codificação" #. .decode(encoding).encode("utf-8") #. From filechooser.py #: ../SCRIBES/internationalization.py:213 msgid "Closed dialog window" msgstr "Janela de diálogo fechada" #. .decode(encoding).encode("utf-8") #. From error.py #: ../SCRIBES/internationalization.py:216 #, python-format msgid "Cannot open %s" msgstr "Impossível abrir %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:217 msgid "Closed error dialog" msgstr "Diálogo de erro fechado" #. .decode(encoding).encode("utf-8") #. From fileloader.py #: ../SCRIBES/internationalization.py:220 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. " "Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "Não foi possível determinar o tipo de arquivo que você está tentando abrir. " "Certifique-se de que seja um arquivo de texto.\n" "\n" "Tipo MIME: %s" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:222 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "O arquivo que você está tentando abrir não é de texto.\n" "\n" "Tipo MIME: %s" #. .decode(encoding).encode("utf-8") #. From printing.py #: ../SCRIBES/internationalization.py:226 #, python-format msgid "Printing \"%s\"" msgstr "Imprimindo \"%s\"" #. .decode(encoding).encode("utf-8") #. From encoding.py #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:229 #: ../SCRIBES/internationalization.py:232 #: ../SCRIBES/internationalization.py:234 msgid "English" msgstr "Inglês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:230 #: ../SCRIBES/internationalization.py:231 #: ../SCRIBES/internationalization.py:255 msgid "Traditional Chinese" msgstr "Chinês Tradicional" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:233 #: ../SCRIBES/internationalization.py:241 #: ../SCRIBES/internationalization.py:245 #: ../SCRIBES/internationalization.py:264 #: ../SCRIBES/internationalization.py:290 msgid "Hebrew" msgstr "Judaico " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:235 #: ../SCRIBES/internationalization.py:238 #: ../SCRIBES/internationalization.py:258 #: ../SCRIBES/internationalization.py:261 #: ../SCRIBES/internationalization.py:295 #: ../SCRIBES/internationalization.py:303 msgid "Western Europe" msgstr "Europa Ocidental" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:236 #: ../SCRIBES/internationalization.py:250 #: ../SCRIBES/internationalization.py:252 #: ../SCRIBES/internationalization.py:262 #: ../SCRIBES/internationalization.py:289 #: ../SCRIBES/internationalization.py:300 msgid "Greek" msgstr "Grego" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:237 #: ../SCRIBES/internationalization.py:266 #: ../SCRIBES/internationalization.py:293 msgid "Baltic languages" msgstr "Línguas bálticas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:239 #: ../SCRIBES/internationalization.py:259 #: ../SCRIBES/internationalization.py:284 #: ../SCRIBES/internationalization.py:302 msgid "Central and Eastern Europe" msgstr "Europa Central e Oriental" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:240 #: ../SCRIBES/internationalization.py:260 #: ../SCRIBES/internationalization.py:287 #: ../SCRIBES/internationalization.py:299 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Búlgaro, Macedoniano, Russo, Sérvio" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:242 #: ../SCRIBES/internationalization.py:257 #: ../SCRIBES/internationalization.py:263 #: ../SCRIBES/internationalization.py:291 #: ../SCRIBES/internationalization.py:304 msgid "Turkish" msgstr "Turco" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:243 msgid "Portuguese" msgstr "Português" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:244 #: ../SCRIBES/internationalization.py:301 msgid "Icelandic" msgstr "Islandês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:246 msgid "Canadian" msgstr "Canadense" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:247 #: ../SCRIBES/internationalization.py:265 #: ../SCRIBES/internationalization.py:288 msgid "Arabic" msgstr "Ãrabe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:248 msgid "Danish, Norwegian" msgstr "Dinamarquês, Norueguês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:249 #: ../SCRIBES/internationalization.py:297 msgid "Russian" msgstr "Russo" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:251 msgid "Thai" msgstr "Tailandês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:253 #: ../SCRIBES/internationalization.py:268 #: ../SCRIBES/internationalization.py:269 #: ../SCRIBES/internationalization.py:270 #: ../SCRIBES/internationalization.py:276 #: ../SCRIBES/internationalization.py:277 #: ../SCRIBES/internationalization.py:279 #: ../SCRIBES/internationalization.py:280 #: ../SCRIBES/internationalization.py:281 #: ../SCRIBES/internationalization.py:306 #: ../SCRIBES/internationalization.py:307 #: ../SCRIBES/internationalization.py:308 msgid "Japanese" msgstr "Japonês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:254 #: ../SCRIBES/internationalization.py:271 #: ../SCRIBES/internationalization.py:282 #: ../SCRIBES/internationalization.py:296 msgid "Korean" msgstr "Coreano" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:256 msgid "Urdu" msgstr "Urdu" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:267 msgid "Vietnamese" msgstr "Vietnamita" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:272 #: ../SCRIBES/internationalization.py:275 msgid "Simplified Chinese" msgstr "Chinês Simplificado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:273 #: ../SCRIBES/internationalization.py:274 msgid "Unified Chinese" msgstr "Chinês Unificado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:278 msgid "Japanese, Korean, Simplified Chinese" msgstr "Japonês, Coreano, Chinês Simplificado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:283 msgid "West Europe" msgstr "Europa Ocidental" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:285 msgid "Esperanto, Maltese" msgstr "Esperando, Maltês" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:286 msgid "Baltic languagues" msgstr "Línguas bálticas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:292 msgid "Nordic languages" msgstr "Línguas nórdicas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:294 msgid "Celtic languages" msgstr "Língas célticas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:298 msgid "Ukrainian" msgstr "Ucraniano" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:305 msgid "Kazakh" msgstr "Cazaque" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:309 msgid "All languages" msgstr "Todas as línguas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:310 #: ../SCRIBES/internationalization.py:311 msgid "All Languages (BMP only)" msgstr "Todas as línguas (apenas BMP)" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:312 msgid "All Languages" msgstr "Todas as línguas" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:313 #: ../plugins/SyntaxColorSwitcher/i18n.py:24 msgid "None" msgstr "Nenhuma" #. .decode(encoding).encode("utf-8") #. From indent.py #: ../SCRIBES/internationalization.py:317 msgid "Replaced tabs with spaces on selected lines" msgstr "Tabulações substituídas por espaços nas linhas selecionadas" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #: ../SCRIBES/internationalization.py:325 msgid "Co_lor: " msgstr "_Cor: " #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:326 ../plugins/ColorEditor/i18n.py:37 msgid "B_old" msgstr "_Negrito" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:327 ../plugins/ColorEditor/i18n.py:38 msgid "I_talic" msgstr "_Itálico" #. .decode(encoding).encode("utf-8") #. From templateadd.py #: ../SCRIBES/internationalization.py:331 msgid "_Name:" msgstr "_Nome:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:332 msgid "_Description:" msgstr "_Descrição:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:333 msgid "_Template:" msgstr "_Modelo:" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:334 msgid "Add New Template" msgstr "Adicionar Modelo" #. .decode(encoding).encode("utf-8") #. From templateedit.py #: ../SCRIBES/internationalization.py:337 ../plugins/TemplateEditor/i18n.py:28 msgid "Edit Template" msgstr "Editar Modelo" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:340 msgid "Select to use themes' foreground and background colors" msgstr "Usa as cores do tema padrão para primeiro plano e plano de fundo" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:341 msgid "Click to choose a new color for the editor's text" msgstr "Escolhe a cor do texto do editor" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:342 msgid "Click to choose a new color for the editor's background" msgstr "Escolhe a cor do plano de fundo do editor" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:343 msgid "Click to choose a new color for the language syntax element" msgstr "Escolhe a cor do elemento da sintaxe da linguagem" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:344 msgid "Select to make the language syntax element bold" msgstr "Negrita o elemento de sintaxe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:345 msgid "Select to make the language syntax element italic" msgstr "Italiciza o elemento de linguagem" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:346 msgid "Select to reset the language syntax element to its default settings" msgstr "" "Reverte o elemento da sintaxe da linguagem para sua configuração padrão" #. .decode(encoding).encode("utf-8") #. From syntaxcoloreditor.py #. From readonly.py #: ../SCRIBES/internationalization.py:353 msgid "Toggled readonly mode on" msgstr "Modo somente leitura ativado" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:354 msgid "Toggled readonly mode off" msgstr "Modo somente leitura desativado" #. .decode(encoding).encode("utf-8") #. From tooltips.py #: ../SCRIBES/internationalization.py:357 msgid "Menu for advanced configuration" msgstr "Menu para configuração avançada" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:358 msgid "Configure the editor's foreground, background or syntax colors" msgstr "" "Configurar as cores de primeiro plano, plano de fundo ou destaque de sintaxe" #. .decode(encoding).encode("utf-8") #: ../SCRIBES/internationalization.py:359 msgid "Create, modify or manage templates" msgstr "Criar, modificar ou gerenciar modelos" #. .decode(encoding).encode("utf-8") #. From cursor.py #: ../SCRIBES/internationalization.py:362 #, python-format msgid "Ln %d col %d" msgstr "Li %d col %d" #. .decode(encoding).encode("utf-8") #. From passworddialog.py #: ../SCRIBES/internationalization.py:365 msgid "Authentication Required" msgstr "Autenticação Necessária" #: ../SCRIBES/internationalization.py:366 #, python-format msgid "You must log in to access %s" msgstr "Você precisa identificar-se para acessar %s" #: ../SCRIBES/internationalization.py:367 msgid "_Password:" msgstr "_Senha:" #: ../SCRIBES/internationalization.py:368 msgid "_Remember password for this session" msgstr "_Lembrar senha durante essa sessão" #: ../SCRIBES/internationalization.py:369 msgid "Save password in _keyring" msgstr "Salvar a senha no c_haveiro" #. From fileloader.py #: ../SCRIBES/internationalization.py:372 #, python-format msgid "Loading \"%s\"..." msgstr "Carregando \"%s\"..." #. From bookmark.py #: ../SCRIBES/internationalization.py:375 msgid "Moved to most recently bookmarked line" msgstr "Cursor movido para o marcador mais recente" #: ../SCRIBES/internationalization.py:376 msgid "Already on most recently bookmarked line" msgstr "Cursor já está no marcador mais recente" #. bookmarktrigger.py #: ../SCRIBES/internationalization.py:377 #: ../SCRIBES/internationalization.py:452 #: ../plugins/BookmarkBrowser/i18n.py:27 msgid "No bookmarks found" msgstr "Nenhum marcador encontrado" #. From dialogfilter.py #: ../SCRIBES/internationalization.py:381 msgid "Ruby Documents" msgstr "Documentos Ruby" #: ../SCRIBES/internationalization.py:382 msgid "Perl Documents" msgstr "Documentos Perl" #: ../SCRIBES/internationalization.py:383 msgid "C Documents" msgstr "Documentos C" #: ../SCRIBES/internationalization.py:384 msgid "C++ Documents" msgstr "Documentos C++" #: ../SCRIBES/internationalization.py:385 msgid "C# Documents" msgstr "Documentos C#" #: ../SCRIBES/internationalization.py:386 msgid "Java Documents" msgstr "Documentos Java" #: ../SCRIBES/internationalization.py:387 msgid "PHP Documents" msgstr "Documentos PHP" #: ../SCRIBES/internationalization.py:388 msgid "HTML Documents" msgstr "Documentos HTML" #: ../SCRIBES/internationalization.py:389 ../plugins/TemplateEditor/i18n.py:27 msgid "XML Documents" msgstr "Documentos XML" #: ../SCRIBES/internationalization.py:390 msgid "Haskell Documents" msgstr "Documentos Haskell" #: ../SCRIBES/internationalization.py:391 msgid "Scheme Documents" msgstr "Documentos Scheme" #. From textview.py #: ../SCRIBES/internationalization.py:394 msgid "INS" msgstr "INS" #: ../SCRIBES/internationalization.py:395 msgid "OVR" msgstr "SE" #. From loader.py #: ../SCRIBES/internationalization.py:398 msgid "" "Open Error: An error occurred while opening the file. Try opening the file " "again or file a bug report." msgstr "" "Erro ao Abrir: Ocorreu um erro ao abrir o arquivo. Tente abri-lo novamente " "ou faça um relatório de erro." #: ../SCRIBES/internationalization.py:400 #, python-format msgid "Info Error: Information on %s cannot be retrieved." msgstr "Erro de Informação: Não foi possível recuperar informações de %s." #: ../SCRIBES/internationalization.py:401 msgid "Info Error: Access has been denied to the requested file." msgstr "Erro de Informação: Acesso negado ao arquivo solicitado." #: ../SCRIBES/internationalization.py:402 msgid "Permission Error: Access has been denied to the requested file." msgstr "Erro de Permissão: Acesso negado ao arquivo solicitado." #: ../SCRIBES/internationalization.py:403 msgid "Cannot open file" msgstr "Não foi possível abrir o arquivo" #. From save.py #: ../SCRIBES/internationalization.py:406 msgid "" "You do not have permission to save the file. Try saving the file to your " "desktop, or to a folder you own. Automatic saving has been disabled until " "the file is saved correctly without errors." msgstr "" "Você não tem permissão para salvar o arquivo. Tente salvá-lo em sua Ãrea de " "Trabalho, ou para outra pasta que você possua. O recurso de salvar " "automaticamente permanecerá desativado até que o arquivo seja salvo sem " "erros." #: ../SCRIBES/internationalization.py:409 msgid "" "A saving operation failed. Could not create swap area. Make sure you have " "permission to save to your home folder. Also check to see that you have not " "run out of disk space. Automatic saving will be disabled until the document " "is properly saved." msgstr "" "Uma operação de gravação falhou. Não foi possível criar área de troca. " "Certifique-se de ter permissão para salvar em sua pasta pessoal. Verifique " "também de ter espaço em disco. O recurso de salvar automaticamente será " "desativado até que o arquivo seja salvado sem erros." #: ../SCRIBES/internationalization.py:413 msgid "" "An error occured while creating the file. Automatic saving has been disabled " "until the file is saved correctly without errors." msgstr "" "Ocorreu um erro ao criar o arquivo. O recurso de salvar automaticamente será " "desativado até que o arquivo seja salvo sem erros." #: ../SCRIBES/internationalization.py:415 msgid "" "A saving error occured. The document could not be transfered from its " "temporary location. Automatic saving has been disabled until the file is " "saved correctly without errors." msgstr "" "Ocorreu um erro de gravação. Não foi possível transferir o documento de sua " "localização temporária. O recurso de salvar automaticamente será desativado " "até que o arquivo seja salvo sem erros." #: ../SCRIBES/internationalization.py:418 msgid "" "You do not have permission to save the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Você não tem permissão para salvar o arquivo. O recurso de salvar " "automaticamente será desativado até que o arquivo seja salvo sem erros." #: ../SCRIBES/internationalization.py:420 msgid "" "A decoding error occured while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Ocorreu um erro de decodificação ao salvar o arquivo. O recurso de salvar " "automaticamente será desativado até que o arquivo seja salvo sem erros." #: ../SCRIBES/internationalization.py:422 msgid "" "An encoding error occurred while saving the file. Automatic saving will be " "disabled until the file is properly saved." msgstr "" "Ocorreu um erro de codificação ao salvar o arquivo. O recurso de salvar " "automaticamente será desativado até que o arquivo seja salvo sem erros." #. From regexbar.py #: ../SCRIBES/internationalization.py:426 msgid "Search for text using regular expression" msgstr "Pesquisar texto usando expressão regular" #: ../SCRIBES/internationalization.py:427 msgid "Close regular expression bar" msgstr "Fechar barra de expressão regular" #. From replacestopbutton.py #: ../SCRIBES/internationalization.py:430 msgid "Stopped replacing" msgstr "Substituição interrompida" #. templateeditorexportbutton.py #: ../SCRIBES/internationalization.py:433 #: ../plugins/TemplateEditor/Template.glade.h:6 msgid "E_xport" msgstr "E_xportar" #. templateeditorimportbutton.py #: ../SCRIBES/internationalization.py:436 #: ../plugins/TemplateEditor/Template.glade.h:8 msgid "I_mport" msgstr "I_mportar" #. templateadddialog.py #: ../SCRIBES/internationalization.py:439 msgid "Error: Name field must contain a string." msgstr "Erro: Campo nome deve conter uma expressão." #: ../SCRIBES/internationalization.py:440 #, python-format msgid "Error: '%s' already in use. Please choose another string." msgstr "Erro: \"%s\" já em uso. Por favor, escolha outra expressão." #: ../SCRIBES/internationalization.py:441 msgid "Error: Name field cannot have any spaces." msgstr "Erro: Campo Nome não pode conter espaço." #: ../SCRIBES/internationalization.py:442 msgid "Error: Template editor can only have one '${cursor}' placeholder." msgstr "" "Erro: Editor de modelos pode conter apenas um espaço reservado \"${cursor}\"." #. importdialog.py #: ../SCRIBES/internationalization.py:445 msgid "Error: Invalid template file." msgstr "Erro: Arquivo de modelos inválido." #. exportdialog.py #: ../SCRIBES/internationalization.py:449 #: ../plugins/TemplateEditor/Template.glade.h:7 msgid "Export Template" msgstr "Exporta o Modelo" #. preftabcheckbutton.py #: ../SCRIBES/internationalization.py:457 msgid "Use spaces instead of tabs for indentation" msgstr "Usar espaço ao invés de tabulação recuar o texto" #: ../SCRIBES/internationalization.py:461 msgid "Select to underline language syntax element" msgstr "Sublinha o elemento da sintaxe da linguagem" #: ../SCRIBES/internationalization.py:464 #: ../plugins/DocumentBrowser/i18n.py:24 msgid "Open Documents" msgstr "Documentos Abertos" #: ../SCRIBES/internationalization.py:466 msgid "Current document is focused" msgstr "Documento atual já focado" #: ../SCRIBES/internationalization.py:467 msgid "Open recently used files" msgstr "Abre arquivos usados recentemente" #: ../SCRIBES/internationalization.py:469 msgid "Failed to save file" msgstr "Não foi possível salvar arquivo" #: ../SCRIBES/internationalization.py:470 msgid "" "Save Error: You do not have permission to modify this file or save to its " "location." msgstr "" "Erro ao Salvar: Você não tem permissão para modificar este arquivo ou salvar " "em sua localização." #: ../SCRIBES/internationalization.py:472 msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "" "Erro ao Salvar: Não foi possível transferir arquivo da localização " "temporária para a permanente." #: ../SCRIBES/internationalization.py:473 msgid "Save Error: Failed to create swap location or file." msgstr "" "Erro ao Salvar: Não foi possível criar localização ou arquivo temporário." #: ../SCRIBES/internationalization.py:474 msgid "Save Error: Failed to create swap file for saving." msgstr "Erro ao Salvar: Não foi possível criar arquivo temporário para salvar." #: ../SCRIBES/internationalization.py:475 msgid "Save Error: Failed to write swap file for saving." msgstr "" "Erro ao Salvar: Não foi possível gravar no arquivo temporário para salvar." #: ../SCRIBES/internationalization.py:476 msgid "Save Error: Failed to close swap file for saving." msgstr "" "Erro ao Salvar: Não foi possível fechar arquivo temporário para salvar." #: ../SCRIBES/internationalization.py:477 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "" "Erro ao Salvar: Não foi possível decodificar o conteúdo do arquivo de \"UTF-8" "\" para Unicode." #: ../SCRIBES/internationalization.py:478 msgid "" "Save Error: Failed to encode contents of file. Make sure the encoding of the " "file is properly set in the save dialog. Press (Ctrl - s) to show the save " "dialog." msgstr "" "Erro ao Salvar: Não foi possível codificar o conteúdo do arquivo. Certifique-" "se de que a codificação do arquivo esteja configurada adequadamente no " "diálogo Salvar Arquivo. Pressione (Ctrl - s_ para exibi-lo." #: ../SCRIBES/internationalization.py:482 #, python-format msgid "File: %s" msgstr "Arquivo: %s" #: ../SCRIBES/internationalization.py:484 msgid "Failed to load file." msgstr "Não foi possível carregar o arquivo %s" #: ../SCRIBES/internationalization.py:486 msgid "Load Error: You do not have permission to view this file." msgstr "Erro ao Carrgar: Você não tem permissão para ver este arquivo." #: ../SCRIBES/internationalization.py:487 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "" "Erro ao Carregar: Não foi possível acessar arquivo remoto por motivos de " "permissão." #: ../SCRIBES/internationalization.py:488 msgid "" "Load Error: Failed to get file information for loading. Please try loading " "the file again." msgstr "" "Erro ao Carregar: Não foi possível obter informações do arquivo para " "carregamento. Por favor, tente carregá-lo novamente." #: ../SCRIBES/internationalization.py:490 msgid "Load Error: File does not exist." msgstr "Erro ao Carregar: O arquivo não existe." #: ../SCRIBES/internationalization.py:491 msgid "Damn! Unknown Error" msgstr "Droga! Erro desconhecido" #: ../SCRIBES/internationalization.py:492 msgid "Load Error: Failed to open file for loading." msgstr "Erro ao Carregar: Não foi possível abrir o arquivo para carregá-lo." #: ../SCRIBES/internationalization.py:493 msgid "Load Error: Failed to read file for loading." msgstr "Erro ao Carregar: Não foi possível ler o arquivo para carregá-lo." #: ../SCRIBES/internationalization.py:494 msgid "Load Error: Failed to close file for loading." msgstr "Erro ao Carregar: Não foi possível fechar o arquivo para carregá-lo." #: ../SCRIBES/internationalization.py:495 msgid "" "Load Error: Failed to decode file for loading. The file your are loading may " "not be a text file. If you are sure it is a text file, try to open the file " "with the correct encoding via the open dialog. Press (control - o) to show " "the open dialog." msgstr "" "Erro ao Carregar: Não foi possível decodificar o arquivo para carregá-lo. O " "arquivo que você está carregando pode não ser um arquivo de texto. Se você " "tiver certeza de que o mesmo seja um arquivo de texto, tente abrir o arquivo " "com a codificação correta através do diálogo Abrir Arquivo. Pressione " "(Control - o) para mostrar o diálogo." #: ../SCRIBES/internationalization.py:499 msgid "" "Load Error: Failed to encode file for loading. Try to open the file with the " "correct encoding via the open dialog. Press (control - o) to show the open " "dialog." msgstr "" "Erro ao Carregar: Não foi possível codificar o arquivo para carregá-lo. " "Tente abri-lo com a codificação correta através do diálogo Abrir Arquivo. " "Pressione (Control - o) para mostrar o diálogo." #: ../SCRIBES/internationalization.py:503 #, python-format msgid "Reloading %s" msgstr "Recarregando %s" #: ../SCRIBES/internationalization.py:504 #, python-format msgid "'%s' has been modified by another program" msgstr "\"%s\" foi midificado por outro programa" #: ../plugins/BookmarkBrowser/i18n.py:23 msgid "Move to bookmarked line" msgstr "Mover cursor para linha marcada" #: ../plugins/BookmarkBrowser/i18n.py:24 msgid "Bookmark Browser" msgstr "Navegador dos Marcadores" #: ../plugins/BookmarkBrowser/i18n.py:25 msgid "Line" msgstr "Linha" #: ../plugins/BookmarkBrowser/i18n.py:26 msgid "Bookmarked Text" msgstr "Texto Marcado" #: ../plugins/BookmarkBrowser/i18n.py:28 ../plugins/Bookmark/i18n.py:27 #, python-format msgid "Moved to bookmark on line %d" msgstr "Cursor movido para marcador da linha %d" #: ../plugins/PrintDialog/i18n.py:23 msgid "Print Document" msgstr "Imprimir Documento" #: ../plugins/PrintDialog/i18n.py:24 msgid "Print file" msgstr "Imprimir documento" #: ../plugins/PrintDialog/i18n.py:25 msgid "File: " msgstr "Documento: " #: ../plugins/PrintDialog/i18n.py:26 msgid "Print Preview" msgstr "Visualizar Impressão" #: ../plugins/RemoteDialog/i18n.py:23 ../plugins/OpenDialog/i18n.py:23 msgid "Open Document" msgstr "Abrir Documento" #: ../plugins/RemoteDialog/i18n.py:24 msgid "Type URI for loading" msgstr "Digite a URI a ser carregada" #: ../plugins/RemoteDialog/i18n.py:25 msgid "Enter the location (URI) of the file you _would like to open:" msgstr "Digite a localização (URI) do arquivo que você gostaria de abrir:" #: ../plugins/AutoReplace/i18n.py:23 #, python-format msgid "Replaced '%s' with '%s'" msgstr "\"%s\" substituído por \"%s\"" #: ../plugins/Templates/i18n.py:23 msgid "Template mode is active" msgstr "Modo de modelo ativado" #: ../plugins/Templates/i18n.py:24 msgid "Inserted template" msgstr "Modelo inserido" #: ../plugins/Templates/i18n.py:25 msgid "Selected next placeholder" msgstr "Próximo espaço reservado selecionado" #: ../plugins/Templates/i18n.py:26 msgid "Selected previous placeholder" msgstr "Espaço reservado anterior selecionado" #: ../plugins/About/i18n.py:23 msgid "Scribes is a text editor for GNOME." msgstr "Scribes é um editor de texto para GNOME." #: ../plugins/About/i18n.py:24 msgid "Information about the text editor" msgstr "Informação sobre o editor de texto" #: ../plugins/TemplateEditor/Template.glade.h:1 msgid "here" msgstr "daqui" #: ../plugins/TemplateEditor/Template.glade.h:2 msgid "_Description:" msgstr "_Descrição:" #: ../plugins/TemplateEditor/Template.glade.h:3 msgid "_Name:" msgstr "_Nome:" #: ../plugins/TemplateEditor/Template.glade.h:4 msgid "_Template:" msgstr "_Modelo:" #: ../plugins/TemplateEditor/Template.glade.h:5 msgid "Download templates from" msgstr "Baixar modelos" #: ../plugins/TemplateEditor/Template.glade.h:9 #: ../plugins/TemplateEditor/i18n.py:26 msgid "Import Template" msgstr "Importa o Modelo" #: ../plugins/TemplateEditor/Template.glade.h:10 #: ../plugins/TemplateEditor/i18n.py:32 msgid "Template Editor" msgstr "Editor de Modelos" #: ../plugins/TemplateEditor/Template.glade.h:11 msgid "gtk-add" msgstr "gtk-add" #: ../plugins/TemplateEditor/Template.glade.h:12 msgid "gtk-cancel" msgstr "gtk-cancel" #: ../plugins/TemplateEditor/Template.glade.h:13 msgid "gtk-edit" msgstr "gtk-edit" #: ../plugins/TemplateEditor/Template.glade.h:14 msgid "gtk-help" msgstr "gtk-help" #: ../plugins/TemplateEditor/Template.glade.h:15 msgid "gtk-remove" msgstr "gtk-remove" #: ../plugins/TemplateEditor/Template.glade.h:16 msgid "gtk-save" msgstr "gtk-save" #: ../plugins/TemplateEditor/i18n.py:23 msgid "_Language" msgstr "_Idioma" #: ../plugins/TemplateEditor/i18n.py:24 msgid "_Name" msgstr "_Nome" #: ../plugins/TemplateEditor/i18n.py:25 msgid "_Description" msgstr "_Descrição" #: ../plugins/TemplateEditor/i18n.py:29 msgid "Error: Name field cannot be empty" msgstr "Erro: O campo nome não pode ficar vazio" #: ../plugins/TemplateEditor/i18n.py:30 msgid "Error: Trigger name already in use. Please use another trigger name." msgstr "" "Erro: O nome do gatilho já está sendo usado. Por favor, use outro nome." #: ../plugins/TemplateEditor/i18n.py:31 msgid "Add Template" msgstr "Adicionar Modelo" #: ../plugins/TemplateEditor/i18n.py:33 msgid "Error: You do not have permission to save at the location" msgstr "Erro: Você não tem permissão para salvar na localização" #: ../plugins/TemplateEditor/i18n.py:34 msgid "Error: No selection to export" msgstr "Erro: Nenhuma seleção para exportar" #: ../plugins/TemplateEditor/i18n.py:35 msgid "Error: File not found" msgstr "Erro: Arquivo não localizado" #: ../plugins/TemplateEditor/i18n.py:36 msgid "Error: Invalid template file" msgstr "Erro: Arquivo de modelo inválido" #: ../plugins/TemplateEditor/i18n.py:37 msgid "Error: No template information found" msgstr "Erro: Não foram encontradas informações sobre o modelo" #: ../plugins/AutoReplaceGUI/i18n.py:23 msgid "Auto Replace Editor" msgstr "Editor de Substituição Automática" #: ../plugins/AutoReplaceGUI/i18n.py:24 msgid "_Abbreviations" msgstr "A_breviações" #: ../plugins/AutoReplaceGUI/i18n.py:25 msgid "_Replacements" msgstr "_Substituições" #: ../plugins/AutoReplaceGUI/i18n.py:26 #, python-format msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "Erro: \"%s\" já está sendo usada. Por favor, utilize outra abreviação." #: ../plugins/AutoReplaceGUI/i18n.py:27 msgid "Automatic Replacement" msgstr "Substituição Automática" #: ../plugins/AutoReplaceGUI/i18n.py:28 msgid "Modify words for auto-replacement" msgstr "Substitua palavras automaticamente" #: ../plugins/Indent/i18n.py:24 msgid "Indenting please wait..." msgstr "Fazendo recuos, por favor aguarde..." #: ../plugins/Indent/i18n.py:26 #, python-format msgid "Indented line %d" msgstr "Linha %d recuada" #: ../plugins/Indent/i18n.py:30 msgid "I_ndentation" msgstr "Rec_uo" #: ../plugins/Indent/i18n.py:31 msgid "Shift _Right" msgstr "Recuar para a _Direita" #: ../plugins/Indent/i18n.py:32 msgid "Shift _Left" msgstr "Recuar para a _Esquerda" #: ../plugins/Selection/i18n.py:24 msgid "Selected word" msgstr "Palavra selecionada" #: ../plugins/Selection/i18n.py:25 msgid "No word to select" msgstr "Não há palavra para selecionar" #: ../plugins/Selection/i18n.py:26 msgid "Selected sentence" msgstr "Frase selecionada" #: ../plugins/Selection/i18n.py:27 msgid "No sentence to select" msgstr "Não há frase para selecionar" #: ../plugins/Selection/i18n.py:28 #, python-format msgid "No text to select on line %d" msgstr "Sem texto para selecionar na linha %d" #: ../plugins/Selection/i18n.py:29 #, python-format msgid "Selected line %d" msgstr "Linha %d selecionada" #: ../plugins/Selection/i18n.py:30 msgid "Selected paragraph" msgstr "Parágrafo selecionado" #: ../plugins/Selection/i18n.py:31 msgid "No paragraph to select" msgstr "Não há parágrafo para selecionar" #: ../plugins/Selection/i18n.py:32 msgid "S_election" msgstr "Se_leção" #: ../plugins/Selection/i18n.py:33 msgid "Select _Word" msgstr "Selecionar _Palavra" #: ../plugins/Selection/i18n.py:34 msgid "Select _Line" msgstr "Selecionar _Linha" #: ../plugins/Selection/i18n.py:35 msgid "Select _Sentence" msgstr "Selecionar _Sentença" #: ../plugins/Selection/i18n.py:36 msgid "Select _Paragraph" msgstr "Selecionar Pa_rágrafo" #: ../plugins/Lines/i18n.py:24 #, python-format msgid "Deleted line %d" msgstr "Linha %d excluída" #: ../plugins/Lines/i18n.py:25 #, python-format msgid "Joined line %d to line %d" msgstr "Linha %d unida à linha %d" #: ../plugins/Lines/i18n.py:26 msgid "No more lines to join" msgstr "Não há mais linhas para unir" #: ../plugins/Lines/i18n.py:27 #, python-format msgid "Freed line %d" msgstr "Linha %d apagada" #: ../plugins/Lines/i18n.py:28 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Texto removido do cursor até o fim da linha %d" #: ../plugins/Lines/i18n.py:29 msgid "Cursor is already at the end of line" msgstr "O cursor já está no fim da linha" #: ../plugins/Lines/i18n.py:30 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Texto excluído do cursor até o começo da linha %d" #: ../plugins/Lines/i18n.py:31 msgid "Cursor is already at the beginning of line" msgstr "O cursor já está no começo da linha" #: ../plugins/Lines/i18n.py:32 msgid "_Lines" msgstr "_Linhas" #: ../plugins/Lines/i18n.py:33 msgid "_Delete Line" msgstr "E_xcluir Linha" #: ../plugins/Lines/i18n.py:34 msgid "_Join Line" msgstr "_Unir Linha" #: ../plugins/Lines/i18n.py:35 msgid "Free Line _Above" msgstr "Abrir Linha _Acima" #: ../plugins/Lines/i18n.py:36 msgid "Free Line _Below" msgstr "Abrir Linha A_baixo" #: ../plugins/Lines/i18n.py:37 msgid "Delete Cursor to Line _End" msgstr "Excluir do Cursor até o _Fim da Linha" #: ../plugins/Lines/i18n.py:38 msgid "Delete _Cursor to Line Begin" msgstr "Excluir do Cursor até o _Começo da Linha" #: ../plugins/Preferences/i18n.py:23 msgid "Font" msgstr "Fonte" #: ../plugins/Preferences/i18n.py:24 msgid "Editor _font: " msgstr "_Corpo de texto: " #: ../plugins/Preferences/i18n.py:25 msgid "Tab Stops" msgstr "Paradas de tabulação" #: ../plugins/Preferences/i18n.py:26 msgid "_Tab width: " msgstr "_Largura da tabulação: " #: ../plugins/Preferences/i18n.py:27 msgid "Text Wrapping" msgstr "Quebra de Texto" #: ../plugins/Preferences/i18n.py:28 msgid "Right Margin" msgstr "Margem Direita" #: ../plugins/Preferences/i18n.py:29 msgid "_Right margin position: " msgstr "_Posição da margem direita: " #: ../plugins/Preferences/i18n.py:30 msgid "Spell Checking" msgstr "Verificação Ortográgica" #: ../plugins/Preferences/i18n.py:31 msgid "Change editor settings" msgstr "Mudar configurações do editor" #: ../plugins/Preferences/i18n.py:32 msgid "Preferences" msgstr "Preferências" #: ../plugins/Preferences/i18n.py:33 #, python-format msgid "Changed font to \"%s\"" msgstr "Fonte alterada para \"%s\"" #: ../plugins/Preferences/i18n.py:34 #, python-format msgid "Changed tab width to %d" msgstr "Largura de tabulação alterada para %d" #: ../plugins/Preferences/i18n.py:35 msgid "_Use spaces instead of tabs" msgstr "_Usar espaços em vez de tabulações" #: ../plugins/Preferences/i18n.py:36 msgid "Use tabs for indentation" msgstr "Usar tabulação para recuo" #: ../plugins/Preferences/i18n.py:37 msgid "Use spaces for indentation" msgstr "Usar espaço para recuo" #: ../plugins/Preferences/i18n.py:38 msgid "Enable text _wrapping" msgstr "_Quebrar texto automaticamente" #: ../plugins/Preferences/i18n.py:39 msgid "Enabled text wrapping" msgstr "Quebra de texto ativada" #: ../plugins/Preferences/i18n.py:40 msgid "Disabled text wrapping" msgstr "Quebra de texto desativada" #: ../plugins/Preferences/i18n.py:41 msgid "Display right _margin" msgstr "Exibir _margem direita" #: ../plugins/Preferences/i18n.py:42 msgid "Show right margin" msgstr "Margem direita mostrada" #: ../plugins/Preferences/i18n.py:43 msgid "Hide right margin" msgstr "Margem direita escondida" #: ../plugins/Preferences/i18n.py:44 msgid "_Enable spell checking" msgstr "_Verificação ortográfica" #: ../plugins/Preferences/i18n.py:45 ../plugins/SpellCheck/i18n.py:24 msgid "Enabled spellchecking" msgstr "Verificação ortográfica ativada" #: ../plugins/Preferences/i18n.py:46 ../plugins/SpellCheck/i18n.py:23 msgid "Disabled spellchecking" msgstr "Verificação ortográfica desativada" #: ../plugins/Preferences/i18n.py:47 #, python-format msgid "Positioned margin line at column %d" msgstr "Linha de margem posicionada na coluna %d" #: ../plugins/BracketCompletion/i18n.py:23 msgid "Pair character completion occurred" msgstr "Parêntese fechado" #: ../plugins/BracketCompletion/i18n.py:24 msgid "Enclosed selected text" msgstr "Texto incluído em parênteses" #: ../plugins/BracketCompletion/i18n.py:25 msgid "Removed pair character completion" msgstr "Fechamento de parêntese removido" #: ../plugins/DocumentBrowser/i18n.py:23 msgid "Select document to focus" msgstr "Selecione documento a focar" #: ../plugins/DocumentBrowser/i18n.py:25 msgid "File _Type" msgstr "_Tipo de Arquivo" #: ../plugins/DocumentBrowser/i18n.py:26 msgid "File _Name" msgstr "_Nome de Arquivo" #: ../plugins/DocumentBrowser/i18n.py:27 msgid "Full _Path Name" msgstr "_Caminho Completo" #: ../plugins/DocumentBrowser/i18n.py:28 msgid "No documents open" msgstr "Nenhum documento aberto" #: ../plugins/SearchPreviousNext/i18n.py:23 msgid "No previous match" msgstr "Nenhuma ocorrência prévia" #: ../plugins/IncrementalBar/i18n.py:23 ../plugins/FindBar/i18n.py:23 #: ../plugins/ReplaceBar/i18n.py:23 msgid "Match _case" msgstr "Coinc. _maiúsc./minúsc." #: ../plugins/IncrementalBar/i18n.py:24 ../plugins/FindBar/i18n.py:24 #: ../plugins/ReplaceBar/i18n.py:24 msgid "Match _word" msgstr "_Coinc. palavra" #: ../plugins/IncrementalBar/i18n.py:25 ../plugins/FindBar/i18n.py:25 #: ../plugins/ReplaceBar/i18n.py:25 msgid "_Previous" msgstr "A_nterior" #: ../plugins/IncrementalBar/i18n.py:26 ../plugins/FindBar/i18n.py:26 #: ../plugins/ReplaceBar/i18n.py:26 msgid "_Next" msgstr "Pró_ximo" #: ../plugins/IncrementalBar/i18n.py:27 ../plugins/FindBar/i18n.py:27 #: ../plugins/ReplaceBar/i18n.py:27 msgid "_Search for:" msgstr "_Pesquisar por:" #: ../plugins/IncrementalBar/i18n.py:29 ../plugins/FindBar/i18n.py:29 #: ../plugins/ReplaceBar/i18n.py:29 msgid "Closed search bar" msgstr "Barra \"pesquisar\" fechada" #: ../plugins/IncrementalBar/i18n.py:30 msgid "Incrementally search for text" msgstr "Pesquisa enquanto digita" #: ../plugins/IncrementalBar/i18n.py:31 msgid "Close incremental search bar" msgstr "Fechar barra de pesquisa incremental" #: ../plugins/OpenDialog/i18n.py:24 msgid "Select file for loading" msgstr "Seleciona o arquivo a ser aberto" #: ../plugins/ToolbarVisibility/i18n.py:23 msgid "Hide toolbar" msgstr "Ocultar barra de ferramentas" #: ../plugins/ToolbarVisibility/i18n.py:24 msgid "Showed toolbar" msgstr "Barra de ferramentas exibida" #: ../plugins/MatchingBracket/i18n.py:23 #, python-format msgid "Found matching bracket on line %d" msgstr "Parêntese correspondente encontrado na linha %d" #: ../plugins/MatchingBracket/i18n.py:24 msgid "No matching bracket found" msgstr "Parêntese correspondente não encontrado" #: ../plugins/BracketSelection/i18n.py:23 msgid "Selected characters inside bracket" msgstr "Caracteres selecionados dentro dos parênteses" #: ../plugins/BracketSelection/i18n.py:24 msgid "No brackets found for selection" msgstr "Não há parêntese para remover" #: ../plugins/Case/i18n.py:23 msgid "No selection to change case" msgstr "Não há texto selecionado para alterar maiúsculas/minúsculas" #: ../plugins/Case/i18n.py:24 msgid "Selected text is already uppercase" msgstr "O texto selecionado já está em letras maiúsculas" #: ../plugins/Case/i18n.py:25 msgid "Changed selected text to uppercase" msgstr "Seleção de texto alterada minúsculas para maiúsculas" #: ../plugins/Case/i18n.py:26 msgid "Selected text is already lowercase" msgstr "O texto selecionado já está em letras minúsculas" #: ../plugins/Case/i18n.py:27 msgid "Changed selected text to lowercase" msgstr "Seleção de texto alterada de maiúsculas para maiúsculas" #: ../plugins/Case/i18n.py:28 msgid "Selected text is already capitalized" msgstr "Texto selecionado já está em caixa alta" #: ../plugins/Case/i18n.py:29 msgid "Capitalized selected text" msgstr "Texto alternado para caixa alta" #: ../plugins/Case/i18n.py:30 msgid "Swapped the case of selected text" msgstr "Maiúsculas/minúsculas alternadas no texto selecionado" #: ../plugins/Case/i18n.py:31 msgid "_Case" msgstr "M_aiusculização" #: ../plugins/Case/i18n.py:32 msgid "_Uppercase" msgstr "_Maiúsculas" #: ../plugins/Case/i18n.py:33 msgid "_Lowercase" msgstr "Mi_núsculas" #: ../plugins/Case/i18n.py:34 msgid "_Titlecase" msgstr "_Iniciais em Maiúsculas" #: ../plugins/Case/i18n.py:35 msgid "_Swapcase" msgstr "_Trocar Minúsculas/Maiúsculas" #: ../plugins/Bookmark/i18n.py:23 #, python-format msgid "Removed bookmark on line %d" msgstr "Marcador removido da linha %d" #: ../plugins/Bookmark/i18n.py:24 #, python-format msgid "Bookmarked line %d" msgstr "Linha %d marcada" #: ../plugins/Bookmark/i18n.py:25 msgid "No bookmarks found to remove" msgstr "Não há marcador para remover" #: ../plugins/Bookmark/i18n.py:26 msgid "Removed all bookmarks" msgstr "Todos marcadores removidos" #: ../plugins/Bookmark/i18n.py:28 msgid "No next bookmark to move to" msgstr "Não há marcador seguir" #: ../plugins/Bookmark/i18n.py:29 msgid "No previous bookmark to move to" msgstr "Não marcador prévio" #: ../plugins/Bookmark/i18n.py:30 msgid "Already on first bookmark" msgstr "Cursor já no primeiro marcador" #: ../plugins/Bookmark/i18n.py:31 msgid "Moved to first bookmark" msgstr "Cursor movido para o primeiro marcador" #: ../plugins/Bookmark/i18n.py:32 msgid "Already on last bookmark" msgstr "Cursor já no último marcador" #: ../plugins/Bookmark/i18n.py:33 msgid "Moved to last bookmark" msgstr "Cursor movido para o último marcador" #: ../plugins/Bookmark/i18n.py:34 msgid "_Bookmark" msgstr "_Marcadores" #: ../plugins/Bookmark/i18n.py:35 msgid "Bookmark _Line" msgstr "Marcar _Linha" #: ../plugins/Bookmark/i18n.py:36 msgid "_Remove Bookmark" msgstr "_Remover Marcador" #: ../plugins/Bookmark/i18n.py:37 msgid "Remove _All Bookmarks" msgstr "Remover _Todos os Marcadores" #: ../plugins/Bookmark/i18n.py:38 msgid "Move to _Next Bookmark" msgstr "Pró_ximo Marcador" #: ../plugins/Bookmark/i18n.py:39 msgid "Move to _Previous Bookmark" msgstr "Marcador A_nterior" #: ../plugins/Bookmark/i18n.py:40 msgid "Move to _First Bookmark" msgstr "_Primeiro Marcador" #: ../plugins/Bookmark/i18n.py:41 msgid "Move to Last _Bookmark" msgstr "Últim_o Marcador" #: ../plugins/Bookmark/i18n.py:42 msgid "_Show Bookmark Browser" msgstr "_Mostrar Navegador de Marcadores" #: ../plugins/SaveDialog/i18n.py:23 msgid "Save Document" msgstr "Salvar Como" #: ../plugins/SaveDialog/i18n.py:24 msgid "Change name of file and save" msgstr "Altera o nome do arquivo e o salva" #: ../plugins/UserGuide/i18n.py:23 msgid "Launching help browser" msgstr "Obtendo ajuda" #: ../plugins/UserGuide/i18n.py:24 msgid "Could not open help browser" msgstr "Não foi possível abrir o navegador da ajuda" #: ../plugins/ReadOnly/i18n.py:23 msgid "File has not been saved to disk" msgstr "O documento não foi salvado em disco" #: ../plugins/ReadOnly/i18n.py:24 msgid "No permission to modify file" msgstr "Você não tem permissão para modificar este documento" #: ../plugins/UndoRedo/i18n.py:24 msgid "Undid last action" msgstr "Ação desfeita" #: ../plugins/UndoRedo/i18n.py:25 msgid "Cannot undo action" msgstr "Impossível desfazer ação" #: ../plugins/UndoRedo/i18n.py:26 msgid "Redid undone action" msgstr "Ação refeita" #: ../plugins/Spaces/i18n.py:24 msgid "Replacing spaces please wait..." msgstr "Substituindo espaços, por favor aguarde..." #: ../plugins/Spaces/i18n.py:25 msgid "No spaces found to replace" msgstr "Nenhum espaço encontrado para ser substituído" #: ../plugins/Spaces/i18n.py:26 msgid "Replaced spaces with tabs" msgstr "Espaços substituídos por tabulações" #: ../plugins/Spaces/i18n.py:27 msgid "Replacing tabs please wait..." msgstr "Substituindo tabulações, por favor aguarde..." #: ../plugins/Spaces/i18n.py:28 msgid "Replaced tabs with spaces" msgstr "Tabulações subtituídas por espaços" #: ../plugins/Spaces/i18n.py:29 msgid "No tabs found to replace" msgstr "Nenhuma tabulação encontrada para ser substituída" #: ../plugins/Spaces/i18n.py:30 msgid "Removing spaces please wait..." msgstr "Removendo espaços, por favor aguarde..." #: ../plugins/Spaces/i18n.py:31 msgid "No spaces were found at end of line" msgstr "Não foram encontrados espaços no fim das linhas" #: ../plugins/Spaces/i18n.py:32 msgid "Removed spaces at end of lines" msgstr "Espaços removidos ao fim das linhas" #: ../plugins/Spaces/i18n.py:33 msgid "S_paces" msgstr "_Espaços" #: ../plugins/Spaces/i18n.py:34 msgid "_Tabs to Spaces" msgstr "_Tabulações para Espaços" #: ../plugins/Spaces/i18n.py:35 msgid "_Spaces to Tabs" msgstr "_Espaços para Tabulações" #: ../plugins/Spaces/i18n.py:36 msgid "_Remove Trailing Spaces" msgstr "_Remover Espaços ao Fim da Linha" #: ../plugins/GotoBar/i18n.py:23 msgid "Move cursor to a specific line" msgstr "Move o cursor para uma determinada linha" #: ../plugins/GotoBar/i18n.py:24 msgid "Closed goto line bar" msgstr "Barra \"ir para linha\" fechada" #: ../plugins/GotoBar/i18n.py:25 #, python-format msgid " of %d" msgstr " de %d" #: ../plugins/GotoBar/i18n.py:26 msgid "Line number:" msgstr "Linha número:" #: ../plugins/GotoBar/i18n.py:27 #, python-format msgid "Moved cursor to line %d" msgstr "Cursor movido para linha %d" #: ../plugins/SearchReplace/i18n.py:23 msgid "Searching please wait..." msgstr "Pesquisando, por favor aguarde..." #: ../plugins/SearchReplace/i18n.py:24 #, python-format msgid "Found %d matches" msgstr "%d ocorrências encontradas" #: ../plugins/SearchReplace/i18n.py:25 #, python-format msgid "Match %d of %d" msgstr "Ocorrência %d de %d" #: ../plugins/SearchReplace/i18n.py:26 msgid "No match found" msgstr "Nenhuma ocorrência encontrada" #: ../plugins/SearchReplace/i18n.py:27 msgid "No next match found" msgstr "Nenhuma ocorrência a seguir" #: ../plugins/SearchReplace/i18n.py:28 msgid "Stopped operation" msgstr "Operação interrompida" #: ../plugins/SearchReplace/i18n.py:29 msgid "Replacing please wait..." msgstr "Substituindo, por favor aguarde..." #: ../plugins/SearchReplace/i18n.py:30 msgid "Replace found match" msgstr "Ocorrência substituída" #: ../plugins/SearchReplace/i18n.py:31 msgid "Replaced all found matches" msgstr "Todas as ocorrências substituídas" #: ../plugins/SearchReplace/i18n.py:32 msgid "No previous match found" msgstr "Nenhuma ocorrência anterior" #: ../plugins/ReplaceBar/i18n.py:30 msgid "Replac_e with:" msgstr "S_ubstituir por:" #: ../plugins/ReplaceBar/i18n.py:32 msgid "Closed replace bar" msgstr "Barra \"substituir\" fechada" #: ../plugins/ReplaceBar/i18n.py:33 msgid "_Replace" msgstr "_Substituir" #: ../plugins/ReplaceBar/i18n.py:34 msgid "Replace _All" msgstr "Substituir _Todas" #: ../plugins/ReplaceBar/i18n.py:35 msgid "Incre_mental" msgstr "_Incremental" #: ../plugins/ColorEditor/i18n.py:23 msgid "Change editor colors" msgstr "Mudar as cores do editor" #: ../plugins/ColorEditor/i18n.py:24 msgid "Syntax Color Editor" msgstr "Editor de Cores" #: ../plugins/ColorEditor/i18n.py:25 msgid "_Use default theme" msgstr "_Usar tema padrão" #: ../plugins/ColorEditor/i18n.py:26 msgid "Using theme colors" msgstr "Usando cores do tema" #: ../plugins/ColorEditor/i18n.py:27 msgid "Using custom colors" msgstr "Usando cores personalizadas" #: ../plugins/ColorEditor/i18n.py:28 msgid "Select foreground color" msgstr "Selecionar Cor do Primeiro Plano" #: ../plugins/ColorEditor/i18n.py:29 msgid "_Normal text color: " msgstr "Corpo de _texto: " #: ../plugins/ColorEditor/i18n.py:30 msgid "_Background color: " msgstr "_Plano de fundo: " #: ../plugins/ColorEditor/i18n.py:31 msgid "_Foreground:" msgstr "_Primeiro plano:" #: ../plugins/ColorEditor/i18n.py:32 msgid "Back_ground:" msgstr "Plano de _fundo:" #: ../plugins/ColorEditor/i18n.py:33 msgid "Select background color" msgstr "Selecionar Cor do Plano de Fundo" #: ../plugins/ColorEditor/i18n.py:34 msgid "Language Elements" msgstr "Modo de destaque" #: ../plugins/ColorEditor/i18n.py:35 msgid "Select foreground syntax color" msgstr "Selecionar Cor do do Primeiro Plano da Sintaxe" #: ../plugins/ColorEditor/i18n.py:36 msgid "Select background syntax color" msgstr "Selecionar Cor do Plano de Fundo da Sintaxe" #: ../plugins/ColorEditor/i18n.py:39 msgid "_Underline" msgstr "_Sublinhado" #: ../plugins/ColorEditor/i18n.py:40 msgid "_Reset to Default" msgstr "_Restaurar Padrão" #: ../plugins/SyntaxColorSwitcher/i18n.py:23 msgid "_Highlight Mode" msgstr "Modo de _Destaque" #: ../plugins/SyntaxColorSwitcher/i18n.py:25 #, python-format msgid "Activated '%s' syntax color" msgstr "Cor da sintaxe \"%s\" ativada" #: ../plugins/SyntaxColorSwitcher/i18n.py:26 msgid "Disabled syntax color" msgstr "Cor da sintaxe desativada" #~ msgid "%d match was found" #~ msgstr "%d ocorrência encontrada" #~ msgid "%d matches were found" #~ msgstr "%d ocorrências encontradas" #~ msgid "Create a new file" #~ msgstr "Criar um novo documento" #~ msgid "Change the name of current file and save it" #~ msgstr "Salvar documento com outro nome" #~ msgid "Line %d is already bookmarked" #~ msgstr "Linha %d já está marcada" #~ msgid "No bookmark on line %d to remove" #~ msgstr "Não há marcador para remover na linha %d" #~ msgid "No tabs found in selected text" #~ msgstr "Não há tabulações no texto selecionado" #~ msgid "Closed findbar" #~ msgstr "Barra de localizar fechada" #~ msgid "Name" #~ msgstr "Nome" #~ msgid "Description" #~ msgstr "Descrição" #~ msgid "scribes: %s is an invalid option" #~ msgstr "scribes: opção \"%s\" não reconhecida" scribes-0.4~r910/po/stamp-it0000644000175000017500000000000011242100540015507 0ustar andreasandreasscribes-0.4~r910/po/sv.gmo0000644000175000017500000011432611242100540015203 0ustar andreasandreasÞ•Ò¬w<' '%' ,' M'[')m'8—' Ð'Ü'ð'((5,(b( w(…(s—() )®5)ôä)Ù*ò*+ + ,+M+ h+ v+„+ +«+Å+(Þ+u,d},~â,va-tØ-eM.)³.Ý.ä.ü./&/ ,/9/J/\/m/|/Œ/'Ÿ/ Ç/ Ó/ à/î/÷/0)0A0T0g0v0‡0¢0·0Î0ë0"1"#1F1^1q17‡11¿1;ñ1@-23n2¢2¿2Ô2è2ý23>3Z3#o3“3"¯3Ò3*î3$4>4P4d4v4‘4®40¾4*ï4&53A5/u5¥5¼5Ò5+é56+6C6 K6Y6i6x66 ¨6 ¶6×6í67 7!:7\7=d79¢7?Ü7828O8!m8)8(¹8â8$9A%99g9¡9´9Ä9Ù9 í9 ø9:#:*:>3:Dr:·:Æ:×:è: ù:;;#;2;D;K; ];j;n;v; ~;‹; “;; ­;º;Ø;é;9<2<<!o<‘<£<$¬<Ñ<à<ú<===.=F=]=n= s= €=@=-Î=ôü=Ÿñ>Z‘?,ì?,@ F@9g@¡@²@Â@Þ@ í@ ù@ AA!0ARAqAˆA A·AÒAêABB7B&NB!uB—BªBÇBÙBøBCC9CMCdCC¡C³C!ËCíC DD2DHD)cD#D±D ÊDëDEEE0E 4EBEfQE ¸EÄEÖEïE øEFF?(F hFsF#†F ªF¶F ÅF ÓFÞF õFGG(G ;GHG^GtG&G-·G åGH'%HMHlH„H “H HºHÒH*íHI2I+LIxI‘I±IÏIÞI æIñI ùICJ1KJ2}J3°JDäJ1)KS[K=¯KíK LL#L#7L0[LŒLŸL(»L,äLM(!MJMcM jMwM‰M šM§M¿MÞMùMN*NBNBaN¤N/ÄN1ôNC&O+jO6–OÍOàOñO PPÿŠ>‹N‹_‹z‹ ‹‹¬‹¼‹Ú‹ ù‹Œ.Œ4NŒƒŒ”Œ £Œ±ŒÏŒïŒ-?Sjˆ—¦ » ÈÔ†Ùa`ŽJÂŽD 4Rw‡ÿ+.B7q©LÀ+ ‘9‘B‘$[‘#€‘ ¤‘®‘ȑۑ𑒒’,2’"_’=‚’$À’å’“ “%“ -“9“ H“uU“ÁË“0”(¾”ç”÷” • • • ,• 9•G• c•o•ƒ•“•›•¢•©•¯•¶•¾•Ò• ã• ï• ý•& –1– D–e–n–}–˜– ¸–Å–Ö–ç–——(—D— K— U—c—k—-—¯—,·—ä—˜ ˜˜˜ ˜'˜/˜ 5˜!B˜)d˜Ž˜)¬˜( p»‹Å¾Š&ZHÿ%;#­¨nx, b翞àY¯v|$q+(¤¡v« ý±<ÅI €xRê¢ãÚ«&Ÿ5³`VÇ+[Ȭ§NÉUÌÎ5qÂ@m´»©̶FtE":‘£Æõ-¶bК4kC_Àwy‡ÑT¨¿ǵþ*ºn>öòÖ)ÊjO–3^{˜ðZ<K7ϼ mS ®ŠHó}½²°~¦i§¥aGyu›.Ý" wƒg=6z×gš‡”ÁŽ÷Do|\Ð.åsýfïªȹrIp º'…Û†[N¥‚³Óc`P}JÑÜT)Wa^ 0’¡Pœ,ˆ1ocA‰ËË3sÕ=A£'æBÁ™²i€–¯_ÍŒ?M°J2fl?ÀˆO•ôÉedME—á/FXÞù908L îØ¦’·†¬Æ¹¢l‰]~>2d±ètìC„Rµe‘@8…ƒŸÔ“*“!ëjr˜¤ûQñ™1‚ ·íQuÔßLŽø´9YkÄ/Ò¸—Ùh©Gé\¼Kœ-ÎÍWª!Êúz$7ľh •› 6ÒD®]4â­:„#äÏBUŒXVS‹ ;%{žü¸ of %d"%s" has been replaced with "%s"%d%% complete%s does not exist'%s' has been modified by another programhereFontRight MarginSpell CheckingTab StopsText WrappingThis file has been modified by another program_Description:_Name:_Template:A decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.A list of encodings selected by the user.A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.A text editor for GNOME.Activated '%s' syntax colorAdd New TemplateAdd TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAll LanguagesAll Languages (BMP only)All languagesAlready on first bookmarkAlready on last bookmarkAlready on most recently bookmarked lineAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicAuthentication RequiredAuto Replace EditorAutomatic ReplacementB_oldBack_ground:Baltic languagesBaltic languaguesBookmark BrowserBookmark _LineBookmarked TextBookmarked line %dBulgarian, Macedonian, Russian, SerbianC DocumentsC# DocumentsC++ DocumentsCanadianCannot open %sCannot open fileCannot perform operation in readonly modeCannot redo actionCannot undo actionCase sensitiveCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text to lowercaseChanged selected text to uppercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Close regular expression barClosed dialog windowClosed error dialogClosed goto line barCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCould not open help browserCreate, modify or manage templatesCurrent document is focusedCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDamn! Unknown ErrorDanish, NorwegianDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDetach Scribes from the shell terminalDetermines whether to show or hide the status area.Determines whether to show or hide the toolbar.Disabled spellcheckingDisabled syntax colorDisabled text wrappingDiscard current file and load modified fileDisplay right _marginDownload templates fromE_xportEdit TemplateEdit text filesEditor _font: Editor background colorEditor foreground colorEditor's fontEnable or disable spell checkingEnable text _wrappingEnabled spellcheckingEnabled text wrappingEnables or disables right marginEnables or disables text wrappingEnglishEnter the location (URI) of the file you _would like to open:Error: '%s' already in use. Please choose another string.Error: '%s' is already in use. Please use another abbreviation.Error: File not foundError: Invalid template fileError: Invalid template file.Error: Name field cannot be emptyError: Name field cannot have any spaces.Error: Name field must contain a string.Error: No selection to exportError: No template information foundError: Template editor can only have one '${cursor}' placeholder.Error: You do not have permission to save at the locationEsperanto, MalteseExport TemplateFailed to load file.Failed to save fileFile _NameFile _TypeFile has not been saved to diskFile: File: %sFind occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound %d matchFound %d matchesFree Line _AboveFree Line _BelowFreed line %dGo to a specific lineGreekHTML DocumentsHaskell DocumentsHebrewHide right marginHide toolbarINSI_gnoreI_mportI_ndentationI_talicIcelandicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Info Error: Access has been denied to the requested file.Info Error: Information on %s cannot be retrieved.Information about the text editorInserted templateJapaneseJapanese, Korean, Simplified ChineseJava DocumentsJoined line %d to line %dKazakhKoreanLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLineLine number:Ln %d col %dLoad Error: Failed to access remote file for permission reasons.Load Error: Failed to close file for loading.Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to get file information for loading. Please try loading the file again.Load Error: Failed to open file for loading.Load Error: Failed to read file for loading.Load Error: File does not exist.Load Error: You do not have permission to view this file.Loaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMatch wordMenu for advanced configurationModify words for auto-replacementMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to most recently bookmarked lineNeither reload nor overwrite fileNo bookmarks foundNo bookmarks found to removeNo documents openNo indentation selection foundNo match foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous matchNo previous match foundNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found to replaceNo text content in the clipboardNo text to select on line %dNo word to selectNoneNordic languagesOVROpen DocumentOpen DocumentsOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Open a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPasted copied textPerl DocumentsPermission Error: Access has been denied to the requested file.PortuguesePosition of marginPositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redo undone actionReloading %sRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of linesRemoved spaces at end of selected linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplaced '%s' with '%s'Replaced all found matchesReplaced all occurrences of "%s" with "%s"Replaced spaces with tabsReplaced tabs with spacesReplaced tabs with spaces on selected linesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsRussianS_electionS_pacesSave DocumentSave Error: Failed decode contents of file from "UTF-8" to Unicode.Save Error: Failed to close swap file for saving.Save Error: Failed to create swap file for saving.Save Error: Failed to create swap location or file.Save Error: Failed to transfer file from swap to permanent location.Save Error: Failed to write swap file for saving.Save Error: You do not have permission to modify this file or save to its location.Save current file and overwrite changes made by other programSave password in _keyringSaved "%s"Scheme DocumentsScribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearch for text using regular expressionSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect character _encodingSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelected encodingsSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSets the margin's position within the editorSets the width of tab stops within the editorShift _LeftShift _RightShow marginShow or hide the status area.Show or hide the toolbar.Show right marginShowed toolbarSimplified ChineseSpell checkingStopped operationStopped replacingSyntax Color EditorTab widthTemplate EditorTemplate mode is activeText DocumentsText wrappingThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe color used to render normal text in the text editor's buffer.The color used to render the text editor buffer background.The editor's font. Must be a string valueThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.Traditional ChineseTrue to use tabs instead of spaces, false otherwise.Try 'scribes --help' for more informationTurkishType URI for loadingType in the text you want to replace withType in the text you want to search forUkrainianUndo last actionUnified ChineseUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduUse GTK theme colorsUse Tabs instead of spacesUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsVietnameseWarningWest EuropeWestern EuropeXML DocumentsYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.You do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.You do not have permission to view this file.You must log in to access %s_Abbreviations_Background color: _Bookmark_Case_Delete Line_Description_Description:_Enable spell checking_Foreground:_Highlight Mode_Join Line_Language_Lines_Lowercase_Name_Name:_Next_Normal text color: _Overwrite File_Password:_Previous_Reload File_Remember password for this session_Remove Bookmark_Remove Trailing Spaces_Replace_Replacements_Reset to Default_Right margin position: _Search for:_Search for: _Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Template:_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscompletedcreate a new file and open the file with Scribesdisplay this help screenerrorgtk-addgtk-cancelgtk-editgtk-helpgtk-removegtk-saveloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: scribes Report-Msgid-Bugs-To: POT-Creation-Date: 2007-05-13 21:38+0200 PO-Revision-Date: 2007-05-20 20:48+0100 Last-Translator: Daniel Nylander Language-Team: Swedish MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit av %d"%s" har ersatts med "%s"%d%% färdig%s finns inte"%s" har ändrats av ett annat programhärTypsnittHögermarginalStavningskontrollTabulatorstoppRadbrytningDen här filen har ändrats av ett annat program_Beskrivning:_Namn:_Mall:Ett avkodningsfel inträffade vid sparandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.En lista över kodningar valda av användaren.Ett fel vid sparandet inträffade. Dokumentet kunde inte överföras frÃ¥n sin temporära plats. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.En sparningsÃ¥tgärd misslyckades. Kunde inte skapa växlingsutrymme. Försäkra dig om att du har behörighet att spara till din hemmapp. Kontrollera även att du inte har slut pÃ¥ diskutrymme. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.En textredigerare för GNOME.Aktiverade färg för "%s"-syntaxLägg till ny mallLägg till mallLägg till eller ta bort teckenkodningLägg till eller ta bort kodning ...Alla dokumentAlla sprÃ¥kAlla sprÃ¥k (endast BMP)Alla sprÃ¥kRedan pÃ¥ det första bokmärketRedan pÃ¥ det sista bokmärketRedan pÃ¥ den senaste bokmärkta radenEtt avkodningsfel inträffade vid sparande av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.Ett kodningsfel inträffade. Skicka in en felrapport pÃ¥ http://openusability.org/forum/?group_id=141Ett fel inträffade vid skapandet av filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.Ett fel inträffade vid avkodning av din fil. Skicka in en felrapport pÃ¥ "http://openusability.org/forum/?group_id=141"Ett fel inträffade vid kodning av din fil. Prova att spara din fil med en annan teckenkodning, föredragsvis UTF-8.Ett fel inträffade vid öppnandet av filen. Skicka in en felrapport pÃ¥ http://scribes.sourceforge.netEtt fel inträffade vid sparandet av den här filen.ArabiskaAutentisering krävsAutomatisk ersättningAutomatisk ersättning_FetBak_grund:Baltiska sprÃ¥kBaltiska sprÃ¥kBokmärkesbläddareBokmärk _radBokmärkt textBokmärkte rad %dBulgariska, makedonska, ryska, serbiskaC-dokumentC#-dokumentC++-dokumentKanadensiskaKan inte öppna %sKan inte öppna filenKan inte genomföra Ã¥tgärden i skrivskyddat lägeKan inte gör om Ã¥tgärdenKan inte Ã¥ngra Ã¥tgärdSkiftlägeskänsligKeltiska sprÃ¥kCentrala och ÖsteuropaÄndra redigerarfärgerÄndra redigerarinställningarÄndra namn pÃ¥ filen och sparaÄndrade typsnitt till "%s"Ändrade markerad text till gemenerÄndrade markerad text till versalerÄndrade tabulatorbredd till %dTeckenkodningTecken_kodning: Klicka för att välja en ny färg för redigerarens bakgrundKlicka för att välja en ny färg för redigerarens textKlicka för att välja en ny färg för sprÃ¥ksyntaxelementetKlicka för att ange typsnittstypen, stil och storlek att använda för text.Klicka för att ange platsen för den vertikala linjen.Stäng regulära uttryckStängde dialogfönsterStängde feldialogStängde GÃ¥ till rad-radFä_rg: Konfigurera redigerarenKonfigurera redigerarens förgrunds-, bakgrunds- eller syntaxfärgerKopierade markerad textKunde inte hitta Scribes datamappKunde inte öppna hjälpvisarenSkapa, ändra eller hantera mallarAktuellt dokument är fokuseratMarkören är redan pÃ¥ början av radenMarkören är redan pÃ¥ slutet av radenKlipp ut markerad textArgh! Okänt felDanska, norskaTa bort frÃ¥n markör till rad_slutTa bort frÃ¥n _markör till radens börjanTog bort rad %dTog bort text frÃ¥n markören till början av rad %dTog bort text frÃ¥n markören till slutet av rad %dKoppla loss Scribes frÃ¥n skalterminalenBestämmer huruvida statusrutan ska visas eller döljas.Fastställer huruvida verktygsraden ska visas eller döljas.Inaktiverade stavningskontrollInaktiverade syntaxfärgInaktiverade radbrytningFörkasta aktuell fil och läs in den ändrade filenVisa höger_marginalHämta ner mallarE_xporteraRedigera mallRedigera textfilerTypsnitt för _redigerare: Bakgrundsfärg för redigerarenFörgrundsfärg för redigerarenTypsnitt för redigerarenAktivera eller inaktivera stavningskontrollAktivera text_brytningAktiverade stavningskontrollAktiverade radbrytningAktiverar eller inaktiverar högermarginalenAktiverar eller inaktiverar radbrytningEngelskaAnge platsen (URI) till filen som du _vill öppna:Fel: "%s" används redan. Välj en annan sträng.Fel: "%s" används redan. Använd en annan förkortning.Fel: Filen hittades inteFel: Ogiltig mallfilFel: Ogiltig mallfil.Fel: Namnfältet fÃ¥r inte vara blanktFel: Namnfältet fÃ¥r inte innehÃ¥lla blanksteg.Fel: Namnfältet mÃ¥ste innehÃ¥lla en sträng.Fel: Ingen markering att exporteraFel: Ingen mallinformation hittadesFel: Mallredigeraren kan endast ha en "${cursor}"-platshÃ¥llare.Fel: Du har inte behörighet att spara pÃ¥ platsenEsperanto, MaltesiskaExportera mallMisslyckades med att läsa filen.Misslyckades med att spara filFil_namnFil_typFilen har inte sparats till diskFil: Fil: %sHitta förekomster av strängen som endast matchar hela ordetHitta förekomster av strängen som endast matchar angivna versaler och gemenerHittade %d sökträffarHittade %d sökträffarFrigör _överliggande radFrigör _underliggande radFrigjorde rad %dGÃ¥ till en specifik radGrekiskaHTML-dokumentHaskell-dokumentHebreiskaDölj högermarginalDölj verktygsradINFI_gnoreraI_mporteraI_ndenteringK_ursivIsländskaImportera mallInkre_mentellInkrementell sökning efter textDrog in rad %dIndenterar, vänta...Informationsfel: Ã…tkomst till den begärda filen nekades.Informationsfel: Information om %s kan inte hämtas.Information om textredigerarenInfogade mallJapanskaJapanska, koreanska, förenklad kinesiskaJava-dokumentSammanförde rad %d till rad %dKazakiskaKoreanskaSprÃ¥kelementSprÃ¥k och regionStarta hjälpvisarenStartar hjälpvisarenLämna helskärmslägeRadRadnummer:Rad %d kol %dInläsningsfel: Misslyckades med att komma Ã¥t fjärrfilen pÃ¥ grund av behörighetsproblem.Inläsningsfel: Misslyckades med att stänga filen för inläsning.Inläsningsfel: Misslyckades med att avkoda filen för inläsning. Filen som du läser in kanske inte är en textfil. Om du är säker pÃ¥ att den är en textfil kan du prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen.Inläsningsfel: Misslyckades med att koda filen för inläsning. Prova att öppna filen med den korrekta kodningen via Öppna-dialogen. Tryck (Ctrl - o) för att visa Öppna-dialogen.Inläsningsfel: Misslyckades med att fÃ¥ information om filen för inläsning. Prova att läsa in filen igen.Inläsningsfel: Misslyckades med att öppna filen för inläsning.Inläsningsfel: Misslyckades med att läsa filen för inläsning.Inläsningsfel: Filen finns inte.Inläsningsfel: Du har inte behörighet att visa den här filen.Läste in filen "%s"Läser in "%s"...Läser in filen, vänta...Sökträff %d av %dMatcha _skiftlägeMatcha _ordMatcha hela ordMeny för avancerad konfigurationÄndra ord för automatisk ersättningFlytta markören till en specifik radFlytta till _sista bokmärketFlytta till _första bokmärketFlytta till _nästa bokmärkeFlytta till _föregÃ¥ende bokmärkeFlytta till bokmärkt radFlyttade markören till rad %dFlyttade till bokmärke pÃ¥ rad %dFlyttade till första bokmärketFlyttade till sista bokmärketFlyttade till senaste bokmärkta radLäs varken om eller skriv över filenInga bokmärken hittadesInga bokmärken hittades att ta bortInga dokument öppnadeIngen indenteringsmarkering hittadesIngen sökträff hittadesInga fler rader att sammanföraInget nästa bokmärke att flytta tillIngen nästa sökträff hittadesInget stycke att markeraIngen behörighet att ändra filenInget föregÃ¥ende bokmärke att flytta tillIngen tidigare sökträffIngen föregÃ¥ende sökträff hittadesInga av de markerade raderna kan indenterasIngen markering att ändra skiftläge pÃ¥Ingen markering att kopieraIngen markering att klippa utIngen mening att markeraInga blanksteg hittades att ersättaInga blanksteg hittades i början av radInga blanksteg hittades pÃ¥ slutet av radInga tabulatorer hittades att ersättaInget textinnehÃ¥ll i urklippIngen text att markera pÃ¥ rad %dInget ord att markeraIngenNordiska sprÃ¥kSRÖÖppna dokumentÖppna dokumentÖppningsfel: Ett fel inträffade vid öppnandet av filen. Prova att öppna filen igen eller skicka in en felrapport.Öppna en filÖppna ett nytt fönsterÖppna tidigare använda filerFlaggor:PHP-dokumentKlistrade in kopierad textPerl-dokumentRättighetsfel: Ã…tkomst till den begärda filen nekades.PortugisiskaMarginalens positionPositionerade marginalen pÃ¥ kolumn %dInställningarSkriv ut dokumentFörhandsvisningSkriv ut filSkriv ut aktuell filSkriver ut "%s"Python-dokumentRekommenderad (UTF-8)Gör om Ã¥ngrad Ã¥tgärdLäser om %sTa bort _alla bokmärkenTog bort alla bokmärkenTog bort bokmärket pÃ¥ rad %dTog bort blanksteg frÃ¥n början av rad %dTog bort blanksteg frÃ¥n början av markerade raderTog bort blanksteg pÃ¥ slutet av rad %dTog bort blanksteg pÃ¥ slutet av radernaTog bort blanksteg pÃ¥ slutet av markerade raderTar bort blanksteg, vänta...Byt namn pÃ¥ aktuell filErsät_t med:Ersätt _allaErsätt alla sökträffarErsatte "%s" med "%s"Ersatte alla funna sökträffarErsatte alla förekomster av "%s" med "%s"Ersatte blanksteg med tabulatorerErsatte tabulatorer med blankstegErsatte tabulatorer med blanksteg pÃ¥ markerade raderErsätter, vänta...Ersätter blanksteg, vänta ...Ersätter tabulatorer, vänta...Ruby-dokumentRyska_MarkeringB_lankstegSpara dokumentFel vid sparande: Misslyckades med att avkoda innehÃ¥llet i filen frÃ¥n "UTF-8" till Unicode.Fel vid sparande: Misslyckades med att stänga växlingsfil för sparandet.Fel vid sparande: Misslyckades med att skapa växlingsplats för sparandet.Fel vid sparande: Misslyckades med att skapa växlingsplats eller fil.Fel vid sparande: Misslyckades med att överföra filen frÃ¥n växlingsutrymme till permanent plats.Fel vid sparande: Misslyckades med att skriva växlingsfil för sparandet.Fel vid sparande: Du har inte behörighet att ändra den här filen eller att spara till dess plats.Spara aktuell fil och skriv över ändringarna gjorda av det andra programmetSpara lösenordet i _nyckelringSparade "%s"Scheme-dokumentTextredigeraren ScribesScribes är en textredigerare för GNOME.Scribes har endast stöd för en flagga Ã¥t gÃ¥ngenScribes version %sSök och ersätt textSök efter nästa förekomst av strängenSök efter föregÃ¥ende förekomst av strängenSök efter textSök efter text med hjälp av reguljärt uttryckSöker, vänta...VäljMarkera _radMarkera _styckeMarkera _meningMarkera _ordVälj bakgrundsfärgVälj bakgrundsfärg för syntaxVälj tecken_kodningVälj dokument att fokuseraVälj fil för inläsningVälj förgrundsfärgVälj förgrundsfärg för syntaxVälj för att visa en vertikal linje som indikerar högermarginalen.Aktivera stavningskontrollenVälj för att göra sprÃ¥ksyntaxelementet i fet textVälj för att göra sprÃ¥ksyntaxelementet i kursiv textVälj för att Ã¥terställa sprÃ¥ksyntaxelementet till dess standardinställningarVälj för att understryka sprÃ¥ksyntaxelementVälj för att använda temats förgrund- och bakgrundsfärgerValda kodningarMarkerade rad %dValde nästa platshÃ¥llareMarkerade styckeValde föregÃ¥ende platshÃ¥llareMarkerad meningMarkerad text är redan gemenMarkerad text är redan versalMarkerat ordMarkeringen indenteradesStäller in marginalens position i redigerarenStäller in bredden pÃ¥ tabulatorstopp i redigerarenDra in _vänsterDra in _högerVisa marginalVisa eller dölj statusrutan.Visa eller dölj verktygsraden.Visa högermarginalVisade verktygsradenFörenklad kinesiskaStavningskontrollStoppade Ã¥tgärdenStoppade ersättningenRedigerare för syntaxfärgerTabulatorbreddMallredigerareMalläget är aktivtTextdokumentRadbrytningThaiMIME-typen för filen som du försöker att öppna kunde inte fastställas. Kontrollera att filen är en textfil. MIME-typ: %sMIME-typen för filen som du försöker att öppna är inte för en textfil. MIME-typ: %sFärgen som används för att rita normal text i textredigerarens buffert.Färgen som används för att rita textredigerarens buffertbakgrund.Redigerarens typsnitt. MÃ¥ste vara ett strängvärdeKodningen för filen som du försöker att öppna kunde inte fastställas. Prova att öppna filen med en annan kodning.Filen "%s" är öppnadFilen "%s" är öppnad i skrivskyddat lägeFilen som du försöker att öppna finns inte.Filen som du försöker att öppna är inte en textfil.Traditionell kinesiskaSant för att använda tabulatorer istället för blanksteg, falskt om inte.Prova "scribes --help" för mer informationTurkiskaAnge URI för inläsningAnge texten som du vill ersätta medAnge texten som du vill söka efterUkrainskaÃ…ngra senaste Ã¥tgärdenFörenad kinesiskaAvindenterade rad %dOkänd flagga: "%s"Osparat dokumentUrduAnvänd GTK-temafärgerAnvänd tabulatorer istället för blankstegAnvänd blanksteg för indenteringAnvänd blanksteg istället för tabulatorer för indenteringAnvänd tabulatorer för indenteringAnvänder anpassade färgerAnvänder temafärgerVietnamesiskaVarningVästeuropaVästra EuropaXML-dokumentDu har inte behörighet att spara filen. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt.Du har inte behörighet att spara filen. Prova att spara filen pÃ¥ ditt skrivbord eller till en annan mapp. Automatiskt sparande kommer att vara inaktiverat tills filen sparas korrekt utan fel.Du har inte behörighet att visa den här filen.Du mÃ¥ste logga in för att komma Ã¥t %s_Förkortningar_Bakgrundsfärg: _Bokmärk_Skiftläge_Ta bort rad_Beskrivning_Beskrivning:A_ktivera stavningskontroll_Förgrund:_Uppmärkningsläge_Sammanför rad_SprÃ¥k_Rader_Gemen_Namn_Namn:_Nästa_Normal textfärg: S_kriv över fil_Lösenord:_FöregÃ¥endeLäs _om fil_Kom ihÃ¥g lösenordet under sessionen_Ta bort bokmärkeTa bort _efterliggande blanksteg_Ersätt_Ersättningar_Ã…terställ till standardPosition för _högermarginal: _Sök efter:_Sök efter: _Visa bokmärken_Blanksteg till tabulatorer_Växla skiftläge_Tabulatorbredd: _Tabulatorer till blanksteg_Mall:_Titeltyp_Understruken_Versal_Använd standardtema_Använd blanksteg istället för tabulatorerfärdigskapa en ny fil och öppna filen med Scribesvisa den här hjälpskärmenfelLägg tillAvbrytRedigeraHjälpTa bortSparaläser in...öppna filen i skrivskyddat lägeskriv ut versionsinformation för Scribesscribes: %s tar inga argumentanvändning: scribes [FLAGGA] [FIL] [...]scribes-0.4~r910/po/nl.gmo0000644000175000017500000012435611242100540015170 0ustar andreasandreasÞ•êl¼ð( ñ(ý( ) %)3))E)8o) ¨)´)È)Þ)ï)* *'*s9*)­*®×*ô†+{,”,°, Á, Î,ï, - -&- ?-M-g-(€-u©-d.~„.v/tz/eï/)U00†0ž0²0È0 Î0Û0ì0þ011.1'A1 i1 u1 ‚11™1¨1)¹1ã1ö1 2#222C2^2s2Š2§2"¼2"ß233-37C31{3;­3@é33*4T^4³4Ð4í455+5>5P5Y5>n5­5#Â5æ5"6%6*A6$l6‘6£6·6É6ä6707*B7&m7è”73}8/±8á8ø89%9;9S9 [9i9y9ˆ9 9 ¸9 Æ9ç9ý9: ):!J:l:ƒ:=‹:9É:?;C;Y;v;!”;)¶;(à; <$'<AL<DŽ<9Ó< = =0=E= Y= d=o==–=>Ÿ=DÞ=#>2>!C>e>v> ‡>•>¥>»>Á>Ð>â>é> û>? ? ?!? )?3? C?P?n??9˜?2Ò?!@'@9@$B@g@v@@—@ž@°@Ä@Ü@ó@A"A 'A 4A@AA-‚Aô°AŸ¥BZEC, C,ÍC úC9DUDfDvD’D ¡D ­D ¹DÄD!äDE%EKKKaKwK!“K&µK-ÜK L+L'JLrL‘L©L ¸LÅLßL óLM,M*GMrMŒM+¦MÒMëM N)N8N @NKN SNCaN1¥N2×N3 OŸ>ODÞO1#PSUP©P ÃPÎPßP#óP0QHQ(wQ, QÍQ(ÝQRR &R3RER VRcR{RšRµRÎRæRþRBS`S/€S1°SCâS+&T6RTO‰T"ÙTüTU U:UMUkU$}U"¢U"ÅU èUöU V,V-KV yV …V ’VžV¼VÖVèV÷V WW+W!=W_W sW}WW¥W ´WÂW‚ÇW^JXA©X;ëX)'YtQYÆY&ÜY/Z33ZQgZ¹ZÓZìZ[4ž[)Ó[ý[\)\'D\ l\v\ˆ\™\©\Ç\Ú\ô\] ]]:]*U]€]™]­] À] Ë]×]æ] ÿ]p ^¾~^-=_k_ˆ_—_ «_µ_ »_ È_ Õ_ã_ú_ `` .` 9`C` J`U`[`b`h` }` ˆ`#’`¶`Ç`ß` è`ö`a !a.a?aVa fa pa}a a ˜a £a ®a¹aÌa èa0òa#beWege}e “e¡e³e9Qf‚‹fôgh hAhYh&kh$’h·h ÇhÒh éhôhi++i›Wiyói“mj—k–™k…0lB¶lùlmm3mKm Pm^mnm~m‘m±m#Æm(êm n n.n=nFnYn3qn&¥n&Ìn#óno+o;o'Vo#~o"¢oÅo/âo-p@p [pipDyp>¾p;ýpJ9q3„qc¸qr#7r[rsrˆržr³rÅrÍrJär/s Ns$os'”s¼s*Üs*t2tNt ft'st'›tÃt8×t4u(Eušnu/ v-9vgv‡v¥vÂvÝv ðvüv w$w&?w fw ‡w%¨wÎwêw x#%x"Ix(lx•x<œx@ÙxBy]yyy˜y!¸y)Úy,z$1z&Vz@}zX¾z7{O{b{u{“{ ²{ À{$Î{ó{ ü{2|!;|]|w|*‰|´|Ì|"ä|}}7}>}N} a}k}…}˜} œ} ¨}´}½}Æ} Ù}ã}þ}!~56~3l~ ~À~Ó~'Ú~"5= F Tbz—$®Ó Ù æ<ô;1€6m€·¤w\‚:Ô‚9ƒ%Iƒ@oƒ°ƒƃ,܃ „!„6„N„#e„)‰„*³„Þ„ò„……-…L…&l…“…±….Ð…ÿ…*†#D†h†€†ž†#²†#Ö†ú†‡.‡%N‡t‡‹‡¤‡=½‡8û‡4ˆRˆnˆ%ˆˆ8®ˆ0çˆ"‰ ;‰'\‰„‰ ‰¥‰º‰¾‰Ή“à‰tЇŠ" ŠÊËŠ!ÚŠüŠ‹A(‹ j‹t‹Œ‹ «‹¶‹É‹Ù‹ë‹ ŒŒ1Œ5EŒ,{Œ ¨Œ´ŒÒŒ#îŒ -3<a-ž.Ì<û08ŽiŽ‡Ž˜Ž©Ž'ÇŽ%ïŽ".5Q‡£6¿(ö/,O|Œ •Ÿ¨O¹? ‘GI‘C‘‘¸Õ‘ZŽ’Dé’c.“#’“¶“Ɠؓ'í“>”T”f”€” ” ¾”+Ë”%÷” •'•8•M•\•m•1‰•»•Ó•ñ•–/)–EY–1Ÿ–-Ñ–1ÿ–I1—,{—D¨—uí—"c˜†˜Ÿ˜!µ˜ט) ™1J™2|™¯™!™"ä™5š1=šoš…š›šªšÉšæšüš ›#›5›G›<Y›–› ³›¾›Õ›í›ý› œœœn¯œ$*C%n”ž12ž2dž:—žIÒž Ÿ=Ÿ]Ÿ§rŸ: -U ƒ ‰ <¡ 'Þ  ¡!¡3¡P¡$c¡"ˆ¡«¡Á¡Ú¡ß¡$ú¡"¢EB¢ˆ¢¨¢Å¢ Ü¢ ç¢ ó¢££#£É¥£0o¤ ¤ À¤ͤ à¤ì¤¥ ¥'¥6¥U¥ q¥}¥Ž¥¢¥¨¥°¥À¥Æ¥ Í¥×¥ ì¥ù¥$¦&¦$>¦ c¦n¦~¦›¦ ¸¦ƦÖ¦ê¦#ý¦ !§.§ A§L§ g§ u§ƒ§%§ç0̧ý§¨¨ ¨+¨4¨ =¨H¨Q¨$Z¨#¨!£¨(Ũh»ëd7<)½ÇåÌG«ÙœÎ¯c;6 µ-€>ê„Íè þý¾sÀ6ßÞ¿çÆ­'™U™ÅC:òÉ xxSô+žX·Á|œ',ÕTNâ^NúñÂfB±–ÉÐ`Ü 1"@üR“ÔpJÃ9ؘ0c»‘FÌ&‡Vƒ¨"ØR¬éÏø®‚_¿¦íCãM£F²y·Ä‹ %¢°EÓ s*Ü j2&¥×u4ó¤–æ­Q¼ÒL@¡gÔÅ¡:È=MÄŽ;$!_‰±ŸÏ E(Qq²šµ7˜=8X”é\÷Lß#I—ŠŠV[jtö³rŒ—u…´ÈáÛªwÚgmS? ^{¾2oÝ Y|Ò*-Ã$/› ‘~[‚fæ¯i¶¸n…GB©¶8êPޏ3ÿ°(AÕ©Zài)yʪ£ÛÀv›,Ç`š³3nz¦ºÓ>ÁÎÝÙ}õûã? d4Hʉ]¢pƒDÍäÞùtŒOkkÂWJ§.«ZKT¨†59vËÑ!¼®ŸwqAI{D/%•॔앓„hÖÖ0W´a†’ˆ~ÐËbK×½çe5¬ §le<ˆo.#ârb€¹èÚzl1‹å¹+äžÑ\º’¤îa}Pá ïðÆmHU]YO‡ of %d"%s" has been replaced with "%s"%d%% complete%s does not exist'%s' has been modified by another programhereFontRight MarginSpell CheckingTab StopsText Wrapping_Description:_Name:_Template:A decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.A list of encodings selected by the user.A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.A text editor for GNOME.Activated '%s' syntax colorAdd New TemplateAdd TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAll LanguagesAll Languages (BMP only)All languagesAlready on first bookmarkAlready on last bookmarkAlready on most recently bookmarked lineAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicAuthentication RequiredAuto Replace EditorAutomatic ReplacementB_oldBack_ground:Baltic languagesBaltic languaguesBookmark BrowserBookmark _LineBookmarked TextBookmarked line %dBulgarian, Macedonian, Russian, SerbianC DocumentsC# DocumentsC++ DocumentsCanadianCannot open %sCannot open fileCannot perform operation in readonly modeCannot redo actionCannot undo actionCapitalized selected textCase sensitiveCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text to lowercaseChanged selected text to uppercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Close incremental search barClose regular expression barClosed dialog windowClosed error dialogClosed goto line barClosed replace barClosed search barCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCould not open help browserCreate, modify or manage templatesCurrent document is focusedCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDamn! Unknown ErrorDanish, NorwegianDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDetach Scribes from the shell terminalDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Determines whether to show or hide the status area.Determines whether to show or hide the toolbar.Disabled spellcheckingDisabled syntax colorDisabled text wrappingDisplay right _marginDownload templates fromE_xportEdit TemplateEdit text filesEditor _font: Editor background colorEditor foreground colorEditor's fontEnable or disable spell checkingEnable text _wrappingEnabled spellcheckingEnabled text wrappingEnables or disables right marginEnables or disables text wrappingEnclosed selected textEnglishEnter the location (URI) of the file you _would like to open:Error: '%s' already in use. Please choose another string.Error: '%s' is already in use. Please use another abbreviation.Error: File not foundError: Invalid template fileError: Invalid template file.Error: Name field cannot be emptyError: Name field cannot have any spaces.Error: Name field must contain a string.Error: No selection to exportError: No template information foundError: Template editor can only have one '${cursor}' placeholder.Error: Trigger name already in use. Please use another trigger name.Error: You do not have permission to save at the locationEsperanto, MalteseExport TemplateFailed to load file.Failed to save fileFile _NameFile _TypeFile has not been saved to diskFile: File: %sFind occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound %d matchFound %d matchesFound matching bracket on line %dFree Line _AboveFree Line _BelowFreed line %dFull _Path NameGo to a specific lineGreekHTML DocumentsHaskell DocumentsHebrewHide right marginHide toolbarINSI_mportI_ndentationI_talicIcelandicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Info Error: Access has been denied to the requested file.Info Error: Information on %s cannot be retrieved.Information about the text editorInserted templateJapaneseJapanese, Korean, Simplified ChineseJava DocumentsJoined line %d to line %dKazakhKoreanLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLexical scope highlight colorLineLine number:Ln %d col %dLoad Error: Failed to access remote file for permission reasons.Load Error: Failed to close file for loading.Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to get file information for loading. Please try loading the file again.Load Error: Failed to open file for loading.Load Error: Failed to read file for loading.Load Error: File does not exist.Load Error: You do not have permission to view this file.Loaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMatch wordMenu for advanced configurationModify words for auto-replacementMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to most recently bookmarked lineNo bookmarks foundNo bookmarks found to removeNo brackets found for selectionNo documents openNo indentation selection foundNo match foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous matchNo previous match foundNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found to replaceNo text content in the clipboardNo text to select on line %dNo word to selectNoneNordic languagesOVROpen DocumentOpen DocumentsOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Open a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPair character completion occurredPasted copied textPerl DocumentsPermission Error: Access has been denied to the requested file.PortuguesePosition of marginPositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionReloading %sRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved pair character completionRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of linesRemoved spaces at end of selected linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplace found matchReplace the selected found matchReplaced '%s' with '%s'Replaced all found matchesReplaced all occurrences of "%s" with "%s"Replaced spaces with tabsReplaced tabs with spacesReplaced tabs with spaces on selected linesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsRussianS_electionS_pacesSave DocumentSave Error: Failed decode contents of file from "UTF-8" to Unicode.Save Error: Failed to close swap file for saving.Save Error: Failed to create swap file for saving.Save Error: Failed to create swap location or file.Save Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Save Error: Failed to transfer file from swap to permanent location.Save Error: Failed to write swap file for saving.Save Error: You do not have permission to modify this file or save to its location.Save password in _keyringSaved "%s"Scheme DocumentsScribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearch for text using regular expressionSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect character _encodingSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected encodingsSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedSets the margin's position within the editorSets the width of tab stops within the editorShift _LeftShift _RightShow marginShow or hide the status area.Show or hide the toolbar.Show right marginShowed toolbarSimplified ChineseSpell checkingStopped operationStopped replacingSwapped the case of selected textSyntax Color EditorTab widthTemplate EditorTemplate mode is activeText DocumentsText wrappingThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe color used to render normal text in the text editor's buffer.The color used to render the text editor buffer background.The editor's font. Must be a string valueThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.The highlight color when the cursor is around opening or closing pair characters.Toggled readonly mode offToggled readonly mode onTraditional ChineseTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.True to use tabs instead of spaces, false otherwise.Try 'scribes --help' for more informationTurkishType URI for loadingType in the text you want to replace withType in the text you want to search forUkrainianUndid last actionUndo last actionUnified ChineseUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduUse GTK theme colorsUse Tabs instead of spacesUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsVietnameseWest EuropeWestern EuropeWord completion occurredXML DocumentsYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.You do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.You do not have permission to view this file.You must log in to access %s_Abbreviations_Background color: _Bookmark_Case_Delete Line_Description_Description:_Enable spell checking_Find Matching Bracket_Foreground:_Highlight Mode_Join Line_Language_Lines_Lowercase_Name_Name:_Next_Normal text color: _Password:_Previous_Remember password for this session_Remove Bookmark_Remove Trailing Spaces_Replace_Replacements_Reset to Default_Right margin position: _Search for:_Search for: _Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Template:_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscompletedcreate a new file and open the file with Scribesdisplay this help screenerrorgtk-addgtk-cancelgtk-editgtk-helpgtk-removegtk-saveloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: nl Report-Msgid-Bugs-To: POT-Creation-Date: 2007-03-16 23:37+0100 PO-Revision-Date: 2007-03-17 01:43+0100 Last-Translator: Filip Vervloesem Language-Team: Nederlands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.11.4 van %d"%s" is vervangen door "%s"%d%% voltooid%s bestaat niet%s is aangepast door een ander programma.hierLettertypeRechterkantlijnSpellingscontroleTabstopsRegelafbreking_Beschrijving:_Naam:_Sjabloon:Er heeft zich een decoderingsfout voorgedaan bij het opslaan van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.Een lijst van door de gebruiker geselecteerde coderingen.Er heeft zich een fout bij het opslaan voorgedaan. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.Opslaan is mislukt. Kon geen wisselbestand aanmaken. Controleer of u rechten heeft om in uw thuismap op te slaan. Kijk ook na of u nog voldoende schijfruimte hebt. Automatisch opslaan is uitgeschakeld totdat het document foutloos is opgeslagen.Een tekst-editor voor GNOME.'%s' syntaxiskleuren geactiveerdVoeg nieuw sjabloon toeVoeg sjabloon toeTekencodering toevoegen of verwijderenCodering toevoegen of verwijderen...Alle documentenAlle TalenAlle talen (enkel BMP)Alle talenReeds op eerste bladwijzerReeds op laatste bladwijzerReeds op regel met meest recente bladwijzerEr heeft zich een coderingsfout voorgedaan bij het opslaan van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.Er heeft zich een coderingsfout voorgedaan. Vul a.u.b. een foutrapport in op http://openusability.org/forum/?group_id=141Er heeft zich een fout voorgedaan bij het aanmaken van het bestand. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.Er heeft zich een fout voorgedaan tijdens het decoderen van het bestand. Vul a.u.b. een foutrapport in op"http://openusability.org/forum/?group_id=141"Er heeft zich een fout voorgedaan tijdens het coderen van uw bestand. Probeer uw bestand op te slaan met een andere tekencodering, bij voorkeur UTF-8.Er heeft zich een fout voorgedaan tijdens het openen van het bestand. Vul a.u.b. een foutrapport in op http://scribes.sourceforge.netEr heeft zich een fout voorgedaan bij het opslaan van dit bestand.ArabischVerificatie vereistAutomatisch vervangen editorAutomatische vervanging_VetAchter_grond:Baltische talenBaltische talenBladwijzer-browserBladwijzer aan_maken voor regelTekst van bladwijzerBladwijzer voor regel %d toegevoegdBulgaars, Macedonisch, Russich, ServischC-documentenC#-documentenC++-documentenCanadeesKan %s niet openenKan bestand niet openenKan deze actie niet uitvoeren in alleen-lezen modusActie kan niet ongedaan gemaakt wordenActie kan niet ongedaan gemaakt wordenGeselecteerde tekst gekapitaliseerdHoofdlettergevoeligKeltische talenCentraal- en Oost-EuropeesKleuren van het tekstvenster veranderenInstellingen van de editor wijzigenBestandsnaam veranderen en opslaanLettertype gewijzigd in "%s"Geselecteerde tekst gewijzigd in kleine lettersGeselecteerde tekst gewijzigd in hoofdlettersTabbreedte gewijzigd in %dTekencoderingT_ekencodering:Klik om een nieuwe kleur te kiezen voor de achtergrond van de editorKlik om een nieuwe kleur te kiezen voor de tekst van de editorKlik om een nieuwe kleur te kiezen voor het syntaxiselementKlik hier om de stijl en de grootte van het tekstlettertype in te stellen.Klik om de plaats van de verticale lijn te bepalen.Klik om de breedte in te stellen van de ruimte die wordt ingevoegd wanneer u op de Tab-toets drukt.Oplopende zoekbalk sluitenReguliere uitdrukkingenbalk sluitenDialoogvenster geslotenFoutmelding geslotenGa naar-balk geslotenVervangbalk geslotenZoekbalk geslotenK_leur:De editor configurerenStel de voorgrond-, achtergrond- en syntaxiskleur voor het tekstvenster inGeselecteerde tekst gekopieerdKon Scribes' datamap niet vindenHelp-browser kon niet geopend wordenSjablonen aanmaken, wijzigen of beherenHuidige document heeft de focusCursor is reeds aan het begin van de regelCursor is reeds aan het einde van de regelGeselecteerde tekst gekniptVerdomd! Onbekende foutDeens, NoorsVan cursor tot _einde regel verwijderenVan _cursor tot begin regel verwijderenRegel %d verwijderdTekst verwijderd vanaf cursor tot het begin van regel %dTekst verwijderd vanaf cursor tot einde van regel %dKoppel Scribes los van de shell-terminalBepaalt of de GTK themakleuren gebruikt worden voor de tekst en de achtergrond van het tekstvenster. Deselecteer deze optie om zelf de kleuren te bepalen.Bepaalt of de statusbalk getoond wordt of niet.Bepaalt of de werkbalk getoond wordt of niet.Spellingscontrole uitgeschakeldSyntaxiskleuren uitgeschakeldRegelafbreking uitgeschakeldRechter_kantlijn weergevenDownload sjablonen_ExporterenBewerk sjabloonTekstbestanden bewerken_Lettertype van de editor:Achtergrondkleur voor het tekstvensterTekstkleur voor het tekstvensterLettertype voor het tekstvensterSpellingscontrole in- of uitschakelen_Regelafbreking inschakelenSpellingscontrole ingeschakeldRegelafbreking ingeschakeldRechterkantlijn in- of uitschakelenRegelafbreking in- of uitschakelenGeselecteerde tekst omringd door haakjesEngelsVoer de locatie (URI) in van het bestand dat u _wilt openen:Fout: %s is reeds in gebruik. Kies a.u.b. een andere tekenreeks.Fout: %s is reeds in gebruik. Gebruik a.u.b. een andere afkorting.Fout: bestand niet gevondenFout: ongeldig sjabloonbestandFout: ongeldig sjabloonbestand.Fout: naamveld mag niet leeg zijnFout: naamveld mag geen spaties bevatten.Fout: naamveld moet een tekenreeks bevatten.Fout: geen selectie om te exporterenFout: geen sjablooninformatie gevondenFout: sjabloon kan slechts één '${cursor}' placeholder hebben.Fout: Naam van trigger is al in gebruik. Gebruik a.u.b. een andere naam voor de trigger.Fout: u heeft geen rechten om op de locatie op te slaanEsperanto, MalteesExporteer sjabloonLaden van bestand is mislukt.Opslaan van bestand is misluktBestands_naamBestands_typeBestand is niet opgeslagen op schijfBestand:Bestand: %sEnkel complete woorden als zoekresultaat weergevenZoekresultaat hoofdlettergevoelig%d zoekresultaat gevonden%d zoekresultatenOvereenkomstig haakje gevonden op regel %dRegel er_boven invoegenRegel er_onder invoegenNieuwe regel ingevoegd op regel %dVolledige _padnaamNaar een bepaalde regel gaanGrieksHTML-documentenHaskell-documentenHebreeuwsRechterkantlijn verbergenWerkbalk verborgenINV_ImporterenI_nspringen_CursiefIjslandsImporteer sjabloon_OplopendOplopend naar tekst zoekenRegel %d ingesprongenInspringen, even wachten a.u.b...Fout: toegang tot het gevraagde bestand is geweigerd.Fout: informatie over %s kan niet opgehaald worden.Informatie over de tekst-editorSjabloon ingevoegdJapansJapans, Koreaans, Vereenvoudigd ChineesJava-documentenRegel %d samengevoegd met regel %dKazachsKoreaansTaalelementenTaal en regioDe help-browser startenHelp-browser wordt opgestartSchermvullend verlatenAccentueerkleur voor lexicaal bereikRegelRegelnummer:Rg %d, Kol %dFout bij laden: toegang tot bestand op afstand is geweigerd.Fout bij laden: sluiten van bestand om te laden is mislukt.Fout bij laden: decoderen van bestand om te laden is mislukt. Het bestand dat u probeert te openen is misschien geen tekstbestand. Indien u zeker bent dat het een tekstbestand is, probeer het bestand dan te openen met de correcte codering via de het openvenster. Druk (control - o) om het openvenster te tonen.Fout bij laden: coderen van bestand om te laden is mislukt. Probeer het bestand te openen met de correcte codering via het openvenster. Druk (control - o) om het openvenster te tonen.Fout bij laden: verkrijgen van bestandsinformatie om te laden is mislukt. Probeer het bestand a.u.b. nogmaals te laden.Fout bij laden: openen van bestand om te laden is mislukt.Fout bij laden: lezen van bestand om te laden is mislukt.Fout bij laden: bestand bestaat niet.Fout bij laden: u heeft geen rechten om dit bestand te bekijken.Bestand "%s" geladen"%s" wordt geladen...Bestand wordt geladen, even wachten a.u.b...Zoekresultaat %d van %d_HoofdlettergevoeligEnkel complete _woordenEnkel complete woordenMenu voor geavanceerde instellingenWijzig woorden voor automatisch vervangenCursor naar een bepaalde regel verplaatsen_Laatste bladwijzer_Eerste bladwijzerVolge_nde bladwijzer_Vorige bladwijzerNaar regel met bladwijzer gaanCursor verplaatst naar regel %dVerplaatst naar bladwijzer op regel %dNaar eerste bladwijzer gegaanNaar laatste bladwijzer gegaanNaar regel met meest recente bladwijzer gegaanGeen bladwijzers gevondenGeen bladwijzer gevonden om te verwijderenGeen haakjes gevonden voor selectieGeen documenten geopendGeen inspringing geselecteerdGeen zoekresultatenGeen overeenkomstig haakje gevondenGeen regels meer om samen te voegenGeen volgende bladwijzerGeen volgend zoekresultaatGeen paragraaf om te selecterenGeen rechten om,bestand aan te passenGeen vorige bladwijzerGeen vorig zoekresultaatGeen vorig zoekresultaatInspringing van geselecteerde regels kan niet worden vergrootGeen selectie om hoofd- en kleine letters te verwisselenGeen selectie om te kopiërenGeen selectie om te knippenGeen zin om te selecterenGeen spaties gevonden om te vervangenEr zijn geen spaties gevonden aan het begin van de regelGeen spaties gevonden aan het einde van de regelGeen tabs gevonden om te vervangenGeen tekstinhoud in het klembordGeen tekst om te selecteren op regel %dGeen woord om te selecterenGeenNoord-Europese talenOVRDocument openenDocumenten openenFout bij openen: er heeft zich een fout voorgedaan bij het openen van het bestand. Probeer het bestand opnieuw te openen of vul een foutrapport in.Een bestand openenEen nieuw venster openenOnlangs gebruikte bestanden openenOpties:PHP-documentenOvereenkomstige haakjes aangevuldGeselecteerde tekst geplaktPerl-documentenFout bij toegang: toegang tot het gevraagde bestand is geweigerd.PortugeesPositie van de kantlijnKantlijn geplaatst op kolom %dVoorkeurenDocument afdrukkenAfdrukvoorbeeldBestand afdrukkenHet huidige bestand afdrukken"%s" wordt afgedruktPython-documenten Aanbevolen (UTF-8) Laatste ongedaan gemaakte actie is opnieuw uitgevoerdDe ongedaan gemaakte actie opnieuw uitvoeren%s herladen_Alle bladwijzers verwijderenAlle bladwijzers verwijderdBladwijzer voor regel %d verwijderdOvereenkomstig haakje verwijderdSpaties aan het begin van regel %d verwijderdSpaties aan het begin van de geselecteerde regels verwijderdSpaties aan het einde van regel %d verwijderdSpaties verwijderd aan het einde van de regelsSpaties aan het einde van de geselecteerde regels verwijderdSpaties worden verwijderd, even wachten a.u.b...Het huidige bestand hernoemenV_ervangen door:_Alles vervangenAlle zoekresultaten vervangenGeselecteerd zoekresultaat is vervangenGeselecteerde zoekresultaat vervangen'%s' vervangen door '%s'Alle zoekresultaten zijn vervangenAlle zoekresultaten van "%s" zijn vervangen door "%s"Spaties vervangen door tabsTabs vervangen door spatiesTabs vervangen door spaties op de geselecteerde regelsAan het vervangen, even wachten a.u.b...Spaties worden vervangen, even wachten a.u.b...Tabs worden vervangen, even wachten a.u.b...Ruby-documentenRussischS_electieS_patiesDocument opslaanFout bij opslaan: bestandsinhoud decoderen van "UTF-8" naar Unicode is mislukt.Fout bij opslaan: sluiten wisselbestand om te slaan is mislukt.Fout bij opslaan: aanmaken van wisselbestand om op te slaan is mislukt.Fout bij opslaan: aanmaken van wisselbestand of bestand is mislukt.Fout bij opslaan: bestandsinhoud coderen is mislukt. Controleer of de codering van het bestand juist is ingesteld in het opslaanvenster. Druk (Ctrl - s) om het opslaanvenster te tonen.Fout bij opslaan: bestand overzetten van wisselbestand naar permanente locatie is mislukt.Fout bij opslaan: schrijven wisselbestand om op te slaan is mislukt.Fout bij opslaan: u heeft geen rechten om dit bestand aan te passen of op te slaan op zijn locatie._Sla wachtwoord op in sleutelhanger"%s" opgeslagenScheme-documentenScribes tekst-editorScribes is een tekst-editor voor GNOME.Scribes ondersteunt enkel het gebruik van één optie tegelijkScribes versie %sTekst zoeken en vervangenVolgend zoekresultaat weergevenVorig zoekresultaat weergevenTekst zoekenZoek naar tekst met reguliere uitdrukkingenAan het zoeken, even wachten a.u.b...SelecteerSelecteer rege_lSelecteer _paragraaf_Selecteer zinSelecteer _woordAchtergrondkleur selecterenAchtergrondkleur voor syntaxiskleuring selecterenSelecteer tekencoderingSelecteer document voor focusSelecteer bestand om te ladenVoorgrondkleur selecterenVoorgrondkleur voor syntaxiskleuring selecterenSelecteer om de rechterkantlijn aan te duiden met een verticale lijn.Selecteer om de spellingscontrole in te schakelenSelecteer om het syntaxiselement vet te makenSelecteer om het syntaxiselement cursief te makenSelecteer om het syntaxiselement te herstellen naar zijn standaardwaardenSelecteer om syntaxiselement te onderstrepenSelecteer om voorgrond- en achtergrondkleuren van thema te gebruikenSelecteer om de tekst op het einde van een regel af te breken, zodat die binnen de grens van het tekstvenster blijft.Tekens binnen haakjes geselecteerdGeselecteerde coderingenRegel %d geselecteerdVolgende placeholder geselecteerdParagraaf geselecteerdVorige placeholder geselecteerdGeselecteerde zinGeselecteerde tekst is al gekapitaliseerdGeselecteerde tekst bestaat al uit kleine lettersGeselecteerde tekst bestaat reeds uit hoofdlettersGeselecteerd woordInspringing van selectie vergrootInspringing van selectie verkleindPositie van de kantlijn in het tekstvenster instellenBreedte van de tabstops in tekstvenster instellenVerk_lein inspringingVe_rgroot inspringingKantlijn tonenStatusbalk tonen of verbergen.Werkbalk tonen of verbergen.Rechterkantlijn tonenWerkbalk getoondVereenvoudigd ChineesSpellingscontroleBewerking gestoptVervangen gestoptHoofd- en kleine letters van geselecteerde tekst omgewisseldSyntaxiskleuren configurerenTabbreedteSjablonen configurerenSjabloonmodus is actiefTekstdocumentenRegelafbrekingThaisHet MIME-type van het bestand dat u probeert te openen kon niet worden vastgesteld. Controleer of dit bestand wel een tekstbestand is. MIME type: %sHet MIME-type van het bestand dat u probeert te openen is niet dat van een tekstbestand. MIME type: %sDe tekstkleur voor het tekstvenster.De achtergrondkleur voor het tekstvenster.Het lettertype voor het tekstvenster.De codering van het bestand dat u wilt openen kan niet worden vastgesteld. Probeer het bestand met een andere codering te openen.Het bestand "%s" is geopendHet bestand "%s" is in alleen-lezen modus geopendHet bestand dat u probeert te openen bestaat niet.Het bestand dat u probeert te openen is geen tekstbestand.De accentueerkleur wanneer de cursor naast overeenkomstige haakjes staat.Alleen-lezen modus uitgeschakeldAlleen-lezen modus ingeschakeldTraditioneel ChineesSchakel dit in om Scribes los te koppelen van de shell-terminal en in zijn eigen proces te draaien. Om fouten op te sporen kan het nuttig zijn om dit uit te schakelen.Schakel dit in om tabs in plaats van spaties te gebruiken.Probeer 'scribes --help' voor meer informatieTurksVoer URI in om te ladenVoer de tekst in waardoor u de zoekresultaten wilt vervangenVoer de tekst in waarnaar u wilt zoekenOekraïensLaatste actie is ongedaan gemaaktLaatste actie ongedaan makenEengemaakt ChineesInspringing verkleinen is onmogelijkInspringing van regel %d verkleindOnbekende optie: '%s'Niet-opgeslagen documentUrduGTK themakleuren gebruikenTabs in plaats van spaties gebruikenSpaties voor inspringing gebruikenSelecteer om spaties in plaats van tabs te gebruiken voor inspringingTabs voor inspringing gebruikenAangepaste kleuren gebruikenThemakleuren gebruikenVietnameesWest-EuropaWest-EuropeesWoord is aangevuldXML-documentenU heeft geen rechten om het bestand op te slaan. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.U heeft geen rechten om het bestand op te slaan. Probeer het bestand op te slaan op uw bureaublad of een map die u bezit. Automatisch opslaan is uitgeschakeld totdat het bestand foutloos is opgeslagen.U heeft geen rechten om dit bestand te bekijken.U moet inloggen om %s te openen_Afkortingen_Achtergrondkleur:_BladwijzerHoofd- of kleine _lettersRegel verwij_deren_Beschrijving_Beschrijving:Spellingscontrole inschak_elen_Zoek overeenkomstig haakje_Voorgrond:_AccentueermodusRegels samen_voegen_TaalRege_ls_Kleine letters_Naam_Naam:V_olgende_Normale tekstkleur:_Wachtwoord:_Vorige_Onthoud wachtwoord voor deze sessieBladwijzer verwijde_renSpaties aan einde regel ve_rwijderenVe_rvangen_Vervangen doorStandaardwaarden he_rstellenPositie van _rechterkantlijn_Zoeken naar:_Zoek naar: _Bladwijzer-browser_Spaties naar tabs_Verwissel hoofd- en kleine letters_Tabbreedte:_Tabs naar spaties_Sjabloon:_Eerste letter hoofdletter_Onderstrepen_Hoofdletters_Standaardthema gebruiken_Spaties in plaats van tabs gebruikenVoltooideen nieuw bestand aanmaken en openen met Scribesdit helpvenster tonenfoutgtk-addgtk-cancelgtk-editgtk-helpgtk-removegtk-saveLaden...bestand in alleen-lezen modus openenversie-informatie van Scribes tonenscribes: %s heeft geen argumentengebruik: scribes [OPTIE] [BESTAND] [...]scribes-0.4~r910/po/Makefile.in.in0000644000175000017500000001537711242100540016527 0ustar andreasandreas# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info ctags tags CTAGS TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/po/it.po0000644000175000017500000010616711242100540015027 0ustar andreasandreas# Italian translations for scribes package # Traduzioni italiane per il pacchetto scribes. # Copyright (C) 2005 YHE scribes'S COPYRIGHT HOLDER # This file is distributed under the same license as the scribes package. # Stefano Esposito , 2005. # msgid "" msgstr "" "Project-Id-Version: scribes 0.2.3_beta1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-01-26 19:53-0500\n" "PO-Revision-Date: 2005-12-29 17:18+0100\n" "Last-Translator: Stefano Esposito \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: Scribes/internationalization.py:87 msgid "Scribes is a text editor for GNOME." msgstr "Scribes e' un editor di testo per GNOME" #: Scribes/internationalization.py:91 msgid "Cannot undo action" msgstr "Impossibile annullare" #: Scribes/internationalization.py:92 msgid "Cannot redo action" msgstr "Impossibile ripetere" #: Scribes/internationalization.py:96 #, python-format msgid "Deleted line %d" msgstr "Riga %d cancellata" #: Scribes/internationalization.py:97 #, python-format msgid "Joined line %d to line %d" msgstr "Le righe %d e %d sono state unite" #: Scribes/internationalization.py:98 msgid "No more lines to join" msgstr "Non ci sono altre righe da unire" #: Scribes/internationalization.py:102 msgid "Selected word" msgstr "Parola selezionata" #: Scribes/internationalization.py:103 msgid "No word to select" msgstr "Nessuna parola da selezionare" #: Scribes/internationalization.py:104 #, python-format msgid "No text to select in line %d" msgstr "Non c'e' testo da selezionare nella riga %d" #: Scribes/internationalization.py:105 #, python-format msgid "Selected line %d" msgstr "Riga %d selezionata" #: Scribes/internationalization.py:106 msgid "Selected paragraph" msgstr "Paragrafo selezionato" #: Scribes/internationalization.py:107 msgid "No paragraph to select" msgstr "Nessun paragrafo da selezionare" #: Scribes/internationalization.py:108 msgid "Selected sentence" msgstr "Frase selezionata" #: Scribes/internationalization.py:109 msgid "No sentence to select" msgstr "Nessuna frase da selezionare" #: Scribes/internationalization.py:113 msgid "No selection to change case" msgstr "Nessuna seleziona a cui cambiare il case" #: Scribes/internationalization.py:114 msgid "Selected text is already uppercase" msgstr "Il testo selezionato e' già maiuscolo" #: Scribes/internationalization.py:115 msgid "Changed selected text from lowercase to uppercase" msgstr "Il testo selezionato e' stato cambiato da minuscolo in maiuscolo" #: Scribes/internationalization.py:116 msgid "Selected text is already lowercase" msgstr "Il testo selezionato e' già minuscolo" #: Scribes/internationalization.py:117 msgid "Changed selected text from uppercase to lowercase" msgstr "Il testo selezionato e' stato cambiato da maiuscolo in minuscolo" #: Scribes/internationalization.py:121 #, python-format msgid "Found matching bracket on line %d" msgstr "Trovata la parentesi corrispondente sulla riga %d" #: Scribes/internationalization.py:122 msgid "No matching bracket found" msgstr "Non e' stata trovata una parentesi corrispondente" #: Scribes/internationalization.py:126 msgid "Disabled spellchecking" msgstr "Il controllo ortografico e' stato disabilitato" #: Scribes/internationalization.py:127 msgid "Enabled spellchecking" msgstr "Il controllo ortografico e' stato abilitato" #: Scribes/internationalization.py:128 msgid "Leave Fullscreen" msgstr "Esci dal fullscreen" #: Scribes/internationalization.py:132 msgid "Unsaved Document" msgstr "Documento non salvato" #: Scribes/internationalization.py:136 msgid "Open Document" msgstr "Apri Documento" #: Scribes/internationalization.py:137 msgid "All Documents" msgstr "Tutti i documenti" #: Scribes/internationalization.py:138 msgid "Python Documents" msgstr "Documenti Python" #: Scribes/internationalization.py:139 msgid "Text Documents" msgstr "Documenti di testo" #: Scribes/internationalization.py:143 #, python-format msgid "Loaded file \"%s\"" msgstr "Il file \"%s\" e' stato caricato" #: Scribes/internationalization.py:144 msgid "" "The encoding of the file you are trying to open could not be determined. Try " "opening the file with another encoding." msgstr "" "L'encoding del file che stai tentando di aprire non può essere determinato." "Prova ad aprire il file con un altro encoding" #: Scribes/internationalization.py:146 msgid "Loading file please wait..." msgstr "Caricamento file in corso. Attendere prego..." #: Scribes/internationalization.py:147 msgid "" "An error occurred while openning the file. Please file a bug report at " "http://scribes.sourceforge.net" msgstr "" "C'e' stato un errore durante l'apertura del file. Compila un bug report su " "http://scribes.sourceforge.net. Grazie." #: Scribes/internationalization.py:152 msgid " " msgstr " " #: Scribes/internationalization.py:156 msgid "You do not have permission to view this file." msgstr "Non hai i permessi per vedere questo file." #: Scribes/internationalization.py:157 msgid "The file you are trying to open is not a text file." msgstr "Il file che stai cercando di aprire non e' un file di testo." #: Scribes/internationalization.py:158 msgid "The file you are trying to open does not exist." msgstr "Il file che stai cercando di aprire non esiste." #: Scribes/internationalization.py:162 #, python-format msgid "Unrecognized option: '%s'" msgstr "Opzione sconosciuta: '%s'" #: Scribes/internationalization.py:163 msgid "Try 'scribes --help' for more information" msgstr "'scribes --help' per maggiori informazioni." #: Scribes/internationalization.py:164 msgid "Scribes only supports using one option at a time" msgstr "Scribes supporta l'uso di una sola opzione alla volta." #: Scribes/internationalization.py:165 #, python-format msgid "scribes: %s takes no arguments" msgstr "scribes: %s non necessita di argomenti" #: Scribes/internationalization.py:166 #, python-format msgid "Scribes version %s" msgstr "Scribes, Versione: %s" #: Scribes/internationalization.py:167 #, python-format msgid "%s does not exist" msgstr "%s non esiste" #: Scribes/internationalization.py:171 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "Il file \"%s\" e' aperto in modalità di sola lettura" #: Scribes/internationalization.py:172 #, python-format msgid "The file \"%s\" is open" msgstr "Il file \"%s\" e' aperto" #: Scribes/internationalization.py:176 msgid "No match was found" msgstr "Nessuna corrispondenza trovata" #: Scribes/internationalization.py:177 #, python-format msgid "%d match was found" msgstr "E' stata trovate %d corrispondenza" #: Scribes/internationalization.py:178 #, python-format msgid "%d matches were found" msgstr "Sono state trovate %d corrispondenze" #: Scribes/internationalization.py:179 msgid "_Search for: " msgstr "_Cerca: " #: Scribes/internationalization.py:180 msgid "_Search for:" msgstr "_Cerca:" #: Scribes/internationalization.py:181 msgid "_Previous" msgstr "_Precedente" #: Scribes/internationalization.py:182 msgid "_Next" msgstr "P_rossimo" #: Scribes/internationalization.py:183 msgid "Match _case" msgstr "M_aiuscolo/minuscolo" #: Scribes/internationalization.py:184 msgid "Match _word" msgstr "_Tutta la parola" #: Scribes/internationalization.py:188 msgid "Line number:" msgstr "Numero di riga:" #: Scribes/internationalization.py:189 #, python-format msgid " of %d" msgstr " di %d" #: Scribes/internationalization.py:193 msgid "Launching help browser" msgstr "Avvio dell'help browser in corso" #: Scribes/internationalization.py:197 msgid "No indentation selection found" msgstr "Non e' stata trovata nessuna selezione da indentare" #: Scribes/internationalization.py:198 msgid "Selection indented" msgstr "La selezione e' stata indentata" #: Scribes/internationalization.py:199 msgid "Unindentation is not possible" msgstr "Impossibile disindentare" #: Scribes/internationalization.py:200 msgid "Selection unindented" msgstr "La selezione e' stata disindentata" #: Scribes/internationalization.py:204 msgid "loading..." msgstr "caricamento..." #: Scribes/internationalization.py:208 msgid "Font" msgstr "Carattere" #: Scribes/internationalization.py:209 msgid "Editor _font: " msgstr "_Carattere dell'editor" #: Scribes/internationalization.py:210 msgid "Tab Stops" msgstr "Spazi di Tabulatura" #: Scribes/internationalization.py:211 msgid "_Tab width: " msgstr "Larghezza della _Tabulatura: " #: Scribes/internationalization.py:212 msgid "Text Wrapping" msgstr "Divisione del testo" #: Scribes/internationalization.py:213 msgid "Enable text _wrapping" msgstr "Abilita la _divisione del testo" #: Scribes/internationalization.py:214 msgid "Right Margin" msgstr "Margine destro" #: Scribes/internationalization.py:215 msgid "Display right _margin" msgstr "Mostra il _margine destro" #: Scribes/internationalization.py:216 msgid "_Right margin position: " msgstr "Posizione del ma_rgine destro: " #: Scribes/internationalization.py:217 msgid "Spell Checking" msgstr "Controllo Ortografico" #: Scribes/internationalization.py:218 msgid "_Enable spell checking" msgstr "_Abilita il controllo ortografico" #: Scribes/internationalization.py:222 msgid "Print Preview" msgstr "Anteprima di stampa" #: Scribes/internationalization.py:223 msgid "File: " msgstr "" #: Scribes/internationalization.py:224 msgid "Print Document" msgstr "Stampa documento" #: Scribes/internationalization.py:228 #, python-format msgid "\"%s\" has been replaced with \"%s\"" msgstr "\"%s\" e' stato sostutuito con \"%s\"" #: Scribes/internationalization.py:229 #, python-format msgid "Replaced all occurrences of \"%s\" with \"%s\"" msgstr "Tuttele occorrenze di \"%s\" sono state sostituite con \"%s\"" #: Scribes/internationalization.py:230 msgid "Replac_e with:" msgstr "S_ostituisci con:" #: Scribes/internationalization.py:231 msgid "_Replace" msgstr "_Sostituisci" #: Scribes/internationalization.py:232 msgid "Replace _All" msgstr "S_ostituisci tutto" #: Scribes/internationalization.py:236 msgid "Save Document" msgstr "Salva documento" #: Scribes/internationalization.py:240 msgid "An error occurred while saving this file." msgstr "C'e' stato un errore durante il salvataggio di questo file" #: Scribes/internationalization.py:241 msgid "" "An error occurred while decoding your file. Please file a bug report at " "\"http://openusability.org/forum/?group_id=141\"" msgstr "" "C'e' stato un errore durante la decodifica del tuo file. Compila un bug " "report su \"http://openusability.org/forum/?group_id=141\". Grazie." #: Scribes/internationalization.py:243 #, python-format msgid "Saved \"%s\"" msgstr "\"%s\" e' stato salvato" #: Scribes/internationalization.py:247 msgid "Shift _Right" msgstr "_Aumenta l'indentazione" #: Scribes/internationalization.py:248 msgid "Shift _Left" msgstr "_Dimunuisci l'indentazione" #: Scribes/internationalization.py:249 msgid "_Find Matching Bracket" msgstr "_Cerca parentesi corrispondente" #: Scribes/internationalization.py:250 msgid "Copied selected text" msgstr "Il testo selezionato e' stato copiato" #: Scribes/internationalization.py:251 msgid "No selection to copy" msgstr "Nessuna selezione da copiare" #: Scribes/internationalization.py:252 msgid "Cut selected text" msgstr "Il testo selezionato e' stato tagliato" #: Scribes/internationalization.py:253 msgid "No selection to cut" msgstr "Nessuna selezione da tagliare" #: Scribes/internationalization.py:254 msgid "Pasted copied text" msgstr "Il testo copiato e' stato incollato" #: Scribes/internationalization.py:255 msgid "No text content in the clipboard" msgstr "Non c'e' testo negli appunti" #: Scribes/internationalization.py:259 #, python-format msgid "%d%% complete" msgstr "%d%% completo" #: Scribes/internationalization.py:260 msgid "completed" msgstr "completato" #: Scribes/internationalization.py:264 msgid "Create a new file" msgstr "Nuovo file" #: Scribes/internationalization.py:265 msgid "Open a file" msgstr "Apri un file" #: Scribes/internationalization.py:266 msgid "Change the name of current file and save it" msgstr "Salva con nome" #: Scribes/internationalization.py:267 msgid "Print the current file" msgstr "Stampa il file corrente" #: Scribes/internationalization.py:268 msgid "Undo last action" msgstr "Annulla" #: Scribes/internationalization.py:269 msgid "Redo undone action" msgstr "Ripeti" #: Scribes/internationalization.py:270 Scribes/internationalization.py:422 msgid "Search for text" msgstr "Cerca testo" #: Scribes/internationalization.py:271 Scribes/internationalization.py:427 msgid "Search for and replace text" msgstr "Cerca e sostituisci testo" #: Scribes/internationalization.py:272 msgid "Go to a specific line" msgstr "Vai ad una riga specifica" #: Scribes/internationalization.py:273 msgid "Configure the editor" msgstr "Configura l'editor" #: Scribes/internationalization.py:274 msgid "Launch the help browser" msgstr "Avvia l'help browser" #: Scribes/internationalization.py:275 msgid "Search for previous occurrence of the string" msgstr "Cerca l'occorrenza precedente della stringa" #: Scribes/internationalization.py:276 msgid "Search for next occurrence of the string" msgstr "Cerca la prossima occorrenza della stringa" #: Scribes/internationalization.py:277 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "" "Cerca solo occorrenze della stringa corrispondenti per maiuscolo e minuscolo" #: Scribes/internationalization.py:279 msgid "Find occurrences of the string that match the entire word only" msgstr "Cerca solo occorrenze della stringa che corrispondo all'intera parola" #: Scribes/internationalization.py:280 msgid "Type in the text you want to search for" msgstr "Scrivi il testo che vuoi cercare" #: Scribes/internationalization.py:281 msgid "Type in the text you want to replace with" msgstr "Scrivi il testo con cui vuoi sostituire" #: Scribes/internationalization.py:282 msgid "Replace the selected found match" msgstr "Sostituisci il risultato della ricerca selezionato" #: Scribes/internationalization.py:283 msgid "Replace all found matches" msgstr "Sostituisci tutti i risultati della ricerca" #: Scribes/internationalization.py:284 msgid "Click to specify the font type, style, and size to use for text." msgstr "" "Clicca per specificare il tipo, lo stile e la dimensione del carattere da " "utilizzare per il testo" #: Scribes/internationalization.py:285 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" "Clicca per specificare la larghezza della spazio da inserire con il tasto Tab" #: Scribes/internationalization.py:287 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "" "Seleziona per dividere il testo quando raggiungi il limite della finestra." #: Scribes/internationalization.py:289 msgid "Select to display a vertical line that indicates the right margin." msgstr "" "Seleziona per mostrare una linea verticale che indichi il margine destro" #: Scribes/internationalization.py:291 msgid "Click to specify the location of the vertical line." msgstr "Clicca per specificare la posizione della linea verticale" #: Scribes/internationalization.py:292 msgid "Select to enable spell checking" msgstr "Seleziona per attivare il controllo ortografico" #: Scribes/internationalization.py:296 msgid "Undid last action" msgstr "Annulato" #: Scribes/internationalization.py:297 msgid "Redid undone action" msgstr "Ripetuto" #: Scribes/internationalization.py:301 msgid "A text editor for GNOME." msgstr "Un editor di testo per GNOME" #: Scribes/internationalization.py:302 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "utilizzo: scribes [OPZIONI] [FILE] [...]" #: Scribes/internationalization.py:303 msgid "Options:" msgstr "Opzioni:" #: Scribes/internationalization.py:304 msgid "display this help screen" msgstr "mostra questo help" #: Scribes/internationalization.py:305 msgid "output version information of Scribes" msgstr "stampa la versione di Scribes" #: Scribes/internationalization.py:306 msgid "create a new file and open the file with Scribes" msgstr "crea un nuovo file e lo apre con Scribes" #: Scribes/internationalization.py:307 msgid "open file in readonly mode" msgstr "apre il file in modalità di sola lettura" #: Scribes/internationalization.py:311 msgid "Could not find Scribes' data folder" msgstr "Impossibile trovare la cartella dati di Scribes" #: Scribes/internationalization.py:315 msgid "Preferences" msgstr "Preferenze" #: Scribes/internationalization.py:319 msgid "error" msgstr "errore" #: Scribes/internationalization.py:323 msgid "No spaces were found at end of line" msgstr "Non sono stati trovati spazi alla fine della riga" #: Scribes/internationalization.py:324 #, python-format msgid "Removed spaces at end of line %d" msgstr "Rimossi gli spazi alla fine della riga" #: Scribes/internationalization.py:328 #, python-format msgid "Freed line %d" msgstr "Riga %d liberata" #: Scribes/internationalization.py:329 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "Il testo dal cursore alla fine della riga %d e' stato cancellato" #: Scribes/internationalization.py:330 msgid "Cursor is already at the end of line" msgstr "Il cursore e' già alla fine della riga" #: Scribes/internationalization.py:331 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "Il testo dal cursore all'inizio della riga %d e' stato cancellato" #: Scribes/internationalization.py:332 msgid "Cursor is already at the beginning of line" msgstr "Il cursore e' già all'inizio della riga" #: Scribes/internationalization.py:336 msgid "No spaces were found at beginning of line" msgstr "Non sono stati trovati spazi all'inizio della riga" #: Scribes/internationalization.py:337 #, python-format msgid "Removed spaces at beginning of line %d" msgstr "Rimossi gli spazi all'inizio della riga %d" #: Scribes/internationalization.py:338 msgid "Removed spaces at beginning of selected lines" msgstr "Rimossi gli spazi all'inizio delle righe selezionate" #: Scribes/internationalization.py:339 msgid "Removed spaces at end of selected lines" msgstr "Rimossi gli spazi alla fine delle righe selezionate" #: Scribes/internationalization.py:343 msgid "Cannot perform operation in readonly mode" msgstr "Impossibile compiere questa operazione in modalità di sola lettura" #: Scribes/internationalization.py:347 #, python-format msgid "Indented line %d" msgstr "La riga %d e' stata indentata" #: Scribes/internationalization.py:348 #, python-format msgid "Unindented line %d" msgstr "La riga %d e' stata disindentata" #: Scribes/internationalization.py:349 msgid "No selected lines can be indented" msgstr "Nessuna delle righe selezionate può essere indentata" #: Scribes/internationalization.py:353 msgid "Swapped the case of selected text" msgstr "Scambiato il case del testo selezionato." #: Scribes/internationalization.py:354 msgid "Capitalized selected text" msgstr "Il testo selezionato e' stato capitalizzato." #: Scribes/internationalization.py:355 msgid "Selected text is already capitalized" msgstr "Il testo selezionato e' già capitalizzato" #: Scribes/internationalization.py:359 msgid "" "An error occurred while encoding your file. Try saving your file using " "another character encoding, preferably UTF-8." msgstr "" "C'e' stato un errore durante la codifica del tuo file. Prova a salvare il " "tuo file usando un'altr codifica, preferibilmente UTF-8." #: Scribes/internationalization.py:364 msgid "" "An encoding error occurred. Please file a bug report at http://openusability." "org/forum/?group_id=141" msgstr "" "C'e' stato un errore di codifica. Compila un bug report su http://" "openusability.org/forum/?group_id=141. Grazie." #: Scribes/internationalization.py:369 msgid "Bracket completion occurred" msgstr "C'e' stato un completamento di parentesi" #: Scribes/internationalization.py:373 msgid "Word completion occurred" msgstr "C'e' stato un completamento di parola" #: Scribes/internationalization.py:377 msgid "Removed bracket completion" msgstr "Il completamento di parentesi e' stato rimosso" #: Scribes/internationalization.py:381 msgid "_Character Encoding: " msgstr "_Codifica di carattere:" #: Scribes/internationalization.py:382 msgid "Add or Remove Encoding" msgstr "Aggiungi o rimuovi codifica" #: Scribes/internationalization.py:383 msgid "Recommended (UTF-8)" msgstr "Raccomandato (UTF-8)" #: Scribes/internationalization.py:384 msgid "Add or Remove Character Encoding" msgstr "Aggiungi o rimuovi codifica di carattere" #: Scribes/internationalization.py:385 msgid "Language and Region" msgstr "Lingua e Regione" #: Scribes/internationalization.py:386 msgid "Character Encoding" msgstr "Codifica di carattere" #: Scribes/internationalization.py:387 msgid "Select" msgstr "Seleziona" #: Scribes/internationalization.py:391 #, python-format msgid "Line %d is already bookmarked" msgstr "La riga %d ha già un segnalibro" #: Scribes/internationalization.py:392 #, python-format msgid "Bookmarked line %d" msgstr "Aggiunto segnalibro alla riga %d" #: Scribes/internationalization.py:393 #, python-format msgid "No bookmark on line %d to remove" msgstr "Nessun segnalibro da rimuovere alla riga %d" #: Scribes/internationalization.py:394 #, python-format msgid "Removed bookmark on line %d" msgstr "Rimosso segnalibro dalla riga &d" #: Scribes/internationalization.py:395 msgid "No bookmarks found to remove" msgstr "Non e' stato trovato alcun segnalibro da rimuovere" #: Scribes/internationalization.py:396 msgid "Removed all bookmarks" msgstr "Tutti i segnalibri sono stati rimossi" #: Scribes/internationalization.py:397 msgid "No next bookmark to move to" msgstr "Nessun segnalibro verso cui muovere" #: Scribes/internationalization.py:398 #, python-format msgid "Moved to bookmark on line %d" msgstr "Spostato sul segnalibro alla riga %s" #: Scribes/internationalization.py:399 msgid "No previous bookmark to move to" msgstr "Nessun segnalibro precedente verso cui spostarsi" #: Scribes/internationalization.py:403 msgid "Select character _encoding" msgstr "Seleziona la codifica di caratt_ere" #: Scribes/internationalization.py:407 #, python-format msgid "Replaced tabs with spaces on line %d" msgstr "Sostituiti i tab con gli spazi alla riga %d" #: Scribes/internationalization.py:408 msgid "Replacing tabs please wait..." msgstr "Tab in sostituzione. Attendere prego..." #: Scribes/internationalization.py:409 #, python-format msgid "No tabs found on line %d" msgstr "Nessun tab trovato sulla riga %d" #: Scribes/internationalization.py:410 msgid "No tabs found in selected text" msgstr "Nessun tab trovato nel testo selezionato" #: Scribes/internationalization.py:411 msgid "Removing spaces please wait..." msgstr "Spazi in rimozione. Attendere prego..." #: Scribes/internationalization.py:412 msgid "Indenting please wait..." msgstr "Indentazione in corso. Attendere prego..." #: Scribes/internationalization.py:416 msgid "Move cursor to a specific line" msgstr "Sposta il cursore su una riga specifica" #: Scribes/internationalization.py:417 #, python-format msgid "Moved cursor to line %d" msgstr "Il cursore e' stato spostato sulla riga %d" #: Scribes/internationalization.py:418 msgid "Closed goto line bar" msgstr "Barra spostamento di riga chiusa" #: Scribes/internationalization.py:423 msgid "Closed findbar" msgstr "Barra di ricerca chiusa" #: Scribes/internationalization.py:428 msgid "Closed replacebar" msgstr "Barra di sostituzione chiusa" #: Scribes/internationalization.py:432 msgid "Closed dialog window" msgstr "Finestra di dialogo chiusa" #: Scribes/internationalization.py:433 msgid "Select file for loading" msgstr "Seleziona il file da caricare" #: Scribes/internationalization.py:437 #, python-format msgid "Cannot open %s" msgstr "Impossibile aprire %s" #: Scribes/internationalization.py:438 msgid "Closed error dialog" msgstr "Dialog d'errore chiuso" #: Scribes/internationalization.py:442 #, python-format msgid "" "The MIME type of the file you are trying to open could not be determined. " "Make sure the file is a text file.\n" "\n" "MIME type: %s" msgstr "" "Il tipo MIME del file che stai cercando di aprire non può essere " "determinato. Assicurati che si tratti di un file di testo.\n" "\n" "Tipo MIME: %s" #: Scribes/internationalization.py:444 #, python-format msgid "" "The MIME type of the file you are trying to open is not for a text file.\n" "\n" "MIME type: %s" msgstr "" "Il tipo MIME del file che stai cercando di aprire non e' di un file di " "testo.\n" "\n" "Tipo MIME: %s" #: Scribes/internationalization.py:449 msgid "Change name of file and save" msgstr "Cambia il nome del file e salvalo" #: Scribes/internationalization.py:453 msgid "Print file" msgstr "Stampa file" #: Scribes/internationalization.py:454 #, python-format msgid "Printing \"%s\"" msgstr "Stampa di \"%s\" in corso" #: Scribes/internationalization.py:458 msgid "Change editor settings" msgstr "Cambia i settaggi dell'editor" #: Scribes/internationalization.py:459 #, python-format msgid "Changed font to \"%s\"" msgstr "Carrattere combiato a \"%s\"" #: Scribes/internationalization.py:460 #, python-format msgid "Changed tab width to %d" msgstr "Cambiata la larghezza del tab a %d" #: Scribes/internationalization.py:461 msgid "Enabled text wrapping" msgstr "Divisione testo attivata" #: Scribes/internationalization.py:462 msgid "Disabled text wrapping" msgstr "Divisione testo disattivata" #: Scribes/internationalization.py:463 msgid "Show right margin" msgstr "Mostra il margine destro" #: Scribes/internationalization.py:464 msgid "Hide right margin" msgstr "Nascondi il margine destro" #: Scribes/internationalization.py:465 #, python-format msgid "Positioned margin line at column %d" msgstr "La line del margine e' stata posizionata sulla colonna %d" #: Scribes/internationalization.py:469 msgid "Information about the text editor" msgstr "Informazioni sull'editor" #: Scribes/internationalization.py:472 msgid "No brackets found for selection" msgstr "Non sono state trvate parentesi per la selezione" #: Scribes/internationalization.py:473 msgid "Selected characters inside bracket" msgstr "Selezionati i caratteri all'interno della parentesi" #: Scribes/internationalization.py:477 msgid "Enclosed selected text" msgstr "Il testo selezionato e' stato racchiuso" #: Scribes/internationalization.py:481 Scribes/internationalization.py:484 #: Scribes/internationalization.py:486 msgid "English" msgstr "Inglese" #: Scribes/internationalization.py:482 Scribes/internationalization.py:483 #: Scribes/internationalization.py:507 msgid "Traditional Chinese" msgstr "Cinese Tradizionale" #: Scribes/internationalization.py:485 Scribes/internationalization.py:493 #: Scribes/internationalization.py:497 Scribes/internationalization.py:516 #: Scribes/internationalization.py:542 msgid "Hebrew" msgstr "Ebraico" #: Scribes/internationalization.py:487 Scribes/internationalization.py:490 #: Scribes/internationalization.py:510 Scribes/internationalization.py:513 #: Scribes/internationalization.py:547 Scribes/internationalization.py:555 msgid "Western Europe" msgstr "Europa occidentale" #: Scribes/internationalization.py:488 Scribes/internationalization.py:502 #: Scribes/internationalization.py:504 Scribes/internationalization.py:514 #: Scribes/internationalization.py:541 Scribes/internationalization.py:552 msgid "Greek" msgstr "Greco" #: Scribes/internationalization.py:489 Scribes/internationalization.py:518 #: Scribes/internationalization.py:545 msgid "Baltic languages" msgstr "Lingue Baltiche" #: Scribes/internationalization.py:491 Scribes/internationalization.py:511 #: Scribes/internationalization.py:536 Scribes/internationalization.py:554 msgid "Central and Eastern Europe" msgstr "Europa centrale ed Europa orientale" #: Scribes/internationalization.py:492 Scribes/internationalization.py:512 #: Scribes/internationalization.py:539 Scribes/internationalization.py:551 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgaro, Macedone, Russo, Serbo" #: Scribes/internationalization.py:494 Scribes/internationalization.py:509 #: Scribes/internationalization.py:515 Scribes/internationalization.py:543 #: Scribes/internationalization.py:556 msgid "Turkish" msgstr "Turco" #: Scribes/internationalization.py:495 msgid "Portuguese" msgstr "Portoghese" #: Scribes/internationalization.py:496 Scribes/internationalization.py:553 msgid "Icelandic" msgstr "Islandese" #: Scribes/internationalization.py:498 msgid "Canadian" msgstr "Canadese" #: Scribes/internationalization.py:499 Scribes/internationalization.py:517 #: Scribes/internationalization.py:540 msgid "Arabic" msgstr "Arabo" #: Scribes/internationalization.py:500 msgid "Danish, Norwegian" msgstr "Danese, Norvegiese" #: Scribes/internationalization.py:501 Scribes/internationalization.py:549 msgid "Russian" msgstr "Russo" #: Scribes/internationalization.py:503 msgid "Thai" msgstr "Thai" #: Scribes/internationalization.py:505 Scribes/internationalization.py:520 #: Scribes/internationalization.py:521 Scribes/internationalization.py:522 #: Scribes/internationalization.py:528 Scribes/internationalization.py:529 #: Scribes/internationalization.py:531 Scribes/internationalization.py:532 #: Scribes/internationalization.py:533 Scribes/internationalization.py:558 #: Scribes/internationalization.py:559 Scribes/internationalization.py:560 msgid "Japanese" msgstr "Giapponese" #: Scribes/internationalization.py:506 Scribes/internationalization.py:523 #: Scribes/internationalization.py:534 Scribes/internationalization.py:548 msgid "Korean" msgstr "Coreano" #: Scribes/internationalization.py:508 msgid "Urdu" msgstr "Urdu" #: Scribes/internationalization.py:519 msgid "Vietnamese" msgstr "Vietnamita" #: Scribes/internationalization.py:524 Scribes/internationalization.py:527 msgid "Simplified Chinese" msgstr "Cinese semplificato" #: Scribes/internationalization.py:525 Scribes/internationalization.py:526 msgid "Unified Chinese" msgstr "Cinese unificato" #: Scribes/internationalization.py:530 msgid "Japanese, Korean, Simplified Chinese" msgstr "Giapponese, Coreano, Cinese semplificato" #: Scribes/internationalization.py:535 msgid "West Europe" msgstr "Europa occidentale" #: Scribes/internationalization.py:537 msgid "Esperanto, Maltese" msgstr "Esperanto, Maltese" #: Scribes/internationalization.py:538 msgid "Baltic languagues" msgstr "Lingue Baltiche" #: Scribes/internationalization.py:544 msgid "Nordic languages" msgstr "Lingue Nordiche" #: Scribes/internationalization.py:546 msgid "Celtic languages" msgstr "Lingue Celtiche" #: Scribes/internationalization.py:550 msgid "Ukrainian" msgstr "Ucraino" #: Scribes/internationalization.py:557 msgid "Kazakh" msgstr "Kazaco" #: Scribes/internationalization.py:561 msgid "All languages" msgstr "Tutte le lingue" #: Scribes/internationalization.py:562 Scribes/internationalization.py:563 msgid "All Languages (BMP only)" msgstr "Tutte le lingue (solo BMP)" #: Scribes/internationalization.py:564 msgid "All Languages" msgstr "Tutte le lingue" #: Scribes/internationalization.py:565 msgid "None" msgstr "Nessuno" #: Scribes/internationalization.py:570 msgid "Replaced tabs with spaces on selected lines" msgstr "Sostituiti i tabs con gli spazi sulle linee selezionate" #: Scribes/internationalization.py:574 msgid "Scribes Text Editor" msgstr "Scribes - Editor di testo" #: Scribes/internationalization.py:575 msgid "Edit text files" msgstr "Modifica file di testo" #: Scribes/internationalization.py:579 msgid "Syntax Color Editor" msgstr "Editor dei colori di sintassi" #: Scribes/internationalization.py:580 msgid "_Use default theme" msgstr "_usa il tema iniziale" #: Scribes/internationalization.py:581 msgid "_Normal text color: " msgstr "Colore del testo _normale" #: Scribes/internationalization.py:582 msgid "_Background color: " msgstr "Colore di _background" #: Scribes/internationalization.py:583 msgid "Language Elements" msgstr "Elementi del linguaggio" #: Scribes/internationalization.py:584 msgid "Co_lor: " msgstr "Co_lori: " #: Scribes/internationalization.py:585 msgid "B_old" msgstr "_Grassetto" #: Scribes/internationalization.py:586 msgid "I_talic" msgstr "_Corsivo" #: Scribes/internationalization.py:587 msgid "_Reset to Default" msgstr "_Ripristina i valori iniziali" #: Scribes/internationalization.py:591 msgid "Template Editor" msgstr "Editor per i template" #: Scribes/internationalization.py:592 msgid "Language" msgstr "Linguaggio" #: Scribes/internationalization.py:593 msgid "Name" msgstr "Nome" #: Scribes/internationalization.py:594 msgid "Description" msgstr "Descrizione" #: Scribes/internationalization.py:597 msgid "_Name:" msgstr "_Nome" #: Scribes/internationalization.py:598 msgid "_Description:" msgstr "_Descrizione" #: Scribes/internationalization.py:599 msgid "_Template:" msgstr "" #: Scribes/internationalization.py:600 msgid "Add New Template" msgstr "Aggiungi nuovo template" #: Scribes/internationalization.py:603 msgid "Edit Template" msgstr "Modifica Template" #: Scribes/internationalization.py:606 msgid "Select to use themes' foreground and background colors" msgstr "Seleziona per usare i colori di foreground e background del tema" #: Scribes/internationalization.py:607 msgid "Click to choose a new color for the editor's text" msgstr "Clicca per selezionare un nuovo colo per il testo dell'editor" #: Scribes/internationalization.py:608 msgid "Click to choose a new color for the editor's background" msgstr "Clicca per selzionare un nuovo colore per lo sfondo dell'editor" #: Scribes/internationalization.py:609 msgid "Click to choose a new color for the language syntax element" msgstr "" "Clicca per selezionare un nuovo colore per gli elementi di sintassi del linguaggio" #: Scribes/internationalization.py:610 msgid "Select to make the language syntax element bold" msgstr "" "Seleziona per rendere in grassetto gli elementi di sintassi del linguaggio" #: Scribes/internationalization.py:611 msgid "Select to make the language syntax element italic" msgstr "" "Seleziona per rendere in corsivo gli elementi di sintassi del linguaggio" #: Scribes/internationalization.py:612 msgid "Select to reset the language syntax element to its default settings" msgstr "" "Seleziona per ripristinare i valori iniziali degli elementi di sintassi del" " linguaggio" #: Scribes/internationalization.py:616 msgid "Change editor colors" msgstr "Cambia i colori dell'editor" #: Scribes/internationalization.py:619 msgid "Toggled readonly mode on" msgstr "Entrato nella modalità di sola lettura" #: Scribes/internationalization.py:620 msgid "File has not been saved to disk" msgstr "Il file non e' stato salvato sul disco" #: Scribes/internationalization.py:621 msgid "Toggled readonly mode off" msgstr "Uscito dalla modalità di sola lettura" #: Scribes/internationalization.py:622 msgid "No permission to modify file" msgstr "Non hai i permessi per modificare questo file." #: Scribes/internationalization.py:625 msgid "Menu for advanced configuration" msgstr "Menu per la configurazione avanzata" #: Scribes/internationalization.py:626 msgid "Configure the editor's foreground, background or syntax colors" msgstr "" "Configura i colori di foreground, di background o di sintassi dell'editor" #: Scribes/internationalization.py:627 msgid "Create, modify or manage templates" msgstr "Crea, modifica o gestisci i template" #: Scribes/internationalization.py:630 #, python-format msgid "Ln %d col %d" msgstr "Linea %d colonna %d" scribes-0.4~r910/po/fr.gmo0000644000175000017500000010214511242100540015156 0ustar andreasandreasÞ•—Ô #Œ" "%" ," M"[" m"y""£"´"sÉ"®=#ôì#á$ú$ %,% G% U%c% |%Š%¤%(½%uæ%d\&~Á&v@'t·'e,()’(¼(Ã(Û( á(î(ÿ()")1)A)'T) |) ˆ) •)£)¬)»))Ì)ö) **6*G*b*w*Ž*«*1À*1ò*$+<+O+7e+1+;Ï+@ ,3L,T€,Õ,ò,-$-8-M-`-r-{->-Ï-#ä-."$.G.*c.$Ž.³.Å.×.ò./0/*P/ {/‡/ž/µ/Ë/ Ó/á/ñ/00,0B0Y0=a09Ÿ0Ù0)÷0(!1AJ1Œ1Ÿ1 ¯1 º1Å1å1>ì1D+2p22!2²2Ã2 Ô2â2ò2333/363H3L3 T3a3 i3s3 ƒ33®3¿39Ø324!E4g4y4$‚4§4¶4Ð4×4Þ4ð45535D5I5 g5 t55’5¢5¾5 Í5 Ù5å56$6;6S6j6…66µ6Ò6ê6&7 (7I7\7y7™7«7Ê7Ù7ó7 8%898P8m88!¥8Ç8ã8ø8 9"9)=9#g9‹9ª9Ã9 Ü9ý9:,:1:B: F:T:fc: Ê:Ö:è:; ;";;;N;?]; ;#¨; Ì;Ø; ç; õ;< <%<6<J<^<q<‡<<!¹<&Û<-= 0=Q='p=˜=·=Ï= Þ=ë=> >:>*U>€>š>$´>+Ù>??>?\?k? s?~? †?”? ®?¹?Ê?#Þ?0@3@F@(b@,‹@¸@(È@ñ@ A AA0A AANAfA…A A¹AÑAéABBKB/kB1›BCÍB+C6=COtC"ÄCçCøCD%DCD$UD"zD"D ÀDÎDáD öD EE!E4EFE!XEzEŽEžE¶EÅE‚ÊE^MFt¬F!G&7G/^G3ŽGÂGÜGõG) H3H;H)PH'zH ¢H¬H¾HÏHßHýHI*I;I@I*[I†IŸI³I ÆI ÑIÝIìI JpJ-„J²JÏJ ãJíJ óJ KK%K ¾YRýY:PZ`‹ZìZ) [4[Q["k[Ž[­[ É[Ó["é[% \;2\n\‹\«\+É\+õ\!]?]*R]+}]©]K»]J^ R^&^^…^¤^Á^É^Ú^ô^ _"&_I_'c_‹_6“_IÊ_`0-`+^`TŠ`ß`ò`a a-1a _a?ia=©açab2bRbnbŒbŸb¸b×bÜbëbýbcc"c *c 7c AcLc jc%xcžc&¼c'ãc: d-Fdtd‡d%d¶d!Ådçdídõd ee,e@eXe^e}e eœe±e'Çeïef f%f-Dfrf‹f¤f½f+Ùfg+#g$Og$tg,™g*Ægñgh0hPhih‡h*¦hÑhêh'i"(i8Ki„i*ži6Éi7j8jTjpj+j4»j4ðj.%k#Tkxk"˜k.»kêkl ll"l1lKBlŽl l½lÚl ãlñlm'm06m gm(qm šm¨m½mÖmçmûmnn2nNnhn%ˆn+®n&ÚnCoREoB˜o3ÛoOp(_pˆpœp¬p¼pÜpïp- q<7q)tq)žq8ÈqOrQr*pr,›rÈr×r Ýrërôr)s 1s=sNs,gs,”sÁs#Ôs.øs4't\t3ut©t ÅtÒtåtþtu'u@u_uvu"u²uÈu;èu$$v1Iv5{vF±v,øv>%wFdwI«wõw x,x#Exix-x/­x/Ýx yy4yMybywy’y¥y¸y1Îy)z*z=zNz]z’czƒöz©z{$|+?|2k|?ž|Þ|ý|}0-}^}c}+€}*¬} ×}á}þ}~-~!H~j~„~˜~'Ÿ~?Ç~+3S s~‘¤ ºkÈ24€-g€•€¦€®€µ€ Å€%Ó€)ù€ #0?G OZ_en‡ –/£Ó$ä ‚‚!%‚ G‚T‚e‚„‚•‚¨‚Á‚Ò‚Û‚ ÷‚ ƒ ƒ--ƒ[ƒ2dƒ—ƒ±ƒ ¸ƒ"ƃ.éƒ'„$@„x·79ÔAfðH¾u3Ì+ÿù3s˜€‰q!Ú…Q!¦Ø)¸JT}%>ôˤcz(# ”&õ„º€?¢Œ02{vY§ Uøözlmi†]“œ[| ‚ZþàÅ|#,µ On]’=5av‡Ä>Ér²°••*ÀìýZ¨^Lé[pXSF 6RPMl 1¯=Ÿr0Â4N`†Qú¥…LN"Šp@;È.V  ›H½„Óe$»BE‘‰TäÊtGá$Ïb­}ñiê2-<Ý‘*y{xˆj”ÞG+×çdÙFÛ1hDR?B Î‚(ÐOå¿‹au/%-5âÖw‡s—@qÑ.c–;CyƒXÕ:£æWM÷«Aã)™ß" —èVótšƒDeIgbCíªP_/dÍï4î7o –¡Üžû9K¶“®nÁÇ\~IŒwü’‹g,Ƴ©'ëh~mSÒ¹ˆUW:K6¬Š<±¼Žjf'ò´` &kEoŽkÃ_8\Y 8^J of %d"%s" has been replaced with "%s"%d%% complete%s does not existFontRight MarginSpell CheckingTab StopsText WrappingA decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.A text editor for GNOME.Add New TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAll LanguagesAll Languages (BMP only)All languagesAlready on first bookmarkAlready on last bookmarkAlready on most recently bookmarked lineAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicAuthentication RequiredB_oldBack_ground:Baltic languagesBaltic languaguesBookmark BrowserBookmark _LineBookmarked TextBookmarked line %dBulgarian, Macedonian, Russian, SerbianC DocumentsC# DocumentsC++ DocumentsCanadianCannot open %sCannot open fileCannot perform operation in readonly modeCannot redo actionCannot undo actionCapitalized selected textCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text from lowercase to uppercaseChanged selected text from uppercase to lowercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Close incremental search barClose regular expression barClosed dialog windowClosed error dialogClosed goto line barClosed replace barClosed search barCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCould not open help browserCreate, modify or manage templatesCurrent document is focusedCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDanish, NorwegianDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDescriptionDisabled spellcheckingDisabled text wrappingDisplay right _marginE_xportEdit TemplateEdit text filesEditor _font: Enable text _wrappingEnabled spellcheckingEnabled text wrappingEnclosed selected textEnglishEnter the location (URI) of the file you _would like to open:Error: '%s' already in use. Please choose another string.Error: Invalid template file.Error: Name field cannot have any spaces.Error: Name field must contain a string.Error: Template editor can only have one '${cursor}' placeholder.Esperanto, MalteseExport TemplateFile _NameFile _TypeFile has not been saved to diskFile: Find occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound %d matchFound %d matchesFound matching bracket on line %dFree Line _AboveFree Line _BelowFreed line %dFull _Path NameGo to a specific lineGreekHTML DocumentsHaskell DocumentsHebrewHide right marginINSI_mportI_ndentationI_talicIcelandicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Info Error: Access has been denied to the requested file.Info Error: Information on %s cannot be retrieved.Information about the text editorInserted templateJapaneseJapanese, Korean, Simplified ChineseJava DocumentsJoined line %d to line %dKazakhKoreanLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLineLine %d is already bookmarkedLine number:Ln %d col %dLoaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMenu for advanced configurationMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to most recently bookmarked lineNo bookmark on line %d to removeNo bookmarks foundNo bookmarks found to removeNo brackets found for selectionNo documents openNo indentation selection foundNo match foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous match foundNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found in selected textNo tabs found on line %dNo tabs found to replaceNo text content in the clipboardNo text to select on line %dNo word to selectNoneNordic languagesOVROpen DocumentOpen DocumentsOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Open a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPair character completion occurredPasted copied textPerl DocumentsPermission Error: Access has been denied to the requested file.PortuguesePositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved pair character completionRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of linesRemoved spaces at end of selected linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplace found matchReplace the selected found matchReplaced all found matchesReplaced all occurrences of "%s" with "%s"Replaced spaces with tabsReplaced tabs with spacesReplaced tabs with spaces on line %dReplaced tabs with spaces on selected linesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsRussianS_electionS_pacesSave DocumentSave password in _keyringSaved "%s"Scheme DocumentsScribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearch for text using regular expressionSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect character _encodingSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedShift _LeftShift _RightShow right marginSimplified ChineseStopped operationStopped replacingSwapped the case of selected textSyntax Color EditorTemplate EditorTemplate mode is activeText DocumentsThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.Toggled readonly mode offToggled readonly mode onTraditional ChineseTry 'scribes --help' for more informationTurkishType URI for loadingType in the text you want to replace withType in the text you want to search forUkrainianUndid last actionUndo last actionUnified ChineseUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsVietnameseWest EuropeWestern EuropeWord completion occurredXML DocumentsYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.You do not have permission to view this file.You must log in to access %s_Background color: _Bookmark_Case_Delete Line_Description:_Enable spell checking_Find Matching Bracket_Foreground:_Join Line_Language_Lines_Lowercase_Name_Name:_Next_Normal text color: _Password:_Previous_Remember password for this session_Remove Bookmark_Remove Trailing Spaces_Replace_Reset to Default_Right margin position: _Search for:_Search for: _Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Template:_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscompletedcreate a new file and open the file with Scribesdisplay this help screenerrorloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: POT-Creation-Date: 2006-10-08 14:46+0200 PO-Revision-Date: 2007-04-28 09:30+0200 Last-Translator: Hanusz Leszek Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit de %d"%s" a été remplacé par "%s"%d%% effectué%s n'existe pasFonteMarge à droiteCorrection orthographiqueUtilisation des TabulationsMise à la ligneLa sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée.La sauvegarde a échouée. Impossible de déplacer le fichier temporaire. La sauvegarde automatique sera désormais désactivée.La sauvegarde a échouée. Impossible de créer un fichier d'échange. Votre disque est probablement plein. La sauvegarde automatique sera désormais désactivée.Un éditeur de texte pour GNOMEAjouter un PatronAjouter ou Supprimer l'Encodage de CaractèreAjouter ou Supprimer le codage ...Tous les documentsToutes les languesToutes les langues (BMP uniquement)Toutes les languesDéjà sur le premier SignetDéjà sur le dernier SignetDéjà sur le signet le plus récentErreur d'encodage lors de la sauvegarde du fichier. La sauvegarde automatique sera désormais désactivée.Une erreur d'encodage est apparue.Une erreur est survenue lors de la création du fichier. La sauvegarde automatique sera rétablie quand le fichier sera sauvé sans erreurs.Une erreur est arrivée lors du décodage du fichier. Reportez le bogue sur notre site:"http://openusability.org/forum/?group_id=141"Une erreur est apparue lors de l'encodage du fichier. Essayez de le sauver en utilisant un autre codage de caractère, de préférence UTF-8.Erreur lors de l'ouverture du fichier. Reportez le bogue sur notre site:http://scribes.sourceforge.netUne erreur est arrivée lors de la sauvegarde du fichier.ArabeAuthentification requise_GrasCouleur de _Fond:Langues BaltiquesLangues BaltiquesGestionnaire de signetsPlacer un signet sur la ligneSignet ajoutéUn signet a été placé sur la ligne %dBulgare, Macédonien, Russe, SerbeDocuments CDocuments C#Documents C++CanadienImpossible d'ouvrir %sImpossible d'ouvrir le fichierImpossible d'effectuer cette opération en mode lecture seuleImpossible de refaire l'actionImpossible d'annuler l'actionLe texte sélectionné a été capitaliséLangues CeltiquesEurope Centrale et OrientaleChanger les couleurs de l'éditeurModifier les paramètres de l'éditeurChanger le nom du fichier et le sauverLa fonte est maintenant: "%s"Le texte sélectionné a été changé de minuscules en majusculesLe texte sélectionné a été changé de majuscules en minusculesTaille des tabulations: %dEncodage de Caractère_Codage des caractères: Cliquer pour choisir une couleur pour le fondCliquer pour choisir une couleur pour le texteCliquer pour choisir une couleur pour cet élément de syntaxeCliquez pour specifier les caractéristiques de la fonte à utiliser pour le texteCliquer pour spécifier la position de la marge à droite.Cliquez pour specifier le nombre d'espaces à inserer lorsque vous pressez la touche Tabulation.Masquer la barre de rechercheMasquer la barre d'expression régulièreFenêtre de dialogue ferméeFenêtre d'erreur ferméeBarre 'aller à la ligne' masquéeBarre de remplacement masquéeBarre de recherche masquéeCou_leur:Configurer l'éditeurChanger les couleurs de l'éditeurLe texte sélectionné a été copiéImpossible de trouver le répertoire de données de ScribesImpossible d'afficher l'aideCréer, et modifier les PatronsLe document courant est actifLe curseur est déjà au début de la ligneLe curseur est déjà à la fin de la ligneCouper le texte sélectionnéDanois, NorvégienSupprimer le curseur à la fin de la ligneSupprimer le _curseur au début de la ligneLigne effacée %dLe texte a été supprimé du curseur au début de la ligne, à la ligne %dLe texte a été supprimé du curseur à la fin de la ligne à la ligne %dDescriptionCorrection orthographique désactivéeMise à la _ligne désactivéeAfficher la marge à _droiteE_xportEditer un PatronEdite les fichiers textes_Fonte de l'éditeur:Activer la mise a la _ligneCorrection orthographique activéeMise à la ligne activéeLe texte sélectionné a été entouréAnglaisEntrer l'adresse du fichier que vous _désirez ouvrir:Erreur: '%s' déjà en cours d'utilisation. Choisissez une autre chaîne.Erreur: Fichier invalideErreur: Le champ ne doit pas contenir d'espaces.Erreur: Le champ doit contenir une chaîne.Erreur: Le gestionnaire d'extraits de code ne peut avoir qu'un élément '${cursor}'Esperanto, MaltaisExporter des extraits de code_Nom du fichier_Type de fichierLe fichier n'a pas été sauvé sur le disqueFichier: Rechercher des occurences de la chaine par mot entier seulementRechercher des occurences de la chaine en respectant la casse%d correspondance trouvée%d correspondances trouvéesParenthèse correspondante trouvée à la ligne %dInsérer une ligne _dessousInsérer une ligne _au dessusLigne %d libérée_Chemin d'accès completAller à une ligne spécifiéeGrecDocuments HTMLDocuments HaskellHébreuCache la marge à droiteINSI_mportI_ndentation_ItaliqueIcelandaisImporter des extraits de codeIncré_mentalRechercher dans le texte à la voléeLa ligne %d a été indentéeIndentation en cours, patientez SVP...Erreur Info: Accès refusé au fichier.Erreur Info: Impossible d'obtenir des informations sur %s.Informations à propos de l'éditeur de texteInsérer un patronJaponaisJaponais, Koréen, Chinois SImplifiéDocuments JavaCollé la ligne %d à la ligne %dKazakKoréenElements de LanguageLangue et RégionAfficher l'aideLancement de l'aideQuitter le plein écranLigneLa ligne %d a déjà un signetNuméro de ligne:Li %d col %dFichier "%s" chargéchargement de "%s"...Chargement du fichier, patientez SVP...Correspondance %d de %dRespecter la casseMot entierMenu de configuration avancéeDéplacer le curseur à une ligne spécifiéeAller au _dernier signetAller au P_remier SignetAller au prochain signetAller au Signet _PrécedentCurseur placé sur le signet à la ligne %dCurseur placé à la ligne %dCurseur placé sur le signet de la ligne %dCurseur placé sur le premier signetCurseur placé sur le dernier signetCurseur placé sur le signet le plus récentPas de signet à supprimer sur la ligne %dAucun signet n'a été trouvéAucun signets n'a été trouvéAucun crochet n'a été trouvéPas de documents ouvertsPas de sélection à indenterPas de correspondance trouvéePas de parenthèse correspondante trouvéePlus de lignes à collerPas de signet suivantPas de correspondance suivante trouvéePas de paragraphe à sélectionnerVous n'avez pas la permission d'écrire dans ce fichier.Pas de signet précédentPas de correspondance précedente trouvéeLes lignes sélectionnées ne peuvent être indentéesPas de sélection pour appliquer un changement de cassePas de sélection à copierPas de sélection à couperPas de phrase à sélectionnerAucun espace à remplacer n'a été trouvéAucun espace n'a été trouvé au début de la ligneAucun espace n'a été trouvé à la fin de la lignePas de tabulations dans le texte sélectionnéPas de tabulations dans la ligne %dPas de tabulations à remplacerPas de texte dans le presse-papierPas de texte à sélectionner dans la ligne %dPas de mot à sélectionnerAucunLangues NordiquesOVROuvre documentOuvrir documentsErreur lors de l'ouverture du fichier. Essayez encore ou reportez un bogue.Ouvrir un fichierOuvrir une nouvelle fenêtreOuvrir les fichiers récentsOptions:Documents PHPAutocompletion de parenthèseLe texte a été colléDocuments PerlErreur de Permission: Accès refusé au fichier.PortugaisMarge à droite placée à la colonne %dPréférencesImprimer le DocumentAperçu avant impressionImprimer fichierImprimer le fichierImpression de "%s"Document PythonRecommandé (UTF-8)Action annulée réactivéeRefaire l'action annuléeSuppression de tous les signetsTous les signets ont été supprimésLe signet sur la ligne %s a été suppriméAutocompletion de parenthèse annuléeLes espaces de début de ligne ont été supprimés, à la ligne %dLes espaces de début de ligne ont été supprimés sur les lignes sélectionnéesLes espaces de fin de la ligne ont été supprimés à la ligne %dLes espaces de fin de la ligne ont été supprimésLes espaces de fin de ligne ont été supprimés sur les lignes sélectionnéesEffacement des espaces, patientez SVP...Renommer le fichierR_emplacer par:Remplacer _ToutRemplacer toutes les occurencesOccurence trouvéeRemplacer cette occurenceToutes les occurences ont été remplacées·Toutes les occurences de "%s" ont été remplacées par "%s"Remplacé les tabulations par des espacesRemplacé les tabulations par des espacesRemplacé les tabulations par des espaces à la ligne %dLes espaces de fin de ligne ont été supprimés sur les lignes sélectionnéesRemplacement, patientez SVP...Remplacement des espaces, patientez SVP...Changement des tabulations, patientez SVP...Documents RubyRusseS_electionnerE_spacesSauver le DocumentSauver le mot de passe dans le _trousseau"%s" sauvéDocuments SchemeScribes Editeur de TexteScribes est un éditeur de texte pour GNOME.Scribes ne supporte qu'une option à la foisScribes version %sChercher et Remplacer dans le texteRechercher la prochaine occurence de la chaineRechercher des occurences précédentes de la chaineRechercher dans le texteRecherche dans le texte par expression régulière.Recherche, patientez SVP...SelectionnerSélectionne ligneSélectionner ParagrapheSélectionner _PhraseSélectionner _MotCouleur d'a_rrière-planChoisissez la Couleur de _FondEncodage de caractèreSelectionner le documentSelectionner le fichier à chargerCouleur d'_avant-planChoisir la couleur d'avant-planAfficher la ligne verticale qui indique la marge à droite.Activer la correction orthographiqueCocher pour mettre l'élément de syntaxe en grasCocher pour mettre l'élément de syntaxe en italiqueCliquer pour remettre a zéro les paramètres de l'élement de syntaxeCocher pour souligner l'élément de syntaxeSélectionner pour utiliser les couleurs du thème par défautActiver la coupure du texte lorsque vous atteignez la marge à droite.Les caractères à l'intérieur des parenthèses ont été sélectionnésLigne %d sélectionnéeÉlement suivant sélectionnéParagraphe sélectionnéEmplacement précedent selectionnéPhrase sélectionnéeLe texte sélectionné est déjà capitaliséLe texte sélectionné est déjà en minusculesLe texte sélectionné est déjà en majusculesMot sélectionnéSélection indentéeSélection désindentéeDéplacer à _GaucheDéplacer à _DroiteAffiche la marge à droiteChinois SimplifiéOperation arretéeRemplacement arrétéLa casse du texte sélectionné a été inverséeConfiguration de la Coloration SyntaxiqueEditeur de PatronsPatrons activésDocument texteThaïLe type MIME du fichier que vous essayez d'ouvrir ne peut être déterminé,Verifiez que le fichier est bien un format texte type MIME: %sErreur lors de la vérification du fichier. Le fichier que vous essayez d'ouvrir n'est pas un fichier texte. Type MIME : %sErreur de décodage. L'encodage de caractères du fichier que vous essayez d'ouvrir n'est pas reconnu. Essayez d'ouvrir le fichier avec un autre encodage de caractères.Le fichier "%s" est ouvertLe fichier "%s" est ouvert en lecture seuleLe fichier que vous essayez d'ouvrir n'existe pas.Le fichier que vous essayez d'ouvrir n'est pas un fichier texteMode lecture seule désactivéMode lecture seule activéChinois TraditionnelEssayez 'scribes --help' pour plus d'informationTurcTaper une adresse à chargerEntrez le texte que vous désirez remplacerEntrez le texte que vous désirez chercherUkrainienAction précédente annuléeDéfaire l'action précédenteChinois UnifiéDésindentation impossibleLa ligne %d a été désindentéeOption non reconnue: '%s'Document non sauvéOurdouUtiliser des espaces pour l'indentationUtiliser des espaces au lieu des tabulations pour l'indentationUtiliser des tabulations pour l'indentationUtilise les couleurs modifiéesUtiliser les couleurs du thèmeVietnamienEurope OccidentaleEurope OccidentaleAutocompletion de motDocuments XMLVous n'avez pas la permission d'écrire ce fichier. La sauvegarde automatique sera désormais désactivée.Vous n'avez pas la permission d'ouvrir ce fichier.Vous devez vous identifier pour acceder à %sCouleur de _Fond_Signet_CasseLigne _effacée_Description:_Activer la correction orthographique_Rechercher la parenthèse correspondante_Avant plan:_Joindre Ligne_Langue_Lignes_Minuscule_Nom_Nom:_SuivantCouleur du texte _normalMot de _passe:_Précédent_Enregistrer le mot de passe pour cette sessionSupprimer signet_Enlever les espaces en fin de ligne_Remplacer_Remise à zéro_Position de la marge à droite: _Rechercher:_Rechercher: _Afficher la liste des SignetsE_spaces en Tabs_Inverser la casse_Taille des tabulations:_Tabs en espaces_Patron:Majuscule en _début de mot_Souligner_MajusculeUtiliser le thème par défa_ut_Utiliser des espaces au lieu des tabulationsterminécréer un nouveau fichier et l'ouvrir avec Scribesaffiche cette page d'aideerreurchargement...ouvrir le fichier en lecture seuleaffiche les informations de version de Scribesscribes: %s ne prend pas de paramètresusage: scribes [OPTION] [FILE] [...]scribes-0.4~r910/po/ChangeLog0000644000175000017500000000000011242100540015600 0ustar andreasandreasscribes-0.4~r910/po/zh_CN.po0000644000175000017500000011714711242100540015414 0ustar andreasandreas# translation of Scribes. # Copyright (C) 2006 Free Software Foundation, Inc. # This file is distributed under the same license as the Scribes package. # grissiom , 2007-10-02. # "我将拿ä¸å‡†çš„翻译都用 #!!!! 标记了,如果有好的æ„è§ï¼Œæ¬¢è¿Žäº¤æµ~~~~" #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: chaos.proton@gmail.com\n" "POT-Creation-Date: 2007-10-01 21:44+0800\n" "PO-Revision-Date: 2007-10-02 07:06+0800\n" "Last-Translator: grissiom \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: SCRIBES/internationalization.py:41 plugins/UndoRedo/i18n.py:27 msgid "Cannot redo action" msgstr "ä¸èƒ½é‡åš" #: SCRIBES/internationalization.py:44 msgid "Leave Fullscreen" msgstr "å…¨å±" #: SCRIBES/internationalization.py:47 plugins/SaveDialog/i18n.py:25 msgid "Unsaved Document" msgstr "未ä¿å­˜æ–‡æ¡£" #: SCRIBES/internationalization.py:51 msgid "All Documents" msgstr "所有文件" #: SCRIBES/internationalization.py:52 msgid "Python Documents" msgstr "Python 文件" #: SCRIBES/internationalization.py:53 msgid "Text Documents" msgstr "文本文件" #: SCRIBES/internationalization.py:56 #, python-format msgid "Loaded file \"%s\"" msgstr "载入的文件 \"%s\"" #: SCRIBES/internationalization.py:57 msgid "Loading file please wait..." msgstr "正在载入文件,请ç¨å€™â€¦â€¦" #: SCRIBES/internationalization.py:59 msgid " " msgstr "〈åªè¯»ã€‰" #: SCRIBES/internationalization.py:62 #, python-format msgid "Unrecognized option: '%s'" msgstr "ä¸è¯†åˆ«çš„选项:'%s'" #: SCRIBES/internationalization.py:63 msgid "Try 'scribes --help' for more information" msgstr "请å°è¯• 'scribes --help' 以获得更多信æ¯" #: SCRIBES/internationalization.py:64 msgid "Scribes only supports using one option at a time" msgstr "Scribesåªæ”¯æŒä¸€æ¬¡ä½¿ç”¨ä¸€ä¸ªé€‰é¡¹" #: SCRIBES/internationalization.py:65 #, python-format msgid "Scribes version %s" msgstr "Scribes 版本 %s" #: SCRIBES/internationalization.py:66 #, python-format msgid "%s does not exist" msgstr "%s ä¸å­˜åœ¨" #: SCRIBES/internationalization.py:69 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "文件 \"%s\" 以åªè¯»æ¨¡å¼æ‰“å¼€" #: SCRIBES/internationalization.py:70 #, python-format msgid "The file \"%s\" is open" msgstr "文件 \"%s\" 已打开" #: SCRIBES/internationalization.py:72 #, python-format msgid "Saved \"%s\"" msgstr "文件 \"%s\" å·²ä¿å­˜" #: SCRIBES/internationalization.py:74 msgid "Copied selected text" msgstr "å¤åˆ¶äº†é€‰ä¸­çš„æ–‡æœ¬" #: SCRIBES/internationalization.py:75 #!!!! msgid "No selection to copy" msgstr "没有选择" #: SCRIBES/internationalization.py:76 msgid "Cut selected text" msgstr "剪切" #: SCRIBES/internationalization.py:77 #!!!! msgid "No selection to cut" msgstr "没有选择" #: SCRIBES/internationalization.py:78 msgid "Pasted copied text" msgstr "粘贴" #: SCRIBES/internationalization.py:79 msgid "No text content in the clipboard" msgstr "剪贴æ¿é‡Œæ²¡æœ‰æ–‡æœ¬" #: SCRIBES/internationalization.py:82 msgid "Open a new window" msgstr "打开一个新窗å£" #: SCRIBES/internationalization.py:83 msgid "Open a file" msgstr "打开一个文件" #: SCRIBES/internationalization.py:84 msgid "Rename the current file" msgstr "é‡å‘½å当剿–‡ä»¶" #: SCRIBES/internationalization.py:85 msgid "Print the current file" msgstr "打å°å½“剿–‡ä»¶" #: SCRIBES/internationalization.py:86 msgid "Undo last action" msgstr "撤消上一次æ“作" #: SCRIBES/internationalization.py:87 msgid "Redo undone action" msgstr "é‡åšæ“作" #: SCRIBES/internationalization.py:88 plugins/IncrementalBar/i18n.py:28 #: plugins/FindBar/i18n.py:28 plugins/ReplaceBar/i18n.py:28 msgid "Search for text" msgstr "查找" #: SCRIBES/internationalization.py:89 plugins/ReplaceBar/i18n.py:31 msgid "Search for and replace text" msgstr "查找并替æ¢" #: SCRIBES/internationalization.py:90 msgid "Go to a specific line" msgstr "转到指定行" #: SCRIBES/internationalization.py:91 msgid "Configure the editor" msgstr "编辑器设置" #: SCRIBES/internationalization.py:92 msgid "Launch the help browser" msgstr "打开帮助" #: SCRIBES/internationalization.py:93 #!!!! msgid "Search for previous occurrence of the string" msgstr "寻找å‰ä¸€ä¸ª" #: SCRIBES/internationalization.py:94 #!!!! msgid "Search for next occurrence of the string" msgstr "寻找下一个" #: SCRIBES/internationalization.py:95 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "" #: SCRIBES/internationalization.py:97 msgid "Find occurrences of the string that match the entire word only" msgstr "" #: SCRIBES/internationalization.py:98 msgid "Type in the text you want to search for" msgstr "输入您想寻找的文本" #: SCRIBES/internationalization.py:99 msgid "Type in the text you want to replace with" msgstr "è¾“å…¥æ‚¨æƒ³æ›¿æ¢æˆçš„æ–‡æœ¬" #: SCRIBES/internationalization.py:100 msgid "Replace the selected found match" msgstr "替æ¢äº†æ‰¾åˆ°çš„短语" #: SCRIBES/internationalization.py:101 msgid "Replace all found matches" msgstr "替æ¢äº†æ‰€æœ‰æ‰¾åˆ°çš„短语" #: SCRIBES/internationalization.py:102 msgid "Click to specify the font type, style, and size to use for text." msgstr "指定文本的字体,风格和字å·ã€‚" #: SCRIBES/internationalization.py:103 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "指定tab的宽度。" #: SCRIBES/internationalization.py:105 #!!!! msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "自动æ¢è¡Œã€‚" #: SCRIBES/internationalization.py:107 #!!!! msgid "Select to display a vertical line that indicates the right margin." msgstr "显示一æ¡ç«–çº¿æ¥æŒ‡ç¤ºå³ç©ºç™½ã€‚" #: SCRIBES/internationalization.py:109 msgid "Click to specify the location of the vertical line." msgstr "指定竖线的ä½ç½®ã€‚" #: SCRIBES/internationalization.py:110 msgid "Select to enable spell checking" msgstr "激活拼写检查" #: SCRIBES/internationalization.py:114 msgid "A text editor for GNOME." msgstr "GNOME 的一个文本编辑器。" #: SCRIBES/internationalization.py:115 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "用途:scribes [选项] [文件] [...]" #: SCRIBES/internationalization.py:116 msgid "Options:" msgstr "选项:" #: SCRIBES/internationalization.py:117 msgid "display this help screen" msgstr "显示帮助" #: SCRIBES/internationalization.py:118 msgid "output version information of Scribes" msgstr "输出 Scribes 的版本信æ¯" #: SCRIBES/internationalization.py:119 msgid "create a new file and open the file with Scribes" msgstr "新建一个文件并用 Scribes 打开" #: SCRIBES/internationalization.py:120 msgid "open file in readonly mode" msgstr "以åªè¯»æ¨¡å¼æ‰“开文件" #: SCRIBES/internationalization.py:123 msgid "error" msgstr "错误" #: SCRIBES/internationalization.py:129 msgid "Character _Encoding: " msgstr "字符编ç (_E):" #: SCRIBES/internationalization.py:130 msgid "Add or Remove Encoding ..." msgstr "添加或删除编ç â€¦â€¦" #: SCRIBES/internationalization.py:131 msgid "Recommended (UTF-8)" msgstr "推è(UTF-8)" #: SCRIBES/internationalization.py:132 msgid "Add or Remove Character Encoding" msgstr "添加或删除字符编ç " #: SCRIBES/internationalization.py:133 msgid "Language and Region" msgstr "语言和地区" #: SCRIBES/internationalization.py:134 msgid "Character Encoding" msgstr "字符编ç " #: SCRIBES/internationalization.py:135 msgid "Select" msgstr "选择" #: SCRIBES/internationalization.py:138 msgid "Closed dialog window" msgstr "关闭了对è¯çª—å£" #: SCRIBES/internationalization.py:142 SCRIBES/internationalization.py:143 #: SCRIBES/internationalization.py:167 msgid "Traditional Chinese" msgstr "ç¹ä½“中文" #: SCRIBES/internationalization.py:184 SCRIBES/internationalization.py:187 msgid "Simplified Chinese" msgstr "简体中文" #: SCRIBES/internationalization.py:228 msgid "Select to use themes' foreground and background colors" msgstr "ä½¿ç”¨ä¸»é¢˜çš„å‰æ™¯å’ŒèƒŒæ™¯è‰²" #: SCRIBES/internationalization.py:229 msgid "Click to choose a new color for the editor's text" msgstr "为编辑器的文本选择一个新的颜色" # # åƒè¿™ç§"Click to choose",“Select to makeâ€ï¼Œå®žåœ¨ä¸å¥½ç¿»ï¼Œå¹²è„†çœåŽ»äº†ï¼Œåº”è¯¥ä¹Ÿä¸å½±å“è¾¾æ„。 # å†ä¸€ä¸ªå°±æ˜¯â€œthe language syntaxâ€è¯‘æˆâ€œè¿™ç§è¯­è¨€çš„语法元素â€ä¹Ÿæ¯”较罗嗦, # 所以直接æˆäº†â€œè¯­æ³•元素â€ï¼Œæœ‰æ—¶å°±ç›´æŽ¥çœåŽ»äº†ã€‚å¦‚æžœå¤§å®¶æœ‰å¥½çš„æ„è§æ¬¢è¿Žäº¤æµ # #: SCRIBES/internationalization.py:230 msgid "Click to choose a new color for the editor's background" msgstr "为编辑器的背景选择一个新的颜色" #: SCRIBES/internationalization.py:231 msgid "Click to choose a new color for the language syntax element" msgstr "选择一个新的颜色" #: SCRIBES/internationalization.py:232 msgid "Select to make the language syntax element bold" msgstr "å˜ä¸ºç²—体" #: SCRIBES/internationalization.py:233 msgid "Select to make the language syntax element italic" msgstr "å˜ä¸ºæ–œä½“" #: SCRIBES/internationalization.py:234 msgid "Select to reset the language syntax element to its default settings" msgstr "将语法显示全部é‡è®¾ä¸ºé»˜è®¤å€¼" #: SCRIBES/internationalization.py:241 #!!!! msgid "Toggled readonly mode on" msgstr "åªè¯»æ¨¡å¼é”定" #: SCRIBES/internationalization.py:242 msgid "Toggled readonly mode off" msgstr "åªè¯»æ¨¡å¼è§£é”" #: SCRIBES/internationalization.py:245 msgid "Menu for advanced configuration" msgstr "更多设置" #: SCRIBES/internationalization.py:246 msgid "Configure the editor's foreground, background or syntax colors" msgstr "è®¾ç½®ç¼–è¾‘å™¨çš„å‰æ™¯è‰²ï¼ŒèƒŒæ™¯è‰²æˆ–者语法高亮" #: SCRIBES/internationalization.py:247 msgid "Create, modify or manage templates" msgstr "åˆ›å»ºï¼Œä¿®æ”¹æˆ–ç®¡ç†æ¨¡æ¿" #: SCRIBES/internationalization.py:250 #, python-format msgid "Ln %d col %d" msgstr "第 %d 行,第 %d 列" #: SCRIBES/internationalization.py:253 #, python-format msgid "Loading \"%s\"..." msgstr "正在加载 \"%s\" ……" #: SCRIBES/internationalization.py:256 msgid "Ruby Documents" msgstr "Ruby 文件" #: SCRIBES/internationalization.py:257 msgid "Perl Documents" msgstr "Perl 文件" #: SCRIBES/internationalization.py:258 msgid "C Documents" msgstr "C 文件" #: SCRIBES/internationalization.py:259 msgid "C++ Documents" msgstr "C++ 文件" #: SCRIBES/internationalization.py:260 msgid "C# Documents" msgstr "C# 文件" #: SCRIBES/internationalization.py:261 msgid "Java Documents" msgstr "Java 文件" #: SCRIBES/internationalization.py:262 msgid "PHP Documents" msgstr "PHP 文件" #: SCRIBES/internationalization.py:263 msgid "HTML Documents" msgstr "HTML 文件" #: SCRIBES/internationalization.py:264 plugins/TemplateEditor/i18n.py:27 msgid "XML Documents" msgstr "XML 文件" #: SCRIBES/internationalization.py:265 msgid "Haskell Documents" msgstr "Haskell 文件" #: SCRIBES/internationalization.py:266 msgid "Scheme Documents" msgstr "Scheme 文件" #: SCRIBES/internationalization.py:268 msgid "INS" msgstr "æ’å…¥" #: SCRIBES/internationalization.py:269 msgid "OVR" msgstr "替æ¢" #: SCRIBES/internationalization.py:271 plugins/BookmarkBrowser/i18n.py:27 msgid "No bookmarks found" msgstr "没有找到书签" #: SCRIBES/internationalization.py:272 msgid "Use spaces instead of tabs for indentation" msgstr "使用空格代替tab缩进" #: SCRIBES/internationalization.py:273 msgid "Select to underline language syntax element" msgstr "加下滑线" #: SCRIBES/internationalization.py:274 msgid "Open recently used files" msgstr "打开最近用过的文件" #: SCRIBES/internationalization.py:275 msgid "Failed to save file" msgstr "ä¿å­˜æ–‡ä»¶å¤±è´¥" #: SCRIBES/internationalization.py:277 msgid "" "Save Error: You do not have permission to modify this file or save to its " "location." msgstr "ä¿å­˜å¤±è´¥ï¼šæ‚¨æ²¡æœ‰æƒé™åœ¨æ­¤ç›®å½•下修改或ä¿å­˜è¿™ä¸ªæ–‡ä»¶ã€‚" #: SCRIBES/internationalization.py:279 #!!!! msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "" #: SCRIBES/internationalization.py:280 msgid "Save Error: Failed to create swap location or file." msgstr "ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢ä½ç½®æˆ–文件。" #: SCRIBES/internationalization.py:281 msgid "Save Error: Failed to create swap file for saving." msgstr "ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å»ºç«‹äº¤æ¢æ–‡ä»¶ã€‚" #: SCRIBES/internationalization.py:282 msgid "Save Error: Failed to write swap file for saving." msgstr "ä¿å­˜å¤±è´¥ï¼šæœªèƒ½å†™å…¥äº¤æ¢æ–‡ä»¶ã€‚" #: SCRIBES/internationalization.py:283 msgid "Save Error: Failed to close swap file for saving." msgstr "ä¿å­˜å¤±è´¥:æœªèƒ½å…³é—­äº¤æ¢æ–‡ä»¶ã€‚" #: SCRIBES/internationalization.py:284 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "ä¿å­˜å¤±è´¥ï¼šæœªèƒ½æŠŠæ–‡ä»¶ä¸­\"UTF-8\"çš„å†…å®¹è§£ç æˆUnicode。" #: SCRIBES/internationalization.py:285 msgid "" "Save Error: Failed to encode contents of file. Make sure the encoding of the " "file is properly set in the save dialog. Press (Ctrl - s) to show the save " "dialog." msgstr "ä¿å­˜å¤±è´¥ï¼šæœªèƒ½ç¼–ç æ–‡ä»¶å†…容。请确认在ä¿å­˜å¯¹è¯æ¡†é‡Œè®¾ç½®äº†åˆé€‚的字符编ç ã€‚" "按(Ctrl+s)显示ä¿å­˜å¯¹è¯æ¡†ã€‚" #: SCRIBES/internationalization.py:289 #, python-format msgid "File: %s" msgstr "文件: %s" #: SCRIBES/internationalization.py:290 msgid "Failed to load file." msgstr "未能载入文件。" #: SCRIBES/internationalization.py:291 msgid "Load Error: You do not have permission to view this file." msgstr "载入错误:您没有阅读这个文件的æƒé™ã€‚" #: SCRIBES/internationalization.py:292 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "载入错误:因为æƒé™åŽŸå› ï¼Œæœªèƒ½è®¿é—®è¿œç¨‹æ–‡ä»¶ã€‚" #: SCRIBES/internationalization.py:293 msgid "" "Load Error: Failed to get file information for loading. Please try loading " "the file again." msgstr "载入错误:未能å–得文件信æ¯ï¼Œè¯·é‡æ–°è½½å…¥ã€‚" #: SCRIBES/internationalization.py:295 msgid "Load Error: File does not exist." msgstr "载入错误:文件ä¸å­˜åœ¨ã€‚" #: SCRIBES/internationalization.py:296 msgid "Damn! Unknown Error" msgstr "å¤©å•Šï¼æœªçŸ¥é”™è¯¯" #: SCRIBES/internationalization.py:297 msgid "Load Error: Failed to open file for loading." msgstr "载入错误:未能打开文件。" #: SCRIBES/internationalization.py:298 msgid "Load Error: Failed to read file for loading." msgstr "载入错误:未能读文件。" #: SCRIBES/internationalization.py:299 msgid "Load Error: Failed to close file for loading." msgstr "载入错误:未能关闭文件。" #: SCRIBES/internationalization.py:300 msgid "" "Load Error: Failed to decode file for loading. The file your are loading may " "not be a text file. If you are sure it is a text file, try to open the file " "with the correct encoding via the open dialog. Press (control - o) to show " "the open dialog." msgstr "è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚您所加载的文件å¯èƒ½å¹¶ä¸æ˜¯ä¸€ä¸ªæ–‡æœ¬æ–‡ä»¶ã€‚如果您确信它是文本文件," "请您从打开对è¯çª—å£ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)显示打开对è¯çª—å£ã€‚" #: SCRIBES/internationalization.py:304 msgid "" "Load Error: Failed to encode file for loading. Try to open the file with the " "correct encoding via the open dialog. Press (control - o) to show the open " "dialog." msgstr "è½½å…¥é”™è¯¯ï¼šæœªèƒ½è§£ç æ–‡ä»¶ã€‚" "请您从 æ‰“å¼€å¯¹è¯æ¡† ä¸­é€‰æ‹©ç›¸åº”çš„ç¼–ç æ‰“开文件。按(Ctrl+o)æ˜¾ç¤ºæ‰“å¼€å¯¹è¯æ¡†ã€‚" #: SCRIBES/internationalization.py:308 #, python-format msgid "Reloading %s" msgstr "釿–°è½½å…¥ %s " #: SCRIBES/internationalization.py:309 #, python-format msgid "'%s' has been modified by another program" msgstr "'%s' å·²ç»è¢«å…¶ä»–程åºä¿®æ”¹" #: plugins/BookmarkBrowser/i18n.py:23 msgid "Move to bookmarked line" msgstr "转到书签标记的行" #: plugins/BookmarkBrowser/i18n.py:24 msgid "Bookmark Browser" msgstr "书签æµè§ˆå™¨" #: plugins/BookmarkBrowser/i18n.py:25 msgid "Line" msgstr "行å·" #: plugins/BookmarkBrowser/i18n.py:26 msgid "Bookmarked Text" msgstr "书签标记的文本" #: plugins/BookmarkBrowser/i18n.py:28 plugins/Bookmark/i18n.py:27 #, python-format msgid "Moved to bookmark on line %d" msgstr "转到书签标记的第 %d 行" #: plugins/PrintDialog/i18n.py:23 msgid "Print Document" msgstr "æ‰“å°æ–‡æ¡£" #: plugins/PrintDialog/i18n.py:24 msgid "Print file" msgstr "æ‰“å°æ–‡ä»¶" #: plugins/PrintDialog/i18n.py:25 msgid "File: " msgstr "文件:" #: plugins/PrintDialog/i18n.py:26 msgid "Print Preview" msgstr "打å°é¢„览" #: plugins/RemoteDialog/i18n.py:23 plugins/OpenDialog/i18n.py:23 #: plugins/OpenDialog/Dialog.glade:8 msgid "Open Document" msgstr "打开文档" #: plugins/RemoteDialog/i18n.py:24 msgid "Type URI for loading" msgstr "输入è¦è½½å…¥çš„URI" #: plugins/RemoteDialog/i18n.py:25 #!!!! msgid "Enter the location (URI) of the file you _would like to open:" msgstr "输入文件的URI" #: plugins/AutoReplace/i18n.py:23 #, python-format msgid "Replaced '%s' with '%s'" msgstr "" #: plugins/Templates/i18n.py:23 msgid "Template mode is active" msgstr "æ¿€æ´»äº†æ¨¡æ¿æ¨¡å¼" #: plugins/Templates/i18n.py:24 msgid "Inserted template" msgstr "æ’入了模æ¿" #: plugins/Templates/i18n.py:25 msgid "Selected next placeholder" msgstr "下一个ä½ç½®" #: plugins/Templates/i18n.py:26 msgid "Selected previous placeholder" msgstr "上一个ä½ç½®" #: plugins/About/i18n.py:23 msgid "Scribes is a text editor for GNOME." msgstr "Scribes 是 GNOME 的一个文本编辑器" #: plugins/About/i18n.py:24 msgid "Information about the text editor" msgstr "文本编辑器的信æ¯" #: plugins/TemplateEditor/Template.glade:7 plugins/TemplateEditor/i18n.py:32 msgid "Template Editor" msgstr "模æ¿ç¼–辑器" #: plugins/TemplateEditor/Template.glade:132 #: plugins/TemplateEditor/Template.glade:353 msgid "I_mport" msgstr "导入(_m)" msgid "E_xport" msgstr "导出(_x)" #: plugins/TemplateEditor/Template.glade:254 msgid "Download templates from" msgstr "您å¯ä»¥ä»Žè¿™é‡Œä¸‹è½½æ¨¡æ¿:" #: plugins/TemplateEditor/Template.glade:264 msgid "here" msgstr "这里" #: plugins/TemplateEditor/Template.glade:297 plugins/TemplateEditor/i18n.py:26 msgid "Import Template" msgstr "导入模æ¿" #: plugins/TemplateEditor/Template.glade:382 msgid "Export Template" msgstr "导出模æ¿" #: plugins/TemplateEditor/Template.glade:526 msgid "_Template:" msgstr "" #: plugins/TemplateEditor/Template.glade:541 msgid "_Description:" msgstr "æè¿°(_D):" #: plugins/TemplateEditor/Template.glade:557 msgid "_Name:" msgstr "åç§°(_N)" #: plugins/TemplateEditor/i18n.py:23 msgid "_Language" msgstr "语言(_L)" #: plugins/TemplateEditor/i18n.py:24 #"这个å称实际上应该是触å‘å,我觉得触å‘åä¸å¥½ç†è§£ï¼Œæ‰€ä»¥ç›´è¯‘æˆäº†åç§°ï¼Œå¸Œæœ›å¤§å®¶ææ„è§" msgid "_Name" msgstr "åç§°(_N)" #: plugins/TemplateEditor/i18n.py:25 msgid "_Description" msgstr "æè¿°(_D)" #: plugins/TemplateEditor/i18n.py:28 msgid "Edit Template" msgstr "编辑模æ¿" #: plugins/TemplateEditor/i18n.py:29 msgid "Error: Name field cannot be empty" msgstr "错误: åç§°ä¸èƒ½ä¸ºç©º" #: plugins/TemplateEditor/i18n.py:30 msgid "Error: Trigger name already in use. Please use another trigger name." msgstr "错误:触å‘器åç§°å·²ç»è¢«ä½¿ç”¨ï¼Œè¯·å¦æ¢ä¸€ä¸ªå称。" #: plugins/TemplateEditor/i18n.py:31 msgid "Add Template" msgstr "添加模æ¿" #: plugins/TemplateEditor/i18n.py:33 msgid "Error: You do not have permission to save at the location" msgstr "错误:您没有此ä½ç½®çš„写æƒé™" #: plugins/TemplateEditor/i18n.py:34 #"æ¯æ¬¡è¿›å…¥ç¼–辑器都会选择一个默认的模æ¿ï¼Œæ¯”如ada,所以好似ä¸å­˜åœ¨è¿™ä¸ªé—®é¢˜ã€‚" msgid "Error: No selection to export" msgstr "" #: plugins/TemplateEditor/i18n.py:35 msgid "Error: File not found" msgstr "错误:文件未找到" #: plugins/TemplateEditor/i18n.py:36 msgid "Error: Invalid template file" msgstr "é”™è¯¯ï¼šæ— æ•ˆçš„æ¨¡æ¿æ–‡ä»¶" #: plugins/TemplateEditor/i18n.py:37 msgid "Error: No template information found" msgstr "错误:没有找到模æ¿ä¿¡æ¯" #: plugins/AutoReplaceGUI/i18n.py:23 msgid "Auto Replace Editor" msgstr "自动替æ¢ç¼–辑器" #: plugins/AutoReplaceGUI/i18n.py:24 msgid "_Abbreviations" msgstr "缩写(_A)" #: plugins/AutoReplaceGUI/i18n.py:25 msgid "_Replacements" msgstr "替æ¢ä¸º(_R)" #: plugins/AutoReplaceGUI/i18n.py:26 #, python-format #!!!! msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "错误:'%s' å·²ç»è¢«ä½¿ç”¨äº†ï¼Œè¯·ç”¨å¦ä¸€ä¸ªç¼©å†™" #: plugins/AutoReplaceGUI/i18n.py:27 msgid "Automatic Replacement" msgstr "自动替æ¢" #: plugins/AutoReplaceGUI/i18n.py:28 #!!!! msgid "Modify words for auto-replacement" msgstr "编辑自动替æ¢" #: plugins/Indent/i18n.py:24 msgid "Indenting please wait..." msgstr "正在缩进,请ç¨å€™â€¦â€¦" #: plugins/Indent/i18n.py:25 msgid "Selection indented" msgstr "缩进完æˆäº†" #: plugins/Indent/i18n.py:26 #, python-format msgid "Indented line %d" msgstr "缩进了第 %d 行" #: plugins/Indent/i18n.py:27 msgid "Unindentation is not possible" msgstr "必须缩进" #: plugins/Indent/i18n.py:28 msgid "Selection unindented" msgstr "å–æ¶ˆäº†ç¼©è¿›" #: plugins/Indent/i18n.py:29 #, python-format msgid "Unindented line %d" msgstr "å–æ¶ˆäº†ç¬¬ %d 行的缩进" #: plugins/Indent/i18n.py:30 msgid "I_ndentation" msgstr "缩进(_n)" #: plugins/Indent/i18n.py:31 msgid "Shift _Right" msgstr "å³ç§»ä½(_R)" #: plugins/Indent/i18n.py:32 msgid "Shift _Left" msgstr "左移ä½(_L)" #: plugins/Selection/i18n.py:24 msgid "Selected word" msgstr "选择了一个è¯" #: plugins/Selection/i18n.py:25 msgid "No word to select" msgstr "未找到è¯" #: plugins/Selection/i18n.py:26 #!!!!"æ ¹æ®åŠŸèƒ½" msgid "Selected sentence" msgstr "选择了å¥å­" #: plugins/Selection/i18n.py:27 msgid "No sentence to select" msgstr "没有找到å¥å­" #: plugins/Selection/i18n.py:28 #, python-format msgid "No text to select on line %d" msgstr "在第 %d 行里没有文本å¯é€‰" #: plugins/Selection/i18n.py:29 #, python-format msgid "Selected line %d" msgstr "选择了第 %d 行" #: plugins/Selection/i18n.py:30 plugins/Paragraph/i18n.py:29 msgid "Selected paragraph" msgstr "选择了段è½" #: plugins/Selection/i18n.py:31 msgid "No paragraph to select" msgstr "未找到段è½" #: plugins/Selection/i18n.py:32 msgid "S_election" msgstr "选择(_S)" #: plugins/Selection/i18n.py:33 msgid "Select _Word" msgstr "选择è¯(_W)" #: plugins/Selection/i18n.py:34 msgid "Select _Line" msgstr "选择行(_L)" #: plugins/Selection/i18n.py:35 msgid "Select _Sentence" msgstr "选择å¥å­(_S)" #: plugins/Selection/i18n.py:36 msgid "Select _Paragraph" msgstr "选择段è½(_P)" #: plugins/Lines/i18n.py:24 #, python-format msgid "Deleted line %d" msgstr "删除了第 %d 行" #: plugins/Lines/i18n.py:25 #, python-format msgid "Joined line %d to line %d" msgstr "将第 %d 行åˆå¹¶åˆ°äº†ç¬¬ %d 行" #: plugins/Lines/i18n.py:26 msgid "No more lines to join" msgstr "没有更多行å¯ä»¥åˆå¹¶äº†" #: plugins/Lines/i18n.py:27 #, python-format msgid "Freed line %d" msgstr "æ–°æ’入了第 %d 行" #: plugins/Lines/i18n.py:28 #, python-format msgid "Deleted text from cursor to end of line %d" msgstr "将从光标到第 %d 行尾的文本删除了" #: plugins/Lines/i18n.py:29 msgid "Cursor is already at the end of line" msgstr "光标已ç»åœ¨è¡Œå°¾äº†" #: plugins/Lines/i18n.py:30 #, python-format msgid "Deleted text from cursor to beginning of line %d" msgstr "将从光标到第 %d 行首的文本删除了" #: plugins/Lines/i18n.py:31 msgid "Cursor is already at the beginning of line" msgstr "光标已ç»åœ¨è¡Œé¦–了" #: plugins/Lines/i18n.py:32 msgid "_Lines" msgstr "行(_L)" #: plugins/Lines/i18n.py:33 msgid "_Delete Line" msgstr "删除行(_D)" #: plugins/Lines/i18n.py:34 msgid "_Join Line" msgstr "åˆå¹¶è¡Œ(_J)" #: plugins/Lines/i18n.py:35 msgid "Free Line _Above" msgstr "åœ¨ä¸Šé¢æ’入一行(_A)" #: plugins/Lines/i18n.py:36 msgid "Free Line _Below" msgstr "åœ¨ä¸‹é¢æ’入一行(_B)" #: plugins/Lines/i18n.py:37 msgid "Delete Cursor to Line _End" msgstr "删除从光标到行尾(_E)" #: plugins/Lines/i18n.py:38 msgid "Delete _Cursor to Line Begin" msgstr "删除从光标到行首(_C)" #: plugins/Lines/i18n.py:39 msgid "Duplicated line" msgstr "å¤åˆ¶äº†è¡Œ" #: plugins/Lines/i18n.py:40 msgid "D_uplicate line" msgstr "å¤åˆ¶è¡Œ(_L)" #: plugins/Preferences/i18n.py:23 msgid "Font" msgstr "字体" #: plugins/Preferences/i18n.py:24 msgid "Editor _font: " msgstr "编辑器字体(_f):" #: plugins/Preferences/i18n.py:25 msgid "Tab Stops" msgstr " Tab宽度" #: plugins/Preferences/i18n.py:26 msgid "_Tab width: " msgstr "Tab宽度(_T)" #: plugins/Preferences/i18n.py:27 msgid "Text Wrapping" msgstr "自动æ¢è¡Œ" #: plugins/Preferences/i18n.py:28 msgid "Right Margin" msgstr "å³ç©ºç™½" #: plugins/Preferences/i18n.py:29 msgid "_Right margin position: " msgstr "å³ç©ºç™½ä½ç½®(_R):" #: plugins/Preferences/i18n.py:30 msgid "Spell Checking" msgstr "拼写检查" #: plugins/Preferences/i18n.py:31 msgid "Change editor settings" msgstr "更改编辑器设置" #: plugins/Preferences/i18n.py:32 msgid "Preferences" msgstr "使用å好" #: plugins/Preferences/i18n.py:33 #, python-format msgid "Changed font to \"%s\"" msgstr "将字体å˜ä¸º \"%s\"" #: plugins/Preferences/i18n.py:34 #, python-format msgid "Changed tab width to %d" msgstr "å°†tab宽度å˜ä¸º %d" #: plugins/Preferences/i18n.py:35 msgid "_Use spaces instead of tabs" msgstr "使用空格代替tab(_u)" #: plugins/Preferences/i18n.py:36 msgid "Use tabs for indentation" msgstr "使用tabæ¥ç¼©è¿›" #: plugins/Preferences/i18n.py:37 msgid "Use spaces for indentation" msgstr "使用空格缩进" #: plugins/Preferences/i18n.py:38 msgid "Enable text _wrapping" msgstr "激活自动æ¢è¡Œ" #: plugins/Preferences/i18n.py:39 msgid "Enabled text wrapping" msgstr "激活了自动æ¢è¡Œ" #: plugins/Preferences/i18n.py:40 msgid "Disabled text wrapping" msgstr "ç¦ç”¨è‡ªåЍæ¢è¡Œ" #: plugins/Preferences/i18n.py:41 msgid "Display right _margin" msgstr "显示å³ç©ºç™½(_m)" #: plugins/Preferences/i18n.py:42 msgid "Show right margin" msgstr "显示å³ç©ºç™½" #: plugins/Preferences/i18n.py:43 msgid "Hide right margin" msgstr "éšè—å³ç©ºç™½" #: plugins/Preferences/i18n.py:44 msgid "_Enable spell checking" msgstr "激活拼写检查(_E)" #: plugins/Preferences/i18n.py:45 plugins/SpellCheck/i18n.py:24 msgid "Enabled spellchecking" msgstr "激活了拼写检查" #: plugins/Preferences/i18n.py:46 plugins/SpellCheck/i18n.py:23 msgid "Disabled spellchecking" msgstr "ç¦ç”¨äº†æ‹¼å†™æ£€æŸ¥" #: plugins/Preferences/i18n.py:47 #, python-format msgid "Positioned margin line at column %d" msgstr "å°†å³ç©ºç™½çº¿ç½®äºŽç¬¬ %d 列" #: plugins/WordCompletionGUI/i18n.py:3 msgid "Word completion occurred" msgstr "自动补全了å•è¯" #: plugins/BracketCompletion/i18n.py:23 msgid "Pair character completion occurred" msgstr "自动补全了一对字符" #: plugins/BracketCompletion/i18n.py:24 #!!!! msgid "Enclosed selected text" msgstr "" #: plugins/BracketCompletion/i18n.py:25 msgid "Removed pair character completion" msgstr "删除了一对字符" #: plugins/DocumentBrowser/i18n.py:23 msgid "Select document to focus" msgstr "选择文档" #: plugins/DocumentBrowser/i18n.py:24 msgid "Open Documents" msgstr "打开文档" #: plugins/DocumentBrowser/i18n.py:25 msgid "File _Type" msgstr "文档类型(_T)" #: plugins/DocumentBrowser/i18n.py:26 msgid "File _Name" msgstr "文件å(_N)" #: plugins/DocumentBrowser/i18n.py:27 msgid "Full _Path Name" msgstr "完整路径" #: plugins/DocumentBrowser/i18n.py:28 msgid "No documents open" msgstr "没有打开文档" #: plugins/SearchPreviousNext/i18n.py:23 msgid "No previous match" msgstr "没有找到上一个" #: plugins/IncrementalBar/i18n.py:23 plugins/FindBar/i18n.py:23 #: plugins/ReplaceBar/i18n.py:23 msgid "Match _case" msgstr "符åˆå¤§å°å†™(_c)" #: plugins/IncrementalBar/i18n.py:24 plugins/FindBar/i18n.py:24 #: plugins/ReplaceBar/i18n.py:24 msgid "Match _word" msgstr "ç¬¦åˆæ•´è¯(_w)" #: plugins/IncrementalBar/i18n.py:25 plugins/FindBar/i18n.py:25 #: plugins/ReplaceBar/i18n.py:25 msgid "_Previous" msgstr "上一个(_P)" #: plugins/IncrementalBar/i18n.py:26 plugins/FindBar/i18n.py:26 #: plugins/ReplaceBar/i18n.py:26 msgid "_Next" msgstr "下一个(_N)" #: plugins/IncrementalBar/i18n.py:27 plugins/FindBar/i18n.py:27 #: plugins/ReplaceBar/i18n.py:27 msgid "_Search for:" msgstr "æœç´¢(_S):" #: plugins/IncrementalBar/i18n.py:29 plugins/FindBar/i18n.py:29 #: plugins/ReplaceBar/i18n.py:29 msgid "Closed search bar" msgstr "关闭了æœç´¢æ¡" #: plugins/IncrementalBar/i18n.py:30 #"æ ¹æ®åŠŸèƒ½" msgid "Incrementally search for text" msgstr "å‘下æœç´¢" #: plugins/IncrementalBar/i18n.py:31 msgid "Close incremental search bar" msgstr "关闭å‘下æœç´¢æ¡" #: plugins/OpenDialog/i18n.py:24 msgid "Select file for loading" msgstr "选择è¦è½½å…¥çš„æ–‡ä»¶" #: plugins/ToolbarVisibility/i18n.py:23 msgid "Hide toolbar" msgstr "éšè—工具æ¡" #: plugins/ToolbarVisibility/i18n.py:24 msgid "Showed toolbar" msgstr "显示工具æ¡" #: plugins/MatchingBracket/i18n.py:23 #, python-format msgid "Found matching bracket on line %d" msgstr "在第 %d 行找到了对应的括å·" #: plugins/MatchingBracket/i18n.py:24 msgid "No matching bracket found" msgstr "没有找到对应的括å·" #: plugins/BracketSelection/i18n.py:23 msgid "Selected characters inside bracket" msgstr "选择了括å·å†…所有的è¯" #: plugins/BracketSelection/i18n.py:24 msgid "No brackets found for selection" msgstr "没有找到括å·" #: plugins/Case/i18n.py:23 msgid "No selection to change case" msgstr "没有选择" #: plugins/Case/i18n.py:24 msgid "Selected text is already uppercase" msgstr "é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å¤§å†™äº†" #: plugins/Case/i18n.py:25 msgid "Changed selected text to uppercase" msgstr "å°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å¤§å†™" #: plugins/Case/i18n.py:26 msgid "Selected text is already lowercase" msgstr "é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯å°å†™äº†" #: plugins/Case/i18n.py:27 msgid "Changed selected text to lowercase" msgstr "å°†é€‰ä¸­çš„æ–‡æœ¬è½¬æ¢æˆäº†å°å†™" #: plugins/Case/i18n.py:28 msgid "Selected text is already capitalized" msgstr "é€‰ä¸­çš„æ–‡æœ¬å·²ç»æ˜¯è¯é¦–大写了" #: plugins/Case/i18n.py:29 msgid "Capitalized selected text" msgstr "将选中的文本è¯é¦–大写了" #: plugins/Case/i18n.py:30 msgid "Swapped the case of selected text" msgstr "交æ¢é€‰ä¸­æ–‡æœ¬çš„大å°å†™" #: plugins/Case/i18n.py:31 msgid "_Case" msgstr "大å°å†™(_C)" #: plugins/Case/i18n.py:32 msgid "_Uppercase" msgstr "大写(_U)" #: plugins/Case/i18n.py:33 msgid "_Lowercase" msgstr "å°å†™(_L)" #: plugins/Case/i18n.py:34 msgid "_Titlecase" msgstr "è¯é¦–大写(_T)" #: plugins/Case/i18n.py:35 msgid "_Swapcase" msgstr "交æ¢å¤§å°å†™(_S)" #: plugins/Bookmark/i18n.py:23 #, python-format msgid "Removed bookmark on line %d" msgstr "将第 %d 行的书签删除了" #: plugins/Bookmark/i18n.py:24 #, python-format msgid "Bookmarked line %d" msgstr "将第 %d 行打上书签" #: plugins/Bookmark/i18n.py:25 msgid "No bookmarks found to remove" msgstr "没有找到书签" #: plugins/Bookmark/i18n.py:26 msgid "Removed all bookmarks" msgstr "删除了所有的书签" #: plugins/Bookmark/i18n.py:28 msgid "No next bookmark to move to" msgstr "䏋颿²¡æœ‰ä¹¦ç­¾äº†" #: plugins/Bookmark/i18n.py:29 msgid "No previous bookmark to move to" msgstr "ä¸Šé¢æ²¡æœ‰ä¹¦ç­¾äº†" #: plugins/Bookmark/i18n.py:30 msgid "Already on first bookmark" msgstr "å·²ç»åœ¨ç¬¬ä¸€ä¸ªä¹¦ç­¾äº†" #: plugins/Bookmark/i18n.py:31 msgid "Moved to first bookmark" msgstr "转到了第一个书签" #: plugins/Bookmark/i18n.py:32 msgid "Already on last bookmark" msgstr "å·²ç»åœ¨æœ€åŽä¸€ä¸ªä¹¦ç­¾äº†" #: plugins/Bookmark/i18n.py:33 msgid "Moved to last bookmark" msgstr "转到最åŽä¸€ä¸ªä¹¦ç­¾" #: plugins/Bookmark/i18n.py:34 msgid "_Bookmark" msgstr "书签(_B)" #: plugins/Bookmark/i18n.py:35 msgid "Bookmark _Line" msgstr "用书签标记这一行(_L)" #: plugins/Bookmark/i18n.py:36 msgid "_Remove Bookmark" msgstr "删除书签(_R)" #: plugins/Bookmark/i18n.py:37 msgid "Remove _All Bookmarks" msgstr "删除所有书签(_A)" #: plugins/Bookmark/i18n.py:38 msgid "Move to _Next Bookmark" msgstr "转到下一个书签(_N)" #: plugins/Bookmark/i18n.py:39 msgid "Move to _Previous Bookmark" msgstr "转到上一个书签(_P)" #: plugins/Bookmark/i18n.py:40 msgid "Move to _First Bookmark" msgstr "转到第一个书签(_F)" #: plugins/Bookmark/i18n.py:41 msgid "Move to Last _Bookmark" msgstr "转到最åŽä¸€ä¸ªä¹¦ç­¾(_B)" #: plugins/Bookmark/i18n.py:42 msgid "_Show Bookmark Browser" msgstr "显示书签æµè§ˆå™¨(_S)" #: plugins/SaveDialog/i18n.py:23 plugins/SaveDialog/Dialog.glade:7 msgid "Save Document" msgstr "ä¿å­˜æ–‡æ¡£" #: plugins/SaveDialog/i18n.py:24 msgid "Change name of file and save" msgstr "更改文件åå¹¶ä¿å­˜" #: plugins/UserGuide/i18n.py:23 msgid "Launching help browser" msgstr "打开帮助æµè§ˆå™¨" #: plugins/UserGuide/i18n.py:24 msgid "Could not open help browser" msgstr "未能打开帮助æµè§ˆå™¨" #: plugins/ReadOnly/i18n.py:23 msgid "File has not been saved to disk" msgstr "文件还未存盘" #: plugins/ReadOnly/i18n.py:24 msgid "No permission to modify file" msgstr "没有修改文件的æƒé™" #: plugins/UndoRedo/i18n.py:24 msgid "Undid last action" msgstr "撤消了上一个动作" #: plugins/UndoRedo/i18n.py:25 msgid "Cannot undo action" msgstr "ä¸èƒ½æ’¤æ¶ˆçš„动作" #: plugins/UndoRedo/i18n.py:26 msgid "Redid undone action" msgstr "é‡åšäº†æ’¤æ¶ˆçš„动作" #: plugins/Spaces/i18n.py:24 msgid "Replacing spaces please wait..." msgstr "正在替æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦" #: plugins/Spaces/i18n.py:25 msgid "No spaces found to replace" msgstr "æœªæ‰¾åˆ°å¯æ›¿æ¢çš„空格" #: plugins/Spaces/i18n.py:26 msgid "Replaced spaces with tabs" msgstr "用tab替æ¢äº†ç©ºæ ¼" #: plugins/Spaces/i18n.py:27 msgid "Replacing tabs please wait..." msgstr "正在替æ¢tab,请ç¨å€™â€¦â€¦" #: plugins/Spaces/i18n.py:28 msgid "Replaced tabs with spaces" msgstr "用空格替æ¢äº†tab" #: plugins/Spaces/i18n.py:29 msgid "No tabs found to replace" msgstr "æœªæ‰¾åˆ°å¯æ›¿æ¢çš„tab" #: plugins/Spaces/i18n.py:30 msgid "Removing spaces please wait..." msgstr "正在替æ¢ç©ºæ ¼ï¼Œè¯·ç¨å€™â€¦â€¦" #: plugins/Spaces/i18n.py:31 msgid "No spaces were found at end of line" msgstr "未能在行尾找到空格" #: plugins/Spaces/i18n.py:32 msgid "Removed spaces at end of lines" msgstr "删除了行尾的空格" #: plugins/Spaces/i18n.py:33 msgid "S_paces" msgstr "空格(_S)" #: plugins/Spaces/i18n.py:34 msgid "_Tabs to Spaces" msgstr "å°†tabè½¬æ¢æˆç©ºæ ¼(_T)" #: plugins/Spaces/i18n.py:35 msgid "_Spaces to Tabs" msgstr "å°†ç©ºæ ¼è½¬æ¢æˆtab(_S)" #: plugins/Spaces/i18n.py:36 msgid "_Remove Trailing Spaces" msgstr "删除行尾的空格(_R)" #: plugins/GotoBar/i18n.py:23 msgid "Move cursor to a specific line" msgstr "将光标转到指定行" #: plugins/GotoBar/i18n.py:24 msgid "Closed goto line bar" msgstr "关闭了跳转æ¡" #: plugins/GotoBar/i18n.py:25 #, python-format msgid " of %d" msgstr "之 %d" #: plugins/GotoBar/i18n.py:26 msgid "Line number:" msgstr "行å·ï¼š" #: plugins/GotoBar/i18n.py:27 #, python-format msgid "Moved cursor to line %d" msgstr "光标转到了第 %d 行" #: plugins/SearchReplace/i18n.py:23 msgid "Searching please wait..." msgstr "正在æœç´¢ï¼Œè¯·ç¨å€™â€¦â€¦" #: plugins/SearchReplace/i18n.py:24 #, python-format msgid "Found %d matches" msgstr "找到 %d 项" #: plugins/SearchReplace/i18n.py:25 #, python-format msgid "Match %d of %d" msgstr "第 %d 个,共 %d 个" #: plugins/SearchReplace/i18n.py:26 msgid "No match found" msgstr "短语未找到" #: plugins/SearchReplace/i18n.py:27 msgid "No next match found" msgstr "䏋颿²¡æœ‰äº†" #: plugins/SearchReplace/i18n.py:28 msgid "Stopped operation" msgstr "æ“作被中止" #: plugins/SearchReplace/i18n.py:29 msgid "Replacing please wait..." msgstr "正在替æ¢ï¼Œè¯·ç¨å€™â€¦â€¦" #: plugins/SearchReplace/i18n.py:30 msgid "Replace found match" msgstr "æ›¿æ¢æ‰¾åˆ°çš„短语" #: plugins/SearchReplace/i18n.py:31 msgid "Replaced all found matches" msgstr "æ›¿æ¢æ‰€æœ‰æ‰¾åˆ°çš„短语" #: plugins/SearchReplace/i18n.py:32 msgid "No previous match found" msgstr "ä¸Šé¢æ²¡æœ‰äº†" #: plugins/ReplaceBar/i18n.py:30 msgid "Replac_e with:" msgstr "替æ¢ä¸º(_e):" #: plugins/ReplaceBar/i18n.py:32 msgid "Closed replace bar" msgstr "å…³é—­äº†æ›¿æ¢æ¡" #: plugins/ReplaceBar/i18n.py:33 msgid "_Replace" msgstr "替æ¢(_R)" #: plugins/ReplaceBar/i18n.py:34 msgid "Replace _All" msgstr "æ›¿æ¢æ‰€æœ‰(_A)" #: plugins/ReplaceBar/i18n.py:35 msgid "Incre_mental" msgstr "å‘下(_m)" #: plugins/ColorEditor/i18n.py:23 msgid "Change editor colors" msgstr "更改编辑器颜色" #: plugins/ColorEditor/i18n.py:24 msgid "Syntax Color Editor" msgstr "语法高亮编辑器" #: plugins/ColorEditor/i18n.py:25 msgid "_Use default theme" msgstr "使用默认主题(_U)" #: plugins/ColorEditor/i18n.py:26 msgid "Using theme colors" msgstr "使用主题颜色" #: plugins/ColorEditor/i18n.py:27 msgid "Using custom colors" msgstr "使用自定义颜色" #: plugins/ColorEditor/i18n.py:28 msgid "Select foreground color" msgstr "é€‰æ‹©å‰æ™¯è‰²" #: plugins/ColorEditor/i18n.py:29 msgid "_Normal text color: " msgstr "普通文本颜色(_N):" #: plugins/ColorEditor/i18n.py:30 msgid "_Background color: " msgstr "背景色(_B):" #: plugins/ColorEditor/i18n.py:31 msgid "_Foreground:" msgstr "剿™¯(_F):" #: plugins/ColorEditor/i18n.py:32 msgid "Back_ground:" msgstr "背景(_g):" #: plugins/ColorEditor/i18n.py:33 msgid "Select background color" msgstr "选择背景色" #: plugins/ColorEditor/i18n.py:34 #"功能" msgid "Language Elements" msgstr "语言" #: plugins/ColorEditor/i18n.py:35 msgid "Select foreground syntax color" msgstr "é€‰æ‹©è¯­æ³•é«˜äº®å‰æ™¯è‰²" #: plugins/ColorEditor/i18n.py:36 msgid "Select background syntax color" msgstr "选择语法高亮背景色" #: plugins/ColorEditor/i18n.py:37 msgid "B_old" msgstr "粗体(_o)" #: plugins/ColorEditor/i18n.py:38 msgid "I_talic" msgstr "斜体(_t)" #: plugins/ColorEditor/i18n.py:39 msgid "_Underline" msgstr "下划线(_U)" #: plugins/ColorEditor/i18n.py:40 msgid "_Reset to Default" msgstr "还原为默认(_R)" #: plugins/SyntaxColorSwitcher/i18n.py:23 msgid "_Highlight Mode" msgstr "高亮模å¼(_H)" #: plugins/SyntaxColorSwitcher/i18n.py:25 #, python-format msgid "Activated '%s' syntax color" msgstr "激活了 '%s' 的语法高亮" #: plugins/SyntaxColorSwitcher/i18n.py:26 msgid "Disabled syntax color" msgstr "ç¦ç”¨äº†è¯­æ³•高亮" #: plugins/Paragraph/i18n.py:23 msgid "No paragraph found" msgstr "未能找到段è½" #: plugins/Paragraph/i18n.py:24 msgid "No text found" msgstr "未能找到文本" #: plugins/Paragraph/i18n.py:25 msgid "Moved to previous paragraph" msgstr "转到了上一段" #: plugins/Paragraph/i18n.py:26 #!!!! msgid "No previous paragraph" msgstr "" #: plugins/Paragraph/i18n.py:27 msgid "Moved to next paragraph" msgstr "转到了下一段" #: plugins/Paragraph/i18n.py:28 #!!!! msgid "No next paragraph" msgstr "" #: plugins/Paragraph/i18n.py:30 msgid "Reflowed selected text" msgstr "æ•´ç†äº†é€‰æ‹©çš„æ–‡æœ¬" #: plugins/Paragraph/i18n.py:31 msgid "Reflowed paragraph" msgstr "æ•´ç†äº†é€‰æ‹©çš„æ®µ" #: plugins/Paragraph/i18n.py:33 msgid "Para_graph" msgstr "段è½(_g)" #: plugins/Paragraph/i18n.py:34 msgid "_Previous Paragraph" msgstr "上一个段è½(_P)" #: plugins/Paragraph/i18n.py:35 msgid "_Next Paragraph" msgstr "下一个段è½(_N)" #: plugins/Paragraph/i18n.py:36 msgid "_Reflow Paragraph" msgstr "æ•´ç†æ®µè½(_R)" #: plugins/Paragraph/i18n.py:37 msgid "_Select Paragraph" msgstr "选择段è½(_S)" #: plugins/ScrollNavigation/i18n.py:23 msgid "Centered current line" msgstr "当å‰è¡Œå±…中" scribes-0.4~r910/po/de.gmo0000644000175000017500000012463011242100540015142 0ustar andreasandreasÞ•ä<‡\x( y(…( Œ( ­(»()Í(8÷( 0)<)P)f)w)Œ) ¡)¯)sÁ))5*®_*ô+,,8, I, V,w, ’,  ,®, Ç,Õ,ï,(-u1-d§-~ .v‹.t/ew/)Ý/00&0:0P0 V0c0t0†0—0¦0¶0'É0 ñ0 ý0 11!101)A1k1~1‘1«1º1Ë1æ1û12/2"D2"g2Š2¢2µ27Ë213;53@q33²3Tæ3;4X4u4Š4ž4³4Æ4Ø4á4>ö455#J5n5"Š5­5*É5$ô56+6?6Q6l6‰60™6*Ê6&õ6è738/98i8€8–8­8Ã8Û8 ã8ñ899(9 @9 N9o9…9›9 ±9!Ò9ô9 :=:9Q:?‹:Ë:á:þ:!;)>;(h;‘;$¯;AÔ;D<9[<•<¨<¸<Í< á< ì<÷<==>'=Df=«=º=!Ë=í=þ= >>->C>I>X>j>q> ƒ>>”> œ>©> ±>»> Ë>Ø>ö>?9 ?2Z?!?¯?Á?$Ê?ï?þ?@@&@8@L@d@{@Œ@ª@ ¯@ ¼@@É@- Aô8AŸ-BZÍB,(C,UC ‚C9£CÝCîCþCD )D 5D ADLD!lDŽD­DÄDÜDóDE&E>E[EsE&ŠE±EÄEáEFF2FAF[FqFF¡F¸FÕFõFG!GAG]GrG†GœG)·G#áGH H?H\HnHsH„H ˆH–Hf¥H II*ICI LI"ZI}II?ŸI ßIêI#ýI !J-J `O`g` p`~`` ©`¶`Ç`Þ` î` ø`a a a +a 6aAaTa pa0za«aÄa ÊaÕa%ðab$5b)Zb „c‘c™c ·cÅc0Øc d&d8dLdhd{dŽd £d°d‘Ád8Se¾Œe5Kfg›g ºg Çg%Ôg&úg !h .hp Jp;Wp4“pJÈpAq)UqIq#Éq'íqr2r!Lr$nr “r´r»rOÍrs(5s^s(}s"¦s*És(ôstw Qw&rw"™w¼wÒw&éw&x7x>@xIxOÉx(y By cy,„y2±y.äy2z5FzE|z^ÂzL!{n{„{™{¹{Ø{ Þ{è{| |:|8S|Œ|œ|'¬|Ô|í|}})} H}S}b} u}€}—}±} µ}Â}Ê} Ò}Þ} ó}~~4~?Q~9‘~"Ë~î~ + 7)G q |‡–© ºÇ+Ú€ € €Y&€1€€²€¦Ñ~x‚.÷‚,&ƒ)SƒO}ƒ̓ ⃠+„E„`„'{„0£„Ô„ô„…/… O…p…„…&›…Â… â…;†?†(Z†$ƒ†¨†,¼†é†"û†'‡#F‡'j‡#’‡4¶‡%ë‡)ˆ;ˆ3[ˆ1ˆ'Áˆ+éˆ!‰'7‰5_‰3•‰'ɉñ‰.Š@ŠXŠ^ŠqŠ vŠƒŠ”Š$‹7‹P‹ p‹z‹-‰‹·‹Ò‹?â‹ "Œ0Œ$LŒ qŒ Œ ŒŒ šŒ¨Œ ¾ŒÊŒÜŒ"îŒ.@To ‰&ª+Ñ4ý)2Ž&\Ž2ƒŽ&¶ŽÝŽ÷Ž&$<#a…+1É%û%!=G…%Ÿ%Åëû ‘ ‘‘],‘@Š‘>Ë‘L ’æW’d>“A£“eå“%K”q”‚”””%§”1Í”ÿ”•3+•6_• –•*¢•Í• å•ð•––!–0–L–h–%–!¥–Ç–ã–@ÿ–/@—9p— ª—?¶—"ö—O˜@i˜'ª˜Ò˜í˜!™$™"4™ W™.e™.”™.Ùò™šš89š,ršŸš±š Äš"К$óš›+›H›]›r›„›/™›É›Û›ì›ü›œ %œ 1œœ?œRÜœ/K+hˆ”ž1<ž9nž=¨žYæž@Ÿ`Ÿ|Ÿž–ŸB5 9x  ² ¼ 7Ò : ¡ E¡"P¡%s¡™¡(µ¡ Þ¡ÿ¡¢,¢%1¢)W¢*¢>¬¢*뢣$-£ R£ `£ k£*v£ ¡£¯£æ@¤<'¥3d¥ ˜¥¦¥ ¸¥Å¥Ö¥ å¥ ó¥!¦#¦ >¦K¦_¦p¦y¦¦’¦˜¦ ž¦ ©¦ ´¦ ¾¦#ʦ &§ 0§ =§^§ }§Ч ›§¼§اô§¨ "¨ ,¨8¨H¨-Y¨*‡¨²¨&¹¨à¨õ¨ ü¨!© (©$I©)n©—?q‡˜I]Qõr9;•’:Í@ÀKÌ¢gÊ™´0~<R¤ü!ÆJž_^±Ú †òE,Ùó‘—î®`…í rH¨dLÛý¬Þ}Z¨b{:áP/yT%FßÌ®½Ñø Œ&œÕCǧ"“]è+{S¾Éк+âNÏ#àå5¡äO4ˆ’|"Bh¶=‘e\'B ƒJF@µ?¡ßÅ>d/Ël31½âYn¥Y*H^uÔ ²Ö$WÂ<Ÿcã λ­”‚oëV±ôÀ†Æ9³Nµ-‡=fçªz¤ìšaƒMˆn`j£>–˜¬.þÒixöuù“Èûls„pŠÔ\x6C°MkgÇ‚tQc ÁbiO[z)LSÒ7UmeÿñÃW¦žãÝ„ŸAVE8£Ãh1Ë ‰wÓÜst Ñêæ4Ä´¦Š6!kaPÉÅ€€}¸²fàº52)[m¼Ž‹ÙUÝv(Ú»vĸT¶péDʉ¯¯0޹¾׼D ,°ÍqIy_³'¿w™¹›jŒ·ú•Î*-K&R÷·äØïG šo¢§3…¥Ü «Ž.Ø|œ×Ö%;¿2ÈÓ”8–ª ÐÛðÏ›X« ‹$á~XG(A©©Á7­#ZÕ of %d"%s" has been replaced with "%s"%d%% complete%s does not exist'%s' has been modified by another programhereFontRight MarginSpell CheckingTab StopsText Wrapping_Description:_Name:_Template:A decoding error occured while saving the file. Automatic saving will be disabled until the file is properly saved.A list of encodings selected by the user.A saving error occured. The document could not be transfered from its temporary location. Automatic saving has been disabled until the file is saved correctly without errors.A saving operation failed. Could not create swap area. Make sure you have permission to save to your home folder. Also check to see that you have not run out of disk space. Automatic saving will be disabled until the document is properly saved.A text editor for GNOME.Activated '%s' syntax colorAdd New TemplateAdd TemplateAdd or Remove Character EncodingAdd or Remove Encoding ...All DocumentsAll LanguagesAll Languages (BMP only)All languagesAlready on first bookmarkAlready on last bookmarkAlready on most recently bookmarked lineAn encoding error occurred while saving the file. Automatic saving will be disabled until the file is properly saved.An encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occured while creating the file. Automatic saving has been disabled until the file is saved correctly without errors.An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicAuthentication RequiredAuto Replace EditorAutomatic ReplacementB_oldBack_ground:Baltic languagesBaltic languaguesBookmark BrowserBookmark _LineBookmarked TextBookmarked line %dBulgarian, Macedonian, Russian, SerbianC DocumentsC# DocumentsC++ DocumentsCanadianCannot open %sCannot open fileCannot perform operation in readonly modeCannot redo actionCannot undo actionCapitalized selected textCase sensitiveCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChanged font to "%s"Changed selected text to lowercaseChanged selected text to uppercaseChanged tab width to %dCharacter EncodingCharacter _Encoding: Click to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Close incremental search barClose regular expression barClosed dialog windowClosed error dialogClosed goto line barClosed replace barClosed search barCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCould not open help browserCreate, modify or manage templatesCurrent document is focusedCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDamn! Unknown ErrorDanish, NorwegianDelete Cursor to Line _EndDelete _Cursor to Line BeginDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDetach Scribes from the shell terminalDetermines whether or not to use GTK theme colors when drawing the text editor buffer foreground and background colors. If the value is true, the GTK theme colors are used. Otherwise the color determined by one assigned by the user.Determines whether to show or hide the status area.Determines whether to show or hide the toolbar.Disabled spellcheckingDisabled syntax colorDisabled text wrappingDisplay right _marginDownload templates fromE_xportEdit TemplateEdit text filesEditor _font: Editor background colorEditor foreground colorEditor's fontEnable or disable spell checkingEnable text _wrappingEnabled spellcheckingEnabled text wrappingEnables or disables right marginEnables or disables text wrappingEnclosed selected textEnglishEnter the location (URI) of the file you _would like to open:Error: '%s' already in use. Please choose another string.Error: '%s' is already in use. Please use another abbreviation.Error: File not foundError: Invalid template fileError: Invalid template file.Error: Name field cannot be emptyError: Name field cannot have any spaces.Error: Name field must contain a string.Error: No selection to exportError: No template information foundError: Template editor can only have one '${cursor}' placeholder.Error: Trigger name already in use. Please use another trigger name.Error: You do not have permission to save at the locationEsperanto, MalteseExport TemplateFailed to load file.Failed to save fileFile _NameFile _TypeFile has not been saved to diskFile: File: %sFind occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound %d matchFound %d matchesFound matching bracket on line %dFree Line _AboveFree Line _BelowFreed line %dFull _Path NameGo to a specific lineGreekHTML DocumentsHaskell DocumentsHebrewHide right marginHide toolbarINSI_mportI_ndentationI_talicIcelandicImport TemplateIncre_mentalIncrementally search for textIndented line %dIndenting please wait...Info Error: Access has been denied to the requested file.Info Error: Information on %s cannot be retrieved.Information about the text editorInserted templateJapaneseJapanese, Korean, Simplified ChineseJava DocumentsJoined line %d to line %dKazakhKoreanLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLexical scope highlight colorLineLine number:Ln %d col %dLoad Error: Failed to access remote file for permission reasons.Load Error: Failed to close file for loading.Load Error: Failed to decode file for loading. The file your are loading may not be a text file. If you are sure it is a text file, try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to encode file for loading. Try to open the file with the correct encoding via the open dialog. Press (control - o) to show the open dialog.Load Error: Failed to get file information for loading. Please try loading the file again.Load Error: Failed to open file for loading.Load Error: Failed to read file for loading.Load Error: File does not exist.Load Error: You do not have permission to view this file.Loaded file "%s"Loading "%s"...Loading file please wait...Match %d of %dMatch _caseMatch _wordMatch wordMenu for advanced configurationModify words for auto-replacementMove cursor to a specific lineMove to Last _BookmarkMove to _First BookmarkMove to _Next BookmarkMove to _Previous BookmarkMove to bookmarked lineMoved cursor to line %dMoved to bookmark on line %dMoved to first bookmarkMoved to last bookmarkMoved to most recently bookmarked lineNo bookmarks foundNo bookmarks found to removeNo brackets found for selectionNo documents openNo indentation selection foundNo match foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo next match foundNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo previous matchNo previous match foundNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces found to replaceNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found to replaceNo text content in the clipboardNo text to select on line %dNo word to selectNoneNordic languagesOVROpen DocumentOpen DocumentsOpen Error: An error occurred while opening the file. Try opening the file again or file a bug report.Open a fileOpen a new windowOpen recently used filesOptions:PHP DocumentsPair character completion occurredPasted copied textPerl DocumentsPermission Error: Access has been denied to the requested file.PortuguesePosition of marginPositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionReloading %sRemove _All BookmarksRemoved all bookmarksRemoved bookmark on line %dRemoved pair character completionRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of linesRemoved spaces at end of selected linesRemoving spaces please wait...Rename the current fileReplac_e with:Replace _AllReplace all found matchesReplace found matchReplace the selected found matchReplaced '%s' with '%s'Replaced all found matchesReplaced all occurrences of "%s" with "%s"Replaced spaces with tabsReplaced tabs with spacesReplaced tabs with spaces on selected linesReplacing please wait...Replacing spaces please wait...Replacing tabs please wait...Ruby DocumentsRussianS_electionS_pacesSave DocumentSave Error: Failed decode contents of file from "UTF-8" to Unicode.Save Error: Failed to close swap file for saving.Save Error: Failed to create swap file for saving.Save Error: Failed to create swap location or file.Save Error: Failed to encode contents of file. Make sure the encoding of the file is properly set in the save dialog. Press (Ctrl - s) to show the save dialog.Save Error: Failed to transfer file from swap to permanent location.Save Error: Failed to write swap file for saving.Save Error: You do not have permission to modify this file or save to its location.Save password in _keyringSaved "%s"Scheme DocumentsScribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSearch for text using regular expressionSearching please wait...SelectSelect _LineSelect _ParagraphSelect _SentenceSelect _WordSelect background colorSelect background syntax colorSelect character _encodingSelect document to focusSelect file for loadingSelect foreground colorSelect foreground syntax colorSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to underline language syntax elementSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected encodingsSelected line %dSelected next placeholderSelected paragraphSelected previous placeholderSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedSets the margin's position within the editorSets the width of tab stops within the editorShift _LeftShift _RightShow marginShow or hide the status area.Show or hide the toolbar.Show right marginShowed toolbarSimplified ChineseSpell checkingStopped operationStopped replacingSwapped the case of selected textSyntax Color EditorTab widthTemplate EditorTemplate mode is activeText DocumentsText wrappingThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe color used to render normal text in the text editor's buffer.The color used to render the text editor buffer background.The editor's font. Must be a string valueThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.The highlight color when the cursor is around opening or closing pair characters.Toggled readonly mode offToggled readonly mode onTraditional ChineseTrue to detach Scribes from the shell terminal and run it in its own process, false otherwise. For debugging purposes, it may be useful to set this to false.True to use tabs instead of spaces, false otherwise.Try 'scribes --help' for more informationTurkishType URI for loadingType in the text you want to replace withType in the text you want to search forUkrainianUndid last actionUndo last actionUnified ChineseUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduUse GTK theme colorsUse Tabs instead of spacesUse spaces for indentationUse spaces instead of tabs for indentationUse tabs for indentationUsing custom colorsUsing theme colorsVietnameseWest EuropeWestern EuropeWord completion occurredXML DocumentsYou do not have permission to save the file. Automatic saving will be disabled until the file is properly saved.You do not have permission to save the file. Try saving the file to your desktop, or to a folder you own. Automatic saving has been disabled until the file is saved correctly without errors.You do not have permission to view this file.You must log in to access %s_Abbreviations_Background color: _Bookmark_Case_Delete Line_Description_Description:_Enable spell checking_Find Matching Bracket_Foreground:_Highlight Mode_Join Line_Language_Lines_Lowercase_Name_Name:_Next_Normal text color: _Password:_Previous_Remember password for this session_Remove Bookmark_Remove Trailing Spaces_Replace_Replacements_Reset to Default_Right margin position: _Search for:_Search for: _Show Bookmark Browser_Spaces to Tabs_Swapcase_Tab width: _Tabs to Spaces_Template:_Titlecase_Underline_Uppercase_Use default theme_Use spaces instead of tabscompletedcreate a new file and open the file with Scribesdisplay this help screenerrorloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: Scribes VERSION Report-Msgid-Bugs-To: POT-Creation-Date: 2007-03-13 08:12+0100 PO-Revision-Date: 2007-03-13 08:21+0100 Last-Translator: Steffen Klemer Language-Team: German MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit von %d"%s" wurde durch "%s" ersetzt%d%% erledigt%s existiert nicht'%s' wurde von einem anderen Programm veränderthier heruntergeladen werden.SchriftartRechter RandRechtschreibprüfungTabulatorenTextumbruch_Beschreibung_Name_Vorlage:Ein Dekodierungsfehler ist beim Speichern der Datei aufgetreten. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.Eine Liste der vom Benutzer ausgewählten Zeichensätze.Ein Fehler beim Speichern ist aufgetreten. Die Datei konnte nicht aus dem temporären Ordner kopiert werden. Automatisches Speichern wurde deaktiviert, bis es wieder fehlerfrei möglich ist.Das Speichern ist fehlgeschlagen. Konnte keine Swap-Datei anlegen. Bitte versichern Siesich, dass sie das Recht haben in Ihrem Persönlichen Ordner zu speichern.Versichern Sie sich auch, dass Sie noch freien Speicherplatz haben. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.Ein Texteditor für GNOMEFarbschema für '%s' aktiviertNeue VorlageNeue VorlageZeichensatz hnzufügen oder entfernenZeichensatz hinzufügen oder entfernenAlle DateienAlle SprachenAll Languages (nur BMP)Alle SprachenSie sind bereits beim ersten LesezeichenSie sind bereits beim letzten LesezeichenSie sind bereits in der zuletzt mit einem Lesezeichen versehenen ZeileEin Kodierungsfehler ist beim Speichern der Datei aufgetreten. Automatisches Speichern wurde deaktiviert, bis es wieder fehlerfrei möglich ist.Ein Fehler beim Kodieren ist aufgetreten. Bitte senden Sie einen Fehlerbericht(möglichst in Englisch) an http://openusability.org/forum/?group_id=141Ein Fehler ist beim Erstellen der Datei aufgetreten. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.Beim Dekodieren Ihres Textes ist ein Fehler aufgetreten. Bitte schreiben Sieauf "http://openusability.org/forum/?group_id=141" einen Fehlerbericht (wenn möglich in Englisch).Ein Fehler ist beim Kodieren Ihrer Datei aufgetreten. Bitte versuchenSie einen anderen Zeichensatz (bevorzugt UTF-8) zu verwenden.Während des Öffnens ist ein Fehler aufgetreten. Bitte schreiben sie einen Fehlerbericht aufhttp://scribes.sourceforge.net (wenn möglich in Englisch)Beim Speichern dieses Textes ist ein Fehler aufgetreten.ArabischAuthentifizierung benötigtAutomatische ErsetzungenAutomatische Ersetzung_FettHinter_grundBaltische SprachenBaltische SprachenLesezeichenübersichtLesezeichen _hinzufügenText mit einem Lesezeichen versehenLesezeichen für Zeile %d hinzugefügtBulgarisch, Mazedonisch, Russisch, SerbischC QuelltexteC# QuelltexteC++ QuelltexteKanadischKann %s nicht öffnenKann den Text nicht öffnenKann diese Aktion im Nur-Lesen Modus nicht ausführenKann die Aktion nicht WiederholenKann die letzte Aktion nicht rückgängig machenMarkierten Text in Großbuchstaben geändertGroßschreibung beachtenKeltische SprachenZentral- und OsteuropaÄndere EditorfarbenEditor einrichtenDatei unter einem neuem Namen speichernSchriftart in "%s" geändertMarkierten Text von Groß- zu Kleinschreibung geändertMarkierten Text von Klein- zu Großschreibung geändertTabulatorenweite zu $d geändertZeichensatz_ZeichensatzKlicken Sie hier um eine neue Hintergrundfarbe auszuwählenKlicken Sie hier um eine neue Textfarbe auszuwählenKlicken Sie hier um eine neue Farbe für dieses Sprachelement auszuwählenBestimmen Sie die verwendete Schriftart, den Stil und die GrößeÄndert die Position der vertikalen LinieÄndert die Breite des Leerraums, wenn Sie die Tabulatortaste betätigen.Inkrementelle Suchleiste schließenSchließe Reguläre Ausdruck SuchleisteDer Dialog wurde geschlossenFehlermeldung geschlossenDie Zeilauswahlleiste geschlossenDie Ersetzenleiste wurde geschlossenDie Suchleiste wurde geschlossen_FarbeEditor einrichtenKonfiguriert die Vordergrund- und Hintergrundfarbe sowie die SyntaxhervorhebungMarkierten Text kopiertKonnte Scribes' Datenordner nicht findenKonnte die Hilfe nicht öffnenVorlagen erzeugen, ändern und verwaltenAktueller Text wurde hervorgehobenDer Cursor ist bereits am Anfang der ZeileDer Cursor ist bereits am Ende der ZeileMarkierten Text ausgeschnittenVerdammt! Unbekannter FehlerDänisch, NorwegischLösche zum Zeilen_endeLösche zum Zeilen_anfangHabe die Zeile %d gelöschtText vor dem Cursor in Zeile %d gelöschtText hinter dem Cursor in Zeile %d gelöschtScribes im Hintergrund ausführenLegt fest, ob die Farben des GTK-Themas für das Textfenster verwendet werden sollen. Wenn dies aktiviert ist, werden Themenfarben verwendet, ansonsten die vom Benutzerfestgelegten.Legt fest, ob die Statusleiste angezeigt wird.Legt fest, ob die Werkzeugleiste angezeigt wird.Rechtschreibprüfung ausgeschaltenFarbschema ausgeschaltenTextumbruch deaktiviertRechten _Rand anzeigenVorlagen können z.B. vonE_xportierenVorlage bearbeitenTextdateien bearbeitenEditor _Schriftart: HintergrundfarbeVordergrundfarbeEditor _SchriftartRechtschreibprüfung einschaltenAutomatischen Text_umbruch einschaltenRechtschreibprüfung eingeschaltenTextumbruch aktiviertRechten _Rand anzeigenAutomatischen Text_umbruch einschaltenDer ausgewählte Text wurde eingefügtEnglischGeben Sie den Ort (URL) der Datei, die Sie _öffnen wollen an:Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie ein anderes Wort.Fehler: '%s' wird bereits verwendet. Bitte benutzen Sie eine andere Abkürzung.Fehler beim Laden: Datei nicht gefunden.Fehler: Ungültige VorlagendateiFahler: Ungültige VorlagendateiFehler: Sie müssen einen Dateinamen angebenFehler: Der Name darf keine Leerzeichen enthalten:Fehler: Das Feld Name muss ein Wort enthalten.Fehler: Keine Markierung zum Exportieren vorhandenFehler: Keine Information über die Vorlagen gefundenFehler: Eine Vorlage kann nur einen '${cursor}' Platzhalter besitzen.Fehler: Diese Zeichenkette wird bereits als Vorlage verwendet. Bitte benutzen Sie eine andere.Fehler: Sie haben nicht die nötigen Rechte, um die Datei dort zu speichern.Esperanto, MaltesischVorlagen exportierenLaden der Datei fehlgeschlagen.Datei speichern fehlgeschlagen_NameDatei_typDatei wurde nicht gespeichertDatei: Datei: %sFinde nur Zeichenfolgen, die dem gesamten Wort entsprechenFinde nur Zeichenfolgen mit der gleichen Großschreibung%d mal gefunden%d mal gefundenZugehörige Klamme in Zeile %d gefundenLösche _vorherige ZeileLösche _nächste ZeileZeile %d gelöschtVoller _PfadnameGehe zu einer bestimmten ZeileGriechischHTML DokumenteHaskell QuelltexteHebräischVerstecke rechten RandWerkzeugleiste versteckenEINI_mportieren_Einzug_KursivIsländischVorlagen importieren_InkrementellInkrementell nach Text suchenZeile %d eingerücktRücke ein - bitte warten...Fehler: Der Zugriff auf die gewünschte Datei wurde verweigert.Fehler; Information von %s konnte nicht empfangen werden.Informationen über den TexteditorVorlage eingefügtJapanischJapanisch, Koreanisch, Einfaches ChinesischJava QuelltexteHabe die Zeilen %d und %d zusamengeführtKasachischKoreanischSprachelementeSprache und RegionStarte die HilfeStarte HilfeVollbild verlassenHervorhebungsfarbe für den "lexical scope"ZeileGehe zu Zeile:Z %d Sp %dFehler beim Laden: Konnte die entfernte Datei wegen unzureichenden Rechten nicht Öffnen.Fehler beim Laden: Konnte Datei nicht schließen.Fehler beim Laden: Konnte die Datei nicht dekodieren. Die Datei, die Sie versuchen zu öffnen ist eventuell keine Textdatei. Wenn Sie sich sicher sind, dass es doch eine ist, versuchen Sie sie es bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahldes richtigen Zeichensatzes erneut.Fehler beim Laden: Konnte die Datei nicht dekodieren. Versuchen Sie sie es bitte mit dem Öffnen-Dialog (Strg - o) und der Auswahl des richtigen Zeichensatzes erneut.Fehler beim Laden: Konnte die Dateinformationen für das Laden nicht bekommen.Bitte versuchen Sie erneut die Datei zu öffnen.Fehler beim Laden: Konnte Datei nicht öffnen.Fehler beim Laden: Konnte Datei nicht lesen.Fehler beim Laden: Datei existiert nicht.Fehler beim Laden: Sie haben nicht die nötigen Rechte, um die Datei anzusehen.Datei "%s" geöffnetLade "%s"...Lade die Datei.- Bitte warten...Übereinstimmung %d von %d_Großschreibung beachtenNur vollständige _WörterNur vollständige _WörterMenü für die erweiterte KonfigurationÄndere das Wort für die automatische ErsetzungSpringe in eine bestimmte ZeileGehe zum _letzten LesezeichenGehe zum _ersten LesezeichenGehe zum _nächsten LesezeichenGehe zum _vorherigen LesezeichenGehe zu LesezeichenIn Zeile %d gesprungenZum Lesezeichen in Zeile %d gesprungenZum ersten Lesezeichen gegangenZum letzten Lesezeichen gegangenZur zuletzt mit einem Lesezeichen versehenen Zeile gegangenKeine Lesezeichen gefundenKeine Lesezeichen zum entfernen gefundenKeine Klammer zum Markieren gefundenKein Text geöffnetKeine Einrückung in der Markierung gefundenKein mal gefundenKeine zugehörige Klammer gefundenKeine Zeilen zum Zusammenführen übrigKein weiteres Lesezeichen vorhandenKeine weitere Übereinstimmung gefundenKein Absatz zum Markieren vorhandenSie haben keine Berechtigung um die Datei zu ändernKein vorheriges Lesezeichen vorhandenKeine vorherige Übereinstimmung gefundenKeine Übereinstimmung gefundenKeine der markierten Zeilen kann eingerückt werdenNichts markiert um die Großschreibung zu ändernKeine Markierung zum Kopieren vorhandenKeine Markierung zum Ausschneiden vorhandenKein Satz zum Markieren vorhandenKeine Leerzeichen zum Ersetzen gefundenAm Anfang der Zeile wurden keine Leerzeichen gefundenAm Ende der Zeile wurden keine Leerzeichen gefundenKeine Tabulatoren zum Ersetzen gefundenKein Text in der ZwischenablageKein Text zum auswählen in Zeile %d vorhandenKein Wort zum MarkierenKeineNordische SprachenÜBSText öffnenGeöffnete TexteFehler beim Öffnen: Ein Fehler ist beim Öffnen der Datei aufgetreten. Versuchen Sie es erneut oderschicken Sie uns bitte einen Fehlerbericht.Eine Datei öffnenÖffne ein neues FensterÖffne zuletzt benutzte DateienOptionen:PHP QuelltexteZeichenpaarkomplettierung wurde durchgeführtMarkierten Text eingefügtPerl QuelltexteFehler: Der Zugriff auf die gewünschte Datei wurde verweigert.PortugiesischPosition des rechten RandesDer Rechte Rand ist nun in Spalte %dEinstellungenText druckenDruckvorschauDatei druckenDrucke aktuelle DateiDrucke "%s"Python QuelltexteEmpfohlen (UTF-8)Letzte Änderung wiederhergestelltWiederhole die Rückgängig gemachte ÄnderungLade "%s" erneut...Entferne _alle LesezeichenAlle Lesezeichen entferntLesezeichen in Zeile %d entferntZeichenpaarvervollständigung entferntLeerzeichen am Anfang von Zeile %d entferntLeerzeichen am Anfang der markierten Zeilen entferntLeerzeichen am Ende von Zeile %d entferntLeerzeichen am Ende der Zeile entferntLeerzeichen am Ende der markierten Zeilen entferntEntferne Leerzeichen - bitte warten...Benenne aktuelle Datei umErsetzen _mit:_Alle ersetzenAlle gefundenen Zeichenfolgen ersetzenGefundenen Übereinstimmung ersetzenDie gefundene Zeichenfolge ersetzen'%s' durch '%s' ersetztAlle gefundenen Übereinstimmungen ersetzenAlle Vorkommen von "%s" wurden durch "%s" ersetztLeerzeichen durch Tabulatoren ersetztTabulatoren durch Leerzeichen ersetztTabulatoren durch Leerzeichen in der markierten Zeile ersetztErsetze - bitte warten...Ersetze Leerzeichen - bitte warten...Ersetze Tabulatoren - bitte warten...Ruby QuelltexteRussisch_Markierung_LeerzeichenText speichernFehler beim Speichern: Konnte den Inhalt der Datei nicht von "UTF-8" zu Unicode konvertieren.Fehler beim Speichern: Konnte temporäre Datei nicht schließen.Fehler beim Speichern: Konnte temporäre Datei nicht erzeugen.Fehler beim Speichern: Konnte temporären Ordner oder Datei nicht erstellen.Fehler beim Speichern: Konnte den Inhalt der Datei nicht übersetzen. Bitte stellen siesicher, dass dass sich im Speichern-Dialog den richtigen Zeichensatz gewählt haben.Drücken sie (Strg - s) um den Speichern-Dialog zu öffnen.Fehler beim Speichern. Übertragung der Datei vom temporären zum endgültigen Platz fehlgeschlagen.Fehler beim Speichern: Konnte temporäre Datei nicht beschreiben.Sie haben nicht die nötigen Rechte, um die Datei zu ändern oder sie am gewählten Ort zu speichern.Passwort im Schlüsselbund _speichern"%s" gespeichertScheme QuelltexteScribes TexteditorScribes ist ein Texteditor für GNOMEScribes unterstützt nur eine Option gleichzeitigScribes Version %sText suchen und ErsetzenSuche nach dem nächsten Auftreten der ZeichenfolgeSuche nach einem vorherigen Auftreten der ZeichenfolgeText suchenSuche mit Hilfe von Regulären AusdrückenSuche - bitte warten...Auswählen_Markiere _ZeileMarkiere _AbsatzMarkiere _SatzMarkiere _WortHintergrundfarbe auswählenHintergrundfarbe auswählenZeichensatz auswählenText auswählen um ihn hervorzuheben Eine Datei zum öffnen auswählenVordergrundfarbe auswählenVordergrundfarbe auswählenAktiviert eine vertikale Linie, die einen rechten Rand markiert.Aktiviert die automatische RechtschreibprüfungÄndert den Schriftstil dieses Sprachelementes in Fett umÄndert denStellt die Standarteinstellungen des Sprachelementes wieder herUnterstreicht dieses SprachelementAktiviert die Benutzung der Vorder- und Hintergrundfarbe des verwendeten ThemasSollen zu lange Zeilen in die nächste Zeile umgebrochen werden?Zeichen innerhalb der Klammern markiertAusgewählte ZeichensätzeZeile %d ausgewähltNächsten Platzhalter ausgewähltAbsatz markiertVorherigen Platzhalter ausgewähltSatz markiertMarkierter Text ist bereits in GroßbuchstabenMarkierter Text ist bereits in KleinbuchstabenMarkierter Text ist bereits in GroßbuchstabenMarkiertes WortMarkierung eingerücktEinrückung Markierung entferntÄndert the Position des rechten Randes im EditorfensterÄndert die Länge von Tabulatoren im Editor_Links Einrücken_Rechts EinrückenRand zeigenStatusleiste zeigen oder verbergenWerkzeugleiste zeigen oder verbergenZeige rechten RandWerkzeugleiste eingeschaltenEinfaches ChinesischRechtschreibprüfungSuche abgebrochenErsetzen abgebrochenGroßschreibung des markierten Textes getauschtFarbschema Editor_TabulatorbreiteVorlagen EditorVorlagenmodus ist aktivAlle TextdateienTextumbruchThailändischDer MIME-Typ der Datei, die Sie zu öffnen versuchen,konnte nicht ermitelt werden. Bitte versichern Sie sich, dasses eine Textdatei ist MIME-Typ: %sDie Datei, die Sie zu öffnen versuchen ist keine Textdatei. MIME-Type: %sDie Farbe von normalem TextDie normale HintergrundfarbeThe Editorschriftart. Muss ein String sein.Der Zeichensatz mit dem Sie versucht haben die Datei zu öffnen, konnte nicht erkannt werden. Versuchen sie es erneut mit einem anderen.Die Datei "%s" wurde geöffnetDie Datei "%s" wurde im Nur-Lesen Modus geöffnetDie Datei, die Sie zu öffnen versuchen, existiert nicht.Die Datei, die Sie zu öffnen versuchen, ist keine Textdatei.Die Hintergrundfarbe, wenn der Cursor an einer öffnenden oder schließenden Klammer ist.Deaktiviert den Nur-Lesen ModusNur-Lesen Modus einschaltenTraditionelles ChinesischAuf Wahr setzen, wenn Scribes im Hintergrund in einem eigenen Prozess ausgeführtwerden soll. Für Debug-Zwecke ist es eventuell nützlich dies auszuschalten.Wahr, wenn Tabulatoren anstatt Leerzeichen verwendet werden sollenVersuchen Sie 'scribes --help' für weitere InformationenTürkischURL zum Laden eigebenGeben Sie die Zeichenfolge ein, die Sie ersetzen wollenGeben Sie die Zeichenfolge ein, nach der Sie suchen wollenUkrainischLetzte Aktion rückgängig gemachtDie letzte Aktion rückgängig machenVereinheitliches ChinesischEinrückung entfernen ist nicht möglichEinrückung in Zeile %d entferntUnbekannte Option: '%s'Ungespeicherter TextUrduFarben des aktuellen Themas verwendenLeerzeichen anstatt Tabulatoren verwendenLeerzeichen für die Einrückung verwendenLeerzeichen anstatt Tabulatoren für die Einrückung verwendenTabulatoren für die Einrückung verwendenEigene Farben benutzenFarben des aktuellen Themas benutzenVietnamesischWesteuropaWesteuropaWortvervollständigung wurde durchgeführtXML DokumenteSie haben nicht die nötigen Rechte, um die Datei zu speichern. Automatisches Speichern wurdedeaktiviert, bis es wieder fehlerfrei möglich ist.Sie haben nicht die nötigen Rechte um die Datei zu speichern. Versuchen Sie die Dateiauf Ihrem Desktop oder einem eigenen Ordner zu speichern. Automatisches Speichernwurde deaktiviert bis es möglich ist ohne Fehler zu speichern.Sie haben nicht die nötigen Rechte, um die Datei anzusehen.Sie müssen sich einloggen um %s öffnen zu können_Abkürzungen_Hintergrundfarbe_Lesezeichen_Großschreibung_Lösche Zeile_Beschreibung_BeschreibungRechtschreibprüfung _einschalten_Finde zugehörige Klammer_Vordergrund_Hervorhebungsmodus_Verbinde Zeilen_Sprache_Zeilen_Kleinschreibung_Name_Name_Nächstes_Textfarbe_Passwort_Vorheriges_Passwort für diese Sitzung merken_Entferne das LesezeichenEntferne Leerzeichen am _EndeE_rsetzen_Ersetzungen_Zurücksetzen auf Standartwerte_Position des rechten Randes: _Suche nach:_Suche nach: Zeige die Lesezeichen_übersicht_Leerzeichen zu Tabulatoren_Vertausche Großschreibung_Tabulator Breite: _Tabulator zu Leerzeichen_Vorlage:_Titelmodus_Unterstreichen_Großschreibung_Standartfarben des aktuellen Themas benutzen_Leerzeichen anstatt Tabulatoren verwendenFertigErzeuge eine neue Datei und öffne sieZeigt diese Hilfe anFehlerÖffne...Datei im Nur-Lesen Modues öffnenGibt die Version von Scribes ausscribes: %s bekommt nur ein ArgumentVerwendung: scribes [OPTION] [DATEI [...]scribes-0.4~r910/po/it.gmo0000644000175000017500000005456411242100540015176 0ustar andreasandreasÞ•´oL  =P ft †’¦¼Íâû - D R` yd‡vìtceØ)>hou†˜«'Çïø)1DWq‚²É+æ1'1Y‹£7¶1î; @\3TÑ&;O^s…Ž>£â#÷"-*P${ ²Ä0Ô* 0 < S j € Ž ž ­ à Ù ï !!!!>A!D€!!Å! ç!õ! """*" 2"<"M"!f"ˆ"$‘"¶"Ð"×"Þ"ç"ù" #%#<#M# k# x#…#–# ²# ¾#Ê#ê# $!$>$ C$d$$¡$À$Ó$í$%%6%S%!s%•%±%Æ%Ú%)ð%#&>&]& v&—&´&Æ&Ë& Ü& ê&ö&ÿ& '#' A'M' \' j'u' Œ'š'«'¿'Ó'æ'ü'(&3(-Z( ˆ('©(Ñ(ð( ÿ( ) &)*G)$r)+—)Ã)á) é) ÷)*#*0:*k*~*(š*,Ã*ð*++"+B:+}+/+1Í+Cÿ+6C,Oz,"Ê,í,þ,-$#-"H-"k- Ž-œ-¯- Ä- Ð-Ý-ï-!.$.8.H.W.‚\.^ß.t>/³/&É//ð/3 0T0n0‡0)›0Å0)Í0'÷0 1)1;1L1\1z11§1¸1 ½1 È1Ô1ã1-ü1*2>2 T2b2y22—22 ²2¼2Å2×2 ð2ý2 33 .3083i3‚3 ˆ3“3%®3Ô3$ó3v45Ÿ5!¦5"È5$ë5 6 6,6=6S6p6‹6¦6Ã6(Û67 727B7]7pm7‰Þ7‚h8rë8:^9™9 Ÿ9ª9º9 Ê9(ë9:4:=:CS:—:¬:,Â:ï:#ÿ:#;?;!];;Ž;@©;@ê;"+<N<?d<=¤<Râ<a5=9—=MÑ=>:>Q> i>Š> §>±>IÄ>%?/4? d?$o?(”?'½?&å? @@A2@@t@ µ@.Á@ð@ A&A8AOAfA+†A²A'ËAóAûA&BE5BL{B1ÈBúB C%C+C3CNC WCaC)C©C ÂC(ÍC!öCDD 'D2DJD[D pD‘D ¥DÆDÖDêD- E7ELE#]E'E*©E$ÔEùE+þE2*F0]F3ŽFÂF1áF G#4GXG.xG0§G5ØG(H7HTHrH2H1ÂH(ôH I>I+[I‡I¥I­I½I ÌIÙI#âI J9J KJVJgJ {J‡JŸJ·JÈJÝJæJ%íJ K.4K*cK4ŽK&ÃK3êK&LELWL+jL2–L9ÉL+M7/M'gMM•M¥M»M'ÕM6ýM4NJN*dN+N »N ÇN#ÑNõNHO/\OJŒOH×OV P@wPJ¸P3Q7QKQaQ*sQ&žQ&ÅQìQÿQ"RBR]RuRŽR(¢RËRéRÿRS’ScªSyTˆT3ŸT/ÓT<U&@U'gUU+£UÏU'ÕU ýUV&V/V7VHV aV‚VœV²V ·VÂVÕV%èV*W9WOW gW!tW–W¶W ¼WÆW àW ìWùWX7X ?XKXiX X(ŠX³XÆXÍX)ÜXY&$Y(KYw0û鿇#z4~¥³_».—ùÿUE</b+å€Nyø®%KÌ ,Æ ]èG©Œ²HL eýê7}¿ÎòF1$8ì*£†sµŽaŸÖ º•󙂤CÐ[˜lÜÅÉ JQjx‹¦õ‘)Óö¸ÚV½ð±Õ§"î¨ôßZk¶Ï3@MÔ–h„ÈWñ^{ª¹ç’¢Þ'‰vf;\ØOB5”ÄšÝíˆ6œ · m›ü«A â9þ¡I“ožD(gPY¾á2r iÁÑÙëËS×­ tàŠ  u¬?ãpÀÇÛïú´=q¯RÍ:|ƒX-&¼äÒð…!Ê÷c`Tnd> of %d"%s" has been replaced with "%s"%d match was found%d matches were found%d%% complete%s does not existFontRight MarginSpell CheckingTab StopsText WrappingA text editor for GNOME.Add New TemplateAdd or Remove Character EncodingAdd or Remove EncodingAll DocumentsAll LanguagesAll Languages (BMP only)All languagesAn encoding error occurred. Please file a bug report at http://openusability.org/forum/?group_id=141An error occurred while decoding your file. Please file a bug report at "http://openusability.org/forum/?group_id=141"An error occurred while encoding your file. Try saving your file using another character encoding, preferably UTF-8.An error occurred while openning the file. Please file a bug report at http://scribes.sourceforge.netAn error occurred while saving this file.ArabicB_oldBaltic languagesBaltic languaguesBookmarked line %dBracket completion occurredBulgarian, Macedonian, Russian, SerbianCanadianCannot open %sCannot perform operation in readonly modeCannot redo actionCannot undo actionCapitalized selected textCeltic languagesCentral and Eastern EuropeChange editor colorsChange editor settingsChange name of file and saveChange the name of current file and save itChanged font to "%s"Changed selected text from lowercase to uppercaseChanged selected text from uppercase to lowercaseChanged tab width to %dCharacter EncodingClick to choose a new color for the editor's backgroundClick to choose a new color for the editor's textClick to choose a new color for the language syntax elementClick to specify the font type, style, and size to use for text.Click to specify the location of the vertical line.Click to specify the width of the space that is inserted when you press the Tab key.Closed dialog windowClosed error dialogClosed findbarClosed goto line barClosed replacebarCo_lor: Configure the editorConfigure the editor's foreground, background or syntax colorsCopied selected textCould not find Scribes' data folderCreate a new fileCreate, modify or manage templatesCursor is already at the beginning of lineCursor is already at the end of lineCut selected textDanish, NorwegianDeleted line %dDeleted text from cursor to beginning of line %dDeleted text from cursor to end of line %dDescriptionDisabled spellcheckingDisabled text wrappingDisplay right _marginEdit TemplateEdit text filesEditor _font: Enable text _wrappingEnabled spellcheckingEnabled text wrappingEnclosed selected textEnglishEsperanto, MalteseFile has not been saved to diskFind occurrences of the string that match the entire word onlyFind occurrences of the string that match upper and lower cases onlyFound matching bracket on line %dFreed line %dGo to a specific lineGreekHebrewHide right marginI_talicIcelandicIndented line %dIndenting please wait...Information about the text editorJapaneseJapanese, Korean, Simplified ChineseJoined line %d to line %dKazakhKoreanLanguageLanguage ElementsLanguage and RegionLaunch the help browserLaunching help browserLeave FullscreenLine %d is already bookmarkedLine number:Ln %d col %dLoaded file "%s"Loading file please wait...Match _caseMatch _wordMenu for advanced configurationMove cursor to a specific lineMoved cursor to line %dMoved to bookmark on line %dNameNo bookmark on line %d to removeNo bookmarks found to removeNo brackets found for selectionNo indentation selection foundNo match was foundNo matching bracket foundNo more lines to joinNo next bookmark to move toNo paragraph to selectNo permission to modify fileNo previous bookmark to move toNo selected lines can be indentedNo selection to change caseNo selection to copyNo selection to cutNo sentence to selectNo spaces were found at beginning of lineNo spaces were found at end of lineNo tabs found in selected textNo tabs found on line %dNo text content in the clipboardNo text to select in line %dNo word to selectNoneNordic languagesOpen DocumentOpen a fileOptions:Pasted copied textPortuguesePositioned margin line at column %dPreferencesPrint DocumentPrint PreviewPrint filePrint the current filePrinting "%s"Python DocumentsRecommended (UTF-8)Redid undone actionRedo undone actionRemoved all bookmarksRemoved bookmark on line %dRemoved bracket completionRemoved spaces at beginning of line %dRemoved spaces at beginning of selected linesRemoved spaces at end of line %dRemoved spaces at end of selected linesRemoving spaces please wait...Replac_e with:Replace _AllReplace all found matchesReplace the selected found matchReplaced all occurrences of "%s" with "%s"Replaced tabs with spaces on line %dReplaced tabs with spaces on selected linesReplacing tabs please wait...RussianSave DocumentSaved "%s"Scribes Text EditorScribes is a text editor for GNOME.Scribes only supports using one option at a timeScribes version %sSearch for and replace textSearch for next occurrence of the stringSearch for previous occurrence of the stringSearch for textSelectSelect character _encodingSelect file for loadingSelect to display a vertical line that indicates the right margin.Select to enable spell checkingSelect to make the language syntax element boldSelect to make the language syntax element italicSelect to reset the language syntax element to its default settingsSelect to use themes' foreground and background colorsSelect to wrap text onto the next line when you reach the text window boundary.Selected characters inside bracketSelected line %dSelected paragraphSelected sentenceSelected text is already capitalizedSelected text is already lowercaseSelected text is already uppercaseSelected wordSelection indentedSelection unindentedShift _LeftShift _RightShow right marginSimplified ChineseSwapped the case of selected textSyntax Color EditorTemplate EditorText DocumentsThaiThe MIME type of the file you are trying to open could not be determined. Make sure the file is a text file. MIME type: %sThe MIME type of the file you are trying to open is not for a text file. MIME type: %sThe encoding of the file you are trying to open could not be determined. Try opening the file with another encoding.The file "%s" is openThe file "%s" is open in readonly modeThe file you are trying to open does not exist.The file you are trying to open is not a text file.Toggled readonly mode offToggled readonly mode onTraditional ChineseTry 'scribes --help' for more informationTurkishType in the text you want to replace withType in the text you want to search forUkrainianUndid last actionUndo last actionUnified ChineseUnindentation is not possibleUnindented line %dUnrecognized option: '%s'Unsaved DocumentUrduVietnameseWest EuropeWestern EuropeWord completion occurredYou do not have permission to view this file._Background color: _Character Encoding: _Description:_Enable spell checking_Find Matching Bracket_Name:_Next_Normal text color: _Previous_Replace_Reset to Default_Right margin position: _Search for:_Search for: _Tab width: _Use default themecompletedcreate a new file and open the file with Scribesdisplay this help screenerrorloading...open file in readonly modeoutput version information of Scribesscribes: %s takes no argumentsusage: scribes [OPTION] [FILE] [...]Project-Id-Version: scribes 0.2.3_beta1 Report-Msgid-Bugs-To: POT-Creation-Date: 2006-01-26 19:53-0500 PO-Revision-Date: 2005-12-29 17:18+0100 Last-Translator: Stefano Esposito Language-Team: Italian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); di %d"%s" e' stato sostutuito con "%s"E' stata trovate %d corrispondenzaSono state trovate %d corrispondenze%d%% completo%s non esisteCarattereMargine destroControllo OrtograficoSpazi di TabulaturaDivisione del testoUn editor di testo per GNOMEAggiungi nuovo templateAggiungi o rimuovi codifica di carattereAggiungi o rimuovi codificaTutti i documentiTutte le lingueTutte le lingue (solo BMP)Tutte le lingueC'e' stato un errore di codifica. Compila un bug report su http://openusability.org/forum/?group_id=141. Grazie.C'e' stato un errore durante la decodifica del tuo file. Compila un bug report su "http://openusability.org/forum/?group_id=141". Grazie.C'e' stato un errore durante la codifica del tuo file. Prova a salvare il tuo file usando un'altr codifica, preferibilmente UTF-8.C'e' stato un errore durante l'apertura del file. Compila un bug report su http://scribes.sourceforge.net. Grazie.C'e' stato un errore durante il salvataggio di questo fileArabo_GrassettoLingue BalticheLingue BalticheAggiunto segnalibro alla riga %dC'e' stato un completamento di parentesiBulgaro, Macedone, Russo, SerboCanadeseImpossibile aprire %sImpossibile compiere questa operazione in modalità di sola letturaImpossibile ripetereImpossibile annullareIl testo selezionato e' stato capitalizzato.Lingue CelticheEuropa centrale ed Europa orientaleCambia i colori dell'editorCambia i settaggi dell'editorCambia il nome del file e salvaloSalva con nomeCarrattere combiato a "%s"Il testo selezionato e' stato cambiato da minuscolo in maiuscoloIl testo selezionato e' stato cambiato da maiuscolo in minuscoloCambiata la larghezza del tab a %dCodifica di carattereClicca per selzionare un nuovo colore per lo sfondo dell'editorClicca per selezionare un nuovo colo per il testo dell'editorClicca per selezionare un nuovo colore per gli elementi di sintassi del linguaggioClicca per specificare il tipo, lo stile e la dimensione del carattere da utilizzare per il testoClicca per specificare la posizione della linea verticaleClicca per specificare la larghezza della spazio da inserire con il tasto TabFinestra di dialogo chiusaDialog d'errore chiusoBarra di ricerca chiusaBarra spostamento di riga chiusaBarra di sostituzione chiusaCo_lori: Configura l'editorConfigura i colori di foreground, di background o di sintassi dell'editorIl testo selezionato e' stato copiatoImpossibile trovare la cartella dati di ScribesNuovo fileCrea, modifica o gestisci i templateIl cursore e' già all'inizio della rigaIl cursore e' già alla fine della rigaIl testo selezionato e' stato tagliatoDanese, NorvegieseRiga %d cancellataIl testo dal cursore all'inizio della riga %d e' stato cancellatoIl testo dal cursore alla fine della riga %d e' stato cancellatoDescrizioneIl controllo ortografico e' stato disabilitatoDivisione testo disattivataMostra il _margine destroModifica TemplateModifica file di testo_Carattere dell'editorAbilita la _divisione del testoIl controllo ortografico e' stato abilitatoDivisione testo attivataIl testo selezionato e' stato racchiusoIngleseEsperanto, MalteseIl file non e' stato salvato sul discoCerca solo occorrenze della stringa che corrispondo all'intera parolaCerca solo occorrenze della stringa corrispondenti per maiuscolo e minuscoloTrovata la parentesi corrispondente sulla riga %dRiga %d liberataVai ad una riga specificaGrecoEbraicoNascondi il margine destro_CorsivoIslandeseLa riga %d e' stata indentataIndentazione in corso. Attendere prego...Informazioni sull'editorGiapponeseGiapponese, Coreano, Cinese semplificatoLe righe %d e %d sono state uniteKazacoCoreanoLinguaggioElementi del linguaggioLingua e RegioneAvvia l'help browserAvvio dell'help browser in corsoEsci dal fullscreenLa riga %d ha già un segnalibroNumero di riga:Linea %d colonna %dIl file "%s" e' stato caricatoCaricamento file in corso. Attendere prego...M_aiuscolo/minuscolo_Tutta la parolaMenu per la configurazione avanzataSposta il cursore su una riga specificaIl cursore e' stato spostato sulla riga %dSpostato sul segnalibro alla riga %sNomeNessun segnalibro da rimuovere alla riga %dNon e' stato trovato alcun segnalibro da rimuovereNon sono state trvate parentesi per la selezioneNon e' stata trovata nessuna selezione da indentareNessuna corrispondenza trovataNon e' stata trovata una parentesi corrispondenteNon ci sono altre righe da unireNessun segnalibro verso cui muovereNessun paragrafo da selezionareNon hai i permessi per modificare questo file.Nessun segnalibro precedente verso cui spostarsiNessuna delle righe selezionate può essere indentataNessuna seleziona a cui cambiare il caseNessuna selezione da copiareNessuna selezione da tagliareNessuna frase da selezionareNon sono stati trovati spazi all'inizio della rigaNon sono stati trovati spazi alla fine della rigaNessun tab trovato nel testo selezionatoNessun tab trovato sulla riga %dNon c'e' testo negli appuntiNon c'e' testo da selezionare nella riga %dNessuna parola da selezionareNessunoLingue NordicheApri DocumentoApri un fileOpzioni:Il testo copiato e' stato incollatoPortogheseLa line del margine e' stata posizionata sulla colonna %dPreferenzeStampa documentoAnteprima di stampaStampa fileStampa il file correnteStampa di "%s" in corsoDocumenti PythonRaccomandato (UTF-8)RipetutoRipetiTutti i segnalibri sono stati rimossiRimosso segnalibro dalla riga &dIl completamento di parentesi e' stato rimossoRimossi gli spazi all'inizio della riga %dRimossi gli spazi all'inizio delle righe selezionateRimossi gli spazi alla fine della rigaRimossi gli spazi alla fine delle righe selezionateSpazi in rimozione. Attendere prego...S_ostituisci con:S_ostituisci tuttoSostituisci tutti i risultati della ricercaSostituisci il risultato della ricerca selezionatoTuttele occorrenze di "%s" sono state sostituite con "%s"Sostituiti i tab con gli spazi alla riga %dSostituiti i tabs con gli spazi sulle linee selezionateTab in sostituzione. Attendere prego...RussoSalva documento"%s" e' stato salvatoScribes - Editor di testoScribes e' un editor di testo per GNOMEScribes supporta l'uso di una sola opzione alla volta.Scribes, Versione: %sCerca e sostituisci testoCerca la prossima occorrenza della stringaCerca l'occorrenza precedente della stringaCerca testoSelezionaSeleziona la codifica di caratt_ereSeleziona il file da caricareSeleziona per mostrare una linea verticale che indichi il margine destroSeleziona per attivare il controllo ortograficoSeleziona per rendere in grassetto gli elementi di sintassi del linguaggioSeleziona per rendere in corsivo gli elementi di sintassi del linguaggioSeleziona per ripristinare i valori iniziali degli elementi di sintassi del linguaggioSeleziona per usare i colori di foreground e background del temaSeleziona per dividere il testo quando raggiungi il limite della finestra.Selezionati i caratteri all'interno della parentesiRiga %d selezionataParagrafo selezionatoFrase selezionataIl testo selezionato e' già capitalizzatoIl testo selezionato e' già minuscoloIl testo selezionato e' già maiuscoloParola selezionataLa selezione e' stata indentataLa selezione e' stata disindentata_Dimunuisci l'indentazione_Aumenta l'indentazioneMostra il margine destroCinese semplificatoScambiato il case del testo selezionato.Editor dei colori di sintassiEditor per i templateDocumenti di testoThaiIl tipo MIME del file che stai cercando di aprire non può essere determinato. Assicurati che si tratti di un file di testo. Tipo MIME: %sIl tipo MIME del file che stai cercando di aprire non e' di un file di testo. Tipo MIME: %sL'encoding del file che stai tentando di aprire non può essere determinato.Prova ad aprire il file con un altro encodingIl file "%s" e' apertoIl file "%s" e' aperto in modalità di sola letturaIl file che stai cercando di aprire non esiste.Il file che stai cercando di aprire non e' un file di testo.Uscito dalla modalità di sola letturaEntrato nella modalità di sola letturaCinese Tradizionale'scribes --help' per maggiori informazioni.TurcoScrivi il testo con cui vuoi sostituireScrivi il testo che vuoi cercareUcrainoAnnulatoAnnullaCinese unificatoImpossibile disindentareLa riga %d e' stata disindentataOpzione sconosciuta: '%s'Documento non salvatoUrduVietnamitaEuropa occidentaleEuropa occidentaleC'e' stato un completamento di parolaNon hai i permessi per vedere questo file.Colore di _background_Codifica di carattere:_Descrizione_Abilita il controllo ortografico_Cerca parentesi corrispondente_NomeP_rossimoColore del testo _normale_Precedente_Sostituisci_Ripristina i valori inizialiPosizione del ma_rgine destro: _Cerca:_Cerca: Larghezza della _Tabulatura: _usa il tema inizialecompletatocrea un nuovo file e lo apre con Scribesmostra questo helperrorecaricamento...apre il file in modalità di sola letturastampa la versione di Scribesscribes: %s non necessita di argomentiutilizzo: scribes [OPZIONI] [FILE] [...]scribes-0.4~r910/po/scribes.pot0000644000175000017500000020170411242100540016222 0ustar andreasandreas# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-06 18:06-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: Examples/GenericPluginExample/Foo/Trigger.py:20 msgid "Activate the holy power of foo" msgstr "" #: Examples/GenericPluginExample/Foo/Trigger.py:21 msgid "Example" msgstr "" #: GenericPlugins/About/AboutDialog.glade:7 msgid "About Scribes" msgstr "" #: GenericPlugins/About/AboutDialog.glade:22 msgid "" "Scribes is an extensible text editor for GNOME \n" "that combines simplicity with power." msgstr "" #: GenericPlugins/About/AboutDialog.glade:25 msgid "Scribes Website" msgstr "" #: GenericPlugins/About/AboutDialog.py:2 msgid "Information about Scribes" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:8 #: GenericPlugins/AdvancedConfiguration/MenuItem.py:2 msgid "Advanced Configuration" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:29 msgid "Bracket Selection Color" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:54 msgid "_Selection Color:" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:93 msgid "Template Indentation" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:109 msgid "_Use indentation settings from editor" msgstr "" #: GenericPlugins/AdvancedConfiguration/AdvancedConfigurationWindow.glade:115 msgid "" "Convert spaces to tabs, or vice versa, before expanding templates in the " "editing area. The conversion is based on indentation settings from the " "editor. Enabling this option is highly recommended.\n" msgstr "" #: GenericPlugins/AutoReplace/GUI/TreeView.py:71 msgid "Error: Abbreviation must not contain whitespace" msgstr "" #: GenericPlugins/AutoReplace/GUI/TreeView.py:72 #, python-format msgid "Error: '%s' already exists" msgstr "" #: GenericPlugins/AutoReplace/GUI/TreeView.py:192 #: GenericPlugins/EscapeQuotes/Escaper.py:28 #: GenericPlugins/EscapeQuotes/Escaper.py:73 msgid "No selection found" msgstr "" #: GenericPlugins/AutoReplace/GUI/TreeView.py:243 msgid "Abbreviation" msgstr "" #: GenericPlugins/AutoReplace/GUI/TreeView.py:256 msgid "Expanded Text" msgstr "" #: GenericPlugins/AutoReplace/GUI/Window.glade:8 #: GenericPlugins/AutoReplace/GUI/i18n.py:6 msgid "Automatic Replacement" msgstr "" #: GenericPlugins/AutoReplace/GUI/Window.glade:76 #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:79 #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:83 msgid "gtk-add" msgstr "" #: GenericPlugins/AutoReplace/GUI/Window.glade:91 #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:94 msgid "gtk-edit" msgstr "" #: GenericPlugins/AutoReplace/GUI/Window.glade:106 #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:110 #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:98 msgid "gtk-remove" msgstr "" #: GenericPlugins/AutoReplace/GUI/Window.py:2 msgid "Add, editor or remove abbreviations" msgstr "" #: GenericPlugins/AutoReplace/GUI/i18n.py:2 msgid "Auto Replace Editor" msgstr "" #: GenericPlugins/AutoReplace/GUI/i18n.py:3 msgid "_Abbreviations" msgstr "" #: GenericPlugins/AutoReplace/GUI/i18n.py:4 msgid "_Replacements" msgstr "" #: GenericPlugins/AutoReplace/GUI/i18n.py:5 #, python-format msgid "Error: '%s' is already in use. Please use another abbreviation." msgstr "" #: GenericPlugins/AutoReplace/GUI/i18n.py:7 msgid "Modify words for auto-replacement" msgstr "" #: GenericPlugins/AutoReplace/MenuItem.py:2 msgid "Autoreplace Editor" msgstr "" #: GenericPlugins/AutoReplace/TextColorer.py:2 msgid "Abbreviation highlighted" msgstr "" #: GenericPlugins/AutoReplace/TextInserter.py:2 msgid "Expanded abbreviation" msgstr "" #: GenericPlugins/AutoReplace/i18n.py:2 #: GenericPlugins/SearchSystem/ReplaceManager.py:65 #, python-format msgid "Replaced '%s' with '%s'" msgstr "" #: GenericPlugins/Bookmark/Feedback.py:3 msgid "Bookmarked lines" msgstr "" #: GenericPlugins/Bookmark/Feedback.py:34 #, python-format msgid "Marked line %s" msgstr "" #: GenericPlugins/Bookmark/Feedback.py:40 #, python-format msgid "Unmarked line %s" msgstr "" #: GenericPlugins/Bookmark/Feedback.py:46 msgid "Removed all bookmarks" msgstr "" #: GenericPlugins/Bookmark/Feedback.py:82 #, python-format msgid "Cursor on line %s" msgstr "" #: GenericPlugins/Bookmark/GUI/GUI.glade:7 msgid "Bookmarked Lines" msgstr "" #: GenericPlugins/Bookmark/Trigger.py:25 msgid "Add or remove bookmark on a line" msgstr "" #: GenericPlugins/Bookmark/Trigger.py:26 GenericPlugins/Bookmark/Trigger.py:33 #: GenericPlugins/Bookmark/Trigger.py:40 msgid "Bookmark Operations" msgstr "" #: GenericPlugins/Bookmark/Trigger.py:32 msgid "Remove all bookmarks" msgstr "" #: GenericPlugins/Bookmark/Trigger.py:39 msgid "Navigate bookmarks" msgstr "" #: GenericPlugins/BracketCompletion/Manager.py:109 msgid "Pair character completion occurred" msgstr "" #: GenericPlugins/BracketCompletion/Manager.py:128 msgid "Enclosed selected text" msgstr "" #: GenericPlugins/BracketCompletion/Manager.py:166 msgid "Removed pair character" msgstr "" #: GenericPlugins/BracketSelection/Feedback.py:4 msgid "Bracket selection" msgstr "" #: GenericPlugins/BracketSelection/Feedback.py:5 msgid "Removed last selection" msgstr "" #: GenericPlugins/BracketSelection/Feedback.py:6 msgid "Quote selection" msgstr "" #: GenericPlugins/BracketSelection/Feedback.py:7 msgid "No brackets found" msgstr "" #: GenericPlugins/BracketSelection/Trigger.py:20 msgid "Select characters inside brackets and quotes" msgstr "" #: GenericPlugins/BracketSelection/Trigger.py:21 #: GenericPlugins/Selection/Trigger.py:25 #: GenericPlugins/Selection/Trigger.py:32 #: GenericPlugins/Selection/Trigger.py:39 #: GenericPlugins/Selection/Trigger.py:46 msgid "Selection Operations" msgstr "" #: GenericPlugins/Case/CaseProcessor.py:21 #, python-format msgid "Converted '%s' to upper case" msgstr "" #: GenericPlugins/Case/CaseProcessor.py:22 #, python-format msgid "Converted '%s' to lower case" msgstr "" #: GenericPlugins/Case/CaseProcessor.py:23 #, python-format msgid "Converted '%s' to title case" msgstr "" #: GenericPlugins/Case/CaseProcessor.py:24 #, python-format msgid "Converted '%s' to swap case" msgstr "" #: GenericPlugins/Case/Marker.py:63 GenericPlugins/Paragraph/Manager.py:75 msgid "No text found" msgstr "" #: GenericPlugins/Case/PopupMenuItem.py:8 msgid "_Case" msgstr "" #: GenericPlugins/Case/PopupMenuItem.py:26 msgid "_Togglecase (alt + u)" msgstr "" #: GenericPlugins/Case/PopupMenuItem.py:27 msgid "_Titlecase (alt + shift + u)" msgstr "" #: GenericPlugins/Case/PopupMenuItem.py:28 msgid "_Swapcase (alt + shift + l)" msgstr "" #: GenericPlugins/Case/Trigger.py:24 msgid "Convert the case of text" msgstr "" #: GenericPlugins/Case/Trigger.py:25 GenericPlugins/Case/Trigger.py:32 #: GenericPlugins/Case/Trigger.py:39 msgid "Case Operations" msgstr "" #: GenericPlugins/Case/Trigger.py:31 msgid "Convert text to title case" msgstr "" #: GenericPlugins/Case/Trigger.py:38 msgid "Swap the case of text" msgstr "" #: GenericPlugins/CloseReopen/Trigger.py:20 msgid "Close current window and reopen a new one" msgstr "" #: GenericPlugins/CloseReopen/Trigger.py:21 #: GenericPlugins/DocumentBrowser/Trigger.py:22 #: GenericPlugins/DocumentSwitcher/Trigger.py:21 #: GenericPlugins/NewWindow/Trigger.py:21 #: GenericPlugins/ShortcutWindow/Trigger.py:20 msgid "Window Operations" msgstr "" #: GenericPlugins/DocumentBrowser/DocumentBrowser.glade:8 msgid "Select and Focus A Document" msgstr "" #: GenericPlugins/DocumentBrowser/TreeView.py:24 #: GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeView.py:215 msgid "_Name" msgstr "" #: GenericPlugins/DocumentBrowser/TreeView.py:25 msgid "_Type" msgstr "" #: GenericPlugins/DocumentBrowser/TreeView.py:26 msgid "_Path" msgstr "" #: GenericPlugins/DocumentBrowser/Trigger.py:21 msgid "Focus any file window" msgstr "" #: GenericPlugins/DocumentBrowser/Window.py:33 #: GenericPlugins/DocumentBrowser/Window.py:39 msgid "Select document" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:7 msgid "Document Information" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:28 msgid "Characters:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:40 msgid "Words:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:52 msgid "Lines:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:64 msgid "Accessed:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:76 msgid "Modified:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:88 msgid "MIME type:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:100 msgid "Location:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:112 msgid "Size:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:124 msgid "Type:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:136 msgid "Name:" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:144 msgid "statistics.py" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:156 msgid "Python script" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:170 msgid "1.1 KB (1084 bytes)" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:184 msgid "/home/goldenmyst/Desktop" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:199 msgid "text/x-python" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:213 msgid "113" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:227 msgid "568" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:241 msgid "1256" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:255 msgid "Thu 24 Jul 2008 06:50:22 PM EDT" msgstr "" #: GenericPlugins/DocumentInformation/DocumentStatistics.glade:269 msgid "Thu 24 Jul 2008 06:50:14 PM EDT" msgstr "" #: GenericPlugins/DocumentInformation/SizeLabel.py:20 msgid " bytes" msgstr "" #: GenericPlugins/DocumentInformation/Trigger.py:20 msgid "Show document statistics" msgstr "" #: GenericPlugins/DocumentInformation/Trigger.py:21 #: GenericPlugins/DrawWhitespace/Trigger.py:23 #: GenericPlugins/PreferencesGUI/Trigger.py:22 #: GenericPlugins/TemplateEditor/Trigger.py:21 #: GenericPlugins/ThemeSelector/Trigger.py:21 #: GenericPlugins/TriggerArea/Trigger.py:24 #: GenericPlugins/TriggerArea/Trigger.py:32 #: GenericPlugins/UserGuide/Trigger.py:21 msgid "Miscellaneous Operations" msgstr "" #: GenericPlugins/DocumentInformation/Window.py:2 msgid "Document Statistics" msgstr "" #: GenericPlugins/DocumentSwitcher/Trigger.py:20 msgid "Switch and focus file windows" msgstr "" #: GenericPlugins/DrawWhitespace/Trigger.py:22 msgid "Show or hide white spaces" msgstr "" #: GenericPlugins/EscapeQuotes/Escaper.py:34 #: GenericPlugins/EscapeQuotes/Escaper.py:79 msgid "No selected text found" msgstr "" #: GenericPlugins/EscapeQuotes/Escaper.py:65 #, python-format msgid "Escaped %d quote(s) in selected text" msgstr "" #: GenericPlugins/EscapeQuotes/Escaper.py:100 #, python-format msgid "Unescaped %d quote(s) in selected text" msgstr "" #: GenericPlugins/EscapeQuotes/Trigger.py:22 msgid "Escape quotes" msgstr "" #: GenericPlugins/EscapeQuotes/Trigger.py:23 #: GenericPlugins/EscapeQuotes/Trigger.py:30 #: GenericPlugins/MultiEdit/Trigger.py:19 #: GenericPlugins/Paragraph/Trigger.py:38 GenericPlugins/Spaces/Trigger.py:24 #: GenericPlugins/Spaces/Trigger.py:31 GenericPlugins/Spaces/Trigger.py:38 #: GenericPlugins/UndoRedo/Trigger.py:23 GenericPlugins/UndoRedo/Trigger.py:30 #: GenericPlugins/UndoRedo/Trigger.py:37 msgid "Text Operations" msgstr "" #: GenericPlugins/EscapeQuotes/Trigger.py:29 msgid "Unescape quotes" msgstr "" #: GenericPlugins/GotoBar/GUI/Bar.py:2 msgid "Move cursor to a specific line" msgstr "" #: GenericPlugins/GotoBar/GUI/GotoBar.glade:19 msgid "Line _Number:" msgstr "" #: GenericPlugins/GotoBar/GUI/GotoBar.glade:52 msgid "of 1" msgstr "" #: GenericPlugins/GotoBar/GUI/Label.py:26 #, python-format msgid "of %d" msgstr "" #: GenericPlugins/GotoBar/LineJumper.py:28 #, python-format msgid "Moved view to line %d" msgstr "" #: GenericPlugins/GotoBar/Trigger.py:21 msgid "Jump to a specific line" msgstr "" #: GenericPlugins/GotoBar/Trigger.py:22 #: GenericPlugins/MatchingBracket/Trigger.py:21 #: GenericPlugins/Paragraph/Trigger.py:24 #: GenericPlugins/Paragraph/Trigger.py:31 #: GenericPlugins/ScrollNavigation/Trigger.py:23 #: GenericPlugins/ScrollNavigation/Trigger.py:30 #: GenericPlugins/ScrollNavigation/Trigger.py:37 #: GenericPlugins/SearchSystem/Trigger.py:24 #: GenericPlugins/SearchSystem/Trigger.py:31 #: GenericPlugins/SelectionSearcher/Trigger.py:24 #: GenericPlugins/SelectionSearcher/Trigger.py:32 msgid "Navigation Operations" msgstr "" #: GenericPlugins/Indent/IndentationProcessor.py:71 msgid "Indented line(s)" msgstr "" #: GenericPlugins/Indent/IndentationProcessor.py:77 msgid "Dedented line(s)" msgstr "" #: GenericPlugins/Indent/PopupMenuItem.py:8 msgid "In_dentation" msgstr "" #: GenericPlugins/Indent/PopupMenuItem.py:22 msgid "Shift _Right (ctrl + t)" msgstr "" #: GenericPlugins/Indent/PopupMenuItem.py:23 msgid "Shift _Left (ctrl + shift + t)" msgstr "" #: GenericPlugins/Indent/Trigger.py:22 msgid "Indent line or selected lines" msgstr "" #: GenericPlugins/Indent/Trigger.py:23 GenericPlugins/Indent/Trigger.py:30 #: GenericPlugins/LineEndings/Trigger.py:24 #: GenericPlugins/LineEndings/Trigger.py:31 #: GenericPlugins/LineEndings/Trigger.py:38 GenericPlugins/Lines/Trigger.py:29 #: GenericPlugins/Lines/Trigger.py:36 GenericPlugins/Lines/Trigger.py:43 #: GenericPlugins/Lines/Trigger.py:50 GenericPlugins/Lines/Trigger.py:57 #: GenericPlugins/Lines/Trigger.py:64 GenericPlugins/Lines/Trigger.py:71 #: LanguagePlugins/HashComments/Trigger.py:19 msgid "Line Operations" msgstr "" #: GenericPlugins/Indent/Trigger.py:29 msgid "Unindent line or selected lines" msgstr "" #: GenericPlugins/LineEndings/Converter.py:48 msgid "Converted line endings to UNIX" msgstr "" #: GenericPlugins/LineEndings/Converter.py:54 msgid "Converted line endings to WINDOWS" msgstr "" #: GenericPlugins/LineEndings/Converter.py:60 msgid "Converted line ends to MAC" msgstr "" #: GenericPlugins/LineEndings/PopupMenuItem.py:8 msgid "Line En_dings" msgstr "" #: GenericPlugins/LineEndings/PopupMenuItem.py:21 msgid "Convert to _Unix (alt + 1)" msgstr "" #: GenericPlugins/LineEndings/PopupMenuItem.py:22 msgid "Convert to _Mac (alt + 2)" msgstr "" #: GenericPlugins/LineEndings/PopupMenuItem.py:23 msgid "Convert to _Windows (alt + 3)" msgstr "" #: GenericPlugins/LineEndings/Trigger.py:23 msgid "Convert to unix line endings" msgstr "" #: GenericPlugins/LineEndings/Trigger.py:30 msgid "Convert to mac line endings" msgstr "" #: GenericPlugins/LineEndings/Trigger.py:37 msgid "Convert to windows line endings" msgstr "" #: GenericPlugins/Lines/LineOperator.py:60 msgid "Joined current and next lines" msgstr "" #: GenericPlugins/Lines/LineOperator.py:62 msgid "Cannot join lines" msgstr "" #: GenericPlugins/Lines/LineOperator.py:64 #: GenericPlugins/Lines/LineOperator.py:77 msgid "No lines to join" msgstr "" #: GenericPlugins/Lines/LineOperator.py:75 msgid "Join selected lines" msgstr "" #: GenericPlugins/Lines/LineOperator.py:106 msgid "Duplicated line" msgstr "" #: GenericPlugins/Lines/LineOperator.py:124 #: GenericPlugins/Lines/LineOperator.py:141 #, python-format msgid "Freed line %d" msgstr "" #: GenericPlugins/Lines/LineOperator.py:157 msgid "Deleted text to end of line" msgstr "" #: GenericPlugins/Lines/LineOperator.py:165 msgid "Deleted text to start of line" msgstr "" #: GenericPlugins/Lines/LineOperator.py:181 #, python-format msgid "Deleted line %d" msgstr "" #: GenericPlugins/Lines/LineOperator.py:195 msgid "Deleted selected lines" msgstr "" #: GenericPlugins/Lines/LineOperator.py:205 #, python-format msgid "Deleted selection on line %d" msgstr "" #: GenericPlugins/Lines/LineOperator.py:221 msgid "Deleted last line" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:8 msgid "_Lines" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:27 msgid "_Join Line (alt + j)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:28 msgid "D_uplicate Line (ctrl + u)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:29 msgid "_Delete Line (alt + d)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:30 msgid "Free Line _Below (alt + o)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:31 msgid "Free Line _Above (alt + shift + o)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:32 msgid "Delete Cursor to Line _End (alt + End)" msgstr "" #: GenericPlugins/Lines/PopupMenuItem.py:33 msgid "Delete _Cursor to Line Begin (alt + Home)" msgstr "" #: GenericPlugins/Lines/Trigger.py:28 msgid "Delete line or selected lines" msgstr "" #: GenericPlugins/Lines/Trigger.py:35 msgid "Join current and next line(s)" msgstr "" #: GenericPlugins/Lines/Trigger.py:42 msgid "Free current line" msgstr "" #: GenericPlugins/Lines/Trigger.py:49 msgid "Free next line" msgstr "" #: GenericPlugins/Lines/Trigger.py:56 msgid "Delete text from cursor to end of line" msgstr "" #: GenericPlugins/Lines/Trigger.py:63 msgid "Delete text from cursor to start of line" msgstr "" #: GenericPlugins/Lines/Trigger.py:70 msgid "Duplicate line or selected lines" msgstr "" #: GenericPlugins/MatchingBracket/Manager.py:24 msgid "Moved cursor to matching bracket" msgstr "" #: GenericPlugins/MatchingBracket/Manager.py:27 msgid "No matching bracket found" msgstr "" #: GenericPlugins/MatchingBracket/Trigger.py:20 msgid "Move cursor to matching bracket" msgstr "" #: GenericPlugins/MultiEdit/FeedbackManager.py:4 msgid "Multi Editing Mode" msgstr "" #: GenericPlugins/MultiEdit/FeedbackManager.py:39 msgid "Disabled multi editing mode" msgstr "" #: GenericPlugins/MultiEdit/FeedbackManager.py:45 msgid "New edit point" msgstr "" #: GenericPlugins/MultiEdit/FeedbackManager.py:50 msgid "Removed edit point" msgstr "" #: GenericPlugins/MultiEdit/FeedbackManager.py:55 msgid "ERROR: No edit points found" msgstr "" #: GenericPlugins/MultiEdit/Trigger.py:18 msgid "Enable multi edit mode" msgstr "" #: GenericPlugins/NewWindow/Trigger.py:20 #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/NewToolButton.py:36 #: SCRIBES/i18n.py:45 msgid "Open a new window" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/FeedbackLabel.py:70 msgid "Validating please wait..." msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/FeedbackLabel.py:74 msgid "Creating file please wait..." msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/FileCreator.py:33 msgid "Error: Cannot create new file." msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/InfoLabel.py:2 #, python-format msgid "Create a new file in %s and open it." msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade:7 msgid "Open New File" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade:41 msgid "Create a new file in /home/meek/Desktop and open it" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade:60 msgid "_Filename:" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade:95 msgid "processing please wait..." msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/NewFileDialog.glade:113 msgid "gtk-new" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/Validator.py:40 msgid "Error: Invalid file name" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/Validator.py:42 msgid "Error: File already exists" msgstr "" #: GenericPlugins/OpenFile/NewFileDialogGUI/Window.py:30 #: GenericPlugins/OpenFile/NewFileDialogGUI/Window.py:35 msgid "New Document" msgstr "" #: GenericPlugins/OpenFile/OpenDialogGUI/GUI/GUI.glade:8 #: GenericPlugins/QuickOpen/GUI/GUI.glade:7 msgid "Open Files" msgstr "" #: GenericPlugins/OpenFile/OpenDialogGUI/GUI/GUI.glade:39 #: GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade:71 #: GenericPlugins/SaveDialog/GUI/GUI.glade:39 #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:90 #: data/EncodingErrorWindow.glade:90 msgid "Character _Encoding:" msgstr "" #: GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Displayer.py:26 #: GenericPlugins/OpenFile/OpenDialogGUI/GUI/Window/Displayer.py:33 #: GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade:9 #: GenericPlugins/OpenFile/RemoteDialogGUI/Window.py:30 #: GenericPlugins/OpenFile/RemoteDialogGUI/Window.py:35 msgid "Open Document" msgstr "" #: GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade:30 msgid "Enter the location of the (URI) you _would like to open:" msgstr "" #: GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade:110 #: GenericPlugins/SaveDialog/GUI/GUI.glade:74 #: GenericPlugins/TemplateEditor/EditorGUI/GUI.glade:131 #: GenericPlugins/TemplateEditor/Export/GUI/GUI.glade:41 #: GenericPlugins/TemplateEditor/Import/GUI/GUI.glade:42 #: GenericPlugins/ThemeSelector/AddSchemesGUI/Dialog.glade:37 msgid "gtk-cancel" msgstr "" #: GenericPlugins/OpenFile/RemoteDialogGUI/RemoteDialog.glade:124 #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:145 #: data/EncodingErrorWindow.glade:144 msgid "gtk-open" msgstr "" #: GenericPlugins/OpenFile/Trigger.py:23 #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/OpenToolButton.py:40 msgid "Open a new file" msgstr "" #: GenericPlugins/OpenFile/Trigger.py:24 GenericPlugins/OpenFile/Trigger.py:31 #: GenericPlugins/OpenFile/Trigger.py:38 GenericPlugins/Printing/Trigger.py:22 #: GenericPlugins/QuickOpen/Trigger.py:21 #: GenericPlugins/SaveDialog/Trigger.py:22 #: GenericPlugins/SaveFile/Trigger.py:21 msgid "File Operations" msgstr "" #: GenericPlugins/OpenFile/Trigger.py:30 msgid "Open a file at a remote location" msgstr "" #: GenericPlugins/OpenFile/Trigger.py:37 msgid "Create a new file and open it" msgstr "" #: GenericPlugins/Paragraph/Manager.py:25 msgid "Moved to previous paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:28 msgid "No previous paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:43 msgid "Moved to next paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:46 msgid "No next paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:56 #: GenericPlugins/Selection/Selector.py:99 msgid "Selected paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:59 #: GenericPlugins/Paragraph/Manager.py:68 msgid "No paragraph found" msgstr "" #: GenericPlugins/Paragraph/Manager.py:82 msgid "Reflowed paragraph" msgstr "" #: GenericPlugins/Paragraph/Manager.py:213 #: LanguagePlugins/HashComments/i18n.py:6 msgid "Editor is in readonly mode" msgstr "" #: GenericPlugins/Paragraph/PopupMenuItem.py:8 msgid "Paragraph" msgstr "" #: GenericPlugins/Paragraph/PopupMenuItem.py:23 msgid "Previous Paragraph (alt + Right)" msgstr "" #: GenericPlugins/Paragraph/PopupMenuItem.py:24 msgid "Next Paragraph (alt + Left)" msgstr "" #: GenericPlugins/Paragraph/PopupMenuItem.py:25 msgid "Reflow Paragraph (alt + q)" msgstr "" #: GenericPlugins/Paragraph/PopupMenuItem.py:26 msgid "Select Paragraph (alt + p)" msgstr "" #: GenericPlugins/Paragraph/Trigger.py:23 msgid "Move cursor to next paragraph" msgstr "" #: GenericPlugins/Paragraph/Trigger.py:30 msgid "Move cursor to previous paragraph" msgstr "" #: GenericPlugins/Paragraph/Trigger.py:37 msgid "Reflow a paragraph" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:7 msgid "Preferences" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:30 msgid "Document _Type:" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:73 msgid "Font" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:92 msgid "_Font:" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:128 msgid "Tab Stops" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:148 msgid "_Tab Width:" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:194 msgid "_Use spaces instead of tabs" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:213 msgid "Text Wrapping" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:227 msgid "Enable text _wrapping" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:245 msgid "Right Margin" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:259 msgid "_Show right margin" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:285 msgid "_Right margin postion:" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:326 msgid "Spell Checking" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:340 msgid "_Enable spell checking" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/GUI.glade:382 msgid "_Reset to Default" msgstr "" #: GenericPlugins/PreferencesGUI/GUI/LanguageComboBox/ModelUpdater.py:30 msgid "Plain Text" msgstr "" #: GenericPlugins/PreferencesGUI/Trigger.py:21 msgid "Show preferences window" msgstr "" #: GenericPlugins/Printing/Feedback.py:7 msgid "Cancelled print operation" msgstr "" #: GenericPlugins/Printing/Feedback.py:8 msgid "Print file" msgstr "" #: GenericPlugins/Printing/Feedback.py:11 msgid "Initializing print operation" msgstr "" #: GenericPlugins/Printing/Feedback.py:12 msgid "Preparing data for printing" msgstr "" #: GenericPlugins/Printing/Feedback.py:13 msgid "Generating data for printing" msgstr "" #: GenericPlugins/Printing/Feedback.py:14 msgid "Sending file to printing" msgstr "" #: GenericPlugins/Printing/Feedback.py:15 msgid "Finished printing file" msgstr "" #: GenericPlugins/Printing/Feedback.py:16 msgid "Aborted print operation" msgstr "" #: GenericPlugins/Printing/Trigger.py:21 SCRIBES/i18n.py:48 msgid "Print the current file" msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:2 #: GenericPlugins/QuickOpen/Trigger.py:20 msgid "Open files quickly" msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:44 msgid "searching please wait..." msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:52 #, python-format msgid "%s matches found" msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:56 msgid "No match found" msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:63 msgid "" "updating search path please wait..." msgstr "" #: GenericPlugins/QuickOpen/Feedback.py:70 #, python-format msgid "%s is the current search path" msgstr "" #: GenericPlugins/QuickOpen/GUI/GUI.glade:33 msgid "_Search for: " msgstr "" #: GenericPlugins/QuickOpen/GUI/GUI.glade:98 msgid "Feedback goes here..." msgstr "" #: GenericPlugins/SaveDialog/GUI/FeedbackUpdater.py:2 msgid "Rename Document" msgstr "" #: GenericPlugins/SaveDialog/GUI/FileChooser/URISelector.py:29 #: SCRIBES/i18n.py:10 data/Editor.glade:7 msgid "Unsaved Document" msgstr "" #: GenericPlugins/SaveDialog/GUI/GUI.glade:8 msgid "Rename File" msgstr "" #: GenericPlugins/SaveDialog/GUI/GUI.glade:90 #: GenericPlugins/TemplateEditor/EditorGUI/GUI.glade:144 msgid "gtk-save" msgstr "" #: GenericPlugins/SaveDialog/Trigger.py:21 #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SaveToolButton.py:36 #: SCRIBES/i18n.py:47 msgid "Rename the current file" msgstr "" #: GenericPlugins/SaveFile/Trigger.py:20 msgid "Save current file" msgstr "" #: GenericPlugins/ScrollNavigation/Manager.py:47 msgid "Centered current line" msgstr "" #: GenericPlugins/ScrollNavigation/Trigger.py:22 msgid "Scroll editing area up" msgstr "" #: GenericPlugins/ScrollNavigation/Trigger.py:29 msgid "Scroll editing area down" msgstr "" #: GenericPlugins/ScrollNavigation/Trigger.py:36 msgid "Move cursor line to center" msgstr "" #: GenericPlugins/SearchSystem/GUI/Bar.py:2 #: GenericPlugins/SearchSystem/Trigger.py:23 SCRIBES/i18n.py:51 msgid "Search for text" msgstr "" #: GenericPlugins/SearchSystem/GUI/ComboBox.py:2 msgid "Default" msgstr "" #: GenericPlugins/SearchSystem/GUI/ComboBox.py:2 msgid "Regular Expression" msgstr "" #: GenericPlugins/SearchSystem/GUI/ComboBox.py:3 msgid "Find As You Type" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:27 msgid "Alt+W" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:40 msgid "Match _Word" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:88 msgid "_Search:" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:233 msgid "_Mode:" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:261 msgid "_Replace:" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:304 msgid "Repla_ce" msgstr "" #: GenericPlugins/SearchSystem/GUI/FindBar.glade:322 msgid "Replace _All" msgstr "" #: GenericPlugins/SearchSystem/GUI/MenuComboBox.py:2 msgid "Normal" msgstr "" #: GenericPlugins/SearchSystem/GUI/MenuComboBox.py:2 msgid "Forward" msgstr "" #: GenericPlugins/SearchSystem/GUI/MenuComboBox.py:3 msgid "Backward" msgstr "" #: GenericPlugins/SearchSystem/MatchIndexer.py:46 #: GenericPlugins/SelectionSearcher/MatchIndexer.py:39 #, python-format msgid "Match %d of %d" msgstr "" #: GenericPlugins/SearchSystem/PatternCreator.py:42 msgid "ERROR: Empty search string" msgstr "" #: GenericPlugins/SearchSystem/ReplaceManager.py:76 #, python-format msgid "Replaced all occurrences of '%s' with '%s'" msgstr "" #: GenericPlugins/SearchSystem/Searcher.py:2 msgid "No matches found" msgstr "" #: GenericPlugins/SearchSystem/Trigger.py:30 SCRIBES/i18n.py:52 msgid "Search for and replace text" msgstr "" #: GenericPlugins/Selection/PopupMenuItem.py:8 msgid "Selection" msgstr "" #: GenericPlugins/Selection/PopupMenuItem.py:37 msgid "Select word (alt + w)" msgstr "" #: GenericPlugins/Selection/PopupMenuItem.py:38 msgid "Select line (alt + l)" msgstr "" #: GenericPlugins/Selection/PopupMenuItem.py:39 msgid "Select sentence (alt + s)" msgstr "" #: GenericPlugins/Selection/PopupMenuItem.py:40 msgid "Select paragraph (alt + p)" msgstr "" #: GenericPlugins/Selection/Selector.py:38 #, python-format msgid "Selected word on line %d" msgstr "" #: GenericPlugins/Selection/Selector.py:41 msgid "No word to select" msgstr "" #: GenericPlugins/Selection/Selector.py:59 #, python-format msgid "Selected statement on line %d" msgstr "" #: GenericPlugins/Selection/Selector.py:62 #: GenericPlugins/Selection/Selector.py:78 #: GenericPlugins/Selection/Selector.py:102 msgid "No text to select" msgstr "" #: GenericPlugins/Selection/Selector.py:75 #, python-format msgid "Selected line %d" msgstr "" #: GenericPlugins/Selection/Trigger.py:24 msgid "Select current word" msgstr "" #: GenericPlugins/Selection/Trigger.py:31 msgid "Select current statement" msgstr "" #: GenericPlugins/Selection/Trigger.py:38 msgid "Select current line" msgstr "" #: GenericPlugins/Selection/Trigger.py:45 msgid "Select current paragraph" msgstr "" #: GenericPlugins/SelectionSearcher/MatchIndexer.py:44 msgid "Removed selection highlights" msgstr "" #: GenericPlugins/SelectionSearcher/MatchNavigator.py:45 msgid "No other matches found" msgstr "" #: GenericPlugins/SelectionSearcher/PatternCreator.py:39 msgid "ERROR: Search string not found" msgstr "" #: GenericPlugins/SelectionSearcher/Trigger.py:23 msgid "Navigate to next highlighted match" msgstr "" #: GenericPlugins/SelectionSearcher/Trigger.py:31 msgid "Navigation to previous highlighted match" msgstr "" #: GenericPlugins/ShortcutWindow/Trigger.py:19 msgid "Show Shortcut Window" msgstr "" #: GenericPlugins/Spaces/PopupMenuItem.py:8 msgid "S_paces" msgstr "" #: GenericPlugins/Spaces/PopupMenuItem.py:23 msgid "_Tabs to Spaces (alt+shift+t)" msgstr "" #: GenericPlugins/Spaces/PopupMenuItem.py:24 msgid "_Spaces to Tabs (alt+t)" msgstr "" #: GenericPlugins/Spaces/PopupMenuItem.py:25 msgid "_Remove Trailing Spaces (alt+r)" msgstr "" #: GenericPlugins/Spaces/SpaceProcessor.py:47 msgid "Converted spaces to tabs" msgstr "" #: GenericPlugins/Spaces/SpaceProcessor.py:47 msgid "Converted tabs to spaces" msgstr "" #: GenericPlugins/Spaces/SpaceProcessor.py:71 msgid "Removed trailing spaces" msgstr "" #: GenericPlugins/Spaces/Trigger.py:23 msgid "Convert spaces to tabs" msgstr "" #: GenericPlugins/Spaces/Trigger.py:30 msgid "Convert tabs to spaces" msgstr "" #: GenericPlugins/Spaces/Trigger.py:37 msgid "Remove trailing spaces" msgstr "" #: GenericPlugins/TemplateEditor/EditorGUI/GUI.glade:76 msgid "_Template:" msgstr "" #: GenericPlugins/TemplateEditor/EditorGUI/GUI.glade:92 msgid "_Description:" msgstr "" #: GenericPlugins/TemplateEditor/EditorGUI/GUI.glade:109 msgid "_Name:" msgstr "" #: GenericPlugins/TemplateEditor/EditorGUI/Window.py:75 msgid "Add Template" msgstr "" #: GenericPlugins/TemplateEditor/EditorGUI/Window.py:79 msgid "Edit Template" msgstr "" #: GenericPlugins/TemplateEditor/Export/GUI/FileChooser.py:22 #: GenericPlugins/TemplateEditor/Import/GUI/FileChooser.py:24 msgid "Template Files" msgstr "" #: GenericPlugins/TemplateEditor/Export/GUI/GUI.glade:8 msgid "Export Templates" msgstr "" #: GenericPlugins/TemplateEditor/Export/GUI/GUI.glade:58 #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:142 msgid "E_xport" msgstr "" #: GenericPlugins/TemplateEditor/Import/GUI/GUI.glade:7 msgid "Import Templates" msgstr "" #: GenericPlugins/TemplateEditor/Import/GUI/GUI.glade:79 #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:126 msgid "I_mport" msgstr "" #: GenericPlugins/TemplateEditor/Import/TemplateDataValidator.py:2 msgid "ERROR: No valid templates found" msgstr "" #: GenericPlugins/TemplateEditor/Import/XMLTemplateValidator.py:2 msgid "ERROR: No valid template files found" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/DescriptionTreeView.py:225 msgid "_Description" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:7 #: GenericPlugins/TemplateEditor/MenuItem.py:16 msgid "Template Editor" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:78 msgid "Add a new template" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:93 msgid "Edit selected template" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:109 msgid "Remove selected templates" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:125 msgid "Import templates from a valid template file" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:141 msgid "Export templates to a file." msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:157 msgid "Read more about templates in user guide" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:158 msgid "_Help" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:210 msgid "Download Templates from" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/GUI.glade:225 msgid "here" msgstr "" #: GenericPlugins/TemplateEditor/MainGUI/LanguageTreeView.py:108 msgid "Language" msgstr "" #: GenericPlugins/TemplateEditor/Trigger.py:20 msgid "Manage dynamic templates or snippets" msgstr "" #: GenericPlugins/ThemeSelector/AddSchemesGUI/Dialog.glade:8 msgid "Add Color Theme" msgstr "" #: GenericPlugins/ThemeSelector/AddSchemesGUI/Dialog.glade:69 msgid "A_dd Scheme" msgstr "" #: GenericPlugins/ThemeSelector/AddSchemesGUI/FileChooser.py:26 msgid "Color Scheme Files" msgstr "" #: GenericPlugins/ThemeSelector/MenuItem.py:16 msgid "Theme Selector" msgstr "" #: GenericPlugins/ThemeSelector/SchemeFileValidator.py:34 msgid "No valid scheme file found" msgstr "" #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:9 msgid "Syntax Color Themes" msgstr "" #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:60 msgid "label" msgstr "" #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:82 msgid "Add new themes" msgstr "" #: GenericPlugins/ThemeSelector/SyntaxColorThemes.glade:97 msgid "Remove selected theme" msgstr "" #: GenericPlugins/ThemeSelector/TreeView.py:2 msgid "ERROR: No selection found" msgstr "" #: GenericPlugins/ThemeSelector/TreeView.py:107 msgid "ERROR: Cannot remove builtin scheme." msgstr "" #: GenericPlugins/ThemeSelector/Trigger.py:20 msgid "Manage themes" msgstr "" #: GenericPlugins/TriggerArea/GUI/GUI.glade:7 msgid "Customize Trigger Area" msgstr "" #: GenericPlugins/TriggerArea/GUI/GUI.glade:34 msgid "_Choose color of trigger area:" msgstr "" #: GenericPlugins/TriggerArea/GUI/GUI.glade:67 msgid "_Position trigger area at:" msgstr "" #: GenericPlugins/TriggerArea/GUI/GUI.glade:82 msgid "_Make the trigger area:" msgstr "" #: GenericPlugins/TriggerArea/MenuItem.py:18 msgid "Trigger Area" msgstr "" #: GenericPlugins/TriggerArea/Trigger.py:23 msgid "Show trigger area configuration window" msgstr "" #: GenericPlugins/TriggerArea/Trigger.py:31 msgid "Show editor's full view" msgstr "" #: GenericPlugins/UndoRedo/Trigger.py:22 #: SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py:43 #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/UndoToolButton.py:44 #: SCRIBES/i18n.py:49 msgid "Undo last action" msgstr "" #: GenericPlugins/UndoRedo/Trigger.py:29 GenericPlugins/UndoRedo/Trigger.py:36 #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RedoToolButton.py:42 msgid "Redo last action" msgstr "" #: GenericPlugins/UserGuide/Trigger.py:20 msgid "Show user guide" msgstr "" #: LanguagePlugins/HashComments/Trigger.py:18 msgid "(Un)comment line or selected lines" msgstr "" #: LanguagePlugins/HashComments/i18n.py:2 msgid "Commented selected lines" msgstr "" #: LanguagePlugins/HashComments/i18n.py:3 #, python-format msgid "Commented line %d" msgstr "" #: LanguagePlugins/HashComments/i18n.py:4 msgid "Uncommented selected lines" msgstr "" #: LanguagePlugins/HashComments/i18n.py:5 #, python-format msgid "Uncommented line %d" msgstr "" #: LanguagePlugins/JavaScriptComment/FeedbackManager.py:4 msgid "please wait..." msgstr "" #: LanguagePlugins/JavaScriptComment/FeedbackManager.py:5 #, python-format msgid "Commented line %s" msgstr "" #: LanguagePlugins/JavaScriptComment/FeedbackManager.py:6 msgid "Commented lines" msgstr "" #: LanguagePlugins/JavaScriptComment/FeedbackManager.py:7 #, python-format msgid "Uncommented line %s" msgstr "" #: LanguagePlugins/JavaScriptComment/FeedbackManager.py:8 msgid "Uncommented lines" msgstr "" #: LanguagePlugins/JavaScriptComment/Trigger.py:20 msgid "Toggle JavaScript comment" msgstr "" #: LanguagePlugins/JavaScriptComment/Trigger.py:21 msgid "JavaScript Operations" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:23 msgid "Move cursor to previous block" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:24 #: LanguagePlugins/PythonNavigationSelection/Trigger.py:31 #: LanguagePlugins/PythonNavigationSelection/Trigger.py:38 #: LanguagePlugins/PythonNavigationSelection/Trigger.py:45 #: LanguagePlugins/PythonNavigationSelection/Trigger.py:52 #: LanguagePlugins/PythonNavigationSelection/Trigger.py:59 #: LanguagePlugins/PythonSymbolBrowser/Trigger.py:20 #: LanguagePlugins/PythonSyntaxErrorChecker/Trigger.py:20 msgid "Python" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:30 msgid "Move cursor to next block" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:37 msgid "Select a block of code" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:44 msgid "Move cursor to end of block" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:51 msgid "Select function or method" msgstr "" #: LanguagePlugins/PythonNavigationSelection/Trigger.py:58 msgid "Select class" msgstr "" #: LanguagePlugins/PythonSymbolBrowser/SymbolBrowser.glade:7 msgid "Classes and Functions" msgstr "" #: LanguagePlugins/PythonSymbolBrowser/Trigger.py:19 msgid "Show classes, methods and functions" msgstr "" #: LanguagePlugins/PythonSyntaxErrorChecker/Manager.py:16 msgid "Syntax error on line " msgstr "" #: LanguagePlugins/PythonSyntaxErrorChecker/Manager.py:25 msgid "No syntax errors found" msgstr "" #: LanguagePlugins/PythonSyntaxErrorChecker/Trigger.py:19 msgid "Check for syntax errors" msgstr "" #: LanguagePlugins/zencoding/GUI/GUI.glade:32 msgid "Zencoding _Abbreviation:" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:30 msgid "Add or remove comments in most web languages" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:31 #: LanguagePlugins/zencoding/Trigger.py:39 #: LanguagePlugins/zencoding/Trigger.py:47 #: LanguagePlugins/zencoding/Trigger.py:55 #: LanguagePlugins/zencoding/Trigger.py:63 #: LanguagePlugins/zencoding/Trigger.py:71 #: LanguagePlugins/zencoding/Trigger.py:79 #: LanguagePlugins/zencoding/Trigger.py:87 #: LanguagePlugins/zencoding/Trigger.py:95 #: LanguagePlugins/zencoding/Trigger.py:103 msgid "Markup Operations" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:38 msgid "Expand markup abbreviations" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:46 msgid "Move cursor to next edit point" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:54 msgid "Move cursor to previous edit point" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:62 msgid "Remove a tag" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:70 msgid "Select inner tag's content" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:78 msgid "Select outer tag's content" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:86 msgid "Toggle between single and double tag" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:94 msgid "Merge lines" msgstr "" #: LanguagePlugins/zencoding/Trigger.py:102 msgid "Wrap with abbreviation" msgstr "" #: SCRIBES/CommandLineParser.py:13 msgid "usage: %prog [OPTION...] [FILE...]" msgstr "" #: SCRIBES/CommandLineParser.py:14 msgid "" "%prog is a text editor for GNOME.\n" "\n" " http://scribes.sf.net/" msgstr "" #: SCRIBES/CommandLineParser.py:30 msgid "display the version of Scribes currently running" msgstr "" #: SCRIBES/CommandLineParser.py:34 msgid "display detailed information about Scribes" msgstr "" #: SCRIBES/CommandLineParser.py:38 msgid "create a new file and open the file in Scribes" msgstr "" #: SCRIBES/CommandLineParser.py:42 msgid "open file(s) with specified encoding" msgstr "" #: SCRIBES/CommandLineParser.py:46 msgid "open file(s) in readonly mode" msgstr "" #: SCRIBES/DialogFilters.py:13 SCRIBES/i18n.py:16 msgid "Text Documents" msgstr "" #: SCRIBES/DialogFilters.py:14 SCRIBES/i18n.py:15 msgid "Python Documents" msgstr "" #: SCRIBES/DialogFilters.py:15 SCRIBES/i18n.py:219 msgid "Ruby Documents" msgstr "" #: SCRIBES/DialogFilters.py:16 SCRIBES/i18n.py:220 msgid "Perl Documents" msgstr "" #: SCRIBES/DialogFilters.py:17 SCRIBES/i18n.py:221 msgid "C Documents" msgstr "" #: SCRIBES/DialogFilters.py:18 SCRIBES/i18n.py:222 msgid "C++ Documents" msgstr "" #: SCRIBES/DialogFilters.py:19 SCRIBES/i18n.py:223 msgid "C# Documents" msgstr "" #: SCRIBES/DialogFilters.py:20 SCRIBES/i18n.py:224 msgid "Java Documents" msgstr "" #: SCRIBES/DialogFilters.py:21 SCRIBES/i18n.py:225 msgid "PHP Documents" msgstr "" #: SCRIBES/DialogFilters.py:22 SCRIBES/i18n.py:226 msgid "HTML Documents" msgstr "" #: SCRIBES/DialogFilters.py:23 SCRIBES/i18n.py:227 msgid "XML Documents" msgstr "" #: SCRIBES/DialogFilters.py:24 SCRIBES/i18n.py:228 msgid "Haskell Documents" msgstr "" #: SCRIBES/DialogFilters.py:25 SCRIBES/i18n.py:229 msgid "Scheme Documents" msgstr "" #: SCRIBES/DialogFilters.py:26 SCRIBES/i18n.py:14 msgid "All Documents" msgstr "" #: SCRIBES/Editor.py:108 msgid "Launching user guide" msgstr "" #: SCRIBES/Editor.py:108 msgid "Failed to launch user guide" msgstr "" #: SCRIBES/EncodingSystem/ComboBoxData/Generator.py:32 msgid "Recommended" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:9 #: data/EncodingErrorWindow.glade:9 msgid "Error" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:32 #: data/EncodingErrorWindow.glade:32 msgid "File:" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:46 #: data/EncodingErrorWindow.glade:45 msgid "/dev/null" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:67 #: data/EncodingErrorWindow.glade:66 msgid "" "The encoding of this file could not be automatically detected. If you are " "sure this file is a text file, please open the file with the correct " "encoding." msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:83 #: data/EncodingErrorWindow.glade:83 msgid "Select character encoding" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:126 #: data/EncodingErrorWindow.glade:133 data/MessageWindow.glade:85 msgid "gtk-close" msgstr "" #: SCRIBES/EncodingSystem/Error/GUI/GUI.glade:151 #: data/EncodingErrorWindow.glade:143 msgid "Open file with selected encoding" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:4 #: SCRIBES/i18n.py:158 msgid "West Europe" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:5 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:38 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:58 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:79 #: SCRIBES/i18n.py:114 SCRIBES/i18n.py:134 SCRIBES/i18n.py:159 #: SCRIBES/i18n.py:177 msgid "Central and Eastern Europe" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:6 #: SCRIBES/i18n.py:160 msgid "Esperanto, Maltese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:7 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:14 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:36 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:65 msgid "Baltic Languages" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:8 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:59 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:76 #: SCRIBES/i18n.py:115 SCRIBES/i18n.py:135 SCRIBES/i18n.py:162 #: SCRIBES/i18n.py:174 msgid "Bulgarian, Macedonian, Russian, Serbian" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:9 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:46 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:64 #: SCRIBES/i18n.py:122 SCRIBES/i18n.py:140 SCRIBES/i18n.py:163 msgid "Arabic" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:10 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:35 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:49 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:51 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:61 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:77 #: SCRIBES/i18n.py:111 SCRIBES/i18n.py:125 SCRIBES/i18n.py:127 #: SCRIBES/i18n.py:137 SCRIBES/i18n.py:164 SCRIBES/i18n.py:175 msgid "Greek" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:11 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:32 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:40 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:44 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:63 #: SCRIBES/i18n.py:108 SCRIBES/i18n.py:116 SCRIBES/i18n.py:120 #: SCRIBES/i18n.py:139 SCRIBES/i18n.py:165 msgid "Hebrew" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:12 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:41 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:56 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:62 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:81 #: SCRIBES/i18n.py:117 SCRIBES/i18n.py:132 SCRIBES/i18n.py:138 #: SCRIBES/i18n.py:166 SCRIBES/i18n.py:179 msgid "Turkish" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:13 msgid "Nordic Languages" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:15 msgid "Celtic Languages" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:16 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:34 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:37 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:57 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:60 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:80 #: SCRIBES/i18n.py:110 SCRIBES/i18n.py:113 SCRIBES/i18n.py:133 #: SCRIBES/i18n.py:136 SCRIBES/i18n.py:170 SCRIBES/i18n.py:178 msgid "Western Europe" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:17 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:18 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:20 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:21 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:22 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:26 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:27 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:28 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:52 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:67 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:68 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:69 #: SCRIBES/i18n.py:128 SCRIBES/i18n.py:143 SCRIBES/i18n.py:144 #: SCRIBES/i18n.py:145 SCRIBES/i18n.py:151 SCRIBES/i18n.py:152 #: SCRIBES/i18n.py:154 SCRIBES/i18n.py:155 SCRIBES/i18n.py:156 #: SCRIBES/i18n.py:181 SCRIBES/i18n.py:182 SCRIBES/i18n.py:183 msgid "Japanese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:19 msgid "Japanese, Chinese, Simplified Chinese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:23 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:53 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:70 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:75 #: SCRIBES/i18n.py:129 SCRIBES/i18n.py:146 SCRIBES/i18n.py:157 #: SCRIBES/i18n.py:171 msgid "Korean" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:24 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:25 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:54 #: SCRIBES/i18n.py:105 SCRIBES/i18n.py:106 SCRIBES/i18n.py:130 msgid "Traditional Chinese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:29 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:48 #: SCRIBES/i18n.py:124 SCRIBES/i18n.py:172 msgid "Russian" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:30 msgid "Ukranian" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:31 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:33 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:87 #: SCRIBES/i18n.py:104 SCRIBES/i18n.py:107 SCRIBES/i18n.py:109 msgid "English" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:39 msgid "Bulgarian, Macedonian, Russian, " msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:42 #: SCRIBES/i18n.py:118 msgid "Portuguese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:43 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:78 #: SCRIBES/i18n.py:119 SCRIBES/i18n.py:176 msgid "Icelandic" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:45 #: SCRIBES/i18n.py:121 msgid "Canadian" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:47 #: SCRIBES/i18n.py:123 msgid "Danish, Norwegian" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:50 #: SCRIBES/i18n.py:126 msgid "Thai" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:55 #: SCRIBES/i18n.py:131 msgid "Urdu" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:66 #: SCRIBES/i18n.py:142 msgid "Vietnamese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:71 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:74 #: SCRIBES/i18n.py:147 SCRIBES/i18n.py:150 msgid "Simplified Chinese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:72 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:73 #: SCRIBES/i18n.py:148 SCRIBES/i18n.py:149 msgid "Unified Chinese" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:82 #: SCRIBES/i18n.py:180 msgid "Kazakh" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:83 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:86 #: SCRIBES/i18n.py:187 msgid "All Languages" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:84 #: SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py:85 msgid "All Languages (BMP ONLY)" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/GUI/GUI.glade:9 #: data/EncodingSelectionWindow.glade:9 msgid "Select Encodings" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py:35 #: SCRIBES/i18n.py:98 msgid "Select" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py:46 #: SCRIBES/i18n.py:97 msgid "Character Encoding" msgstr "" #: SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py:56 #: SCRIBES/i18n.py:96 msgid "Language and Region" msgstr "" #: SCRIBES/GUI/InformationWindow/MessageWindow.glade:43 #: data/MessageWindow.glade:42 msgid "This is a test title label" msgstr "" #: SCRIBES/GUI/InformationWindow/MessageWindow.glade:57 #: data/MessageWindow.glade:53 msgid "This is a test message label." msgstr "" #: SCRIBES/GUI/InformationWindow/WindowTitleUpdater.py:28 msgid "ERROR" msgstr "" #: SCRIBES/GUI/InformationWindow/WindowTitleUpdater.py:28 msgid "INFORMATION" msgstr "" #: SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py:46 msgid "Cannot undo last action" msgstr "" #: SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py:62 msgid "Redo previous action" msgstr "" #: SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py:65 msgid "Cannot redo previous action" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/FallbackMessageSwitcher.py:49 msgid " [modified]" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/FileLoadingStateSwitcher.py:2 #: SCRIBES/i18n.py:20 msgid "Loading file please wait..." msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/FileLoadingStateSwitcher.py:3 msgid "Loaded file" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/FileLoadingStateSwitcher.py:4 msgid "ERROR: Failed to load file" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/ReadonlyModeSwitcher.py:2 msgid "Enabled readonly mode" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/ReadonlyModeSwitcher.py:3 msgid "Disabled readonly mode" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/ReadonlyModeSwitcher.py:4 msgid "File is in readonly mode" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/SaveErrorSwitcher.py:25 #: SCRIBES/i18n.py:238 msgid "Failed to save file" msgstr "" #: SCRIBES/GUI/MainGUI/StatusBar/Feedback/StatusMessage/SavedStateSwitcher.py:30 msgid "Saved file" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/GotoToolButton.py:36 msgid "Show bar to move cursor to a specific line" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/HelpToolButton.py:36 msgid "Show keyboard shortcuts" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PreferenceToolButton.py:42 msgid "Show window to customize the editor" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PrintToolButton.py:36 msgid "Show window to print current file" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RecentMenu.py:34 msgid "Recently opened files" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/ReplaceToolButton.py:36 msgid "Show bar to search for and replace text" msgstr "" #: SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SearchToolButton.py:36 msgid "Show bar to search for text" msgstr "" #: SCRIBES/GUI/MainGUI/Window/TitleUpdater.py:47 #: SCRIBES/SaveSystem/FileNameGenerator.py:34 msgid "Unnamed Document" msgstr "" #: SCRIBES/GUI/MainGUI/Window/TitleUpdater.py:51 msgid " [READONLY]" msgstr "" #: SCRIBES/GUI/MainGUI/Window/TitleUpdater.py:52 #, python-format msgid "Loading %s ..." msgstr "" #: SCRIBES/PluginInitializer/ErrorManager.py:3 msgid "" "ERROR: Cannot find plugin folder. Scribes will not function properly without " "plugins. Please file a bug report to address the issue." msgstr "" #: SCRIBES/PluginInitializer/ErrorManager.py:4 msgid "" "ERROR: Cannot create local plugin folder. Please address the source of the " "problem for Scribes to function properly." msgstr "" #: SCRIBES/PluginInitializer/ErrorManager.py:5 msgid "PLUGIN ERROR!" msgstr "" #: SCRIBES/SaveSystem/ReadonlyHandler.py:27 msgid "ERROR: Failed to perform operation in readonly mode" msgstr "" #: SCRIBES/URILoader/ErrorManager.py:35 SCRIBES/i18n.py:252 #, python-format msgid "File: %s" msgstr "" #: SCRIBES/i18n.py:4 msgid "Cannot redo action" msgstr "" #: SCRIBES/i18n.py:7 msgid "Leave Fullscreen" msgstr "" #: SCRIBES/i18n.py:19 #, python-format msgid "Loaded file \"%s\"" msgstr "" #: SCRIBES/i18n.py:22 msgid " " msgstr "" #: SCRIBES/i18n.py:25 #, python-format msgid "Unrecognized option: '%s'" msgstr "" #: SCRIBES/i18n.py:26 msgid "Try 'scribes --help' for more information" msgstr "" #: SCRIBES/i18n.py:27 msgid "Scribes only supports using one option at a time" msgstr "" #: SCRIBES/i18n.py:28 #, python-format msgid "Scribes version %s" msgstr "" #: SCRIBES/i18n.py:29 #, python-format msgid "%s does not exist" msgstr "" #: SCRIBES/i18n.py:32 #, python-format msgid "The file \"%s\" is open in readonly mode" msgstr "" #: SCRIBES/i18n.py:33 #, python-format msgid "The file \"%s\" is open" msgstr "" #: SCRIBES/i18n.py:35 #, python-format msgid "Saved \"%s\"" msgstr "" #: SCRIBES/i18n.py:37 msgid "Copied selected text" msgstr "" #: SCRIBES/i18n.py:38 msgid "No selection to copy" msgstr "" #: SCRIBES/i18n.py:39 msgid "Cut selected text" msgstr "" #: SCRIBES/i18n.py:40 msgid "No selection to cut" msgstr "" #: SCRIBES/i18n.py:41 msgid "Pasted copied text" msgstr "" #: SCRIBES/i18n.py:42 msgid "No text content in the clipboard" msgstr "" #: SCRIBES/i18n.py:46 msgid "Open a file" msgstr "" #: SCRIBES/i18n.py:50 msgid "Redo undone action" msgstr "" #: SCRIBES/i18n.py:53 msgid "Go to a specific line" msgstr "" #: SCRIBES/i18n.py:54 msgid "Configure the editor" msgstr "" #: SCRIBES/i18n.py:55 msgid "Launch the help browser" msgstr "" #: SCRIBES/i18n.py:56 msgid "Search for previous occurrence of the string" msgstr "" #: SCRIBES/i18n.py:57 msgid "Search for next occurrence of the string" msgstr "" #: SCRIBES/i18n.py:58 msgid "Find occurrences of the string that match upper and lower cases only" msgstr "" #: SCRIBES/i18n.py:60 msgid "Find occurrences of the string that match the entire word only" msgstr "" #: SCRIBES/i18n.py:61 msgid "Type in the text you want to search for" msgstr "" #: SCRIBES/i18n.py:62 msgid "Type in the text you want to replace with" msgstr "" #: SCRIBES/i18n.py:63 msgid "Replace the selected found match" msgstr "" #: SCRIBES/i18n.py:64 msgid "Replace all found matches" msgstr "" #: SCRIBES/i18n.py:65 msgid "Click to specify the font type, style, and size to use for text." msgstr "" #: SCRIBES/i18n.py:66 msgid "" "Click to specify the width of the space that is inserted when you press the " "Tab key." msgstr "" #: SCRIBES/i18n.py:68 msgid "" "Select to wrap text onto the next line when you reach the text window " "boundary." msgstr "" #: SCRIBES/i18n.py:70 msgid "Select to display a vertical line that indicates the right margin." msgstr "" #: SCRIBES/i18n.py:72 msgid "Click to specify the location of the vertical line." msgstr "" #: SCRIBES/i18n.py:73 msgid "Select to enable spell checking" msgstr "" #: SCRIBES/i18n.py:77 msgid "A text editor for GNOME." msgstr "" #: SCRIBES/i18n.py:78 msgid "usage: scribes [OPTION] [FILE] [...]" msgstr "" #: SCRIBES/i18n.py:79 msgid "Options:" msgstr "" #: SCRIBES/i18n.py:80 msgid "display this help screen" msgstr "" #: SCRIBES/i18n.py:81 msgid "output version information of Scribes" msgstr "" #: SCRIBES/i18n.py:82 msgid "create a new file and open the file with Scribes" msgstr "" #: SCRIBES/i18n.py:83 msgid "get debuggin information for scribes" msgstr "" #: SCRIBES/i18n.py:86 msgid "error" msgstr "" #: SCRIBES/i18n.py:89 msgid "Cannot perform operation in readonly mode" msgstr "" #: SCRIBES/i18n.py:92 msgid "Character _Encoding: " msgstr "" #: SCRIBES/i18n.py:93 msgid "Add or Remove Encoding ..." msgstr "" #: SCRIBES/i18n.py:94 msgid "Recommended (UTF-8)" msgstr "" #: SCRIBES/i18n.py:95 msgid "Add or Remove Character Encoding" msgstr "" #: SCRIBES/i18n.py:101 msgid "Closed dialog window" msgstr "" #: SCRIBES/i18n.py:112 SCRIBES/i18n.py:141 SCRIBES/i18n.py:168 msgid "Baltic languages" msgstr "" #: SCRIBES/i18n.py:153 msgid "Japanese, Korean, Simplified Chinese" msgstr "" #: SCRIBES/i18n.py:161 msgid "Baltic languagues" msgstr "" #: SCRIBES/i18n.py:167 msgid "Nordic languages" msgstr "" #: SCRIBES/i18n.py:169 msgid "Celtic languages" msgstr "" #: SCRIBES/i18n.py:173 msgid "Ukrainian" msgstr "" #: SCRIBES/i18n.py:184 msgid "All languages" msgstr "" #: SCRIBES/i18n.py:185 SCRIBES/i18n.py:186 msgid "All Languages (BMP only)" msgstr "" #: SCRIBES/i18n.py:188 msgid "None" msgstr "" #: SCRIBES/i18n.py:191 msgid "Select to use themes' foreground and background colors" msgstr "" #: SCRIBES/i18n.py:192 msgid "Click to choose a new color for the editor's text" msgstr "" #: SCRIBES/i18n.py:193 msgid "Click to choose a new color for the editor's background" msgstr "" #: SCRIBES/i18n.py:194 msgid "Click to choose a new color for the language syntax element" msgstr "" #: SCRIBES/i18n.py:195 msgid "Select to make the language syntax element bold" msgstr "" #: SCRIBES/i18n.py:196 msgid "Select to make the language syntax element italic" msgstr "" #: SCRIBES/i18n.py:197 msgid "Select to reset the language syntax element to its default settings" msgstr "" #: SCRIBES/i18n.py:204 msgid "Toggled readonly mode on" msgstr "" #: SCRIBES/i18n.py:205 msgid "Toggled readonly mode off" msgstr "" #: SCRIBES/i18n.py:208 msgid "Menu for advanced configuration" msgstr "" #: SCRIBES/i18n.py:209 msgid "Configure the editor's foreground, background or syntax colors" msgstr "" #: SCRIBES/i18n.py:210 msgid "Create, modify or manage templates" msgstr "" #: SCRIBES/i18n.py:213 #, python-format msgid "Ln %d col %d" msgstr "" #: SCRIBES/i18n.py:216 #, python-format msgid "Loading \"%s\"..." msgstr "" #: SCRIBES/i18n.py:231 msgid "INS" msgstr "" #: SCRIBES/i18n.py:232 msgid "OVR" msgstr "" #: SCRIBES/i18n.py:234 msgid "No bookmarks found" msgstr "" #: SCRIBES/i18n.py:235 msgid "Use spaces instead of tabs for indentation" msgstr "" #: SCRIBES/i18n.py:236 msgid "Select to underline language syntax element" msgstr "" #: SCRIBES/i18n.py:237 msgid "Open recently used files" msgstr "" #: SCRIBES/i18n.py:240 msgid "" "Save Error: You do not have permission to modify this file or save to its " "location." msgstr "" #: SCRIBES/i18n.py:242 msgid "Save Error: Failed to transfer file from swap to permanent location." msgstr "" #: SCRIBES/i18n.py:243 msgid "Save Error: Failed to create swap location or file." msgstr "" #: SCRIBES/i18n.py:244 msgid "Save Error: Failed to create swap file for saving." msgstr "" #: SCRIBES/i18n.py:245 msgid "Save Error: Failed to write swap file for saving." msgstr "" #: SCRIBES/i18n.py:246 msgid "Save Error: Failed to close swap file for saving." msgstr "" #: SCRIBES/i18n.py:247 msgid "Save Error: Failed decode contents of file from \"UTF-8\" to Unicode." msgstr "" #: SCRIBES/i18n.py:248 msgid "" "Save Error: Failed to encode contents of file. Make sure the encoding of the " "file is properly set in the save dialog. Press (Ctrl - s) to show the save " "dialog." msgstr "" #: SCRIBES/i18n.py:253 msgid "Failed to load file." msgstr "" #: SCRIBES/i18n.py:254 msgid "Load Error: You do not have permission to view this file." msgstr "" #: SCRIBES/i18n.py:255 msgid "Load Error: Failed to access remote file for permission reasons." msgstr "" #: SCRIBES/i18n.py:256 msgid "" "Load Error: Failed to get file information for loading. Please try loading " "the file again." msgstr "" #: SCRIBES/i18n.py:258 msgid "Load Error: File does not exist." msgstr "" #: SCRIBES/i18n.py:259 msgid "Damn! Unknown Error" msgstr "" #: SCRIBES/i18n.py:260 msgid "Load Error: Failed to open file for loading." msgstr "" #: SCRIBES/i18n.py:261 msgid "Load Error: Failed to read file for loading." msgstr "" #: SCRIBES/i18n.py:262 msgid "Load Error: Failed to close file for loading." msgstr "" #: SCRIBES/i18n.py:263 msgid "" "Load Error: Failed to decode file for loading. The file your are loading may " "not be a text file. If you are sure it is a text file, try to open the file " "with the correct encoding via the open dialog. Press (control - o) to show " "the open dialog." msgstr "" #: SCRIBES/i18n.py:267 msgid "" "Load Error: Failed to encode file for loading. Try to open the file with the " "correct encoding via the open dialog. Press (control - o) to show the open " "dialog." msgstr "" #: SCRIBES/i18n.py:271 #, python-format msgid "Reloading %s" msgstr "" #: SCRIBES/i18n.py:272 #, python-format msgid "'%s' has been modified by another program" msgstr "" #: data/ModificationDialog.glade:6 msgid "Warning" msgstr "" #: data/ModificationDialog.glade:37 msgid "This file has been modified by another program" msgstr "" #: data/ModificationDialog.glade:65 msgid "Neither reload nor overwrite file" msgstr "" #: data/ModificationDialog.glade:87 msgid "I_gnore" msgstr "" #: data/ModificationDialog.glade:110 msgid "Discard current file and load modified file" msgstr "" #: data/ModificationDialog.glade:132 msgid "_Reload File" msgstr "" #: data/ModificationDialog.glade:155 msgid "Save current file and overwrite changes made by other program" msgstr "" #: data/ModificationDialog.glade:177 msgid "_Overwrite File" msgstr "" scribes-0.4~r910/AUTHORS0000644000175000017500000000004711242100540014473 0ustar andreasandreasLateef Alabi-Oki scribes-0.4~r910/intltool-extract0000644000175000017500000005565211242100540016676 0ustar andreasandreas#!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool 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. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; my $dirname = dirname ($OUTFILE); if (! -d "$dirname" && $dirname ne "") { system ("mkdir -p $dirname"); } } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml", "gettext/quoted", "gettext/quotedxml" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; &type_quoted if $gettext_type eq "quoted"; &type_quotedxml if $gettext_type eq "quotedxml"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) { if (defined($2)) { $comments{$3} = $2; } $messages{$3} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = $expat->original_string(); my $clist = $expat->{Curlist}; my $pos = $#$clist; $data =~ s/^$//s; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_quoted { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_quotedxml { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $message = entity_decode($message); $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty|col)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } scribes-0.4~r910/depcheck.py0000644000175000017500000000233511242100540015545 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- def check_dependencies(): try: # Check for D-Bus Python Bindings. try: import dbus if dbus.version < (0, 70, 0): raise AssertionError print "Checking for D-Bus (Python Bindings)... yes" except ImportError: print "Error: Python bindings for D-Bus was not found." raise SystemExit except AssertionError: print "Error: Version 0.70 or better of dbus-python needed." raise SystemExit # Check for PyGTK. try: import gtk if gtk.pygtk_version < (2, 10, 0): raise AssertionError print "Checking for PyGTK... yes" except ImportError: print "Error: PyGTK was not found." raise SystemExit except AssertionError: print "Error: Version 2.10.0 or better of PyGTK needed." raise SystemExit # Check for pygtksourceview2. try: import gtksourceview2 print "Checking for pygtksourceview2... yes" except ImportError: print "Error: pygtksourceview2 was not found." raise SystemExit try: import gtkspell print "Checking for gtkspell-python... yes" except ImportError: print "Error: Python bindings for gtkspell was not found." raise SystemExit except SystemExit: from sys import exit exit(1) return check_dependencies() scribes-0.4~r910/scribes.in0000644000175000017500000000032011242100540015377 0ustar andreasandreas#! /usr/bin/python # -*- coding: utf-8 -*- python_path = "@python_path@" from sys import path path.insert(0, python_path) if __name__ == "__main__": # Start scribes. from SCRIBES.Main import main main() scribes-0.4~r910/ABOUT-NLS0000644000175000017500000022544711242100540014667 0ustar andreasandreas1 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2006. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ GNUnet | [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] | bash | [] [] [] | batchelor | [] | bfd | | bibshelf | [] | binutils | [] | bison | [] [] | bison-runtime | | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | darkstat | [] () [] | dialog | [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | error | [] [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] | findutils | [] [] [] | flex | [] [] [] | fslint | [] | gas | | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] [] [] [] | gip | [] | gliv | [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | () () [] | gnucash-glossary | [] () | gnuedu | | gnulib | [] [] [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | () () | gramadoir | [] [] | grep | [] [] [] [] [] [] | gretl | | gsasl | | gss | | gst-plugins | [] [] [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] () | gtkam | [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | id-utils | [] [] | impost | | indent | [] [] [] | iso_3166 | [] [] | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] | iso_639 | [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | | keytouch-editor | | keytouch-keyboa... | | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | | libidn | [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] | make | [] [] | man-db | [] () [] [] | minicom | [] [] [] | mysecretdiary | [] [] | nano | [] [] () [] | nano_1_0 | [] () [] [] | opcodes | [] | parted | | pilot-qof | [] | psmisc | [] | pwdutils | | python | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | silky | | skencil | [] () | sketch | [] () | solfege | | soundtracker | [] [] | sp | [] | stardict | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | | texinfo | [] [] [] | textutils | [] [] [] | tin | () () | tp-robot | [] | tuxpaint | [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] | xchat | [] [] [] [] [] | xkeyboard-config | | xpad | [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 11 0 1 2 8 20 1 42 43 2 62 97 18 1 16 13 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ GNUnet | | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] [] [] | batchelor | [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | darkstat | [] () [] [] [] | dialog | [] [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | error | [] [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gip | [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnucash-glossary | [] [] | gnuedu | [] | gnulib | [] [] [] [] [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | () () [] () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] [] | gsasl | [] | gss | [] | gst-plugins | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] [] | impost | [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_3166_3 | [] | iso_4217 | [] [] [] [] | iso_639 | [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | [] [] [] | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | | libidn | [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] [] | lynx | [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | () | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] () [] [] [] [] | nano_1_0 | [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] | pilot-qof | | psmisc | [] [] [] | pwdutils | | python | | qof | | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | | silky | [] | skencil | [] [] | sketch | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | stardict | [] | system-tools-ba... | [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] | textutils | [] [] [] [] [] | tin | [] () | tp-robot | [] [] [] | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | vorbis-tools | [] [] | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 89 21 16 2 41 118 59 14 1 8 1 6 60 30 0 52 ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no +--------------------------------------------------+ GNUnet | | a2ps | () [] [] () | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | batchelor | [] [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | | cpplib | [] | cryptonit | [] | darkstat | [] [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | error | [] | fetchmail | [] [] | fileutils | [] [] | findutils | [] | flex | [] [] | fslint | [] [] | gas | | gawk | [] [] | gbiff | [] | gcal | | gcc | | gettext-examples | [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gimp-print | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] | gnubiff | | gnucash | () () | gnucash-glossary | [] | gnuedu | | gnulib | [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | [] | gpe-edit | [] [] | gpe-filemanager | [] | gpe-go | [] [] | gpe-login | [] [] | gpe-ownerinfo | [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | [] [] | gprof | | gpsdrive | () () () | gramadoir | () | grep | [] [] [] | gretl | | gsasl | [] | gss | | gst-plugins | [] | gst-plugins-base | | gst-plugins-good | [] | gstreamer | [] | gtick | [] | gtkam | [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | | hello | [] [] [] [] [] [] [] [] | id-utils | [] | impost | | indent | [] [] | iso_3166 | [] | iso_3166_1 | [] [] | iso_3166_2 | [] | iso_3166_3 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] | jpilot | () () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | | libidn | [] [] | lifelines | [] | lilypond | | lingoteach | [] | lynx | [] [] | m4 | [] [] | mailutils | | make | [] [] [] | man-db | () | minicom | [] | mysecretdiary | [] | nano | [] [] [] | nano_1_0 | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | psmisc | [] [] [] | pwdutils | | python | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | sh-utils | [] [] | shared-mime-info | [] [] [] [] [] | sharutils | [] [] | shishi | | silky | [] | skencil | | sketch | | solfege | | soundtracker | | sp | () | stardict | [] [] | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] [] | textutils | [] [] [] | tin | | tp-robot | [] | tuxpaint | [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | vorbis-tools | [] | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +--------------------------------------------------+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no 40 24 2 1 1 3 1 2 3 21 0 15 1 102 6 3 nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +------------------------------------------------------+ GNUnet | | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] | bash | [] [] [] | batchelor | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | darkstat | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | error | [] [] [] [] | fetchmail | [] [] [] | fileutils | [] [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] [] [] [] | gas | | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gimp-print | [] [] | gip | [] [] [] [] | gliv | [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () | gnucash | () [] | gnucash-glossary | [] [] [] | gnuedu | | gnulib | [] [] [] [] [] | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] [] [] [] [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] | gretl | [] | gsasl | [] [] | gss | [] [] [] | gst-plugins | [] [] [] [] | gst-plugins-base | [] | gst-plugins-good | [] [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | impost | [] | indent | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] [] [] [] | iso_4217 | [] [] [] [] | iso_639 | [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | [] [] | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] | libgphoto2_port | [] [] | libgsasl | [] [] [] [] | libiconv | | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] [] | make | [] [] [] [] | man-db | [] [] | minicom | [] [] [] [] [] | mysecretdiary | [] [] [] [] | nano | [] [] | nano_1_0 | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | [] | psmisc | [] [] | pwdutils | [] [] | python | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | silky | [] | skencil | [] [] [] | sketch | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | stardict | [] [] [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] | tin | () | tp-robot | [] | tuxpaint | [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | vorbis-tools | [] [] | wastesedge | | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] | xpad | [] [] [] | +------------------------------------------------------+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 2 3 58 31 53 5 76 72 5 42 48 12 51 128 2 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ GNUnet | [] | 2 a2ps | [] [] [] | 19 aegis | | 0 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 14 bash | [] | 11 batchelor | [] [] | 9 bfd | | 1 bibshelf | [] | 7 binutils | [] [] [] | 9 bison | [] [] [] | 19 bison-runtime | [] [] [] | 15 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 4 clisp | | 6 console-tools | [] [] | 5 coreutils | [] [] | 17 cpio | [] [] [] | 9 cpplib | [] [] [] [] | 11 cryptonit | | 5 darkstat | [] () () | 15 dialog | [] [] [] [] [] | 30 diffutils | [] [] [] [] | 28 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 error | [] [] [] [] | 18 fetchmail | [] [] | 12 fileutils | [] [] [] | 18 findutils | [] [] [] | 17 flex | [] [] | 15 fslint | [] | 9 gas | [] | 3 gawk | [] [] | 15 gbiff | [] | 5 gcal | [] | 5 gcc | [] [] [] | 5 gettext-examples | [] [] [] [] [] | 24 gettext-runtime | [] [] [] [] [] | 26 gettext-tools | [] [] [] [] [] | 19 gimp-print | [] [] | 12 gip | [] [] | 12 gliv | [] [] | 8 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 15 gnubiff | [] | 1 gnucash | () | 2 gnucash-glossary | [] [] | 9 gnuedu | [] | 2 gnulib | [] [] [] [] [] | 28 gnunet-gtk | | 1 gnutls | | 2 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] [] [] [] | 19 gpe-clock | [] [] [] [] | 20 gpe-conf | [] [] | 14 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] | 19 gpe-filemanager | [] | 5 gpe-go | [] [] | 14 gpe-login | [] [] [] [] [] | 20 gpe-ownerinfo | [] [] [] [] | 20 gpe-package | [] | 5 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] | 19 gpe-taskmanager | [] [] [] | 19 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 20 gpe-todo | [] | 6 gphoto2 | [] [] [] [] | 20 gprof | [] [] | 11 gpsdrive | | 4 gramadoir | [] | 7 grep | [] [] [] [] | 33 gretl | | 4 gsasl | [] [] | 6 gss | [] | 5 gst-plugins | [] [] [] | 15 gst-plugins-base | [] [] [] | 9 gst-plugins-good | [] [] [] | 18 gstreamer | [] [] [] | 17 gtick | [] | 11 gtkam | [] | 13 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 26 gutenprint | | 3 hello | [] [] [] [] [] | 39 id-utils | [] [] | 14 impost | [] | 4 indent | [] [] [] [] | 25 iso_3166 | [] [] [] | 15 iso_3166_1 | [] [] | 20 iso_3166_2 | | 2 iso_3166_3 | [] [] | 9 iso_4217 | [] [] | 14 iso_639 | [] [] | 16 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] | 12 keytouch | [] | 4 keytouch-editor | | 2 keytouch-keyboa... | [] | 4 latrine | [] [] | 8 ld | [] [] [] | 7 leafpad | [] [] [] [] | 23 libc | [] [] [] | 23 libexif | [] | 4 libextractor | [] | 5 libgpewidget | [] [] [] | 19 libgpg-error | [] | 4 libgphoto2 | [] | 7 libgphoto2_port | [] [] [] | 10 libgsasl | [] | 8 libiconv | | 0 libidn | [] [] | 10 lifelines | | 4 lilypond | | 2 lingoteach | [] | 6 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailutils | [] | 8 make | [] [] [] | 20 man-db | [] | 6 minicom | [] | 14 mysecretdiary | [] [] | 12 nano | [] [] | 15 nano_1_0 | [] [] [] | 18 opcodes | [] [] | 10 parted | [] [] [] | 9 pilot-qof | [] | 3 psmisc | [] | 10 pwdutils | [] | 3 python | | 0 qof | [] | 2 radius | [] | 6 recode | [] [] [] | 25 rpm | [] [] [] | 13 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] | 22 sh-utils | [] | 15 shared-mime-info | [] [] [] [] | 23 sharutils | [] [] [] | 23 shishi | | 1 silky | [] | 4 skencil | [] | 7 sketch | | 6 solfege | | 2 soundtracker | [] [] | 9 sp | [] | 3 stardict | [] [] [] [] | 11 system-tools-ba... | [] [] [] [] [] [] [] | 37 tar | [] [] [] [] | 17 texinfo | [] [] [] | 15 textutils | [] [] [] | 17 tin | | 1 tp-robot | [] [] [] | 9 tuxpaint | [] [] [] | 16 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 vorbis-tools | [] [] | 11 wastesedge | | 1 wdiff | [] [] | 22 wget | [] [] [] | 19 xchat | [] [] [] [] | 28 xkeyboard-config | [] [] [] [] | 11 xpad | [] [] [] | 14 +---------------------------------------------------+ 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 172 domains 0 1 1 78 39 0 135 14 1 50 1 52 0 2040 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2006 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. scribes-0.4~r910/Makefile.am0000644000175000017500000000512511242100540015461 0ustar andreasandreasedit = sed -e 's,@python_path\@,$(pythondir),g' startupdir = $(prefix)/bin startup_script = scribes startup_script_in_files = $(startup_script).in startup_DATA = $(startup_script_in_files:.in=) $(startup_script): Makefile $(startup_script_in_files) rm -f $(startup_script) $(startup_script).tmp $(edit) $(startup_script_in_files) > $(startup_script).tmp mv $(startup_script).tmp $(startup_script) ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} SUBDIRS = po help data SCRIBES # Workaround broken scrollkeeper that doesn't remove its files on # uninstall. distuninstallcheck_listfiles = find . -type f -print | grep -v scrollkeeper DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper EXTRA_DIST = m4 \ autogen.sh \ depcheck.py \ $(startup_script_in_files) \ xmldocs.make \ omf.make \ gnome-doc-utils.make \ intltool-merge.in \ intltool-update.in \ intltool-extract.in \ i18n_plugin_extractor.py \ CONTRIBUTORS \ TODO \ GenericPlugins \ LanguagePlugins \ Examples \ compile.py \ removepyc.py \ scribesplugin \ scribesmodule \ TRANSLATORS DISTCLEANFILES = $(startup_script) \ intltool-extract \ intltool-merge \ intltool-update \ gnome-doc-utils.make install-data-hook: echo "Start byte compiling plugins..." python -OO compile.py echo "Finished byte compiling plugins" if [ -d $(DESTDIR)$(datadir)/scribes/plugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/plugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/plugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/plugins ;\ fi if [ -d $(DESTDIR)$(datadir)/scribes/GenericPlugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/GenericPlugins ;\ fi if [ -d $(DESTDIR)$(datadir)/scribes/LanguagePlugins ]; then \ echo "removing " $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ rm -rf $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ echo "removed " $(DESTDIR)$(datadir)/scribes/LanguagePlugins ;\ fi if [ -d $(DESTDIR)$(libdir)/scribes ]; then \ echo "removing " $(DESTDIR)$(libdir)/scribes ;\ rm -rf $(DESTDIR)$(libdir)/scribes ;\ echo "removed " $(DESTDIR)$(libdir)/scribes ;\ fi mkdir -p $(DESTDIR)$(libdir)/scribes cp -R GenericPlugins $(DESTDIR)$(libdir)/scribes cp -R LanguagePlugins $(DESTDIR)$(libdir)/scribes cp scribesmodule $(DESTDIR)$(startupdir) cp scribesplugin $(DESTDIR)$(startupdir) chmod 755 $(DESTDIR)$(startupdir)/$(startup_script) chmod 755 $(DESTDIR)$(startupdir)/scribesmodule chmod 755 $(DESTDIR)$(startupdir)/scribesplugin rm -rf $(startup_script) python removepyc.py scribes-0.4~r910/TRANSLATORS0000644000175000017500000000056511242100540015167 0ustar andreasandreasBrazilian Portuguese translation by Leonardo F. Fontenelle German translation by Maximilian Baumgart German translation by Steffen Klemer Russian translation by Paul Chavard Italian translation by Stefano Esposito French translation by Gautier Portet scribes-0.4~r910/intltool-merge.in0000644000175000017500000000000011242100540016701 0ustar andreasandreasscribes-0.4~r910/INSTALL0000644000175000017500000002713611242100540014464 0ustar andreasandreasInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *Note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. scribes-0.4~r910/scribesplugin0000755000175000017500000002162411242100540016226 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- PLUGIN_FILES = [] MAIN_PLUGIN_FOLDER = "" def main(): print "creating plugin files and folders..." options = parse_command_line()[0] validate(options) create_files_and_folders(options) populate_plugin_files(options) print "Done!" return def populate_plugin_files(options): populate_plugin_loader(options) populate_plugin_modules(options) return def populate_plugin_loader(options): source_code = PLUGIN_LOADER_SOURCE_CODE.format( name=options.name, module="Trigger" if options.shortcut else "Manager", instance="__trigger" if options.shortcut else "__manager" ) if options.language: source_code = add_language_to(source_code, options.language) loader_module = PLUGIN_FILES[0] create_file(loader_module, source_code) print "created %s" % loader_module return def populate_plugin_modules(options): [process_plugin_modules(_file, options) for _file in PLUGIN_FILES[1:]] return def process_plugin_modules(_file, options): module_handler = { "Signals.py": populate_signals_module, "Trigger.py": populate_trigger_module, "Manager.py": populate_manager_module, "Exceptions.py": populate_exceptions_module, "Utils.py": populate_utils_module, "%s.py" % options.name: populate_implementation_module, } from os.path import basename module_handler[basename(_file)](_file, options) return def populate_signals_module(_file, options): create_file(_file, SIGNALS_MODULE_SOURCE_CODE) print "created %s" % _file return def populate_exceptions_module(_file, options): create_file(_file, EXCEPTION_MODULE_SOURCE_CODE % options.name) print "created %s" % _file return def populate_utils_module(_file, options): create_file(_file, UTILS_MODULE_SOURCE_CODE) print "created %s" % _file return def populate_manager_module(_file, options): create_file(_file, MANAGER_MODULE_SOURCE_CODE.format(name=options.name)) print "created %s" % _file return def populate_implementation_module(_file, options): create_file(_file, IMPLEMENTATION_MODULE_SOURCE_CODE.format(Name=options.name, name=options.name.lower())) print "created %s" % _file return def populate_trigger_module(_file, options): create_file(_file, TRIGGER_MODULE_SOURCE_CODE.format(name=options.name, shortcut=options.shortcut)) print "created %s" % _file return def add_language_to(source_code, language): language_line = "languages = ['%s',]" % language lines = source_code.splitlines() lines.insert(2, language_line) return "\n".join(lines) def create_files_and_folders(options): plugins_folder = get_plugins_folder(options) create_folder(plugins_folder) create_init_module(plugins_folder) create_plugin_loader(plugins_folder, options) create_main_plugin_folder(plugins_folder, options) create_plugin_files(options) return def create_plugin_files(options): plugin_files = ["Signals.py", "Manager.py", "Utils.py", "Exceptions.py", "%s.py" % options.name] if options.shortcut: plugin_files.append("Trigger.py") from os.path import join global PLUGIN_FILES for _file in plugin_files: _file = join(MAIN_PLUGIN_FOLDER, _file) create_file(_file) PLUGIN_FILES.append(_file) return def create_plugin_loader(plugins_folder, options): plugin_loader = "Plugin%s.py" % options.name from os.path import join, exists _file = join(plugins_folder, plugin_loader) if exists(_file): fail("It seems the plugin already exists!") create_file(_file) global PLUGIN_FILES PLUGIN_FILES.append(_file) return def create_main_plugin_folder(plugins_folder, options): from os.path import join, exists folder = join(plugins_folder, options.name) if exists(folder): fail("It seems the plugin already exists!") create_folder(folder) create_init_module(folder) global MAIN_PLUGIN_FOLDER MAIN_PLUGIN_FOLDER = folder return def create_folder(folder): from os import error, makedirs from os.path import exists try: if exists(folder): return makedirs(folder) except error: fail("Failed to create %s!" % folder) return def create_init_module(folder): from os.path import exists, join _file = join(folder, "__init__.py") if exists(_file): return create_file(_file) return def create_file(_file, content=""): try: with open(_file, "w") as f: f.write(content) except IOError: fail("Failed to create %s" % _file) return def get_plugins_folder(options): from os import environ from os.path import join config_folder = join(environ["HOME"], ".config", "scribes") plugin_type = "LanguagePlugins" if options.language else "GenericPlugins" return join(config_folder, plugin_type) def validate(options): if not options.name: fail("--name is a required option") if not options.name.isalnum(): fail("Invalid option for --name") if options.language and not options.language.isalpha(): fail("Invalid option for --language") return def fail(message): print message raise SystemExit def parse_command_line(): # options.name, options.author, options.shortcut, options.language from optparse import OptionParser usage = "usage: %prog [options]" parser = OptionParser(usage=usage) parser.add_option("-n", "--name", dest="name", help="Name of the plugin", ) parser.add_option("-s", "--shortcut", dest="shortcut", help="Keyboard shortcut to activate the plugin [OPTIONAL]", ) parser.add_option("-l", "--language", dest="language", help="Language the plugin affects [OPTIONAL]", ) return parser.parse_args() TRIGGER_MODULE_SOURCE_CODE = """from SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.TriggerManager import TriggerManager from gettext import gettext as _ class Trigger(SignalManager, TriggerManager): def __init__(self, editor): SignalManager.__init__(self) TriggerManager.__init__(self, editor) self.__init_attributes(editor) self.connect(self.__trigger, "activate", self.__activate_cb) def __init_attributes(self, editor): self.__editor = editor self.__manager = None name, shortcut, description, category = ( "activate-{name}", "{shortcut}", _("Activate {name}"), _("Miscellaneous Operations") ##### <--- Update this! ) self.__trigger = self.create_trigger(name, shortcut, description, category) return def destroy(self): self.disconnect() self.remove_triggers() if self.__manager: self.__manager.destroy() del self return False def __get_manager(self): if self.__manager: return self.__manager from Manager import Manager self.__manager = Manager(self.__editor) return self.__manager def __activate(self): self.__get_manager().activate() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate) return False """ IMPLEMENTATION_MODULE_SOURCE_CODE = """from SCRIBES.SignalConnectionManager import SignalManager class {Name}(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "activate", self.__activate_cb) self.connect(manager, "destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __{name}(self): message = "Witness the awesome power of {Name}!" title = "{Name} Power" # Update the message bar. self.__editor.update_message(message, "yes", 10) # Show a window containing message. self.__editor.show_info(title, message, self.__editor.window) return False def __activate_cb(self, *args): self.__{name}() return False def __destroy_cb(self, *args): self.disconnect() del self return False """ MANAGER_MODULE_SOURCE_CODE = """from Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from {name} import {name} {name}(self, editor) def destroy(self): self.emit("destroy") del self return False def activate(self): self.emit("activate") return False """ EXCEPTION_MODULE_SOURCE_CODE = """# Custom exceptions belong in this module. class %sError(Exception): pass """ UTILS_MODULE_SOURCE_CODE = """# Utility functions shared among modules belong here. def answer_to_life(): return 42 """ SIGNALS_MODULE_SOURCE_CODE="""from SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "destroy": (SSIGNAL, TYPE_NONE, ()), "dummy-signal": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) """ PLUGIN_LOADER_SOURCE_CODE = """name = "{name} Plugin" authors = ["Your Name "] version = 0.1 autoload = True class_name = "{name}Plugin" short_description = "A short description" long_description = "A long description" class {name}Plugin(object): def __init__(self, editor): self.__editor = editor self.{instance} = None def load(self): from {name}.{module} import {module} self.{instance} = {module}(self.__editor) return def unload(self): self.{instance}.destroy() return """ if __name__ == "__main__": main() # scribesplugin --name=Foo --shortcut=BackSpace --language=python scribes-0.4~r910/missing0000755000175000017500000002623311242100540015027 0ustar andreasandreas#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: scribes-0.4~r910/data/0000755000175000017500000000000011242100540014333 5ustar andreasandreasscribes-0.4~r910/data/Editor.glade0000644000175000017500000000436611242100540016570 0ustar andreasandreas False Unsaved Document ScribesWindowRole center 640 480 scribes True static ScribesWindowID True True True False True 3 automatic automatic in 1 False False 2 0 scribes-0.4~r910/data/scribes.png0000644000175000017500000000734311242100540016502 0ustar andreasandreas‰PNG  IHDR00Wù‡bKGDÿÿÿ ½§“ pHYs44ý ,tIME× ¿â€pIDAThÞÍZ{Œ\Õyÿ}çœ{ï¼wvv×;»Þ‡wíµ±ñR?R숸U0¥MEh«HmEœ¤¤ªZ©‘*T TÔ(‘"WQÚÆ i’JEIÀ@šº`01xã{½ö¾×ûðÌÎëÎ}ŸÓ?fvÙõάMA*GútFsï¹÷÷û^ç;ß á2nÿÊÓ‡tÁÿÅä·¤”ÿøÆÑCÎͬãŸð‡ ]ã?¾÷3½í¹¢Ý_²¼bûÞûÏÎ >£n´–}2ôOÛØ0pKûww6éºø2n½™•ÿïö~åß5 k]p45„ÑŽ÷xhàð1þ‰'@Jõêw„àp¼½íɈ¡ñ]¶~â (¨/˜SJùWfr87²ÛõÑÜÞA„ƒ7Z/>*€#ABâE…G^€{÷1HÉ~—ü@Ú׊Ža¹> ¡£5Þ0·XÞ>pøXã›G-~¬Ž„!8ÝÖ”ŒíkëlÛ’LÅÃáÑt-JPÒu]Ó²œòÉÛíɱ«ç2çe—yþ*÷‘²D ÀûYéæxƒp\/y2fô-䬭~ó±8r±¨Ámïßö»;ÓBh›„ R:$))BʇКl½[zçüÀþÒäèÔ豆¹ç3yçø#/  DªC .[Ž/gÐGÙVJ±Æ„±õZÞºõ#8rzHàà–[zºeÇÖ½a¦ÒFà“6AJ@J@)@ÉÊæBD1„1€m”B´'¶mþt禟™¸ïß"ó?,”½×Ž¢•L9®Ï_B€ •B$$Zg=‡oÖÙØÄM€oIohø»½ŸÞus²!mXE –È ºfd*² E3Bš¾©q׎¶Ö¶æ»FF&ĹrA´Ú (3bù¼éµœ18RApÆQ}s&o·ýÐYè»÷¢osoûwîÜÇáñP‡Q¸¦Á._|=BAæÚd˜¥PwKª§gïãûâoÿ©¡LNID“ù’©œ3H… ± À-ª”ø§{Á¸MÛ»}GÏ·k÷ö?hbÒ@©Pq—œ7Èõ(‹ŽžèȦ„uåçYÑÙÛÜ»#Õ¡”„åxRÁrüÆ‚éžnÛsÿÙ™Ágnl#AѨ±©{Sû_ôôth>W¥Â5N Eª¸Vÿ~ÓD++³d¨y ÄÀŸƒm>P‰‘êØž÷LTd0Ц…JÎ@•8çèÐX7ˆ ‡ç¶©³5³¸Nù' v?–¾íÃÖ ÄFˆ_Û¸ Ê«ïj¸‚VÆ®ðZõò¦ ©¾D€'bDëGŒ¦dCøvk¤|¿>þÖà›?÷-žA½à[€âi@‡‘Ã=©÷q 9Œ>}Ų _ªŠcÎ l«Œµ H‰ý=]- ØöúgÐí¿_I—õ†[‚òÌå²¢vüìkÞ¶.÷5ǽˆ¡i˜% nu“œW…"‡QÍ f÷5·4 ™³êë/ÜÖq{í‹^Áð‹FN@YYð®;Áûÿo[ûœh ¨y hê ”k¢QTÞ¹#2rÖíHD5¶‚#N„N¥ pjmd[¹Ð2¨O Þ¶*W9=ˆàü33ƒPÙ+ð‡ž÷Òµ-A kŒøª¯SZlM»RJ€à¸f9€((…ß®ž9ÖZ@Óµ6(Zß…m V£ú>äÂÈÅÑ{ääi¨Â4¨¡s-#¾¼o,c |£QLOlÛc]gЗ¾¯š¤T¢&HXÓ:Á Xj Pƒ€*g¡òS€S„rò•Ù--g­Ú5‘\cƒùØ{ã¥^ìÞÞ‰¶T–ãa.[Âä\žMÏ›{]/ˆÕ â €òk×@ÉN°î;¦¯½ÅÎC^»¹ð>TnÊÎÜ€Øù@ÍYš…²2€ôWXÀÇÞÈ%NˆGÃ0t]0Á`ŒÐ…HM X–[R„Øø‘XÛ.ð_¬X€Öº™ÊOv¬}wEã"Ö1í®¿®­}éC͇šDiªd6@ç™—Óa©¸Á4Î`hœ3Et>öÞ›Gù«¾?«”›†ôW™m€øÔ×@‰öÚ`|r~Ôºú¾¿…S7£úG •‡œ=eçä§ @àÑÙàM–óžˆj1M0T„CLÑ6¥Ô¯€Êùš­ho yå¢RN®Rpà;@àÔÏéP™Ã/n`Z¥„^<|Á¥_AN~ðÏ‚*ÍAÙ9è:¬°9q)_´½@ªJAÇ9gÐu®Cÿêô¿dUÐñÙù¼G0¡ “P…i¨ÂT9»ÊOWÁ73Îýrì•P-× §á¿ûS¨ÂÌÚ뺩‚Œe9Ï™–ë— ÊŽ¬ ŽÎ9#º¨(¼6~µX HÊÊA™óPå à•k–ÔÊÎ#xë)øgåoüÜ»ð^;9ñzMÂ2Ú ¦g¯Íé}ÿåúÁ¥\ÑVaɆ½ÕÍl5Ûö %ï´-¹"#´þ©0?ÿÔ7á½vª0ucð¾ƒàÊKðþûï\|ðí{Got'¦3¯õ]¶lïôbÁòTp†!@ÄBÒk²ç˲ëOO•ô·5GÔìÔš¼­²WŒžDpî'Óg¡¬Å·!'^Gpñ¹Šß/\‚:ͺT ®\5s9ëûªUe-Û{»P²HÁ–‚˜Cò\}έ"ððqøGÿÐ=“ÉÙÏ–6$ˆFb\•K¦Î@=ÿW€ï@g+®U¼ºÆ­äØ+ð~ù· ‚ <(;UœŠW¡ŠW×u3Òtø‰&uaðÊÓ¶'ÏWÚ“jÒrüLÑôÒɘX¶‚&¨³æ‰Ìõ‚ùlÎzjxF¿gOwSƒrm¨ÅQ¹‰j¨~$.@f/WëKU¹_z7Ñ P['Þ¾˜)æòö·*íÇC¸ã«OO–mw0W²>ŸŒ'xwíû?xµô?»€b«înËÓ¾÷~[Ê`‡ ‚;ßžãÁ.”tÍ÷FÎüâ_kX¯0èÃÈ¡¹`((抦çé‰DRáˆ2H„ "¡8±J8 ¤`¡0T4Lj© ÅÜqS{u({âÙ3מúáï•á œjÚ¢Z™™Ágü-ŸúKbqç@_SÛçötSOC‘òÈž8qâ…Z­EV%%VÊDò;§qjëpièž±ÒЭ›;6wÄzS±ho”ËX˜K2tUÜÀ“PN@Ê– y“g3EÿÒ¥ÉÜè;£¥s¿¼$ߘÌcqE¯öâ WH°Db_jä$çüÅ®D×öŽ&=îä4bŒEëõFi=Π4œÁ‹é¡Âé]éBï–f¾9ÝnjŒë±x˜ÇË*e:Ò,ZA1ozæø¬9ÿÞœZÀTÞ† À­ñlÔ±üñà±Ç{y||üÞ®®®=®ëR…z‚ªÖªµ7[šgK(¼8‚!ŒÃ:/É" !D¢ÂRA•\89å¼r à«Ä_ñÌà:­+µ¿\æxÞ™Læõ‰‰‰­‹‹‹š”r¼^/ÕøN-WÞ¼Ø<ÓC9k¡0[BfÎDvÑFÎòaªJÓY!nñª³]‹À©S§Ü»ï¾{¶X,Þ‘ÍfÛ<Ï{âå—_ž¬÷SP}Ù’†Dõó’—bdifU¡:ăëÄ_!K±«sÝ´æyÞ»ù|þ|ÀÈþì±Tþu¦_’•Zs¯Ó²]«*v ±”«³SKë×S§NÉýû÷8 `üäÉ“úç¢% /iÞ«ö-$«s¼z-\½W«®­¬7;}ôÑUÞÿçíâMòOò}IEND®B`‚scribes-0.4~r910/data/EncodingErrorWindow.glade0000644000175000017500000002101111242100540021254 0ustar andreasandreas False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 Error ScribesEncodingErrorWindow False GTK_WIN_POS_CENTER_ON_PARENT GDK_WINDOW_TYPE_HINT_DIALOG True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 11 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>File:</b> True False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 /dev/null True True PANGO_ELLIPSIZE_END True 1 False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 The encoding of this file could not be automatically detected. If you are sure this file is a text file, please open the file with the correct encoding. True GTK_JUSTIFY_FILL True PANGO_WRAP_WORD_CHAR True False False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select character encoding 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Character _Encoding:</b> True True False False True False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 GTK_BUTTONBOX_END True False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-close True 0 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Open file with selected encoding gtk-open True 0 1 False False 3 scribes-0.4~r910/data/throbber-active.gif0000644000175000017500000000162111242100540020102 0ustar andreasandreasGIF89aã333LLLfff€€€™™™²²²ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ÿ NETSCAPE2.0!ù ,SÉI«½̵æSHÞ†Ç%Ф‰¢Ö:VoÏ î” ðÃÄçƒâs&—F'7` …KµjÁb-[+‚@x³`1™lFƒÖåé„-—G!ù ,SðÉI«½/Ìµæ“ HÞöÀ%Ф‰¢Ö:VoÏ îÔ0ð‡ÃÄçƒâs&—F'G ` †KµjÁb-[ë£Px³`1™lFƒÖåé„-—G!ù ,SðÉI«½O̵æÓ0HÞöÁ%Ф‰¢Ö:VoÏ îAðÀÄçƒâs&—F'W(`‡KµjÁb-[ëÃ`x³`1™lFƒÖåé„-—G!ù ,SðÉI«½o ̵æAHÞöÂ%Ф‰¢Ö:VoÏ îTQðÀÄçƒâs&—F'g0`€KµjÁb-[ëãpx³`1™lFƒÖåé„-—G!ù ,SðÉI«½̵æSQHÞö Ã%Ф‰¢Ö:VoÏ î”aðÁÄçƒâs&—F'w8`KµjÁb-[ëx³`1™lFƒÖåé„-—G!ù ,SðÉI«½¯̵æ“aHÞöÄ%Ф‰¢Ö:VoÏ îÔqðƒÁÄçƒâs&—F'`‚KµjÁb-[ë#x³`1™lFƒÖåé„-—G!ù ,SðÉI«½Ï̵æÓqHÞöÅ%Ф‰¢Ö:VoÏ îðÂÄçƒâs&—F'`ƒKµjÁb-[ëC x³`1™lFƒÖåé„-—G!ù ,SðÉI«½ï̵æHÞöÆ%Ф‰¢Ö:VoÏ îTð…ÂÄçƒâs&—F''`„KµjÁb-[ëc0x³`1™lFƒÖåé„-—G;scribes-0.4~r910/data/Makefile.in0000644000175000017500000004010311242100540016376 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(Desktopdir)" "$(DESTDIR)$(icondir)" \ "$(DESTDIR)$(pixmapsdir)" "$(DESTDIR)$(scribesdir)" DATA = $(Desktop_DATA) $(icon_DATA) $(pixmaps_DATA) $(scribes_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ edit = sed \ -e 's,@pixmapsdir\@,$(pixmapsdir),g' \ -e 's,@icondir\@,$(icondir),g' \ -e 's,@svgicondir\@, $(svgicondir),g' \ -e 's,@scribes_prefix\@,$(prefix),g' \ -e 's,@scribes_data_path\@,$(datadir),g' \ -e 's,@VERSION\@,$(VERSION),g' # Process Scribes logo. pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = scribes.png # Process Scribes data files. scribesdir = $(datadir)/scribes scribes_DATA = Editor.glade \ bookmarks.png \ ModificationDialog.glade \ EncodingSelectionWindow.glade \ EncodingErrorWindow.glade \ MessageWindow.glade \ throbber-active.gif \ throbber-inactive.png icondir = $(datadir)/icons/hicolor/48x48/apps icon_DATA = scribes.png #svgicondir = $(datadir)/icons/hicolor/scalable/apps #svgicon_DATA = scribes.png gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor # Process Scribes freedesktop.org metadata for GNOME. Desktopdir = $(datadir)/applications Desktop_files = scribes.desktop Desktop_in_files = scribes.desktop.in Desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop) EXTRA_DIST = bookmarks.png \ throbber-inactive.png \ throbber-active.gif \ scribes.desktop.in \ ModificationDialog.glade \ EncodingSelectionWindow.glade \ EncodingErrorWindow.glade \ Editor.glade \ MessageWindow.glade \ scribes.png CLEANFILES = $(Desktop_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-DesktopDATA: $(Desktop_DATA) @$(NORMAL_INSTALL) test -z "$(Desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(Desktopdir)" @list='$(Desktop_DATA)'; test -n "$(Desktopdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(Desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(Desktopdir)" || exit $$?; \ done uninstall-DesktopDATA: @$(NORMAL_UNINSTALL) @list='$(Desktop_DATA)'; test -n "$(Desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(Desktopdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(Desktopdir)" && rm -f $$files install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icondir)" || exit $$?; \ done uninstall-iconDATA: @$(NORMAL_UNINSTALL) @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icondir)" && rm -f $$files install-pixmapsDATA: $(pixmaps_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" @list='$(pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapsdir)" || exit $$?; \ done uninstall-pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pixmapsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pixmapsdir)" && rm -f $$files install-scribesDATA: $(scribes_DATA) @$(NORMAL_INSTALL) test -z "$(scribesdir)" || $(MKDIR_P) "$(DESTDIR)$(scribesdir)" @list='$(scribes_DATA)'; test -n "$(scribesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(scribesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(scribesdir)" || exit $$?; \ done uninstall-scribesDATA: @$(NORMAL_UNINSTALL) @list='$(scribes_DATA)'; test -n "$(scribesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(scribesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(scribesdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(Desktopdir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(pixmapsdir)" "$(DESTDIR)$(scribesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-DesktopDATA install-iconDATA \ install-pixmapsDATA install-scribesDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-DesktopDATA uninstall-iconDATA \ uninstall-pixmapsDATA uninstall-scribesDATA .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-DesktopDATA install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iconDATA install-info install-info-am install-man \ install-pdf install-pdf-am install-pixmapsDATA install-ps \ install-ps-am install-scribesDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-DesktopDATA uninstall-am \ uninstall-iconDATA uninstall-pixmapsDATA uninstall-scribesDATA install-data-hook: @-if test -z "$(DESTDIR)"; then \ echo "Updating Gtk icon cache."; \ $(gtk_update_icon_cache); \ else \ echo "*** Icon cache not updated. After install, run this:"; \ echo "*** $(gtk_update_icon_cache)"; \ fi @INTLTOOL_DESKTOP_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/data/ModificationDialog.glade0000644000175000017500000002340711242100540021064 0ustar andreasandreas Warning True GTK_WIN_POS_CENTER_ON_PARENT GDK_WINDOW_TYPE_HINT_DIALOG True True GDK_GRAVITY_CENTER True 10 10 True 10 True gtk-dialog-warning 6 False False True 0 <b>This file has been modified by another program</b> True PANGO_WRAP_WORD_CHAR 1 False False True 10 GTK_BUTTONBOX_END True True True True True True True Neither reload nor overwrite file True 0 True 5 True gtk-cancel False False True I_gnore True True False False 1 False False True Discard current file and load modified file True 0 True 5 True gtk-refresh False False True _Reload File True False False 1 False False 1 True Save current file and overwrite changes made by other program True 0 True 5 True gtk-save False False True _Overwrite File True False False 1 False False 2 False False 1 scribes-0.4~r910/data/scribes.desktop0000644000175000017500000000262411242100540017364 0ustar andreasandreas[Desktop Entry] Name=Scribes Text Editor Name[de]=Scribes Texteditor Name[fr]=Scribes Editeur de Texte Name[it]=Scribes - Editor di testo Name[nl]=Scribes tekst-editor Name[pt_BR]=Editor de Texto Scribes Name[sv]=Textredigeraren Scribes Comment=Edit text files Comment[de]=Textdateien bearbeiten Comment[fr]=Edite les fichiers textes Comment[it]=Modifica file di testo Comment[nl]=Tekstbestanden bewerken Comment[pt_BR]=Edite documentos de texto Comment[sv]=Redigera textfiler Exec=scribes %U Terminal=false Type=Application StartupNotify=true MimeType=text/css;text/html;text/htmlh;text/plain;text/rss;text/sgml;text/x-adasrc;text/x-authors;text/x-c++hdr;text/x-c++src;text/x-copying;text/x-credits;text/x-csharp;text/x-csrc;text/x-dtd;text/x-fortran;text/x-gettext-translation-template;text/x-gettext-translation;text/x-gtkrc;text/x-haskell;text/x-idl;text/x-install;text/x-java;text/x-js;text/x-ksh;text/x-ksysv-log;text/x-literate-haskell;text/x-log;text/x-makefile;text/x-moc;text/x-msil;text/x-nemerle;text/x-objcsrc;text/x-pascal;text/x-patch;text/x-readme;text/x-scheme;text/x-setext;text/x-sql;text/x-tcl;text/x-tex;text/x-texinfo;text/x-troff-me;text/x-troff-mm;text/x-troff-ms;text/x-uil;text/x-vb;text/xml;text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx; Icon=scribes Categories=Utility;TextEditor;GNOME;GTK; X-GNOME-DocPath=scribes/scribes.xml X-Ubuntu-Gettext-Domain=scribesscribes-0.4~r910/data/throbber-inactive.png0000644000175000017500000000074711242100540020460 0ustar andreasandreas‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ "=qtIDATXÃíÖ¿K–Qð¦ƒ"Ò›ƒA ‚ठáäèÜââ Tàø„ƒ«‹ƒ4ûâàæ"´%.º†ƒ *ÔÔ’C*¾öö>-G¸ˆ©è{_ž/\î9÷ò<çÇ÷ÜáD‰%þSt&rÛ}~Ô~ÇïºcŸ˜Oô=a&Wô3(ðïq†ƒ¸; ý(ä¦f`1ú+| :¶ñ ÏÑ,63ꑈz/Cžã Ä£8/° ÕjõÆú¸m ák¤÷1ú±Fû£&~¡ læàþ5Ö"ÅÓØ ‡ŠdÕ0—û nàêW¬3üŽŒeÁJb¼ùBoàÇèm¶áöà¾cÿÊ@·¹¢K¢®_Ú‹hH“9¹N2py}D%§ñèÂIpF~цŸâ>c<—#K ×u|Oî¾$´,çr`çQípdÑ–Ïã|*'S×ÔB »­˜&ð#yµ×ñ¤UCIÞáV1^©TÚ´å`X¢ø &pxŽà"dIIEND®B`‚scribes-0.4~r910/data/scribes.desktop.in0000644000175000017500000000177211242100540017774 0ustar andreasandreas[Desktop Entry] _Name=Scribes Text Editor _Comment=Edit text files Exec=scribes %U Terminal=false Type=Application StartupNotify=true MimeType=text/css;text/html;text/htmlh;text/plain;text/rss;text/sgml;text/x-adasrc;text/x-authors;text/x-c++hdr;text/x-c++src;text/x-copying;text/x-credits;text/x-csharp;text/x-csrc;text/x-dtd;text/x-fortran;text/x-gettext-translation-template;text/x-gettext-translation;text/x-gtkrc;text/x-haskell;text/x-idl;text/x-install;text/x-java;text/x-js;text/x-ksh;text/x-ksysv-log;text/x-literate-haskell;text/x-log;text/x-makefile;text/x-moc;text/x-msil;text/x-nemerle;text/x-objcsrc;text/x-pascal;text/x-patch;text/x-readme;text/x-scheme;text/x-setext;text/x-sql;text/x-tcl;text/x-tex;text/x-texinfo;text/x-troff-me;text/x-troff-mm;text/x-troff-ms;text/x-uil;text/x-vb;text/xml;text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx; Icon=scribes Categories=Utility;TextEditor;GNOME;GTK; X-GNOME-DocPath=scribes/scribes.xml X-Ubuntu-Gettext-Domain=scribesscribes-0.4~r910/data/bookmarks.png0000644000175000017500000000257111242100540017036 0ustar andreasandreas‰PNG  IHDRàw=øbKGDÿÿÿ ½§“.IDATxÚ¥–ylTUÆï½ÎL;CW 5ERPR)HRv¨ÚÄ 1BDcD@Tˆ(Hˆ1b4‚eqA P 1 ®U)JZ(݇:íl7Λ™7×?¼ÓS#âINî_ï|ç;÷»ßy0xh ,˜ˆ$‹U3€ À ¨üÏÐæÏŸ?Û‘ž%vî?,~,?ïd@¹Ýâ*0Þ‘ž%¶¼³OôôôˆÚËW„=5CKQ€ãvY¨ÀøÌœ;Ŷ÷>>¿_477‹ÚÚZñáþ—$‹û€aÿ……:à,HšSµvãë,_R†»»·Û®ëŒ»7ìô¡Ày·  ÃrGU­X·ÉX¹t!×;:ðù|$''F±$i<ûÜŠ³À H’ä·Ê yÀØœ¼üªk6Ö?û„ÍårljD"Äb1LÓÄ4MЦŽNÍž`‘.™Ø%X"“%»¤ T/}f¥kõ²Ei].†a`š&ñxÓ4III! ‡ÂÖ'_ÜUXXxh<€ôÊlÖ“%¸PÔâK˜2á^G,Å0 Ün÷M…MÓĈDC.ϰ²y¥Ù³‡ÛYûä^Yþ4ËæÎæÂ… !B °¸ä) .ÙiZk}õk}ÖìeÍÌÐu¨RU•ÞÞ^, ׺<™C¬é'ßܬ̉v’çná÷–vozƒ±ãèêê ¤ž>}ªøèÂ*pG[CÞÇGOëÙÙÙX­Öþù;ÚÚ;oÄúÙŸîÞ¡<’B±Ù©ŒX™¾z#EEEØl6œÎ6åÛŠZ€ž"Pº?Îç»_*½Š¢`š&š¦ Ñõ`@ï3’;¢– /ÂŒRå 0åù ”–ÎÃ0 4MÅÕÝÅoëDùÙ¯Tà] ˜€P0PâêhËûìø×Á‘#G¢iV«•ú–ö¦CŸìÉ,K5)j¡Óˆ“9cÓ>†ÍfÃf³7MÊË¥ÝåÁçj¸(/? ˜*j*¾9ÊÙò‹Uýëíµ¶9/qøÀ„=SGSîàL»ïÝ÷±ô­]ýÅ“4§ó=Ìžo+±hdc qURéJ¼]×óö>Ñ“››k¼¿kwÞ¶Ò”¤ÊŸ¨ö…ŽŸÁª}‡UQˆDbÔ]mä·ªzzÜHùú$ƒO<8‹ô1wÉ Í'Nô9rD8,ZæŒ[Í>¿_ÄLSD¢QaD¢"‹‰æ¶kbïÁc 3\ w 4Ä„õ³¸Z}~ô¤iE¡’üQ Ûü[­cxøå-d¤§ÔuŒpUUˆ›qššÛ8ó}!ÝŸèÞ/»Js$IÄwÑXUNþ„éYÞS‡IKRhÐ R³rè ‡±X,Øívªë®ÐÒÞɱ}ÛÖɹûT‘Ð1À Uå9E»ï±7U+»›|üPY/B1M4:¯  ¤¤¤Ø¨«o¢¢²F”Ÿ;£»à–fÿöPXÈ3LX5"Ywhʈ¢×»ãÇ󱦿Ö_¯©üQs%ÞÐä­×»ãÛ_}IÖÍÀ/'‘¨Õ?¢DÄ$@€ŸcBäÎÌJQ35ÅÑPS±·¡¦"L,*éÕ{^.ÝRž7ç–†œl,ésîZjaš¥erFrÖ.§ž<)b— ^鬿Kóßâ<0I²œ |)ÿ,îòä~dÊ=0èž¾Õ¿ƒÄ¦R¤"»5å9hçx«fT™s`IEND®B`‚scribes-0.4~r910/data/Makefile.am0000644000175000017500000000307111242100540016370 0ustar andreasandreasedit = sed \ -e 's,@pixmapsdir\@,$(pixmapsdir),g' \ -e 's,@icondir\@,$(icondir),g' \ -e 's,@svgicondir\@, $(svgicondir),g' \ -e 's,@scribes_prefix\@,$(prefix),g' \ -e 's,@scribes_data_path\@,$(datadir),g' \ -e 's,@VERSION\@,$(VERSION),g' # Process Scribes logo. pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = scribes.png # Process Scribes data files. scribesdir = $(datadir)/scribes scribes_DATA = Editor.glade \ bookmarks.png \ ModificationDialog.glade \ EncodingSelectionWindow.glade \ EncodingErrorWindow.glade \ MessageWindow.glade \ throbber-active.gif \ throbber-inactive.png icondir = $(datadir)/icons/hicolor/48x48/apps icon_DATA = scribes.png #svgicondir = $(datadir)/icons/hicolor/scalable/apps #svgicon_DATA = scribes.png gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor install-data-hook: @-if test -z "$(DESTDIR)"; then \ echo "Updating Gtk icon cache."; \ $(gtk_update_icon_cache); \ else \ echo "*** Icon cache not updated. After install, run this:"; \ echo "*** $(gtk_update_icon_cache)"; \ fi # Process Scribes freedesktop.org metadata for GNOME. Desktopdir = $(datadir)/applications Desktop_files = scribes.desktop Desktop_in_files = scribes.desktop.in Desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ EXTRA_DIST = bookmarks.png \ throbber-inactive.png \ throbber-active.gif \ scribes.desktop.in \ ModificationDialog.glade \ EncodingSelectionWindow.glade \ EncodingErrorWindow.glade \ Editor.glade \ MessageWindow.glade \ scribes.png CLEANFILES = $(Desktop_DATA) scribes-0.4~r910/data/EncodingSelectionWindow.glade0000644000175000017500000000510411242100540022115 0ustar andreasandreas False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 Select Encodings ScribesEncodingSelectionWindowRole ScribesEncodingSelectionWindowID True GTK_WIN_POS_CENTER_ON_PARENT 640 480 True Scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_RESIZE_IMMEDIATE GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True False GTK_TREE_VIEW_GRID_LINES_VERTICAL scribes-0.4~r910/data/MessageWindow.glade0000644000175000017500000001107311242100540020107 0ustar andreasandreas 10 True GTK_WIN_POS_CENTER_ON_PARENT True scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True 10 True 10 True gtk-info 6 False False True 10 True 0 <b>This is a test title label</b> True True PANGO_ELLIPSIZE_END True True 0.10000000149011612 This is a test message label. True True 1 1 False False True GTK_BUTTONBOX_END True True True True True True True gtk-close True 0 False False False False 1 scribes-0.4~r910/SCRIBES/0000755000175000017500000000000011242100540014514 5ustar andreasandreasscribes-0.4~r910/SCRIBES/CommandLineInfo.py0000644000175000017500000000246011242100540020072 0ustar andreasandreasdef print_info(): print "========================================================" import os print "System Info: ", os.uname() import sys print "Python Version: ", sys.version print "System Byteorder: ", sys.byteorder print "Python Modules: ", sys.builtin_module_names print "========================================================" from Globals import version print "Scribes Version: ", version import dbus print "Dbus Version: ", dbus.version import gtk print "GTK+ Version: ", gtk.gtk_version import gtk print "PyGTK Version: ", gtk.pygtk_version try: import psyco print "Psyco Version: ", psyco.version_info except ImportError: print "Psyco Not Installed" print "========================================================" from Globals import dbus_iface services = dbus_iface.ListNames() service = "net.sourceforge.Scribes" print "Running Instance: ", services.count(service) print "========================================================" from Globals import executable_path from Globals import python_path, core_plugin_folder from Globals import data_folder print "Python Path: ", python_path print "Plugin Path: ", core_plugin_folder print "Data Path: ", data_folder print "Executable Path: ", executable_path print "========================================================" return scribes-0.4~r910/SCRIBES/URILoader/0000755000175000017500000000000011242100540016302 5ustar andreasandreasscribes-0.4~r910/SCRIBES/URILoader/Destroyer.py0000644000175000017500000000104311242100540020632 0ustar andreasandreasclass Destroyer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid2 = editor.connect("loaded-file", self.__loaded_file_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__manager.emit("destroy") self.__editor.textview.grab_focus() self.__editor.disconnect_signal(self.__sigid2, self.__editor) del self return False def __loaded_file_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/URILoader/ErrorManager.py0000644000175000017500000000343511242100540021245 0ustar andreasandreasfrom gettext import gettext as _ class Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect_after("error", self.__error_cb) self.__sigid3 = manager.connect_after("encoding-error", self.__encoding_error_cb) self.__sigid4 = manager.connect_after("unhandled-gio-error", self.__gio_error_cb) self.__sigid5 = manager.connect_after("NoFeedbackError", self.__no_feedback_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) del self return False def __show(self, data): uri, message = data self.__editor.emit("load-error", uri) from gio import File gfile = File(uri) title = _("File: %s") % gfile.get_parse_name() self.__editor.show_error(title, message) return False def __destroy_cb(self, *args): self.__destroy return False def __error_cb(self, manager, data): self.__show(data) return False def __encoding_error_cb(self, manager, uri, *args): print "Load encoding error." self.__editor.show_load_encoding_error_window(uri) return False def __gio_error_cb(self, manager, data): gfile, error = data self.__show((gfile.get_uri(), error.message)) return False def __no_feedback_cb(self, manager, data): gfile, error = data self.__editor.emit("load-error", gfile.get_uri()) self.__editor.busy(False) return False scribes-0.4~r910/SCRIBES/URILoader/__init__.py0000644000175000017500000000000011242100540020401 0ustar andreasandreasscribes-0.4~r910/SCRIBES/URILoader/MountOperator.py0000644000175000017500000000105011242100540021466 0ustar andreasandreasfrom gtk import MountOperation class Operator(MountOperation): def __init__(self, manager, editor): MountOperation.__init__(self, editor.window) self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) del self return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/URILoader/FileTypeChecker.py0000644000175000017500000000273411242100540021670 0ustar andreasandreasclass Checker(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("check-file-type", self.__check_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __error(self, data): self.__manager.emit("gio-error", data) return False def __raise_error(self): from gio import Error, ERROR_NOT_REGULAR_FILE message = "ERROR: Not a regular file." from GIOError import GError raise Error, (GError(ERROR_NOT_REGULAR_FILE, message)) def __check(self, uri): from gio import File File(uri).query_info_async(self.__async_result_cb, "standard::type") return False def __async_result_cb(self, gfile, result): from gio import FILE_TYPE_REGULAR, Error try: fileinfo = gfile.query_info_finish(result) if fileinfo.get_file_type() != FILE_TYPE_REGULAR: self.__raise_error() self.__manager.emit("read-uri", gfile.get_uri()) except Error, e: from gobject import idle_add idle_add(self.__error, (gfile, e)) return False def __destroy_cb(self, *args): self.__destroy() return False def __check_cb(self, manager, uri): from gobject import idle_add idle_add(self.__check, uri) return False scribes-0.4~r910/SCRIBES/URILoader/Makefile.in0000644000175000017500000003175111242100540020356 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/URILoader DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(uriloader_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(uriloaderdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uriloaderdir = $(pythondir)/SCRIBES/URILoader uriloader_PYTHON = \ __init__.py \ Manager.py \ StateNotifier.py \ BusyManager.py\ URIReader.py \ ErrorManager.py \ TextInserter.py \ EncodingProcessor.py \ Destroyer.py \ Initializer.py \ FileMounter.py \ FileTypeChecker.py \ GIOError.py \ MountOperator.py \ GIOErrorHandler.py TAGS_FILES = $(uriloader_PYTHON) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/URILoader/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/URILoader/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-uriloaderPYTHON: $(uriloader_PYTHON) @$(NORMAL_INSTALL) test -z "$(uriloaderdir)" || $(MKDIR_P) "$(DESTDIR)$(uriloaderdir)" @list='$(uriloader_PYTHON)'; dlist=; list2=; test -n "$(uriloaderdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(uriloaderdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(uriloaderdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(uriloaderdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(uriloaderdir)" $$dlist; \ fi; \ else :; fi uninstall-uriloaderPYTHON: @$(NORMAL_UNINSTALL) @list='$(uriloader_PYTHON)'; test -n "$(uriloaderdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(uriloaderdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(uriloaderdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(uriloaderdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(uriloaderdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(uriloaderdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(uriloaderdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(uriloaderdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-uriloaderPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-uriloaderPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-uriloaderPYTHON \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-uriloaderPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/URILoader/Initializer.py0000644000175000017500000000166411242100540021146 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager, editor, uri, encoding): SignalManager.__init__(self, editor) self.__init_attibutes(manager, editor) self.connect(editor, "load-file", self.__load_file_cb) self.connect(manager, "destroy", self.__destroy_cb) if uri: editor.load_file(uri, encoding) def __init_attibutes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() del self return False def __load(self, uri, encoding): self.__manager.emit("init-loading", uri, encoding) self.__manager.emit("check-file-type", uri) return False def __load_file_cb(self, editor, uri, encoding): from gobject import idle_add, PRIORITY_HIGH idle_add(self.__load, uri, encoding, priority=PRIORITY_HIGH) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/URILoader/URIReader.py0000644000175000017500000000235311242100540020441 0ustar andreasandreasclass Reader(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("read-uri", self.__read_uri_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __read(self, uri): from gio import File File(uri).load_contents_async(self.__ready_cb) return False def __error(self, data): self.__manager.emit("gio-error", data) return False def __ready_cb(self, gfile, result): from gio import Error try: data = gfile.load_contents_finish(result) self.__manager.emit("process-encoding", gfile.get_uri(), data[0]) except Error, e: from gobject import idle_add idle_add(self.__error, (gfile, e), priority=9999) return False def __destroy_cb(self, *args): self.__destroy() return False def __read_uri_cb(self, manager, uri): from gobject import idle_add from glib import PRIORITY_HIGH idle_add(self.__read, uri, priority=PRIORITY_HIGH) return False scribes-0.4~r910/SCRIBES/URILoader/BusyManager.py0000644000175000017500000000217111242100540021072 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("init-loading", self.__busy_cb) self.__sigid3 = manager.connect("error", self.__nobusy_cb) self.__sigid4 = manager.connect("encoding-error", self.__nobusy_cb) self.__sigid5 = manager.connect("load-success", self.__nobusy_cb) self.__sigid6 = editor.connect("load-error", self.__nobusy_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __destroy(self): signals = ( (self.__sigid1, self.__manager), (self.__sigid2, self.__manager), (self.__sigid3, self.__manager), (self.__sigid4, self.__manager), (self.__sigid5, self.__manager), (self.__sigid6, self.__editor), ) self.__editor.disconnect_signals(signals) del self return False def __destroy_cb(self, *args): self.__destroy() return False def __busy_cb(self, *args): #self.__editor.busy() return False def __nobusy_cb(self, *args): #self.__editor.busy(False) return False scribes-0.4~r910/SCRIBES/URILoader/Manager.py0000644000175000017500000000352411242100540020232 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_STRING from gobject import TYPE_NONE, TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "init-loading": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "process-encoding": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "insertion-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "load-success": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "insert-text": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING, TYPE_STRING)), "read-uri": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "check-file-type": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "NoFeedbackError": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "destroy": (SSIGNAL, TYPE_NONE, ()), "encoding-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "gio-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "unhandled-gio-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "ErrorNotMounted": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor, uri, encoding): GObject.__init__(self) from Destroyer import Destroyer Destroyer(self, editor) from FileMounter import Mounter Mounter(self, editor) from GIOErrorHandler import Handler Handler(self, editor) from BusyManager import Manager Manager(self, editor) from StateNotifier import Notifier Notifier(self, editor) from ErrorManager import Manager Manager(self, editor) from TextInserter import Inserter Inserter(self, editor) from EncodingProcessor import Processor Processor(self, editor) from URIReader import Reader Reader(self, editor) from FileTypeChecker import Checker Checker(self, editor) from Initializer import Initializer Initializer(self, editor, uri, encoding) scribes-0.4~r910/SCRIBES/URILoader/EncodingProcessor.py0000644000175000017500000000315711242100540022310 0ustar andreasandreasclass Processor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("process-encoding", self.__process_cb) self.__sigid3 = manager.connect("init-loading", self.__init_loading_cb) self.__sigid4 = manager.connect("insertion-error", self.__process_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__encodings = deque() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) del self return False def __send(self, uri, string): try: encoding = self.__encodings.popleft() self.__manager.emit("insert-text", uri, string, encoding) except IndexError: self.__manager.emit("encoding-error", uri) return False def __generate_encoding_list(self, encoding): from collections import deque encodings = deque(self.__editor.encoding_guess_list) encodings.appendleft(encoding) return encodings def __destroy_cb(self, *args): self.__destroy() return False def __process_cb(self, manager, uri, string): from gobject import idle_add, PRIORITY_HIGH idle_add(self.__send, uri, string, priority=PRIORITY_HIGH) return False def __init_loading_cb(self, manager, uri, encoding): self.__encodings = self.__generate_encoding_list(encoding) return False scribes-0.4~r910/SCRIBES/URILoader/Makefile.am0000644000175000017500000000063111242100540020336 0ustar andreasandreasuriloaderdir = $(pythondir)/SCRIBES/URILoader uriloader_PYTHON = \ __init__.py \ Manager.py \ StateNotifier.py \ BusyManager.py\ URIReader.py \ ErrorManager.py \ TextInserter.py \ EncodingProcessor.py \ Destroyer.py \ Initializer.py \ FileMounter.py \ FileTypeChecker.py \ GIOError.py \ MountOperator.py \ GIOErrorHandler.py TAGS_FILES = $(uriloader_PYTHON) clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/URILoader/GIOErrorHandler.py0000644000175000017500000000222511242100540021603 0ustar andreasandreasfrom gio import ERROR_NOT_MOUNTED class Handler(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("gio-error", self.__error_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor # Map GIO Error codes to Scribes signals for errors we want to # handle in a special manner. self.__dictionary = { ERROR_NOT_MOUNTED: "ErrorNotMounted", # Password dialog cancel error. # 14: "NoFeedbackError", } return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __process(self, data): try: gfile, error = data self.__manager.emit(self.__dictionary[error.code], data) except KeyError: self.__manager.emit("unhandled-gio-error", data) return False def __error_cb(self, manager, data): from gobject import idle_add idle_add(self.__process, data) return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/URILoader/GIOError.py0000644000175000017500000000022411242100540020302 0ustar andreasandreasfrom gio import Error class GError(Error): def __init__(self, code, message): Error.__init__(self) self.code = code self.message = message scribes-0.4~r910/SCRIBES/URILoader/TextInserter.py0000644000175000017500000000231711242100540021317 0ustar andreasandreasclass Inserter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("insert-text", self.__insert_cb) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return def __insert(self, uri, string, encoding): try: if encoding is None: encoding = "utf-8" unicode_string = string.decode(encoding, "strict") utf8_string = unicode_string.encode("utf-8", "strict") # self.__editor.refresh(True) self.__editor.textbuffer.set_text(utf8_string) # self.__editor.refresh(True) self.__manager.emit("load-success", uri, encoding) except: self.__manager.emit("insertion-error", uri, string) return False def __destroy_cb(self, *args): self.__destroy() return False def __insert_cb(self, manager, uri, string, encoding): from gobject import idle_add, PRIORITY_HIGH idle_add(self.__insert, uri, string, encoding, priority=PRIORITY_HIGH) return False scribes-0.4~r910/SCRIBES/URILoader/StateNotifier.py0000644000175000017500000000321311242100540021433 0ustar andreasandreasclass Notifier(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("init-loading", self.__init_loading_cb) self.__sigid3 = manager.connect("error", self.__error_cb) self.__sigid4 = manager.connect("read-uri", self.__read_uri_cb) self.__sigid5 = manager.connect("encoding-error", self.__encoding_error_cb) self.__sigid6 = manager.connect("load-success", self.__load_success_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__manager) del self return False def __destroy_cb(self, *args): self.__destroy() return False def __init_loading_cb(self, manager, uri, encoding): self.__editor.emit("checking-file", uri) return False def __error_cb(self, manager, uri, error_code): self.__editor.emit("load-error", uri) return False def __read_uri_cb(self, manager, uri): self.__editor.emit("loading-file", uri) return False def __encoding_error_cb(self, manager, uri): self.__editor.emit("load-error", uri) return False def __load_success_cb(self, manager, uri, encoding): self.__editor.emit("loaded-file", uri, encoding) return False scribes-0.4~r910/SCRIBES/URILoader/FileMounter.py0000644000175000017500000000277111242100540021114 0ustar andreasandreasclass Mounter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = manager.connect("destroy", self.__destroy_cb) self.__sigid2 = manager.connect("ErrorNotMounted", self.__mount_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from MountOperator import Operator self.__mount_operator = Operator(manager, editor) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__manager) del self return False def __mount(self, data): gfile, error = data gfile.mount_enclosing_volume(self.__mount_operator, self.__async_ready_cb) return False def __check(self, uri): self.__manager.emit("check-file-type", uri) return False def __error(self, data): self.__manager.emit("gio-error", data) return False def __async_ready_cb(self, gfile, result): from gio import Error try: success = gfile.mount_enclosing_volume_finish(result) from gobject import idle_add, PRIORITY_HIGH if success: idle_add(self.__check, gfile.get_uri(), priority=PRIORITY_HIGH) except Error, e: from gobject import idle_add idle_add(self.__error, (gfile, e)) return False def __destroy_cb(self, *args): self.__destroy() return False def __mount_cb(self, manager, data): from gobject import idle_add from glib import PRIORITY_HIGH idle_add(self.__mount, data, priority=PRIORITY_HIGH) return False scribes-0.4~r910/SCRIBES/CommandLineProcessor.py0000644000175000017500000000250011242100540021151 0ustar andreasandreasdef get_uris(args, newfile): if not args: return [] uris = __uris_from(args) existent_uris, nonexistent_uris = __categorize(uris) new_uris = __create(nonexistent_uris) if newfile else __ignore(nonexistent_uris) uris = existent_uris + new_uris if not uris: raise SystemExit return uris def __uris_from(args): from gio import File return [File(arg.strip()).get_uri() for arg in args] def __categorize(uris): existent_uris, nonexistent_uris = [], [] for uri in uris: existent_uris.append(uri) if __exists(uri) else nonexistent_uris.append(uri) return existent_uris, nonexistent_uris def __exists(uri): # Do not perform checks on remote files. from gio import File if File(uri).get_uri_scheme() != "file": return True from os.path import exists return exists(File(uri).get_path()) def __ignore(uris): if not uris: return [] from gio import File for uri in uris: print File(uri).get_path(), " does not exists" return [] def __new(uri): try: from gio import File if File(uri).get_uri_scheme() != "file": raise ValueError File(uri).replace_contents("") except ValueError: print "Error: %s is a remote file. Cannot create remote files from \ terminal" % File(uri).get_path() except: print "Error: could not create %s" % File(uri).get_path() return uri def __create(uris): return [__new(uri) for uri in uris] scribes-0.4~r910/SCRIBES/RecentManager.py0000644000175000017500000000254611242100540017610 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) editor.set_data("RecentManager", self.__manager) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "loaded-file", self.__loaded_file_cb) self.connect(editor, "renamed-file", self.__renamed_file_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from gtk import recent_manager_get_default self.__manager = recent_manager_get_default() return def __create_recent_data(self, uri): fileinfo = self.__editor.get_fileinfo(uri) app_name = "scribes" app_exec = "%U" description = "A text file." recent_data = { "mime_type": fileinfo.get_content_type(), "app_name": app_name, "app_exec": app_exec, "display_name": fileinfo.get_display_name(), "description": description, } return recent_data def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return def __loaded_file_cb(self, editor, uri, *args): self.__manager.add_full(uri, self.__create_recent_data(uri)) return def __renamed_file_cb(self, editor, uri, *args): self.__manager.add_full(uri, self.__create_recent_data(uri)) return def __quit_cb(self, editor): self.__destroy() return scribes-0.4~r910/SCRIBES/FreezeManager.py0000644000175000017500000000212011242100540017574 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "quit", self.__destroy_cb) self.connect(editor, "freeze", self.__freeze_cb) self.connect(editor, "thaw", self.__thaw_cb) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview self.__is_frozen = 0 return def __freeze_cb(self, *args): try: if self.__is_frozen: raise ValueError self.__view.set_editable(False) self.__view.window.freeze_updates() except ValueError: pass finally: if self.__is_frozen < 0: self.__is_frozen = 0 self.__is_frozen += 1 return False def __thaw_cb(self, *args): try: if self.__is_frozen != 1: raise ValueError self.__view.set_editable(True) self.__view.window.thaw_updates() except ValueError: pass finally: self.__is_frozen -= 1 if self.__is_frozen < 0: self.__is_frozen = 0 return False def __destroy_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/SCRIBES/SIGNALS.py0000644000175000017500000001126111242100540016167 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE, TYPE_BOOLEAN from gobject import TYPE_STRING, TYPE_OBJECT, TYPE_PYOBJECT from gobject import SIGNAL_ACTION, type_register, SIGNAL_NO_RECURSE SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION SACTION = SIGNAL_RUN_LAST|SIGNAL_ACTION class Signals(GObject): __gsignals__ = { # Nobody should listen to this signal. For internal use only. "close": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), # QUIT signal to all core objects. This signal is emitted only after # a file has been properly saved. For internal use only. PlEASE NEVER # EMIT THIS SIGNAL. This is the signal to listen to for proper cleanup # before exit. "quit": (SSIGNAL, TYPE_NONE, ()), "post-quit": (SSIGNAL, TYPE_NONE, ()), "cursor-moved": (SSIGNAL, TYPE_NONE, ()), "ready": (SSIGNAL, TYPE_NONE, ()), "readonly": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "toggle-readonly": (SSIGNAL, TYPE_NONE, ()), "toggle-fullscreen": (SSIGNAL, TYPE_NONE, ()), "busy": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "private-busy": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "checking-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "loading-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "loaded-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "load-file": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT, TYPE_PYOBJECT)), "load-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "show-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING, TYPE_OBJECT, TYPE_BOOLEAN)), "show-info": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING, TYPE_OBJECT, TYPE_BOOLEAN)), "modified-file": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "enable-spell-checking": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "new-encoding-list": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update-encoding-guess-list": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "renamed-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "rename-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "reload-file": (SSIGNAL, TYPE_NONE, ()), "saved-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "save-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "private-save-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "save-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING, TYPE_STRING)), "send-data-to-processor": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING )), "private-encoding-load-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "dbus-saved-file": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING)), "dbus-save-error": (SSIGNAL, TYPE_NONE, (TYPE_STRING, TYPE_STRING, TYPE_STRING)), "window-focus-out": (SSIGNAL, TYPE_NONE, ()), "combobox-encoding-data?": (SSIGNAL, TYPE_NONE, ()), "combobox-encoding-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "supported-encodings-window": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "remove-bar-object": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "add-bar-object": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "spin-throbber": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "bar-is-active": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "hide-message": (SSIGNAL, TYPE_NONE, ()), "update-message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "set-message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "unset-message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "undo": (SSIGNAL, TYPE_BOOLEAN, ()), "redo": (SSIGNAL, TYPE_NONE, ()), "show-full-view": (SSIGNAL, TYPE_NONE, ()), "hide-full-view": (SSIGNAL, TYPE_NONE, ()), "syntax-color-theme-changed": (SSIGNAL, TYPE_NONE, ()), "add-trigger": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove-trigger": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "add-triggers": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove-triggers": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "register-object": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "unregister-object": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "hide-completion-window": (SSIGNAL, TYPE_NONE, ()), "freeze": (SSIGNAL, TYPE_NONE, ()), "thaw": (SSIGNAL, TYPE_NONE, ()), "scrollbar-visibility-update": (SSIGNAL, TYPE_NONE, ()), "completion-window-is-visible": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "trigger": (SSIGNAL, TYPE_NONE, (TYPE_STRING,)), "refresh": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "add-to-popup": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "add-to-pref-menu": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "remove-from-pref-menu": (SSIGNAL, TYPE_NONE, (TYPE_OBJECT,)), "reset-buffer": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "fullscreen": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "message-bar-is-visible": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), "toolbar-is-visible": (SSIGNAL, TYPE_NONE, (TYPE_BOOLEAN,)), } def __init__(self): GObject.__init__(self) # self.__gobject_init__() type_register(Signals) scribes-0.4~r910/SCRIBES/__init__.py0000644000175000017500000000000011242100540016613 0ustar andreasandreasscribes-0.4~r910/SCRIBES/FileModificationMonitor.py0000644000175000017500000000123711242100540021646 0ustar andreasandreasclass Monitor(object): def __init__(self, editor): self.__init_attributes(editor) editor.set_data("modified", False) self.__sigid1 = editor.connect("modified-file", self.__modified_cb) self.__sigid2 = editor.connect("quit", self.__quit_cb) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) del self return False def __modified_cb(self, editor, modified): self.__editor.set_data("modified", modified) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/ScrollbarVisibilityUpdater.py0000644000175000017500000000320011242100540022401 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "quit", self.__destroy_cb) self.connect(self.__vscrollbar, "value-changed", self.__changed_cb, data=True) self.connect(self.__hscrollbar, "value-changed", self.__changed_cb, data=False) self.connect(editor, "loaded-file", self.__loaded_cb, True) def __init_attributes(self, editor): self.__editor = editor self.__vscrollbar = editor.gui.get_widget("ScrolledWindow").get_vscrollbar() self.__hscrollbar = editor.gui.get_widget("ScrolledWindow").get_hscrollbar() self.__vdelta = False self.__hdelta = False return def __update(self, _range, vertical=True): idelta = self.__vdelta if vertical else self.__hdelta delta = True if _range.get_value() else False if delta == idelta: return False if vertical: self.__vdelta = delta if vertical is False: self.__hdelta = delta self.__editor.emit("scrollbar-visibility-update") return True def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __destroy_cb(self, *args): self.disconnect() del self return False def __changed_cb(self, _range, vertical): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__update, _range, vertical, priority=PRIORITY_LOW) return False def __loaded_cb(self, *args): self.__editor.emit("scrollbar-visibility-update") return False scribes-0.4~r910/SCRIBES/TerminalSignalHandler.py0000644000175000017500000000055311242100540021300 0ustar andreasandreasclass Handler(object): def __init__(self, manager): self.__manager = manager from signal import signal, SIGHUP, SIGTERM, SIGABRT, SIGSEGV signal(SIGTERM, self.__quit_cb) signal(SIGHUP, self.__quit_cb) signal(SIGABRT, self.__quit_cb) signal(SIGSEGV, self.__quit_cb) def __quit_cb(self, signum, frame): self.__manager.close_all_windows() return scribes-0.4~r910/SCRIBES/UniqueStampGenerator.py0000644000175000017500000000045611242100540021215 0ustar andreasandreasclass Generator(object): def __init__(self, editor): self.__generate_stamp(editor) self.__destroy() def __generate_stamp(self, editor): from time import strftime editor.set_data("uniquestamp", strftime("%Y-%m-%d %H:%M:%S")) return def __destroy(self): del self self = None return scribes-0.4~r910/SCRIBES/Editor.py0000644000175000017500000004773211242100540016331 0ustar andreasandreasimport EditorImports from SIGNALS import Signals class Editor(Signals): def __init__(self, manager, uri=None, encoding="utf-8", stdin=None): Signals.__init__(self) from ServicesInitializer import Initializer Initializer(self, manager, uri, encoding, stdin) self.__count = 0 ######################################################################## # # Public APIs # ######################################################################## @property def window_is_active(self): from Utils import window_is_active return window_is_active(self) @property def id_(self): return id(self) @property def spaces_instead_of_tabs(self): return self.view.get_insert_spaces_instead_of_tabs() @property def tabs_instead_of_spaces(self): return not self.view.get_insert_spaces_instead_of_tabs() @property def tab_width(self): return self.view.get_tab_width() @property def indentation_width(self): return self.view.get_tab_width() @property def line_text(self): return self.get_line_text() @property def gui(self): try: return self.__gui except AttributeError: self.__gui = self.get_data("gui") return self.__gui @property def textview(self): try: return self.__view except AttributeError: self.__view = self.gui.get_widget("ScrolledWindow").get_child() return self.__view @property def view(self): return self.textview @property def textbuffer(self): try: return self.__buffer except AttributeError: self.__buffer = self.textview.get_property("buffer") return self.__buffer @property def buf(self): return self.textbuffer @property def buffer_(self): return self.textbuffer @property def window(self): try: return self.__window except AttributeError: self.__window = self.gui.get_widget("Window") return self.__window imanager = property(lambda self: self.get_data("InstanceManager")) toolbar = property(lambda self: self.get_data("Toolbar")) uri = property(lambda self: self.get_data("uri")) uris = property(lambda self: self.imanager.get_uris()) # All editor instances objects = instances = property(lambda self: self.imanager.get_editor_instances()) name = property(lambda self: EditorImports.File(self.uri).query_info("*").get_display_name() if self.uri else None) triggers = property(lambda self: self.get_data("triggers")) filename = property(lambda self: EditorImports.File(self.uri).get_path() if self.uri else "") language_object = property(lambda self: self.get_data("language_object")) language = property(lambda self: self.get_data("language")) language_manager = property(lambda self: EditorImports.language_manager_get_default()) language_ids = property(lambda self: self.language_manager.get_language_ids()) language_objects = property(lambda self: [self.language_manager.get_language(language) for language in self.language_ids]) style_scheme_manager = property(lambda self: self.get_data("style_scheme_manager")) readonly = property(lambda self: self.get_data("readonly")) modified = property(lambda self: self.get_data("modified")) contains_document = property(lambda self: self.get_data("contains_document")) encoding = property(lambda self: EditorImports.get_encoding(self.uri)) encoding_list = property(lambda self: EditorImports.get_encoding_list()) encoding_guess_list = property(lambda self: EditorImports.get_encoding_guess_list()) # textview and textbuffer information cursor = property(lambda self: self.textbuffer.get_iter_at_offset(self.textbuffer.get_property("cursor_position"))) text = property(lambda self: self.textbuffer.get_text(*(self.textbuffer.get_bounds()))) # Global information print_settings_filename = property(lambda self: EditorImports.print_settings_filename) data_folder = property(lambda self: EditorImports.data_folder) metadata_folder = property(lambda self: EditorImports.metadata_folder) storage_folder = property(lambda self: EditorImports.storage_folder) home_folder = property(lambda self: EditorImports.home_folder) desktop_folder = property(lambda self: EditorImports.desktop_folder) home_folder_uri = property(lambda self: EditorImports.File(self.home_folder).get_uri()) desktop_folder_uri = property(lambda self: EditorImports.File(self.desktop_folder).get_uri()) core_plugin_folder = property(lambda self: EditorImports.core_plugin_folder) home_plugin_folder = property(lambda self: EditorImports.home_plugin_folder) core_language_plugin_folder = property(lambda self: EditorImports.core_language_plugin_folder) home_language_plugin_folder = property(lambda self: EditorImports.home_language_plugin_folder) session_bus = property(lambda self: EditorImports.session_bus) python_path = property(lambda self: EditorImports.python_path) dbus_iface = property(lambda self: EditorImports.dbus_iface) version = property(lambda self: EditorImports.version) copyrights = property(lambda self: EditorImports.copyrights) license = property(lambda self: EditorImports.license_string) translators = property(lambda self: EditorImports.translators) documenters = property(lambda self: EditorImports.documenters) artists = property(lambda self: EditorImports.artists) author = property(lambda self: EditorImports.author) scribes_theme_folder = property(lambda self: EditorImports.scribes_theme_folder) default_home_theme_folder = property(lambda self: EditorImports.default_home_theme_folder) website = property(lambda self: EditorImports.website) save_processor = property(lambda self: self.imanager.get_save_processor()) supported_encodings = property(lambda self: EditorImports.supported_encodings) word_pattern = property(lambda self: EditorImports.WORD_PATTERN) selection_range = property(lambda self: self.get_selection_range()) selection_bounds = property(lambda self: self.textbuffer.get_selection_bounds()) newline_character = property(lambda self: self.get_newline_character()) line_indentation = property(lambda self: self.get_line_indentation()) selected_text = property(lambda self: self.textbuffer.get_text(*(self.selection_bounds))) has_selection = property(lambda self: self.textbuffer.props.has_selection) pwd = property(lambda self: EditorImports.File(self.uri).get_parent().get_path() if self.uri else self.desktop_folder) pwd_uri = property(lambda self: EditorImports.File(self.uri).get_parent().get_uri() if self.uri else EditorImports.File(self.desktop_folder).get_uri()) dialog_filters = property(lambda self: EditorImports.create_filter_list()) bar_is_active = property(lambda self: self.get_data("bar_is_active")) completion_window_is_visible = property(lambda self: self.get_data("completion_window_is_visible")) minimized = property(lambda self: self.get_data("minimized")) maximized = property(lambda self: self.get_data("maximized")) in_fullscreen_mode = property(lambda self: self.get_data("in_fullscreen_mode")) uniquestamp = property(lambda self: self.get_data("uniquestamp")) generate_filename = property(lambda self: self.get_data("generate_filename")) mimetype = property(lambda self: self.get_mimetype(self.uri)) fileinfo = property(lambda self: self.get_fileinfo(self.uri)) view_bg_color = property(lambda self: self.textview.get_modifier_style().base[-1]) recent_manager = property(lambda self: self.get_data("RecentManager")) last_session_uris = property(lambda self: self.imanager.get_last_session_uris()) def optimize(self, functions): try: from psyco import bind for function in functions: bind(function) except ImportError: pass return False def help(self): uri = "ghelp:scribes" from gtk import show_uri, get_current_event_time result = show_uri(self.window.get_screen(), uri, get_current_event_time()) from gettext import gettext as i18n message = i18n("Launching user guide") if result else i18n("Failed to launch user guide") image = "help" if result else "fail" self.update_message(message, image, 10) return def new(self, text=None): return self.imanager.open_files(stdin=text) def shutdown(self): self.close() return self.imanager.close_all_windows() def close(self, save_first=True): try: if save_first and self.generate_filename: raise ValueError except ValueError: # Don't save document if buffer contains only whitespaces. from string import whitespace document_is_empty = False if self.text.strip(whitespace) else True save_first = False if document_is_empty else True finally: self.emit("close", save_first) return False def fullscreen(self, value=True): self.emit("fullscreen", value) return def toggle_fullscreen(self): self.emit("toggle-fullscreen") return False def toggle_readonly(self): self.emit("toggle-readonly") return False def refresh(self, grab_focus=False): self.emit("refresh", grab_focus) return False def reset_text(self, text): self.freeze() self.buffer_.set_text(text) iterator = self.buffer_.get_start_iter() self.buffer_.place_cursor(iterator) self.thaw() return False def set_text(self, text): self.emit("reset-buffer", "begin") self.textbuffer.set_text(text) self.emit("reset-buffer", "end") return False def save_file(self, uri, encoding="utf-8"): self.emit("save-file", uri, encoding) return def rename_file(self, uri, encoding="utf-8"): self.emit("rename-file", uri, encoding) return def load_file(self, uri, encoding="utf-8"): self.set_data("contains_document", True) self.emit("load-file", uri, encoding) return False def load_last_session(self): uris = self.last_session_uris if not uris: return self.open_files(uris) return def open_file(self, uri, encoding="utf8"): self.imanager.open_files((uri,), encoding) return False def open_files(self, uris, encoding="utf8"): self.imanager.open_files(tuple(uris), encoding) return False def focus_file(self, uri): self.imanager.focus_file(uri) return def focus_by_id(self, id_): self.imanager.focus_by_id(id_) return def close_file(self, uri): self.imanager.close_files([uri]) return def close_files(self, uris): self.imanager.close_files(uris) return def create_uri(self, uri, exclusive=True): from Utils import create_uri return create_uri(uri, exclusive) def remove_uri(self, uri): from Utils import remove_uri return remove_uri(uri) def create_image(self, path): from Utils import create_image return create_image(path) def freeze(self): self.emit("freeze") return False def thaw(self): self.emit("thaw") return False def register_object(self, instance): self.emit("register-object", instance) return False def show_full_view(self): self.emit("show-full-view") return False def hide_full_view(self): self.emit("hide-full-view") return False def unregister_object(self, instance): self.emit("unregister-object", instance) return False def calculate_resolution_independence(self, window, width, height): from Utils import calculate_resolution_independence return calculate_resolution_independence(window, width, height) def disconnect_signal(self, sigid, instance): from Utils import disconnect_signal return disconnect_signal(sigid, instance) def disconnect_signals(self, data): return [self.disconnect_signal(sigid, instance) for sigid, instance in data] def move_view_to_cursor(self, align=False, iterator=None): if iterator is None: iterator = self.cursor # self.response() self.textview.scroll_to_iter(iterator, 0.001, use_align=align, xalign=1.0) # self.response() return False def response(self): from gtk import events_pending, main_iteration while events_pending(): main_iteration(False) self.__count += 1 print "Response count: ", self.__count return False def hide_completion_window(self): self.emit("hide-completion-window") return False def busy(self, busy=True): self.emit("private-busy", busy) return False def show_load_encoding_error_window(self, uri): self.emit("private-encoding-load-error", uri) return False def show_supported_encodings_window(self, window=None): window = window if window else self.window self.emit("supported-encodings-window", window) return def show_error(self, title, message, window=None, busy=False): window = window if window else self.window self.emit("show-error", title, message, window, busy) return False def show_info(self, title, message, window=None, busy=False): window = window if window else self.window self.emit("show-info", title, message, window, busy) return False def emit_combobox_encodings(self): self.emit("combobox-encoding-data?") return False def spin_throbber(self, spin=True): self.emit("spin-throbber", spin) return False def update_message(self, message, icon_name="scribes", time=5, priority="normal"): if self.window_is_active is False: return False data = message, icon_name, time, priority self.emit("update-message", data) return False def hide_message(self): self.emit("hide-message") return False def set_message(self, message, icon_name="scribes"): data = message, icon_name self.emit("set-message", data) return False def unset_message(self, message, icon_name="scribes"): data = message, icon_name self.emit("unset-message", data) return False def get_toolbutton(self, name): toolbutton = None for toolbutton in self.toolbar.get_children(): if name != toolbutton.get_property("name"): continue break return toolbutton def get_indentation(self, iterator=None): if iterator is None: iterator = self.cursor.copy() start = self.backward_to_line_begin(iterator.copy()) if start.is_end() or start.ends_line(): return "" end = start.copy() while end.get_char() in (" ", "\t"): end.forward_char() return self.textbuffer.get_text(start, end) def get_line_indentation(self): indentation = [] for character in self.get_line_text(): if character not in (" ", "\t"): break indentation.append(character) return "".join(indentation) def get_newline_character(self): from Utils import NEWLINE_RE match = NEWLINE_RE.search(self.text) character = match.group(0) if match else "\n" return character def redo(self): self.emit("redo") return def undo(self): self.emit("undo") return def backward_to_line_begin(self, iterator=None): if iterator is None: iterator = self.cursor from Utils import backward_to_line_begin return backward_to_line_begin(iterator.copy()) def forward_to_line_end(self, iterator=None): if iterator is None: iterator = self.cursor from Utils import forward_to_line_end return forward_to_line_end(iterator.copy()) def create_trigger(self, name, accelerator="", description="", category="", error=True, removable=True): from Trigger import Trigger trigger = Trigger(self, name, accelerator, description, category, error, removable) return trigger def trigger(self, name): self.emit("trigger", name) return False def add_trigger(self, trigger): self.emit("add-trigger", trigger) return False def remove_trigger(self, trigger): self.emit("remove-trigger", trigger) return False def add_triggers(self, triggers): self.emit("add-triggers", triggers) return False def remove_triggers(self, triggers): self.emit("remove-triggers", triggers) return False def select_row(self, treeview): from Utils import select_row return select_row(treeview) def mark(self, iterator, alignment="right"): value = False if alignment == "right" else True mark = self.textbuffer.create_mark(None, iterator, value) return mark def create_left_mark(self, iterator=None): if iterator: return self.mark(iterator, "left") return self.mark(self.cursor, "left") def create_right_mark(self, iterator=None): if iterator: return self.mark(iterator, "right") return self.mark(self.cursor, "right") def delete_mark(self, mark): if mark.get_deleted(): return self.textbuffer.delete_mark(mark) return def inside_word(self, iterator=None, pattern=None): if iterator is None: iterator = self.cursor if pattern is None: pattern = self.word_pattern from Word import inside_word return inside_word(iterator, pattern) def is_empty_line(self, iterator=None): if iterator is None: iterator = self.cursor start = self.backward_to_line_begin(iterator) if start.ends_line(): return True end = self.forward_to_line_end(iterator) from string import whitespace text = self.textbuffer.get_text(start, end).strip(whitespace) if text: return False return True def get_line_bounds(self, iterator=None): if iterator is None: iterator = self.cursor start = self.backward_to_line_begin(iterator) end = self.forward_to_line_end(iterator) return start, end def get_line_text(self, iterator=None): if iterator is None: iterator = self.cursor return self.textbuffer.get_text(*(self.get_line_bounds(iterator))) def get_word_boundary(self, iterator=None, pattern=None): if iterator is None: iterator = self.cursor if pattern is None: pattern = self.word_pattern from Word import get_word_boundary return get_word_boundary(iterator, pattern) def find_matching_bracket(self, iterator=None): if iterator is None: iterator = self.cursor from Utils import find_matching_bracket return find_matching_bracket(iterator) def get_current_folder(self, globals_): from Utils import get_current_folder return get_current_folder(globals_) def uri_exists(self, uri): from Utils import uri_exists return uri_exists(uri) def uri_is_folder(self, uri): from Utils import uri_is_folder return uri_is_folder(uri) def add_bar_object(self, bar): self.emit("add-bar-object", bar) return def remove_bar_object(self, bar): self.emit("remove-bar-object", bar) return def add_shortcut(self, shortcut): return self.imanager.add_shortcut(shortcut) def remove_shortcut(self, shortcut): return self.imanager.remove_shortcut(shortcut) def get_shortcuts(self): return self.imanager.get_shortcuts() def add_to_popup(self, menuitem): self.emit("add-to-popup", menuitem) return False def add_to_pref_menu(self, menuitem): self.emit("add-to-pref-menu", menuitem) return False def remove_from_pref_menu(self, menuitem): self.emit("remove-from-pref-menu", menuitem) return False def create_menuitem(self, name, stock=None): from Utils import create_menuitem return create_menuitem(name, stock) def get_glade_object(self, globals_, basepath, object_name): #FIXME: This function will soon be deprecated. It uses glade. # GTKBUILDER should be use instead.get_gui_object uses # GTKBUILDER. from os.path import join folder = self.get_current_folder(globals_) file_ = join(folder, basepath) from gtk.glade import XML glade = XML(file_, object_name, "scribes") return glade def get_gui_object(self, globals_, basepath): from Utils import get_gui_object return get_gui_object(globals_, basepath) def set_vm_interval(self): #FIXME: This function is deprecated! return def get_selection_range(self): if self.textbuffer.props.has_selection is False: return 0 start, end = self.textbuffer.get_selection_bounds() return (end.get_line() - start.get_line()) + 1 def get_file_monitor(self, path): from Utils import get_file_monitor return get_file_monitor(path) def get_folder_monitor(self, path): from Utils import get_folder_monitor return get_folder_monitor(path) def monitor_events(self, args, event_types): from Utils import monitor_events return monitor_events(args, event_types) def get_fileinfo(self, path): from Utils import get_fileinfo return get_fileinfo(path) def get_mimetype(self, path): from Utils import get_mimetype return get_mimetype(path) def begin_user_action(self): self.freeze() self.textbuffer.begin_user_action() return False def end_user_action(self): self.textbuffer.end_user_action() self.thaw() return False def execute(self, command): #FIXME: Not yet implemented! # Reserving this API. #command = None return False def is_delimeter(self, character): from Utils import is_delimeter return is_delimeter(character) def is_not_delimeter(self, character): from Utils import is_not_delimeter return is_not_delimeter(character) def grab_focus(self): self.textview.grab_focus() return False def enable_busy_pointer(self): print "Not yet implemented" return False def disable_busy_pointer(self): print "Not yet implemented" return False scribes-0.4~r910/SCRIBES/Main.py0000644000175000017500000000265411242100540015761 0ustar andreasandreasscribes_dbus_service = "net.sourceforge.Scribes" scribes_dbus_path = "/net/sourceforge/Scribes" def main(): __fork_scribes() from gobject import threads_init threads_init() __open() from gtk import main main() return def __open(): from CommandLineParser import Parser parser = Parser() args, newfile = parser.args, parser.newfile stdin = __get_pipe_input(args) from CommandLineProcessor import get_uris uris = get_uris(args, newfile) if stdin is None else "" __open_via_dbus(uris, stdin) from Utils import init_gnome init_gnome() from InstanceManager import Manager Manager().open_files(uris, "utf-8", stdin) return def __get_pipe_input(args): if not ("-" in args): return None from sys import stdin _stdin = stdin.read() return _stdin def __open_via_dbus(uris, stdin=""): dbus_service = __get_dbus_service() if not dbus_service: return uris = uris if uris else "" if stdin is None: stdin = "" dbus_service.open_files(uris, "utf-8", stdin, dbus_interface=scribes_dbus_service) raise SystemExit def __get_dbus_service(): from Globals import dbus_iface, session_bus services = dbus_iface.ListNames() if not (scribes_dbus_service in services): return None proxy_object = session_bus.get_object(scribes_dbus_service, scribes_dbus_path) return proxy_object def __fork_scribes(): from ForkScribesMetadata import get_value as can_fork if not can_fork(): return from Utils import fork_process fork_process() return scribes-0.4~r910/SCRIBES/FullScreenManager.py0000644000175000017500000000201711242100540020423 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor) editor.set_data("in_fullscreen_mode", False) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "toggle-fullscreen", self.__toggle_cb) self.connect(editor, "fullscreen", self.__fullscreen_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__enabled = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __toggle(self): enable = False if self.__enabled else True self.__editor.emit("fullscreen", enable) return False def __quit_cb(self, *args): self.__destroy() return False def __toggle_cb(self, *args): self.__toggle() return False def __fullscreen_cb(self, editor, enable): self.__editor.set_data("in_fullscreen_mode", enable) self.__enabled = enable return False scribes-0.4~r910/SCRIBES/DisplayRightMarginMetadata.py0000644000175000017500000000132611242100540022272 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "DisplayRightMargin.gdb") def get_value(language): try: display_margin = True database = open_database(basepath, "r") display_margin = database[language] except KeyError: if "def" in database: display_margin = database["def"] finally: database.close() return display_margin def set_value(data): try: language, display_margin = data database = open_database(basepath, "w") database[language] = display_margin finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/MarginPositionMetadata.py0000644000175000017500000000132611242100540021473 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "MarginPosition.gdb") def get_value(language): try: margin_position = 72 database = open_database(basepath, "r") margin_position = database[language] except KeyError: if "def" in database: margin_position = database["def"] finally: database.close() return margin_position def set_value(data): try: language, margin_position = data database = open_database(basepath, "w") database[language] = margin_position finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/Utils.py0000644000175000017500000003355711242100540016203 0ustar andreasandreasfrom string import punctuation, whitespace from re import compile as compile_, M, U, L DELIMETER = ("%s%s%s" % (punctuation, whitespace, "\x00")).replace("-", "").replace("_", "") NEWLINE_RE = compile_("\r\n|\n|\r", M|U|L) WORD_PATTERN = compile_("\w+|[-]", U) SCRIBES_MAIN_WINDOW_STARTUP_ID = "ScribesMainWindow" def is_delimeter(character): return character in DELIMETER def is_not_delimeter(character): return not (character in DELIMETER) def calculate_resolution_independence(window, width, height): screen = window.get_screen() number = screen.get_number() rectangle = screen.get_monitor_geometry(number) width = int(rectangle.width/width) height = int(rectangle.height/height) return width, height def create_button(stock_id, string): from gtk import HBox, Image, Label, ICON_SIZE_BUTTON, Alignment alignment = Alignment() alignment.set_property("xalign", 0.5) alignment.set_property("yalign", 0.5) hbox = HBox(False, 3) if stock_id: image = Image() image.set_from_stock(stock_id, ICON_SIZE_BUTTON) hbox.pack_start(image, False, False, 0) label = Label(string) label.set_property("use-underline", True) hbox.pack_start(label, False, False, 0) alignment.add(hbox) return alignment def process_color(color): red = int(color[0]) green = int(color[1]) blue = int(color[2]) pixel = long(color[3]) from gtk.gdk import Color color = Color(red, green, blue, pixel) return color def create_scrollwin(): from gtk import ScrolledWindow, POLICY_AUTOMATIC from gtk import SHADOW_IN scrollwin = ScrolledWindow() scrollwin.set_border_width(1) scrollwin.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) scrollwin.set_shadow_type(SHADOW_IN) return scrollwin def __get_language_for_mime_type(mime): from gtksourceview2 import language_manager_get_default lang_manager = language_manager_get_default() lang_ids = lang_manager.get_language_ids() for i in lang_ids: response() lang = lang_manager.get_language(i) for m in lang.get_mime_types(): response() if m == mime: return lang return None def get_file_monitor(path): from gio import File, FILE_MONITOR_NONE return File(path).monitor_file(FILE_MONITOR_NONE, None) def get_folder_monitor(path): from gio import File, FILE_MONITOR_NONE return File(path).monitor_directory(FILE_MONITOR_NONE, None) def monitor_events(args, event_types): return args[-1] in event_types def get_fileinfo(path, attribute="standard::*"): if not path: return None from gio import File return File(path).query_info(attribute) def get_modification_time(path): return get_fileinfo(path, "time::modified,time::modified-usec").get_modification_time() def get_mimetype(path): if not path: return None from gio import File, content_type_guess if File(path).get_uri_scheme() != "file": return content_type_guess(path) return get_fileinfo(path, "standard::content-type").get_content_type() def get_language(uri): if not uri: return None from gtksourceview2 import language_manager_get_default language_manager = language_manager_get_default() return language_manager.guess_language(uri, get_mimetype(uri)) def create_encoding_box(combobox): from i18n import msg0157 from gtk import Label, HBox label = Label(msg0157) label.set_use_underline(True) hbox = HBox(homogeneous=False, spacing=10) hbox.pack_start(label, False, False, 0) hbox.pack_start(combobox, True, True, 0) return hbox def generate_random_number(sequence): from random import random while True: _exit = True number = random() if sequence: for item in sequence: if number == item: _exit = False break if _exit: break return number def check_uri_permission(uri): value = True from gio import File if File(uri).get_uri_scheme() == "file": local_path = File(uri).get_path() from os import access, W_OK, path if path.exists(local_path): value = access(local_path, W_OK) else: from Globals import home_folder if local_path.startswith(home_folder) is False: value = False else: writable_scheme = ["ssh", "sftp", "smb", "dav", "davs", "ftp"] scheme = File(uri).get_uri_scheme() if not scheme in writable_scheme: value = False return value def get_file_size(uri): from gio import File return File(uri).query_info("*").get_size() def create_menuitem(string, stock_id=None): from gtk import MenuItem, Image, HBox, Label hbox = HBox(spacing=7) hbox.set_property("border-width", 2) if stock_id: image = Image() image.set_property("stock", stock_id) hbox.pack_start(image, False, False, 0) label = Label(string) label.set_property("use-underline", True) hbox.pack_start(label, False, False, 0) menuitem = MenuItem() menuitem.add(hbox) return menuitem def uri_exists(uri): from gio import File return File(uri).query_exists() def calculate_completion_window_position(editor, width, height): pass # The flag is true when the position of the word completion window needs to # adjusted accross the y-axis. # editor.y_coordinate_flag = False # # Get the cursor's coordinate and size. # cursor_x, cursor_y = get_cursor_window_coordinates(editor) # cursor_height = get_cursor_size(editor)[1] # # Get the text editor's textview coordinate and size. # window = editor.text_view.get_window(TEXT_WINDOW_TEXT) # rectangle = editor.text_view.get_visible_rect() # window_x, window_y = window.get_origin() # window_width, window_height = rectangle.width, rectangle.height # # Determine where to position the completion window. # position_x = window_x + cursor_x # position_y = window_y + cursor_y + cursor_height # # If the completion window extends past the text editor's buffer, # reposition the completion window inside the text editor's buffer area. # if (position_x + width) > (window_x + window_width): # position_x = (window_x + window_width) - width # if (position_y + height) > (window_y + window_height): # position_y = (window_y + cursor_y) - height # editor.y_coordinate_flag = True # return position_x, position_y def find_file(filename): from os import path from Globals import data_folder file_path = path.join(data_folder, filename) return file_path def create_image(file_path): image_file = find_file(file_path) from gtk import Image image = Image() image.set_from_file(image_file) return image def __convert_to_string(value): if not value: return "0000" string = str(hex(value)).lstrip("0x") if len(string) < 4: if len(string) == 3: string = "0" + string elif len(string) == 2: string = "00" + string else: string = "000" + string return string def convert_color_to_spec(color): red = __convert_to_string(color.red) blue = __convert_to_string(color.blue) green = __convert_to_string(color.green) string = "#" + red + green + blue return string def select_row(treeview, column=0): selection = treeview.get_selection() model = treeview.get_model() path, iterator = selection.get_selected() if iterator: path = model.get_path(iterator) treeview.set_cursor(path, treeview.get_column(column)) treeview.grab_focus() else: first_iterator = model.get_iter_first() if first_iterator: path = model.get_path(first_iterator) treeview.set_cursor(path, treeview.get_column(column)) treeview.grab_focus() else: treeview.set_property("sensitive", False) return def disconnect_signal(signal_id, instance): is_connected = instance.handler_is_connected disconnect = instance.disconnect if signal_id and is_connected(signal_id): disconnect(signal_id) return def __is_beside_bracket(iterator, characters): if iterator.get_char() in characters: return True iterator.backward_char() if iterator.get_char() in characters: return True return False def __is_open_bracket(iterator, characters): return __is_beside_bracket(iterator, characters) def __is_close_bracket(iterator, characters): return __is_beside_bracket(iterator, characters) def __reposition_iterator(iterator, open_chars, close_chars): if __is_open_bracket(iterator.copy(), open_chars): if iterator.get_char() in open_chars: return iterator iterator.backward_char() else: if not (iterator.get_char() in close_chars): return iterator iterator.forward_char() return iterator def __get_open_characters(): return ("{", "(", "[", "<") def __get_close_characters(): return ("}", ")", "]", ">") def __get_open_character(iterator): iterator.backward_char() return iterator.get_char() def __get_close_character(iterator): return iterator.get_char() def __get_pair_character(character): if character == "{": pair_character = "}" elif character == "}": pair_character = "{" elif character == "(": pair_character = ")" elif character == ")": pair_character = "(" elif character == "[": pair_character = "]" elif character == "]": pair_character = "[" elif character == "<": pair_character = ">" elif character == ">": pair_character = "<" return pair_character def __is_open_character(iterator): characters = __get_open_characters() if iterator.get_char() in characters: return True success = iterator.backward_char() if not success: return False if iterator.get_char() in characters: return True return False def __is_close_character(iterator): characters = __get_close_characters() iterator.backward_char() if iterator.get_char() in characters: return True iterator.forward_char() if iterator.get_char() in characters: return True return False def __reposition_open_iterator(iterator): characters = __get_open_characters() if not (iterator.get_char() in characters): return iterator iterator.forward_char() return iterator def __reposition_close_iterator(iterator): characters = __get_close_characters() iterator.backward_char() if iterator.get_char() in characters: return iterator iterator.forward_char() return iterator def __search_for_open_character(iterator): iterator = __reposition_close_iterator(iterator.copy()) character = __get_close_character(iterator.copy()) search_character = __get_pair_character(character) count = 0 while True: success = iterator.backward_char() if not success: raise ValueError char = iterator.get_char() if char == character: count += 1 if char == search_character and not count: break if char == search_character and count: count -= 1 return iterator def __search_for_close_character(iterator): iterator = __reposition_open_iterator(iterator.copy()) character = __get_open_character(iterator.copy()) search_character = __get_pair_character(character) count = 0 while True: char = iterator.get_char() if char == character: count += 1 if char == search_character and not count: break if char == search_character and count: count -= 1 success = iterator.forward_char() if not success: raise ValueError return iterator def find_matching_bracket(iterator): try: if __is_open_character(iterator.copy()): iterator = __search_for_close_character(iterator.copy()) elif __is_close_character(iterator.copy()): iterator = __search_for_open_character(iterator.copy()) else: iterator = None except ValueError: return None return iterator def init_gnome(): from gobject import set_application_name, set_prgname set_prgname("Scribes") set_application_name("Scribes") return def backward_to_line_begin(iterator): if iterator.starts_line(): return iterator while True: iterator.backward_char() if iterator.starts_line(): break return iterator def forward_to_line_end(iterator): if iterator.ends_line(): return iterator iterator.forward_to_line_end() return iterator def open_database(basepath, flag="c"): if not basepath.endswith(".gdb"): raise Exception from Globals import metadata_folder from os.path import exists, join, split database_path = join(metadata_folder, basepath.strip("/")) folder, file_ = split(database_path) if not (folder or file_): raise Exception if not exists(folder): from os import makedirs makedirs(folder) from shelve import open as open_ from anydbm import error try: database = open_(database_path, flag=flag, writeback=False) except error: database = open_(database_path, flag="n", writeback=False) return database def open_storage(filename): from Globals import storage_folder from os import makedirs from os.path import join, exists if not exists(storage_folder): makedirs(storage_folder) filename = join(storage_folder, filename.strip("/")) from filedict import FileDict return FileDict(filename=filename) def get_save_processor(): try: from dbus import DBusException from Globals import dbus_iface, session_bus from Globals import SCRIBES_SAVE_PROCESS_DBUS_PATH from Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE services = dbus_iface.ListNames() if not (SCRIBES_SAVE_PROCESS_DBUS_SERVICE in services): return None processor_object = session_bus.get_object(SCRIBES_SAVE_PROCESS_DBUS_SERVICE, SCRIBES_SAVE_PROCESS_DBUS_PATH) except DBusException: return None return processor_object def fork_process(): from os import fork pid = fork() if pid != 0: raise SystemExit return def response(): from gtk import events_pending, main_iteration while events_pending(): main_iteration(False) return def create_uri(uri, exclusive=True): response() from gio import File File(uri).replace_contents("") response() return def remove_uri(uri): from gio import File response() File(uri).delete() response() return def uri_is_folder(uri): from gio import Error try: if not uri: return False from gio import File filetype = File(uri).query_info("*").get_file_type() if filetype == 2: return True except Error: return False return False def set_vm_interval(response=True): return False def window_is_active(editor): try: if editor is None: return False if editor.window.props.is_active is False: return False if editor.textview.props.has_focus is False: return False except AttributeError: return False return True def get_current_folder(globals_): from os.path import split folder = split(globals_["__file__"])[0] return folder def get_gui_object(globals_, basepath): from os.path import join folder = get_current_folder(globals_) file_ = join(folder, basepath) from gtk import Builder gui = Builder() gui.add_from_file(file_) return gui scribes-0.4~r910/SCRIBES/SaveSystem/0000755000175000017500000000000011242100540016617 5ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveSystem/FileNameGenerator.py0000644000175000017500000000306311242100540022522 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Generator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "newname", self.__newname_cb) from gobject import idle_add idle_add(self.__optimize, priority=9999) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__name = "" self.__uri = "" self.__stamp = editor.uniquestamp return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __filename(self, _data): try: newname, data = _data if not newname: newname = _("Unnamed Document") if self.__name == newname: raise ValueError self.__name = newname newname = newname + " - " + "(" + self.__stamp + ")" from os.path import join newfile = join(self.__editor.desktop_folder, newname) from gio import File self.__uri = File(newfile).get_uri() self.__manager.emit("create-new-file", (self.__uri, data)) except ValueError: data = self.__uri, data[1], data[2] self.__manager.emit("save-data", data) return False def __optimize(self): self.__editor.optimize((self.__filename,)) return False def __quit_cb(self, *args): self.__destroy() return False def __newname_cb(self, manager, data): from gobject import idle_add idle_add(self.__filename, data, priority=9999) return False scribes-0.4~r910/SCRIBES/SaveSystem/SaveErrorSignalEmitter.py0000644000175000017500000000230211242100540023566 0ustar andreasandreasclass Emitter(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("session-id", self.__session_cb) self.__sigid3 = manager.connect("error", self.__failed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __emit(self, data): session_id, uri, encoding, message = data if tuple(session_id) != self.__session_id: return False self.__editor.emit("save-error", uri, encoding, message) return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False def __failed_cb(self, manager, data): from gobject import idle_add idle_add(self.__emit, data, priority=9999) return False scribes-0.4~r910/SCRIBES/SaveSystem/__init__.py0000644000175000017500000000000011242100540020716 0ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveSystem/FileModificationMonitor.py0000644000175000017500000000314511242100540023751 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "save-file", self.__save_cb) self.connect(manager, "saved?", self.__saved_cb) self.__sigid1 = self.connect(editor.textbuffer, "changed", self.__changed_cb) self.__block() editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__modified = False self.__blocked = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __emit(self, data): try: if self.__modified: raise ValueError self.__block() self.__manager.emit("saved", data) except ValueError: self.__modified = False self.__manager.emit("reset-modification-flag") return False def __block(self): if self.__blocked: return False self.__editor.textbuffer.handler_block(self.__sigid1) self.__blocked = True return False def __unblock(self): if self.__blocked is False: return False self.__editor.textbuffer.handler_unblock(self.__sigid1) self.__blocked = False return False def __quit_cb(self, *args): self.__destroy() return False def __save_cb(self, *args): self.__unblock() return False def __saved_cb(self, manager, data): from gobject import idle_add idle_add(self.__emit, data) return False def __changed_cb(self, *args): self.__modified = True self.__block() return False scribes-0.4~r910/SCRIBES/SaveSystem/QuitSaver.py0000644000175000017500000000334311242100540021117 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Saver(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "close", self.__close_cb) self.connect(manager, "save-succeeded", self.__saved_cb) self.connect(manager, "save-failed", self.__error_cb) self.connect(manager, "session-id", self.__session_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__session_id = () self.__quit = False self.__error = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) self.__editor.emit("quit") del self return False def __save(self): self.__editor.save_file(self.__editor.uri, self.__editor.encoding) return False def __close(self, save_file): try: if save_file is False: raise StandardError if self.__error: raise ValueError if self.__editor.modified is False: raise ValueError self.__quit = True from gobject import idle_add idle_add(self.__save, priority=9999) except ValueError: self.__destroy() except StandardError: self.__manager.emit("remove-new-file") self.__destroy() return False def __close_cb(self, editor, save_file): self.__close(save_file) return False def __saved_cb(self, manager, data): if self.__session_id != tuple(data[0]): return False self.__error = False if self.__quit: self.__destroy() return False def __error_cb(self, manager, data): if self.__session_id != tuple(data[0]): return False self.__error = True return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False scribes-0.4~r910/SCRIBES/SaveSystem/Makefile.in0000644000175000017500000005034411242100540020672 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/SaveSystem DIST_COMMON = $(savesystem_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(savesystemdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = ExternalProcess savesystemdir = $(pythondir)/SCRIBES/SaveSystem savesystem_PYTHON = \ __init__.py \ Manager.py \ UnnamedDocumentCreator.py \ AutomaticSaver.py \ SessionManager.py \ ReadonlyHandler.py \ DbusDataSender.py \ DbusDataReceiver.py \ DbusSaveProcessorMonitor.py \ SavedSignalEmitter.py \ SaveErrorSignalEmitter.py \ ErrorDisplayer.py \ QuitSaver.py \ SessionCompleter.py \ FocusOutSaver.py \ FileModificationMonitor.py \ FileNameGenerator.py \ NameGenerator.py \ NewFileRemover.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/SaveSystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/SaveSystem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-savesystemPYTHON: $(savesystem_PYTHON) @$(NORMAL_INSTALL) test -z "$(savesystemdir)" || $(MKDIR_P) "$(DESTDIR)$(savesystemdir)" @list='$(savesystem_PYTHON)'; dlist=; list2=; test -n "$(savesystemdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(savesystemdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(savesystemdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(savesystemdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(savesystemdir)" $$dlist; \ fi; \ else :; fi uninstall-savesystemPYTHON: @$(NORMAL_UNINSTALL) @list='$(savesystem_PYTHON)'; test -n "$(savesystemdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(savesystemdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(savesystemdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(savesystemdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(savesystemdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(savesystemdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(savesystemdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(savesystemdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-savesystemPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-savesystemPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-savesystemPYTHON install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-savesystemPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/SaveSystem/UnnamedDocumentCreator.py0000644000175000017500000000307611242100540023605 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Creator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "create-new-file", self.__create_cb) from gobject import idle_add idle_add(self.__optimize, priority=9999) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__count = 0 return def __destroy(self): if self.__count: return True self.disconnect() self.__editor.unregister_object(self) del self return False def __create(self, _data): self.__count += 1 from gio import File uri, data = _data File(uri).create_async(self.__create_async_cb, user_data=_data) return False def __optimize(self): self.__editor.optimize((self.__create,)) return False def __create_async_cb(self, gfile, result, _data): outputstream = gfile.create_finish(result) outputstream.close_async(self.__close_async_cb, user_data=_data) return False def __close_async_cb(self, gfile, result, _data): succeeded = gfile.close_finish(result) uri, data = _data data = uri, data[1], data[2] self.__manager.emit("save-data", data) self.__count -= 1 return False def __quit_cb(self, *args): from gobject import timeout_add timeout_add(50, self.__destroy, priority=9999) return False def __create_cb(self, manager, data): from gobject import idle_add idle_add(self.__create, data, priority=9999) return False scribes-0.4~r910/SCRIBES/SaveSystem/DbusSaveProcessorMonitor.py0000644000175000017500000000210011242100540024146 0ustar andreasandreasfrom SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE class Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) editor.session_bus.add_signal_receiver(self.__is_ready_cb, signal_name="is_ready", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) self.__manager.emit("save-processor-object", self.__editor.save_processor) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.session_bus.remove_signal_receiver(self.__is_ready_cb, signal_name="is_ready", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) self.__editor.unregister_object(self) del self return False def __quit_cb(self, *args): self.__destroy() return False def __is_ready_cb(self, *args): self.__manager.emit("save-processor-object", self.__editor.save_processor) return False scribes-0.4~r910/SCRIBES/SaveSystem/SavedSignalEmitter.py0000644000175000017500000000247411242100540022732 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Emitter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "rename-file", self.__rename_cb) self.connect(manager, "session-id", self.__session_cb) self.connect(manager, "saved", self.__saved_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__rename = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __emit(self, data): session_id, uri, encoding = data if tuple(session_id) != self.__session_id: return False self.__editor.emit("saved-file", uri, encoding) if not self.__rename: return False self.__editor.emit("renamed-file", uri, encoding) self.__rename = False return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False def __saved_cb(self, manager, data): from gobject import idle_add idle_add(self.__emit, data, priority=9999) return False def __rename_cb(self, *args): self.__rename = True return False scribes-0.4~r910/SCRIBES/SaveSystem/ErrorDisplayer.py0000644000175000017500000000246211242100540022143 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "save-failed", self.__failed_cb) self.connect(manager, "session-id", self.__session_cb) self.connect(manager, "save-succeeded", self.__succeeded_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__session_id = () self.__error = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __show(self, data): session_id, uri, encoding, message = data if self.__session_id != tuple(session_id): return False if self.__error: return False self.__error = True self.__editor.show_error(uri, message, busy=True) return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False def __failed_cb(self, manager, data): from gobject import idle_add idle_add(self.__show, data, priority=9999) return def __succeeded_cb(self, *args): self.__error = False return False scribes-0.4~r910/SCRIBES/SaveSystem/DbusDataReceiver.py0000644000175000017500000000361311242100540022350 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE class Receiver(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "session-id", self.__session_cb) editor.session_bus.add_signal_receiver(self.__saved_file_cb, signal_name="saved_file", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) editor.session_bus.add_signal_receiver(self.__save_error_cb, signal_name="error", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__session_id = () return False def __destroy(self): self.disconnect() self.__editor.session_bus.remove_signal_receiver(self.__saved_file_cb, signal_name="saved_file", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) self.__editor.session_bus.remove_signal_receiver(self.__save_error_cb, signal_name="error", dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) self.__editor.unregister_object(self) del self return False def __emit(self, data): if self.__editor.id_ != data[0][0]: return False if tuple(data[0]) != self.__session_id: return False signal_name = "save-succeeded" if len(data) == 3 else "save-failed" self.__manager.emit(signal_name, data) return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False def __saved_file_cb(self, data): from gobject import idle_add idle_add(self.__emit, data, priority=9999) return False def __save_error_cb(self, data): from gobject import idle_add idle_add(self.__emit, data, priority=9999) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/0000755000175000017500000000000011242100540021740 5ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/ErrorManager.py0000644000175000017500000000074311242100540024702 0ustar andreasandreasclass Manager(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("oops", self.__error_cb) def __init_attributes(self, manager): self.__manager = manager return def __error(self, data): message = data[-1] data = data[0], data[1], data[2], message self.__manager.emit("error", data) print message return False def __error_cb(self, manager, data): from gobject import idle_add idle_add(self.__error, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/SIGNALS.py0000644000175000017500000000160011242100540023407 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import TYPE_PYOBJECT, TYPE_INT from gobject import SIGNAL_ACTION, SIGNAL_NO_RECURSE SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Signals(GObject): __gsignals__ = { "save-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "check-permission": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "update-id": (SSIGNAL, TYPE_NONE, (TYPE_INT,)), "is-ready": (SSIGNAL, TYPE_NONE, ()), "saved-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "oops": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "gio-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "replace-file": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "encode-text": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "finished": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/__init__.py0000644000175000017500000000000011242100540024037 0ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Main.py0000644000175000017500000000071011242100540023174 0ustar andreasandreasdef main(): __start() from gobject import MainLoop MainLoop().run() return def __start(): if __save_process_exists(): raise SystemExit from gobject import threads_init threads_init() from Manager import Manager Manager() return def __save_process_exists(): from SCRIBES.Globals import dbus_iface, SCRIBES_SAVE_PROCESS_DBUS_SERVICE services = dbus_iface.ListNames() if SCRIBES_SAVE_PROCESS_DBUS_SERVICE in services: return True return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Makefile.in0000644000175000017500000003217611242100540024016 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/SaveSystem/ExternalProcess DIST_COMMON = $(externalprocess_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(externalprocessdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ externalprocessdir = $(pythondir)/SCRIBES/SaveSystem/ExternalProcess externalprocess_PYTHON = \ __init__.py \ ScribesSaveProcess.py \ Manager.py \ Quiter.py \ SIGNALS.py \ Main.py \ JobSpooler.py \ TextEncoder.py \ FileReplacer.py \ Completer.py \ DbusService.py \ ErrorManager.py \ GIOErrorHandler.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/SaveSystem/ExternalProcess/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/SaveSystem/ExternalProcess/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-externalprocessPYTHON: $(externalprocess_PYTHON) @$(NORMAL_INSTALL) test -z "$(externalprocessdir)" || $(MKDIR_P) "$(DESTDIR)$(externalprocessdir)" @list='$(externalprocess_PYTHON)'; dlist=; list2=; test -n "$(externalprocessdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(externalprocessdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(externalprocessdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(externalprocessdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(externalprocessdir)" $$dlist; \ fi; \ else :; fi uninstall-externalprocessPYTHON: @$(NORMAL_UNINSTALL) @list='$(externalprocess_PYTHON)'; test -n "$(externalprocessdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(externalprocessdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(externalprocessdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(externalprocessdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(externalprocessdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(externalprocessdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(externalprocessdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(externalprocessdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-externalprocessPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-externalprocessPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-externalprocessPYTHON install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-externalprocessPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/ScribesSaveProcess.py0000644000175000017500000000043411242100540026063 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf-8 -*- if __name__ == "__main__": from SCRIBES.Utils import fork_process fork_process() from sys import argv, path path.insert(0, argv[1]) from signal import signal, SIGINT, SIG_IGN signal(SIGINT, SIG_IGN) from Main import main main() scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Completer.py0000644000175000017500000000075311242100540024251 0ustar andreasandreasclass Completer(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("finished", self.__finished_cb) def __init_attributes(self, manager): self.__manager = manager return def __emit(self, data): # data = (session_id, uri, encoding) data = data[0], data[1], data[2] self.__manager.emit("saved-data", data) return False def __finished_cb(self, manager, data): from gobject import idle_add idle_add(self.__emit, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/FileReplacer.py0000644000175000017500000000412211242100540024646 0ustar andreasandreasfrom gio import Error, ERROR_NOT_FOUND class GIOError(Error): def __init__(self): Error.__init__(self) self.code = ERROR_NOT_FOUND self.message = "TEST ERROR" class Replacer(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("replace-file", self.__replace_cb) def __init_attributes(self, manager): self.__manager = manager return def __error(self, data): self.__manager.emit("gio-error", data) return False def __test_error(self): raise Error, GIOError() def __replace(self, data): from gio import File, FILE_CREATE_NONE session_id, uri, encoding, text = data from glib import PRIORITY_DEFAULT File(uri).replace_async(self.__replace_async_cb, etag=None, make_backup=False, flags=FILE_CREATE_NONE, io_priority=PRIORITY_DEFAULT, cancellable=None, user_data=data) return False def __replace_async_cb(self, gfile, result, data): try: text = data[-1] if not text: raise AssertionError output_streamer = gfile.replace_finish(result) from glib import PRIORITY_DEFAULT output_streamer.write_async(text, self.__write_async_cb, io_priority=PRIORITY_DEFAULT, cancellable=None, user_data=data) except AssertionError: self.__manager.emit("finished", data) except Error, e: from gobject import idle_add idle_add(self.__error, (data, e)) return False def __write_async_cb(self, output_streamer, result, data): try: # raise self.__test_error() output_streamer.write_finish(result) from glib import PRIORITY_DEFAULT output_streamer.close_async(self.__close_async_cb, io_priority=PRIORITY_DEFAULT, cancellable=None, user_data=data) except Error, e: from gobject import idle_add idle_add(self.__error, (data, e)) return False def __close_async_cb(self, output_streamer, result, data): try: output_streamer.close_finish(result) self.__manager.emit("finished", data) except Error, e: from gobject import idle_add idle_add(self.__error, (data, e)) return False def __replace_cb(self, manager, data): from gobject import idle_add idle_add(self.__replace, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Manager.py0000644000175000017500000000137011242100540023665 0ustar andreasandreasfrom SIGNALS import Signals class Manager(Signals): def __init__(self): Signals.__init__(self) from DbusService import DbusService DbusService(self) from Quiter import Quiter Quiter() from ErrorManager import Manager Manager(self) from GIOErrorHandler import Handler Handler(self) from Completer import Completer Completer(self) from FileReplacer import Replacer Replacer(self) from TextEncoder import Encoder Encoder(self) from JobSpooler import Spooler Spooler(self) from gobject import timeout_add timeout_add(1000, self.__response) self.emit("is-ready") def __response(self): # Make this process as responsive as possible to signals and events. from SCRIBES.Utils import response response() return True scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/DbusService.py0000644000175000017500000000237211242100540024534 0ustar andreasandreasfrom dbus.service import Object, method, BusName, signal from SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE as dbus_service class DbusService(Object): def __init__(self, manager): from SCRIBES.Globals import session_bus as session from SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_PATH bus_name = BusName(dbus_service, bus=session) Object.__init__(self, bus_name, SCRIBES_SAVE_PROCESS_DBUS_PATH) self.__manager = manager manager.connect("is-ready", self.__is_ready_cb) manager.connect("saved-data", self.__saved_data_cb) manager.connect("error", self.__error_cb) @method(dbus_service, in_signature="(atsss)") def process(self, data): return self.__manager.emit("save-data", data) @signal(dbus_service) def is_ready(self): return False @signal(dbus_service, signature="(axss)") def saved_file(self, data): return False @signal(dbus_service) def error(self, data): return False def __is_ready_cb(self, *args): from gobject import idle_add idle_add(self.is_ready) return False def __saved_data_cb(self, manager, data): from gobject import idle_add idle_add(self.saved_file, data) return False def __error_cb(self, manager, data): from gobject import idle_add idle_add(self.error, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Makefile.am0000644000175000017500000000053511242100540023777 0ustar andreasandreasexternalprocessdir = $(pythondir)/SCRIBES/SaveSystem/ExternalProcess externalprocess_PYTHON = \ __init__.py \ ScribesSaveProcess.py \ Manager.py \ Quiter.py \ SIGNALS.py \ Main.py \ JobSpooler.py \ TextEncoder.py \ FileReplacer.py \ Completer.py \ DbusService.py \ ErrorManager.py \ GIOErrorHandler.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/GIOErrorHandler.py0000644000175000017500000000071411242100540025242 0ustar andreasandreasclass Handler(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("gio-error", self.__error_cb) def __init_attributes(self, manager): self.__manager = manager return def __error(self, data): data, error = data data = data + (error.message,) self.__manager.emit("oops", data) return False def __error_cb(self, manager, data): from gobject import idle_add idle_add(self.__error, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/TextEncoder.py0000644000175000017500000000202211242100540024532 0ustar andreasandreasclass Encoder(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("encode-text", self.__encode_cb) def __init_attributes(self, manager): self.__manager = manager return def __encode(self, data): try: encoding, text = data[2], data[3] encoded_text = text.encode(encoding) data = data[0], data[1], data[2], encoded_text self.__manager.emit("replace-file", data) except: from gettext import gettext as _ message = _(""" Module: SCRIBES/SaveSystem/ExternalProcess/TextEncoder.py Class: Encoder Method: __encode Exception: Unknown Error: Failed to encode text before writing to file. Automatic saving is temporarily disabled. You will loose information in this window if you close it. Please try saving the file again, preferably to a different location like your desktop.""") data = data + (message, ) self.__manager.emit("oops", data) return False def __encode_cb(self, manager, data): from gobject import idle_add idle_add(self.__encode, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/Quiter.py0000644000175000017500000000134611242100540023567 0ustar andreasandreasclass Quiter(object): def __init__(self): from SCRIBES.Globals import session_bus as session from SCRIBES.Globals import SCRIBES_DBUS_SERVICE session.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=SCRIBES_DBUS_SERVICE) def __scribes_process_exists(self): from SCRIBES.Globals import dbus_iface, SCRIBES_DBUS_SERVICE services = dbus_iface.ListNames() if SCRIBES_DBUS_SERVICE in services: return True return False def __quit(self): if self.__scribes_process_exists(): return False from os import _exit _exit(0) return False def __name_change_cb(self, *args): self.__quit() return False scribes-0.4~r910/SCRIBES/SaveSystem/ExternalProcess/JobSpooler.py0000644000175000017500000000170311242100540024371 0ustar andreasandreasclass Spooler(object): def __init__(self, manager): self.__init_attributes(manager) manager.connect("save-data", self.__new_job_cb) manager.connect_after("saved-data", self.__finished_cb) manager.connect_after("error", self.__finished_cb) def __init_attributes(self, manager): self.__manager = manager from collections import deque self.__jobs = deque() self.__busy = False return def __check(self): if self.__busy or not self.__jobs: return False self.__send(self.__jobs.pop()) return False def __send(self, data): self.__busy = True self.__manager.emit("encode-text", data) return False def __new_job(self, data): self.__jobs.appendleft(data) self.__check() return False def __new_job_cb(self, manager, data): from gobject import idle_add # idle_add(self.__new_job, data) idle_add(self.__send, data) return False def __finished_cb(self, *args): # self.__busy = False # self.__check() return False scribes-0.4~r910/SCRIBES/SaveSystem/NewFileRemover.py0000644000175000017500000000237311242100540022067 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Remover(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__destroy_cb) self.connect(manager, "create-new-file", self.__create_cb) self.connect(editor, "renamed-file", self.__renamed_cb) self.connect(manager, "remove-new-file", self.__remove_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__uri = "" return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __remove(self): if self.__uri: self.__editor.remove_uri(self.__uri) return False def __create(self, _data): uri, data = _data self.__remove() self.__uri = uri return False def __create_cb(self, manager, data): from gobject import idle_add idle_add(self.__create, data, priority=9999) return False def __renamed_cb(self, *args): from gobject import idle_add idle_add(self.__remove, priority=9999) return False def __remove_cb(self, *args): self.__remove() return False def __destroy_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/SaveSystem/FocusOutSaver.py0000644000175000017500000000240511242100540021742 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Saver(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "close", self.__close_cb) self.__sigid1 = self.connect(editor, "window-focus-out", self.__out_cb) self.connect(manager, "save-failed", self.__failed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__error = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __save(self): try: if self.__error: raise AssertionError if not self.__editor.modified: return False self.__editor.save_file(self.__editor.uri, self.__editor.encoding) except AssertionError: self.__error = False return False def __quit_cb(self, *args): self.__destroy() return False def __out_cb(self, *args): from gobject import idle_add idle_add(self.__save, priority=9999) return False def __close_cb(self, *args): self.__editor.handler_block(self.__sigid1) return False def __failed_cb(self, *args): self.__error = True return False scribes-0.4~r910/SCRIBES/SaveSystem/Manager.py0000644000175000017500000000417111242100540020546 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_PYOBJECT from gobject import TYPE_NONE, TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "session-id": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "save-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "save-processor-object": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "save-succeeded": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "saved": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "saved?": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "save-failed": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "readonly-error": (SSIGNAL, TYPE_NONE, ()), "reset-modification-flag": (SSIGNAL, TYPE_NONE, ()), "generate-name": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "newname": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "create-new-file": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove-new-file": (SSIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from AutomaticSaver import Saver Saver(self, editor) from FocusOutSaver import Saver Saver(self, editor) from UnnamedDocumentCreator import Creator Creator(self, editor) from QuitSaver import Saver Saver(self, editor) from NewFileRemover import Remover Remover(self, editor) from FileModificationMonitor import Monitor Monitor(self, editor) from SessionCompleter import Completer Completer(self, editor) from FileNameGenerator import Generator Generator(self, editor) from NameGenerator import Generator Generator(self, editor) from SessionManager import Manager Manager(self, editor) from ReadonlyHandler import Handler Handler(self, editor) from ErrorDisplayer import Displayer Displayer(self, editor) from SaveErrorSignalEmitter import Emitter Emitter(self, editor) from SavedSignalEmitter import Emitter Emitter(self, editor) from DbusDataReceiver import Receiver Receiver(self, editor) from DbusDataSender import Sender Sender(self, editor) from DbusSaveProcessorMonitor import Monitor Monitor(self, editor) scribes-0.4~r910/SCRIBES/SaveSystem/SessionManager.py0000644000175000017500000000245211242100540022112 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "save-file", self.__save_cb) self.connect(editor, "rename-file", self.__save_cb, True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__count = 0 return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __process(self, uri, encoding): try: self.__count += 1 session_id = self.__editor.id_, self.__count self.__manager.emit("session-id", session_id) data = uri, encoding, session_id if self.__editor.readonly: raise AssertionError if self.__editor.generate_filename: raise ValueError self.__manager.emit("save-data", data) except AssertionError: self.__manager.emit("readonly-error") except ValueError: self.__manager.emit("generate-name", data) return False def __quit_cb(self, *args): self.__destroy() return False def __save_cb(self, editor, uri, encoding): from gobject import idle_add idle_add(self.__process, uri, encoding) return False scribes-0.4~r910/SCRIBES/SaveSystem/Makefile.am0000644000175000017500000000105211242100540020651 0ustar andreasandreasSUBDIRS = ExternalProcess savesystemdir = $(pythondir)/SCRIBES/SaveSystem savesystem_PYTHON = \ __init__.py \ Manager.py \ UnnamedDocumentCreator.py \ AutomaticSaver.py \ SessionManager.py \ ReadonlyHandler.py \ DbusDataSender.py \ DbusDataReceiver.py \ DbusSaveProcessorMonitor.py \ SavedSignalEmitter.py \ SaveErrorSignalEmitter.py \ ErrorDisplayer.py \ QuitSaver.py \ SessionCompleter.py \ FocusOutSaver.py \ FileModificationMonitor.py \ FileNameGenerator.py \ NameGenerator.py \ NewFileRemover.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/SaveSystem/SessionCompleter.py0000644000175000017500000000340111242100540022465 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Completer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "session-id", self.__session_cb) self.connect(manager, "save-succeeded", self.__data_cb) self.connect(manager, "save-failed", self.__data_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__queue = deque() self.__session_id = () return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __verify_session(self, data): try: session_id = tuple(data[0]) self.__queue.remove(session_id) if self.__session_id != session_id: raise AssertionError # False emit = self.__manager.emit emit("saved?", data) if len(data) == 3 else emit("error", data) except ValueError: print "Module Name: SCRIBES/SaveSystem/SessionCompleter" print "Method Name: __verify_session" print "ERROR MESSAGE: Session id not in queue", session_id except AssertionError: print "Module Name: SCRIBES/SaveSystem/SessionCompleter" print "Method Name: __verify_session" print "ERROR: Session id has changed!" print "Old session id: %s, New session id: %s" % (self.__session_id, session_id) return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id self.__queue.append(session_id) return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__verify_session, data) return False scribes-0.4~r910/SCRIBES/SaveSystem/AutomaticSaver.py0000644000175000017500000000441211242100540022121 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager SAVE_TIMER = 3000 class Saver(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.__sigid1 = self.connect(editor, "modified-file", self.__modified_cb) self.connect(editor, "close", self.__close_cb) self.connect(editor.buf, "changed", self.__changed_cb, True) self.connect(editor, "cursor-moved", self.__changed_cb, True) self.connect(manager, "reset-modification-flag", self.__modified_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__remove_timer() self.disconnect() self.__editor.unregister_object(self) del self return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, 2: self.__timer2, 3: self.__timer3, 4: self.__timer3, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __remove_all_timers(self): [self.__remove_timer(_timer) for _timer in xrange(1, 5)] return False def __process(self): self.__remove_all_timers() from gobject import timeout_add as ta, PRIORITY_LOW self.__timer1 = ta(SAVE_TIMER, self.__save_on_idle, priority=PRIORITY_LOW) return False def __save_on_idle(self): from gobject import idle_add, PRIORITY_LOW self.__timer2 = idle_add(self.__save, priority=PRIORITY_LOW) return False def __save(self): if self.__editor.modified is False: return False self.__editor.save_file(self.__editor.uri, self.__editor.encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __close_cb(self, *args): self.__remove_all_timers() self.__editor.handler_block(self.__sigid1) return False def __modified_cb(self, *args): self.__remove_all_timers() from gobject import idle_add, PRIORITY_LOW self.__timer3 = idle_add(self.__process, priority=PRIORITY_LOW) return False def __changed_cb(self, *args): self.__remove_all_timers() from gobject import timeout_add, PRIORITY_LOW self.__timer5 = timeout_add(150, self.__process, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/SaveSystem/ReadonlyHandler.py0000644000175000017500000000163511242100540022251 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "readonly-error", self.__error_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __error(self): from gettext import gettext as _ message = _("ERROR: Failed to perform operation in readonly mode") self.__editor.update_message(message, "fail") return False def __quit_cb(self, *args): self.__destroy() return False def __error_cb(self, *args): from gobject import idle_add idle_add(self.__error, priority=9999) return False scribes-0.4~r910/SCRIBES/SaveSystem/DbusDataSender.py0000644000175000017500000000434611242100540022030 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager from SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE class Sender(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "session-id", self.__session_cb) self.connect(manager, "save-data", self.__data_cb) self.connect(manager, "save-processor-object", self.__processor_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__session_id = () self.__processor = None return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __get_text(self): # Make sure file is always saved with a newline character. text = self.__editor.text if not text: return text + "\n" if text[-1] in ("\n", "\r", "\r\n"): return text return text + "\n" def __send(self, data): uri, encoding, session_id = data if self.__session_id != session_id: return False # from gio import File # Make sure uri is properly escaped. # uri = File(uri).get_uri() if not encoding: encoding = "utf-8" data = session_id, uri, encoding, self.__get_text() self.__processor.process(data, dbus_interface=SCRIBES_SAVE_PROCESS_DBUS_SERVICE, reply_handler=self.__reply_handler_cb, error_handler=self.__error_handler_cb) return False def __quit_cb(self, *args): self.__destroy() return False def __session_cb(self, manager, session_id): self.__session_id = session_id return False def __data_cb(self, manager, data): from gobject import idle_add idle_add(self.__send, data, priority=9999) return False def __processor_cb(self, manager, processor): self.__processor = processor return False def __reply_handler_cb(self, *args): return False def __error_handler_cb(self, error): print "=======================================================" print "Module Name: SCRIBES/SaveSystem/DbusDataSender.py" print "Class Name: Sender" print "Method Name: __error_handler_cb" print "ERROR MESSAGE: ", error print "=======================================================" return False scribes-0.4~r910/SCRIBES/SaveSystem/NameGenerator.py0000644000175000017500000000356511242100540021731 0ustar andreasandreasfrom string import punctuation, whitespace from SCRIBES.SignalConnectionManager import SignalManager STRIP_CHARACTERS = punctuation + whitespace RESERVED_CHARACTERS = ["/", "\\", "?", "%", "*", ":", "|", '"', "<", ">", ".", "&", ",", "\t"] NUMBER_OF_WORDS = 10 NUMBER_OF_CHARACTERS = 80 class Generator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__destroy_cb) self.connect(manager, "generate-name", self.__generate_cb) from gobject import idle_add idle_add(self.__optimize, priority=9999) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __generate(self, data): try: # Get first valid line in buffer. Strip characters, mostly # punctuation characters, that can cause invalid Unix filenames. line = self.__editor.text.strip(STRIP_CHARACTERS).splitlines()[0].strip(STRIP_CHARACTERS) # Replace invalid characters with spaces. invalid_characters = [character for character in line if character in RESERVED_CHARACTERS] for character in invalid_characters: line = line.replace(character, " ") # Select first ten words and remove extras spaces to get filename filename = " ".join(line.split()[:NUMBER_OF_WORDS]).strip()[:NUMBER_OF_CHARACTERS].strip() except IndexError: filename = "" finally: self.__manager.emit("newname", (filename, data)) return False def __optimize(self): self.__editor.optimize((self.__generate,)) return False def __destroy_cb(self, *args): self.__destroy() return False def __generate_cb(self, manager, data): from gobject import idle_add idle_add(self.__generate, data, priority=9999) return False scribes-0.4~r910/SCRIBES/CursorMetadata.py0000644000175000017500000000065011242100540020005 0ustar andreasandreasfrom Utils import open_database basepath = "cursor.gdb" def get_value(uri): try: cursor_position = 0, 0 database = open_database(basepath, "r") cursor_position = database[uri] except KeyError: pass finally: database.close() return cursor_position def set_value(uri, cursor_position): try: database = open_database(basepath, "w") database[str(uri)] = cursor_position finally: database.close() return scribes-0.4~r910/SCRIBES/TriggerManager.py0000644000175000017500000000113211242100540017761 0ustar andreasandreasclass TriggerManager(object): def __init__(self, editor): self.__init_attributes(editor) def __init_attributes(self, editor): self.__editor = editor self.__triggers = [] return def create_trigger(self, name, accelerator="", description="", category="", error=True, removable=True): trigger = self.__editor.create_trigger(name, accelerator, description, category, error, removable) self.__editor.add_trigger(trigger) self.__triggers.append(trigger) return trigger def remove_triggers(self): [self.__editor.remove_trigger(trigger) for trigger in self.__triggers] return False scribes-0.4~r910/SCRIBES/RegistrationManager.py0000644000175000017500000000322111242100540021031 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "register-object", self.__register_cb) self.connect(editor, "unregister-object", self.__unregister_cb) self.connect(editor, "quit", self.__quit_cb) def __init_attributes(self, editor): self.__editor = editor from collections import deque self.__objects = deque() return def __destroy(self): self.__remove_timer() self.disconnect() self.__editor.emit("post-quit") self.__editor.imanager.unregister_editor(self.__editor) # self.__editor.window.destroy() del self return False def __force_quit(self): print "Forcing the editor to quit. Damn something is wrong!" self.__destroy() return False def __register(self, _object): self.__objects.append(_object) return False def __unregister(self, _object): try: self.__objects.remove(_object) except ValueError: print _object, "not in queue" finally: if not self.__objects: self.__destroy() return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __register_cb(self, editor, _object): self.__register(_object) return False def __unregister_cb(self, editor, _object): self.__unregister(_object) return False def __quit_cb(self, *args): # Give the editor 30 secs to quit properly. Otherwise force quit it. from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(30000, self.__force_quit, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/ServicesInitializer.py0000644000175000017500000000365211242100540021063 0ustar andreasandreasclass Initializer(object): def __init__(self, editor, manager, uri, encoding, stdin): editor.set_data("InstanceManager", manager) from UniqueStampGenerator import Generator Generator(editor) from RegistrationManager import Manager Manager(editor) from FilenameGeneratorModeManager import Manager Manager(editor, uri) from ContentDetector import Detector Detector(editor, uri) from FileModificationMonitor import Monitor Monitor(editor) from URIManager import Manager Manager(editor, uri) from LanguageManager import Manager Manager(editor, uri) from SchemeManager import Manager Manager(editor) from GladeObjectManager import Manager Manager(editor) from CompletionWindowVisibilityManager import Manager Manager(editor) from BusyManager import Manager Manager(editor) from RecentManager import Manager Manager(editor) from GUI.Manager import Manager Manager(editor, uri) from ScrollbarVisibilityUpdater import Updater Updater(editor) ######################################################################## from FreezeManager import Manager Manager(editor) from EncodingSystem.Manager import Manager Manager(editor) # from FileChangeMonitor import Monitor # Monitor(editor) from SaveSystem.Manager import Manager Manager(editor) from TriggerSystem.Manager import Manager Manager(editor) from ReadonlyManager import Manager Manager(editor) # Register with instance manager after a successful editor # initialization. manager.register_editor(editor) from BarObjectManager import Manager Manager(editor) from FullScreenManager import Manager Manager(editor) # This should be the last lines in this method. from PluginSystemInitializer import Initializer Initializer(editor, uri) if stdin: editor.reset_text(stdin) from URILoader.Manager import Manager Manager(editor, uri, encoding) from gtk.gdk import notify_startup_complete notify_startup_complete() scribes-0.4~r910/SCRIBES/DBusService.py0000644000175000017500000000224611242100540017250 0ustar andreasandreasfrom dbus.service import Object, method, BusName class DBusService(Object): def __init__(self, manager): from Globals import session_bus from dbus.exceptions import NameExistsException try: service_name = "net.sourceforge.Scribes" object_path = "/net/sourceforge/Scribes" bus_name = BusName(service_name, bus=session_bus, do_not_queue=True) Object.__init__(self, bus_name, object_path) self.__manager = manager except NameExistsException: print "ERROR! Another instances of Scribes is already running. Cannot run more than one instance of Scribes. Killing this instance!" manager.force_quit() @method("net.sourceforge.Scribes") def open_window(self): return self.__manager.open_window() @method("net.sourceforge.Scribes", in_signature="asss") def open_files(self, uris, encoding="utf-8", stdin=""): uris = uris if uris else None stdin = stdin if stdin else None return self.__manager.open_files(uris, encoding, stdin) @method("net.sourceforge.Scribes", out_signature="as") def get_uris(self): return self.__manager.get_uris() @method("net.sourceforge.Scribes", out_signature="as") def get_text(self): return self.__manager.get_text() scribes-0.4~r910/SCRIBES/Makefile.in0000644000175000017500000005346311242100540016574 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES DIST_COMMON = $(scribes_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(scribesdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ edit = sed \ -e 's,@pixmapsdir\@,$(pixmapsdir),g' \ -e 's,@scribes_prefix\@,$(prefix),g' \ -e 's,@scribes_lib_path\@,$(libdir),g' \ -e 's,@scribes_data_path\@,$(datadir),g' \ -e 's,@scribes_sysconfdir\@,$(sysconfdir),g' \ -e 's,@python_path\@,$(pythondir),g' \ -e 's,@VERSION\@,$(VERSION),g' # dnl Generate "Globals.py" from "Globals.py.in." python_files = Globals.py python_in_files = $(python_files).in scribesdir = $(pythondir)/SCRIBES SUBDIRS = . GUI URILoader EncodingSystem SaveSystem SaveProcessInitializer TriggerSystem PluginInitializer scribes_PYTHON = \ Globals.py \ __init__.py \ BarObjectManager.py \ BusyManager.py \ ColorThemeMetadata.py \ CommandLineInfo.py \ CommandLineProcessor.py \ CommandLineParser.py \ CompletionWindowVisibilityManager.py \ ContentDetector.py \ CursorMetadata.py \ DBusService.py \ DialogFilters.py \ DisplayRightMarginMetadata.py \ Editor.py \ EditorImports.py \ Exceptions.py \ filedict.py \ FileChangeMonitor.py \ FilenameGeneratorModeManager.py \ FileModificationMonitor.py \ FontMetadata.py \ ForkScribesMetadata.py \ FreezeManager.py \ FullScreenManager.py \ GladeObjectManager.py \ GlobalStore.py \ InstanceManager.py \ i18n.py \ LanguageManager.py \ LanguagePluginManager.py \ LastSessionMetadata.py \ License.py \ Main.py \ MarginPositionMetadata.py \ MinimalModeMetadata.py \ SchemeManager.py \ ScrollbarVisibilityUpdater.py \ ServicesInitializer.py \ SIGNALS.py \ SignalConnectionManager.py \ SpellCheckMetadata.py \ PluginSystemInitializer.py \ PositionMetadata.py \ TabWidthMetadata.py \ TerminalSignalHandler.py \ TextWrappingMetadata.py \ Trigger.py \ TriggerManager.py \ URIManager.py \ PluginManager.py \ RegistrationManager.py \ ReadonlyManager.py \ RecentManager.py \ Usage.py \ UseTabsMetadata.py \ UniqueStampGenerator.py \ Utils.py \ WidgetTransparencyMetadata.py \ Word.py EXTRA_DIST = Globals.py.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-scribesPYTHON: $(scribes_PYTHON) @$(NORMAL_INSTALL) test -z "$(scribesdir)" || $(MKDIR_P) "$(DESTDIR)$(scribesdir)" @list='$(scribes_PYTHON)'; dlist=; list2=; test -n "$(scribesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(scribesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(scribesdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(scribesdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(scribesdir)" $$dlist; \ fi; \ else :; fi uninstall-scribesPYTHON: @$(NORMAL_UNINSTALL) @list='$(scribes_PYTHON)'; test -n "$(scribesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(scribesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(scribesdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(scribesdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(scribesdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(scribesdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(scribesdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(scribesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-scribesPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-scribesPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-scribesPYTHON install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-scribesPYTHON $(python_files): Makefile $(python_in_files) rm -f $(python_files) $(python_files).tmp $(edit) $(python_in_files) > $(python_files).tmp mv $(python_files).tmp $(python_files) if [ -d $(scribesdir) ]; then \ echo "removing " $(scribesdir) ;\ rm -rf $(scribesdir) ;\ echo "removed " $(scribesdir) ;\ fi clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/FileChangeMonitor.py0000644000175000017500000000500411242100540020422 0ustar andreasandreas#FIXME: Clean up this module. Too many poorly named variables. from SCRIBES.SignalConnectionManager import SignalManager class Monitor(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "loaded-file", self.__monitor_cb, True) self.connect(editor, "renamed-file", self.__monitor_cb, True) self.connect(editor, "save-file", self.__busy_cb) self.connect(editor, "renamed-file", self.__busy_cb) self.connect(editor, "save-error", self.__error_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__uri = "" self.__monitoring = False self.__busy = False self.__block = False return def __destroy(self): self.__unmonitor(self.__uri) self.disconnect() self.__editor.unregister_object(self) del self return False def __monitor(self, uri): self.__unmonitor(self.__uri) # if uri.startswith("file:///") is False: return False self.__uri = uri from gio import File, FILE_MONITOR_NONE self.__file_monitor = File(uri).monitor_file(FILE_MONITOR_NONE, None) self.__file_monitor.connect("changed", self.__changed_cb) self.__monitoring = True return False def __unmonitor(self, uri): if not uri: return False if self.__monitoring is False: return False self.__file_monitor.cancel() self.__monitoring = False return False def __process(self, args): try: monitor, gfile, otherfile, event = args if not (event in (0, 3)): return False if self.__block: return False self.__block = True from gobject import timeout_add, idle_add timeout_add(500, self.__unblock) if self.__busy: raise ValueError idle_add(self.__reload) except ValueError: self.__busy = False return False def __reload(self): from URILoader.Manager import Manager Manager(self.__editor, self.__editor.uri, self.__editor.encoding) return False def __unblock(self): self.__block = False return False def __quit_cb(self, *args): self.__destroy() return False def __monitor_cb(self, editor, uri, *args): from gobject import idle_add idle_add(self.__monitor, uri, priority=19999) return False def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__process, args, priority=19999) return False def __busy_cb(self, *args): self.__busy = True return False def __nobusy_cb(self, *args): self.__busy = False return False def __error_cb(self, *args): self.__block = True return False scribes-0.4~r910/SCRIBES/PluginSystemInitializer.py0000644000175000017500000000236711242100540021745 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, editor, uri): SignalManager.__init__(self, editor) self.__init_attributes(editor) self.connect(editor, "loaded-file", self.__loaded_cb) self.connect(editor, "loaded-file", self.__loaded_after_cb, True) self.connect(editor, "load-error", self.__loaded_cb) self.connect(editor, "load-error", self.__loaded_after_cb, True) if not uri: self.__ready() if not uri: self.__init_plugins() def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.disconnect() del self return def __init_plugins(self): from PluginInitializer.Manager import Manager Manager(self.__editor) self.__destroy() return False def __ready(self): self.__editor.emit("ready") self.__editor.textview.grab_focus() return def __init_plugins_on_idle(self): from gobject import idle_add, PRIORITY_HIGH idle_add(self.__init_plugins, priority=PRIORITY_HIGH) return False def __loaded_cb(self, *args): self.__ready() return False def __loaded_after_cb(self, *args): from gobject import timeout_add, PRIORITY_HIGH timeout_add(100, self.__init_plugins_on_idle, priority=PRIORITY_HIGH) return False scribes-0.4~r910/SCRIBES/SaveProcessInitializer/0000755000175000017500000000000011242100540021155 5ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveProcessInitializer/__init__.py0000644000175000017500000000000011242100540023254 0ustar andreasandreasscribes-0.4~r910/SCRIBES/SaveProcessInitializer/Makefile.in0000644000175000017500000003222211242100540023223 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/SaveProcessInitializer DIST_COMMON = $(saveprocessinitializer_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(saveprocessinitializerdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ saveprocessinitializerdir = $(pythondir)/SCRIBES/SaveProcessInitializer saveprocessinitializer_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ Monitor.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/SaveProcessInitializer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/SaveProcessInitializer/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-saveprocessinitializerPYTHON: $(saveprocessinitializer_PYTHON) @$(NORMAL_INSTALL) test -z "$(saveprocessinitializerdir)" || $(MKDIR_P) "$(DESTDIR)$(saveprocessinitializerdir)" @list='$(saveprocessinitializer_PYTHON)'; dlist=; list2=; test -n "$(saveprocessinitializerdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(saveprocessinitializerdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(saveprocessinitializerdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(saveprocessinitializerdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(saveprocessinitializerdir)" $$dlist; \ fi; \ else :; fi uninstall-saveprocessinitializerPYTHON: @$(NORMAL_UNINSTALL) @list='$(saveprocessinitializer_PYTHON)'; test -n "$(saveprocessinitializerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(saveprocessinitializerdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(saveprocessinitializerdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(saveprocessinitializerdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(saveprocessinitializerdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(saveprocessinitializerdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(saveprocessinitializerdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(saveprocessinitializerdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-saveprocessinitializerPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-saveprocessinitializerPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-saveprocessinitializerPYTHON \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-saveprocessinitializerPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/SaveProcessInitializer/Initializer.py0000644000175000017500000000207711242100540024020 0ustar andreasandreasclass Initializer(object): def __init__(self, manager): self.__init_attributes(manager) self.__sigid1 = manager.connect("restart", self.__restart_cb) self.__start() def __init_attributes(self, manager): self.__manager = manager return def __start(self): from gobject import spawn_async from SCRIBES.Globals import python_path python = self.__get_python_executable() folder = self.__get_save_process_folder() module = self.__get_save_process_executable(folder) spawn_async([python, module, python_path], working_directory=folder) return False def __get_python_executable(self): from sys import prefix from os.path import join return join(prefix, "bin", "python") def __get_save_process_folder(self): from os.path import join, split SCRIBES_folder = split(split(globals()["__file__"])[0])[0] return join(SCRIBES_folder, "SaveSystem", "ExternalProcess") def __get_save_process_executable(self, folder): from os.path import join return join(folder, "ScribesSaveProcess.py") def __restart_cb(self, *args): self.__start() return False scribes-0.4~r910/SCRIBES/SaveProcessInitializer/Monitor.py0000644000175000017500000000160211242100540023155 0ustar andreasandreasclass Monitor(object): def __init__(self, manager): self.__init_attributes(manager) from SCRIBES.Globals import SCRIBES_SAVE_PROCESS_DBUS_SERVICE, session_bus session_bus.add_signal_receiver(self.__name_change_cb, 'NameOwnerChanged', 'org.freedesktop.DBus', 'org.freedesktop.DBus', '/org/freedesktop/DBus', arg0=SCRIBES_SAVE_PROCESS_DBUS_SERVICE) def __init_attributes(self, manager): self.__manager = manager return def __save_process_exists(self): try: from dbus import DBusException from SCRIBES.Globals import dbus_iface, SCRIBES_SAVE_PROCESS_DBUS_SERVICE services = dbus_iface.ListNames() if not (SCRIBES_SAVE_PROCESS_DBUS_SERVICE in services): return False except DBusException: return False return True def __name_change_cb(self, *args): if self.__save_process_exists(): return self.__manager.emit("restart") return scribes-0.4~r910/SCRIBES/SaveProcessInitializer/Manager.py0000644000175000017500000000070511242100540023103 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_PYOBJECT from gobject import TYPE_NONE, TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "restart": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) from Initializer import Initializer Initializer(self) from Monitor import Monitor Monitor(self) scribes-0.4~r910/SCRIBES/SaveProcessInitializer/Makefile.am0000644000175000017500000000030711242100540023211 0ustar andreasandreassaveprocessinitializerdir = $(pythondir)/SCRIBES/SaveProcessInitializer saveprocessinitializer_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ Monitor.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/UseTabsMetadata.py0000644000175000017500000000124711242100540020101 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "UseTabs.gdb") def get_value(language): try: use_tabs = True database = open_database(basepath, "r") use_tabs = database[language] except KeyError: if "def" in database: use_tabs = database["def"] finally: database.close() return use_tabs def set_value(data): try: language, use_tabs = data database = open_database(basepath, "w") database[language] = use_tabs finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/TabWidthMetadata.py0000644000175000017500000000125311242100540020236 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "TabWidth.gdb") def get_value(language): try: tab_width = 4 database = open_database(basepath, "r") tab_width = database[language] except KeyError: if "def" in database: tab_width = database["def"] finally: database.close() return tab_width def set_value(data): try: language, tab_width = data database = open_database(basepath, "w") database[language] = tab_width finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/PositionMetadata.py0000644000175000017500000000102211242100540020326 0ustar andreasandreasfrom Utils import open_database basepath = "position.gdb" def get_window_position_from_database(uri): try: database = open_database(basepath, "r") window_position = database[uri] except KeyError: KEY = "" window_position = database[KEY] if database.has_key(KEY) else None finally: database.close() return window_position def update_window_position_in_database(uri, window_position): try: database = open_database(basepath, "w") database[str(uri)] = window_position finally: database.close() return scribes-0.4~r910/SCRIBES/PluginManager.py0000644000175000017500000001211611242100540017620 0ustar andreasandreasclass Manager(object): def __init__(self, editor): try: from Exceptions import PluginFolderNotFoundError self.__init_attributes(editor) self.__check_plugin_folders() self.__set_plugin_search_path() self.__load_plugins() self.__sigid1 = editor.connect("quit", self.__quit_cb) editor.register_object(self) except PluginFolderNotFoundError: print "Error: No plugin folder found" def __init_attributes(self, editor): self.__editor = editor # A set of initialized plugins. Each element in the set is a # tuple with format (plugin_name, plugin_version, plugin_object). self.__plugin_objects = set([]) # A set of all plugin modules. Each element in the set is a tuple # with the format, (plugin_name, plugin_version, module_object). self.__plugin_modules = set([]) self.__registration_id = None self.__is_quiting = False return def __init_module(self, filename, plugin_folder): from Exceptions import PluginModuleValidationError from Exceptions import DuplicatePluginError, DoNotLoadError try: if not (filename.startswith("Plugin") and filename.endswith(".py")): return False from os import path filepath = path.join(plugin_folder, filename) from imp import load_source module = load_source(filename[:-3], filepath) plugin_name, plugin_version, PluginClass = self.__get_module_info(module) self.__plugin_modules.add(module) self.__unload_duplicate_plugins(plugin_name, plugin_version) plugin_object = self.__load_plugin(PluginClass) self.__plugin_objects.add((plugin_name, plugin_version, plugin_object)) except PluginModuleValidationError: print "Validation Error: ", filename except DuplicatePluginError: print "Duplicate Plugin: ", (plugin_name, plugin_version) except DoNotLoadError: #print "Not loading: ", (filename) self.__plugin_modules.add(module) return False def __load_plugin(self, PluginClass): plugin_object = PluginClass(self.__editor) plugin_object.load() return plugin_object def __unload_plugin(self, plugin_info): plugin_object = plugin_info[2] plugin_object.unload() self.__plugin_objects.remove(plugin_info) return False def __load_plugins(self): core_plugin_folder = self.__editor.core_plugin_folder home_plugin_folder = self.__editor.home_plugin_folder from os import listdir core_files = listdir(core_plugin_folder) init_module = self.__init_module from gobject import idle_add for filename in core_files: idle_add(init_module, filename, core_plugin_folder, priority=9999) home_files = listdir(home_plugin_folder) for filename in home_files: idle_add(init_module, filename, home_plugin_folder, priority=9999) return False def __unload_plugins(self): for plugin_info in self.__plugin_objects.copy(): self.__unload_plugin(plugin_info) return False def __get_module_info(self, module): try: if not hasattr(module, "autoload"): raise Exception if not getattr(module, "autoload"): raise ValueError if hasattr(module, "version") is False: raise Exception plugin_version = getattr(module, "version") if hasattr(module, "class_name") is False: raise Exception plugin_name = class_name = getattr(module, "class_name") if hasattr(module, class_name) is False: raise Exception PluginClass = getattr(module, class_name) if hasattr(PluginClass, "__init__") is False: raise Exception if hasattr(PluginClass, "load") is False: raise Exception if hasattr(PluginClass, "unload") is False: raise Exception except ValueError: from Exceptions import DoNotLoadError raise DoNotLoadError except: from Exceptions import PluginModuleValidationError raise PluginModuleValidationError return plugin_name, plugin_version, PluginClass def __unload_duplicate_plugins(self, name, version): for info in self.__plugin_objects.copy(): if name in info: if (version > info[1]): info[2].unload() self.__plugin_objects.remove(info) else: from Exceptions import DuplicatePluginError raise DuplicatePluginError break return def __check_plugin_folders(self): from os import makedirs, path from Exceptions import PluginFolderNotFoundError filename = path.join(self.__editor.core_plugin_folder, "__init__.py") if not path.exists(filename): raise PluginFolderNotFoundError filename = path.join(self.__editor.home_plugin_folder, "__init__.py") if path.exists(filename): return try: makedirs(self.__editor.home_plugin_folder) except OSError: pass try: handle = open(filename, "w") handle.close() except IOError: raise PluginFolderNotFoundError return def __set_plugin_search_path(self): from sys import path if not (self.__editor.core_plugin_folder in path): path.insert(0, self.__editor.core_plugin_folder) if not (self.__editor.home_plugin_folder in path): path.insert(0, self.__editor.home_plugin_folder) return def __destroy(self): self.__unload_plugins() self.__plugin_modules.clear() self.__plugin_objects.clear() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self return def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/Exceptions.py0000644000175000017500000000252011242100540017206 0ustar andreasandreasclass Error(Exception): pass class PermissionError(Error): pass class LoadFileError(Error): pass class FileNotFound(Error): pass class SwapError(Error): pass class FileCreateError(Error): pass class FileWriteError(Error): pass class FileCloseError(Error): pass class TransferError(Error): pass class NewFileError(Error): pass class DoNothingError(Error): pass class FileInfoError(Error): pass class GenericError(Error): pass class NotFoundError(Error): pass class AccessDeniedError(Error): pass class OpenFileError(Error): pass class ReadFileError(Error): pass class CloseFileError(Error): pass class GnomeVfsError(Error): pass class PluginError(Error): pass class FileModificationError(Error): pass class PluginFolderNotFoundError(Error): pass class PluginModuleValidationError(Error): pass class DuplicatePluginError(Error): pass class DoNotLoadError(Error): pass class InvalidTriggerNameError(Error): pass class InvalidLanguagePluginError(Error): pass class DuplicateTriggerNameError(Error): pass class DuplicateTriggerRemovalError(Error): pass class DuplicateTriggerAcceleratorError(Error): pass class GlobalStoreObjectExistsError(Error): pass class GlobalStoreObjectDoesNotExistError(Error): pass class BarBoxAddError(Error): pass class BarBoxInvalidObjectError(Error): pass scribes-0.4~r910/SCRIBES/Trigger.py0000644000175000017500000000317011242100540016472 0ustar andreasandreasfrom gobject import GObject, SIGNAL_RUN_LAST, TYPE_NONE from gobject import SIGNAL_ACTION, SIGNAL_NO_RECURSE SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Trigger(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()) } def __init__(self, editor, name, accelerator="", description="", category="", error=True, removable=True): GObject.__init__(self) self.__init_attributes(editor, name, accelerator, description, category, error, removable) from gobject import idle_add, PRIORITY_LOW idle_add(self.__compile, priority=PRIORITY_LOW) def __init_attributes(self, editor, name, accelerator, description, category, error, removable): self.__editor = editor self.__name = name self.__accelerator = accelerator self.__description = description self.__error = error self.__removable = removable self.__category = category return name = property(lambda self: self.__name) accelerator = property(lambda self: self.__accelerator) description = property(lambda self: self.__description) category = property(lambda self: self.__category) error = property(lambda self: self.__error) removable = property(lambda self: self.__removable) def __activate(self): self.__editor.grab_focus() if self.__editor.bar_is_active: return False self.__editor.hide_completion_window() self.emit("activate") return False def activate(self): from gobject import idle_add, PRIORITY_HIGH idle_add(self.__activate, priority=PRIORITY_HIGH) return def destroy(self): del self return def __compile(self): methods = (self.activate, self.__activate) self.__editor.optimize(methods) return False scribes-0.4~r910/SCRIBES/CommandLineParser.py0000644000175000017500000000473511242100540020442 0ustar andreasandreasfrom gettext import gettext as _ class Parser(object): def __init__(self): self.__init_attributes() self.__add_options() self.__args = self.__parser.parse_args()[-1] self.__parser.parse_args() def __init_attributes(self): from optparse import OptionParser self.__parser = OptionParser(usage=_("usage: %prog [OPTION...] [FILE...]"), description=_("%prog is a text editor for GNOME.\n\n http://scribes.sf.net/"), ) self.__args = [] # self.__parser.parse_args()[-1] # [] self.__readonly = False self.__encoding = "utf-8" self.__newfile = False return args = property(lambda self: self.__args) readonly = property(lambda self: self.__readonly) encoding = property(lambda self: self.__encoding) newfile = property(lambda self: self.__newfile) def __add_options(self): parser = self.__parser parser.add_option("-v", "--version", help=_("display the version of Scribes currently running"), action="callback", callback=self.__print_version) parser.add_option("-i", "--info", help=_("display detailed information about Scribes"), action="callback", callback=self.__print_info) parser.add_option("-n", "--newfile", help=_("create a new file and open the file in Scribes"), action="callback", callback=self.__create_newfile) parser.add_option("-e", "--encoding", help=_("open file(s) with specified encoding"), action="callback", callback=self.__use_encoding) parser.add_option("-r", "--readonly", help=_("open file(s) in readonly mode"), action="callback", callback=self.__enable_readonly) return def __print_version(self, *args): from Globals import version from i18n import msg0042 from locale import getpreferredencoding encoding = getpreferredencoding(True) print msg0042.decode("utf-8").encode(encoding) % version.encode(encoding, "replace") raise SystemExit def __print_info(self, *args): from CommandLineInfo import print_info print_info() raise SystemExit def __create_newfile(self, *args): if not self.__args: return False self.__newfile = True return False def __open_pipe_input(self, *args): from sys.stdin import read self.__stdin = read() print self.__stdin raise SystemExit def __use_encoding(self, *args): if not self.__args: return False self.__encoding = "utf-8" print "ERROR: NOT YET IMPLEMENTED" raise SystemExit def __enable_readonly(self, *args): if not self.__args: return False self.__readonly = True print "ERROR: NOT YET IMPLEMENTED" raise SystemExit scribes-0.4~r910/SCRIBES/TextWrappingMetadata.py0000644000175000017500000000131211242100540021160 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "TextWrapping.gdb") def get_value(language): try: text_wrapping = True database = open_database(basepath, "r") text_wrapping = database[language] except KeyError: if "def" in database: text_wrapping = database["def"] finally: database.close() return text_wrapping def set_value(data): try: language, text_wrapping = data database = open_database(basepath, "w") database[language] = text_wrapping finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/SpellCheckMetadata.py0000644000175000017500000000126711242100540020552 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "SpellCheck.gdb") def get_value(language): try: spellcheck = False database = open_database(basepath, "r") spellcheck = database[language] except KeyError: if "def" in database: spellcheck = database["def"] finally: database.close() return spellcheck def set_value(data): try: language, spellcheck = data database = open_database(basepath, "w") database[language] = spellcheck finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return scribes-0.4~r910/SCRIBES/LastSessionMetadata.py0000644000175000017500000000067511242100540021006 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "LastSessionUris.gdb") def get_value(): try: value = [] database = open_database(basepath, "r") value = database["last_session_uris"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["last_session_uris"] = value finally: database.close() return scribes-0.4~r910/SCRIBES/GladeObjectManager.py0000644000175000017500000000133411242100540020525 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__set() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from os.path import join glade_file = join(editor.data_folder, "Editor.glade") from gtk.glade import XML self.__glade = XML(glade_file, "Window", "scribes") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return def __set(self): self.__editor.set_data("gui", self.__glade) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/Usage.py0000644000175000017500000000056511242100540016140 0ustar andreasandreasdef help(): from i18n import msg0124, msg0125, msg0126, msg0127, msg0128 from i18n import msg0129, msg0130 print msg0124 print print msg0125 print print msg0126 print print "\t-h, --help\t" + msg0127 print "\t-v, --version\t" + msg0128 print "\t-n, --newfile\t" + msg0129 print "\t-i, --info\t" + msg0130 print print "http://scribes.sourceforge.net/" return scribes-0.4~r910/SCRIBES/WidgetTransparencyMetadata.py0000644000175000017500000000067111242100540022350 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "WidgetTransparency.gdb") def get_value(): try: value = False database = open_database(basepath, "r") value = database["transparency"] except: pass finally: database.close() return value def set_value(value): try: database = open_database(basepath, "w") database["transparency"] = value finally: database.close() return scribes-0.4~r910/SCRIBES/ForkScribesMetadata.py0000644000175000017500000000047411242100540020750 0ustar andreasandreasfrom SCRIBES.Utils import open_storage STORAGE_FILE = "ForkScribes.dict" KEY = "fork_scribes" def get_value(): try: value = True storage = open_storage(STORAGE_FILE) value = storage[KEY] except: pass return value def set_value(value): storage = open_storage(STORAGE_FILE) storage[KEY] = value return scribes-0.4~r910/SCRIBES/BarObjectManager.py0000644000175000017500000000317011242100540020215 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) editor.set_data("bar_is_active", False) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("add-bar-object", self.__add_cb) self.__sigid3 = editor.connect("remove-bar-object", self.__remove_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __add(self, bar): container = self.__editor.gui.get_widget("BarBox") from Exceptions import BarBoxAddError if container.get_children(): raise BarBoxAddError container.add(bar) if bar.parent is None else bar.reparent(container) container.show_all() self.__editor.set_data("bar_is_active", True) self.__editor.emit("bar-is-active", True) return False def __remove(self, bar): container = self.__editor.gui.get_widget("BarBox") from Exceptions import BarBoxInvalidObjectError if not (bar in container.get_children()): raise BarBoxInvalidObjectError container.hide() container.remove(bar) self.__editor.set_data("bar_is_active", False) self.__editor.emit("bar-is-active", False) return False def __quit_cb(self, *args): self.__destroy() return False def __add_cb(self, editor, bar): self.__add(bar) return False def __remove_cb(self, editor, bar): self.__remove(bar) return False scribes-0.4~r910/SCRIBES/BusyManager.py0000644000175000017500000000165111242100540017306 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("private-busy", self.__busy_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__busy = 0 return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self return False def __set(self, busy): self.__busy = self.__busy + 1 if busy else self.__busy - 1 if self.__busy < 0: self.__busy = 0 busy = True if self.__busy else False self.__editor.emit("busy", busy) return False def __quit_cb(self, *args): self.__destroy() return False def __busy_cb(self, editor, busy): from gobject import idle_add idle_add(self.__set, busy) return False scribes-0.4~r910/SCRIBES/FontMetadata.py0000644000175000017500000000174311242100540017442 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "Languages", "Font.gdb") def get_value(language): try: font = __get_default_font() database = open_database(basepath, "r") font = database[language] except KeyError: if "def" in database: font = database["def"] finally: database.close() return font def set_value(data): try: language, font = data database = open_database(basepath, "w") database[language] = font finally: database.close() return def reset(language): try: database = open_database(basepath, "w") del database[language] except KeyError: pass finally: database.close() return def __get_default_font(): try: font = "Monospace 11" gconf_font_location = "/desktop/gnome/interface/monospace_font_name" from gconf import client_get_default client = client_get_default() font = client.get_string(gconf_font_location) if font is None: font = "Monospace 11" except Exception: pass return font scribes-0.4~r910/SCRIBES/TriggerSystem/0000755000175000017500000000000011242100540017324 5ustar andreasandreasscribes-0.4~r910/SCRIBES/TriggerSystem/TriggerRemover.py0000644000175000017500000000177111242100540022647 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Remover(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "quit", self.__quit_cb) self.connect(editor, "remove-trigger", self.__trigger_cb) self.connect(editor, "remove-triggers", self.__triggers_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __remove(self, trigger): self.__manager.emit("remove", trigger) return False def __remove_triggers(self, triggers): [self.__remove(trigger) for trigger in triggers] return False def __trigger_cb(self, editor, trigger): self.__remove_triggers((trigger,)) return False def __triggers_cb(self, editor, triggers): self.__remove_triggers(triggers) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/TriggerSystem/__init__.py0000644000175000017500000000000011242100540021423 0ustar andreasandreasscribes-0.4~r910/SCRIBES/TriggerSystem/Signals.py0000644000175000017500000000053511242100540021301 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "add": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "remove": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "quit": (SSIGNAL, TYPE_NONE, ()), "triggers-cleared": (SSIGNAL, TYPE_NONE, ()), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/SCRIBES/TriggerSystem/TriggerManager.py0000644000175000017500000000210411242100540022571 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "quit", self.__quit_cb) self.connect(manager, "add", self.__add_cb) self.connect(manager, "remove", self.__remove_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__triggers = [] return False def __add(self, trigger): self.__triggers.append(trigger) return False def __remove(self, trigger): if trigger in self.__triggers: self.__triggers.remove(trigger) return False def __update(self, function, trigger): function(trigger) self.__editor.set_data("triggers", self.__triggers) return False def __add_cb(self, manager, trigger): self.__update(self.__add, trigger) return False def __remove_cb(self, manager, trigger): self.__update(self.__remove, trigger) return False def __quit_cb(self, *args): self.disconnect() self.__triggers = [] del self return False scribes-0.4~r910/SCRIBES/TriggerSystem/Makefile.in0000644000175000017500000005011011242100540021366 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/TriggerSystem DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(triggersystem_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(triggersystemdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Bindings triggersystemdir = $(pythondir)/SCRIBES/TriggerSystem triggersystem_PYTHON = \ __init__.py \ Manager.py \ Signals.py \ TriggerActivator.py \ AcceleratorActivator.py \ Validator.py \ Exceptions.py \ TriggerRemover.py \ Quiter.py \ TriggerManager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/TriggerSystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/TriggerSystem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-triggersystemPYTHON: $(triggersystem_PYTHON) @$(NORMAL_INSTALL) test -z "$(triggersystemdir)" || $(MKDIR_P) "$(DESTDIR)$(triggersystemdir)" @list='$(triggersystem_PYTHON)'; dlist=; list2=; test -n "$(triggersystemdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(triggersystemdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(triggersystemdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(triggersystemdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(triggersystemdir)" $$dlist; \ fi; \ else :; fi uninstall-triggersystemPYTHON: @$(NORMAL_UNINSTALL) @list='$(triggersystem_PYTHON)'; test -n "$(triggersystemdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(triggersystemdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(triggersystemdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(triggersystemdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(triggersystemdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(triggersystemdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(triggersystemdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(triggersystemdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-triggersystemPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-triggersystemPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-triggersystemPYTHON installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-triggersystemPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/TriggerSystem/Exceptions.py0000644000175000017500000000030211242100540022012 0ustar andreasandreasclass NoTriggerNameError(Exception): pass class DuplicateAcceleratorError(Exception): pass class DuplicateTriggerNameError(Exception): pass class InvalidAcceleratorError(Exception): pass scribes-0.4~r910/SCRIBES/TriggerSystem/Manager.py0000644000175000017500000000102611242100540021247 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from Bindings.Manager import Manager Manager(editor) from Quiter import Quiter Quiter(self, editor) from TriggerManager import Manager Manager(self, editor) from TriggerActivator import Activator Activator(self, editor) from AcceleratorActivator import Activator Activator(self, editor) from TriggerRemover import Remover Remover(self, editor) from Validator import Validator Validator(self, editor) scribes-0.4~r910/SCRIBES/TriggerSystem/Makefile.am0000644000175000017500000000047111242100540021362 0ustar andreasandreasSUBDIRS = Bindings triggersystemdir = $(pythondir)/SCRIBES/TriggerSystem triggersystem_PYTHON = \ __init__.py \ Manager.py \ Signals.py \ TriggerActivator.py \ AcceleratorActivator.py \ Validator.py \ Exceptions.py \ TriggerRemover.py \ Quiter.py \ TriggerManager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/TriggerSystem/Quiter.py0000644000175000017500000000213011242100540021143 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Quiter(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "triggers-cleared", self.__cleared_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor # Quit flag must be True before system can quit. self.__quit = False # Cleared flag must be 2 before system can quit. self.__cleared = 0 return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __emit_quit_signal(self): self.__cleared += 1 if self.__quit is False: return False if self.__cleared != 2: return False self.__manager.emit("quit") self.__destroy() return False def __quit_cb(self, *args): self.__quit = True return False def __cleared_cb(self, *args): self.__emit_quit_signal() # from gobject import idle_add # idle_add(self.__emit_quit_signal) return False scribes-0.4~r910/SCRIBES/TriggerSystem/Validator.py0000644000175000017500000000571211242100540021630 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "quit", self.__quit_cb) self.connect(editor, "add-trigger", self.__add_cb) self.connect(editor, "add-triggers", self.__adds_cb) self.connect(editor, "remove-trigger", self.__remove_cb) self.connect(editor, "remove-triggers", self.__removes_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__names = [] self.__accelerators = [] return def __validate(self, trigger): from Exceptions import NoTriggerNameError, DuplicateAcceleratorError from Exceptions import DuplicateTriggerNameError from Exceptions import InvalidAcceleratorError try: name, accelerator = trigger.name, trigger.accelerator self.__validate_name(name) self.__names.append(name) self.__validate_accelerator(accelerator) if accelerator: self.__accelerators.append(accelerator) self.__manager.emit("add", trigger) except NoTriggerNameError: print "ERROR: Trigger must have a name" except DuplicateTriggerNameError: print "ERROR: Duplicate trigger name found", name except DuplicateAcceleratorError: print "ERROR: Accelerator: %s, already in use" % accelerator except InvalidAcceleratorError: print "ERROR: %s is an invalid accelerator" % accelerator return False def __validate_name(self, name): from Exceptions import NoTriggerNameError, DuplicateTriggerNameError if not name: raise NoTriggerNameError if name in self.__names: raise DuplicateTriggerNameError return False def __validate_accelerator(self, accelerator): if not accelerator: return False from Exceptions import DuplicateAcceleratorError if accelerator in self.__accelerators: raise DuplicateAcceleratorError from gtk import accelerator_parse, accelerator_valid keyval, modifier = accelerator_parse(accelerator) if accelerator_valid(keyval, modifier): return False from Exceptions import InvalidAcceleratorError raise InvalidAcceleratorError def __remove(self, trigger): name, accelerator = trigger.name, trigger.accelerator if name in self.__names: self.__names.remove(name) if accelerator in self.__accelerators: self.__accelerators.remove(accelerator) return False def __validate_triggers(self, triggers): [self.__validate(trigger) for trigger in triggers] return False def __add_cb(self, editor, trigger): self.__validate_triggers((trigger,)) return False def __adds_cb(self, editor, triggers): self.__validate_triggers(triggers) return False def __remove_cb(self, editor, trigger): self.__remove(trigger) return False def __removes_cb(self, editor, triggers): [self.__remove(trigger) for trigger in triggers] return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/TriggerSystem/AcceleratorActivator.py0000644000175000017500000000417711242100540024010 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Activator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(manager, "quit", self.__quit_cb) self.connect(manager, "add", self.__add_cb) self.connect(manager, "remove", self.__remove_cb) self.connect(self.__accelgroup, "accel-activate", self.__activate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor # Dictionary Format: {(keyval, modifier): trigger} self.__dictionary = {} from gtk import accel_groups_from_object self.__accelgroup = accel_groups_from_object(self.__editor.window)[0] return False def __add(self, trigger): if not trigger.accelerator: return False from gtk import accelerator_parse, ACCEL_LOCKED keyval, modifier = accelerator_parse(trigger.accelerator) add = self.__editor.window.add_accelerator add("scribes-key-event", self.__accelgroup, keyval, modifier, ACCEL_LOCKED) self.__dictionary[(keyval, modifier)] = trigger return False def __remove(self, trigger): if not (trigger in self.__dictionary.values()): return False remove = self.__editor.window.remove_accelerator keyval, modifier = self.__get_keyval_modifier_from(trigger) remove(self.__accelgroup, keyval, modifier) del self.__dictionary[(keyval, modifier)] if not self.__dictionary: self.__manager.emit("triggers-cleared") return False def __get_keyval_modifier_from(self, trigger): for keyvalmodifier, _trigger in self.__dictionary.iteritems(): if trigger == _trigger: return keyvalmodifier def __activate(self, keyvalmodifier): self.__dictionary[keyvalmodifier].activate() return False def __activate_cb(self, accelgroup, window, keyval, modifier, *args): self.__activate((keyval, modifier)) return False def __add_cb(self, manager, trigger): self.__add(trigger) return False def __remove_cb(self, manager, trigger): self.__remove(trigger) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/0000755000175000017500000000000011242100540021061 5ustar andreasandreasscribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/FullscreenBinder.py0000644000175000017500000000036211242100540024662 0ustar andreasandreasfrom Binder import BaseBinder class Binder(BaseBinder): def __init__(self, editor): BaseBinder.__init__(self, editor, "F11", "fullscreen") self.__editor = editor def activate(self): self.__editor.toggle_fullscreen() return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/Binder.py0000644000175000017500000000205011242100540022633 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class BaseBinder(SignalManager): def __init__(self, editor, shortcut, signal): SignalManager.__init__(self) self.__init_attributes(editor) self.__bind(shortcut, signal) self.connect(editor, "quit", self.__quit_cb) self.connect(editor.window, signal, self.__activate_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __bind(self, shortcut, signal): from gtk import accelerator_parse keyval, modifier = accelerator_parse(shortcut) if (keyval, modifier) in self.__editor.get_shortcuts(): return False from gtk import binding_entry_add_signal as bind bind(self.__editor.window, keyval, modifier, signal, str, shortcut) self.__editor.add_shortcut((keyval, modifier)) return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __quit_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): self.activate() return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/CloseWindowBinder.py0000644000175000017500000000036411242100540025017 0ustar andreasandreasfrom Binder import BaseBinder class Binder(BaseBinder): def __init__(self, editor): BaseBinder.__init__(self, editor, "w", "scribes-close-window") self.__editor = editor def activate(self): self.__editor.close() return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/ShutdownBinder.py0000644000175000017500000000035311242100540024373 0ustar andreasandreasfrom Binder import BaseBinder class Binder(BaseBinder): def __init__(self, editor): BaseBinder.__init__(self, editor, "q", "shutdown") self.__editor = editor def activate(self): self.__editor.shutdown() return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/__init__.py0000644000175000017500000000000011242100540023160 0ustar andreasandreasscribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/Makefile.in0000644000175000017500000003153111242100540023131 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/TriggerSystem/Bindings DIST_COMMON = $(bindings_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindingsdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bindingsdir = $(pythondir)/SCRIBES/TriggerSystem/Bindings bindings_PYTHON = \ __init__.py \ Manager.py \ Binder.py \ CloseWindowBinder.py \ CloseWindowNoSaveBinder.py \ ShutdownBinder.py \ FullscreenBinder.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/TriggerSystem/Bindings/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/TriggerSystem/Bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-bindingsPYTHON: $(bindings_PYTHON) @$(NORMAL_INSTALL) test -z "$(bindingsdir)" || $(MKDIR_P) "$(DESTDIR)$(bindingsdir)" @list='$(bindings_PYTHON)'; dlist=; list2=; test -n "$(bindingsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bindingsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bindingsdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(bindingsdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(bindingsdir)" $$dlist; \ fi; \ else :; fi uninstall-bindingsPYTHON: @$(NORMAL_UNINSTALL) @list='$(bindings_PYTHON)'; test -n "$(bindingsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(bindingsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindingsdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(bindingsdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(bindingsdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(bindingsdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(bindingsdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(bindingsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-bindingsPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-bindingsPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-bindingsPYTHON \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-bindingsPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/CloseWindowNoSaveBinder.py0000644000175000017500000000041411242100540026127 0ustar andreasandreasfrom Binder import BaseBinder class Binder(BaseBinder): def __init__(self, editor): BaseBinder.__init__(self, editor, "w", "scribes-close-window-nosave") self.__editor = editor def activate(self): self.__editor.close(False) return False scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/Manager.py0000644000175000017500000000042711242100540023010 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from CloseWindowBinder import Binder Binder(editor) from CloseWindowNoSaveBinder import Binder Binder(editor) from ShutdownBinder import Binder Binder(editor) from FullscreenBinder import Binder Binder(editor) scribes-0.4~r910/SCRIBES/TriggerSystem/Bindings/Makefile.am0000644000175000017500000000037411242100540023121 0ustar andreasandreasbindingsdir = $(pythondir)/SCRIBES/TriggerSystem/Bindings bindings_PYTHON = \ __init__.py \ Manager.py \ Binder.py \ CloseWindowBinder.py \ CloseWindowNoSaveBinder.py \ ShutdownBinder.py \ FullscreenBinder.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/TriggerSystem/TriggerActivator.py0000644000175000017500000000337411242100540023165 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Activator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "trigger", self.__activate_cb) self.connect(manager, "add", self.__add_cb) self.connect(manager, "remove", self.__remove_cb) self.connect(manager, "quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor # Dictionary Format: {trigger_name: trigger} self.__dictionary = {} return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__manager) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.unregister_object(self) del self return False def __add(self, trigger): self.__dictionary[trigger.name] = trigger return False def __remove(self, trigger): try: name = trigger.name trigger.destroy() del trigger del self.__dictionary[name] except KeyError: print "Error: Trigger named %s not found" % name finally: if not self.__dictionary: self.__manager.emit("triggers-cleared") return False def __activate(self, name): self.__dictionary[name].activate() return False def __activate_cb(self, editor, name): self.__activate(name) return False def __add_cb(self, manager, trigger): self.__add(trigger) return False def __remove_cb(self, manager, trigger): self.__remove(trigger) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/License.py0000644000175000017500000000125511242100540016453 0ustar andreasandreaslicense_string = """ Scribes 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. Scribes 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 Scribes; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """scribes-0.4~r910/SCRIBES/Globals.py0000644000175000017500000000654611242100540016464 0ustar andreasandreas# -*- coding: utf-8 -*- from os import environ from os.path import join, expanduser from dbus import SessionBus, Interface, glib from xdg.BaseDirectory import xdg_config_home, xdg_data_home SCRIBES_DBUS_SERVICE = "net.sourceforge.Scribes" SCRIBES_DBUS_PATH = "/net/sourceforge/Scribes" SCRIBES_SAVE_PROCESS_DBUS_SERVICE = "net.sourceforge.ScribesSaveProcess" SCRIBES_SAVE_PROCESS_DBUS_PATH = "/net/sourceforge/ScribesSaveProcess" session_bus = SessionBus() dbus_proxy_obj = session_bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus') dbus_iface = Interface(dbus_proxy_obj, 'org.freedesktop.DBus') home_folder = expanduser("~") from tempfile import gettempdir tmp_folder = gettempdir() folder_ = join(home_folder, "Desktop") from os.path import exists desktop_folder = folder_ if exists(folder_) else home_folder metadata_folder = config_folder = join(xdg_config_home, "scribes") print_settings_filename = join(metadata_folder, "ScribesPrintSettings.txt") home_plugin_folder = home_generic_plugin_folder = join(config_folder, "GenericPlugins") home_language_plugin_folder = join(config_folder, "LanguagePlugins") scribes_theme_folder = join(config_folder, "styles") storage_folder = join(config_folder, ".config") default_home_theme_folder = join(xdg_data_home, "gtksourceview-2.0", "styles") name = "scribes" prefix = "/usr" executable_path = join(prefix, "bin") data_path = "/usr/share" library_path = "/usr/lib" sysconfdir = "/usr/etc" data_folder = join(data_path, "scribes") root_plugin_folder = join(library_path, "scribes") core_plugin_folder = core_generic_plugin_folder = join(root_plugin_folder, "GenericPlugins") core_language_plugin_folder = join(root_plugin_folder, "LanguagePlugins") python_path = "/usr/lib/python2.6/dist-packages" version = "0.4-dev-build910" author = ["Author:", "\tLateef Alabi-Oki \n", "Contributors:", "\tIb Lundgren ", "\tHerman Polloni ", "\tJames Laver ", "\tHugo Madureira ", "\tJustin Joy ", "\tFrank Hale ", "\tHideo Hattori ", "\tMatt Murphy ", "\tChris Wagner ", "\tShawn Bright ", "\tPeter Magnusson ", "\tJakub Sadowinski ", "\tRockallite Wulf ", "\tJavier Lorenzana ", "\tKuba ", ] documenters = ["Lateef Alabi-Oki "] artists = ["Alexandre Moore ", "Panos Laganakos "] website = "http://scribes.sf.net/" copyrights = "Copyright © 2005 Lateef Alabi-Oki" translators = "Brazilian Portuguese translation by Leonardo F. Fontenelle \ \nRussian translation by Paul Chavard \ \nGerman translation by Maximilian Baumgart \ \nGerman translation by Steffen Klemer \nItalian translation by Stefano Esposito \ \nFrench translation by Gautier Portet \ \nDutch translation by Filip Vervloesem \ \ \nSwedish translation by Daniel Nylander \ \nChinese translation by chaos proton " scribes-0.4~r910/SCRIBES/SignalConnectionManager.py0000644000175000017500000000133711242100540021622 0ustar andreasandreasclass SignalManager(object): def __init__(self, editor=None): self.__signals = [] self.__editor = editor def connect(self, gobject, signal_name, callback, after=False, data=None): connect = gobject.connect if after is False else gobject.connect_after signal_id = connect(signal_name, callback, data) if data is not None else connect(signal_name, callback) self.__signals.append((gobject, signal_id)) return signal_id def disconnect(self): __disconnect = self.__disconnect [__disconnect(gobject, signal_id) for gobject, signal_id in self.__signals] return def __disconnect(self, gobject, signal_id): if not gobject.handler_is_connected(signal_id): return False gobject.disconnect(signal_id) return False scribes-0.4~r910/SCRIBES/Makefile.am0000644000175000017500000000435211242100540016554 0ustar andreasandreasedit = sed \ -e 's,@pixmapsdir\@,$(pixmapsdir),g' \ -e 's,@scribes_prefix\@,$(prefix),g' \ -e 's,@scribes_lib_path\@,$(libdir),g' \ -e 's,@scribes_data_path\@,$(datadir),g' \ -e 's,@scribes_sysconfdir\@,$(sysconfdir),g' \ -e 's,@python_path\@,$(pythondir),g' \ -e 's,@VERSION\@,$(VERSION),g' # dnl Generate "Globals.py" from "Globals.py.in." python_files = Globals.py python_in_files = $(python_files).in scribesdir = $(pythondir)/SCRIBES $(python_files): Makefile $(python_in_files) rm -f $(python_files) $(python_files).tmp $(edit) $(python_in_files) > $(python_files).tmp mv $(python_files).tmp $(python_files) if [ -d $(scribesdir) ]; then \ echo "removing " $(scribesdir) ;\ rm -rf $(scribesdir) ;\ echo "removed " $(scribesdir) ;\ fi SUBDIRS = . GUI URILoader EncodingSystem SaveSystem SaveProcessInitializer TriggerSystem PluginInitializer scribes_PYTHON = \ Globals.py \ __init__.py \ BarObjectManager.py \ BusyManager.py \ ColorThemeMetadata.py \ CommandLineInfo.py \ CommandLineProcessor.py \ CommandLineParser.py \ CompletionWindowVisibilityManager.py \ ContentDetector.py \ CursorMetadata.py \ DBusService.py \ DialogFilters.py \ DisplayRightMarginMetadata.py \ Editor.py \ EditorImports.py \ Exceptions.py \ filedict.py \ FileChangeMonitor.py \ FilenameGeneratorModeManager.py \ FileModificationMonitor.py \ FontMetadata.py \ ForkScribesMetadata.py \ FreezeManager.py \ FullScreenManager.py \ GladeObjectManager.py \ GlobalStore.py \ InstanceManager.py \ i18n.py \ LanguageManager.py \ LanguagePluginManager.py \ LastSessionMetadata.py \ License.py \ Main.py \ MarginPositionMetadata.py \ MinimalModeMetadata.py \ SchemeManager.py \ ScrollbarVisibilityUpdater.py \ ServicesInitializer.py \ SIGNALS.py \ SignalConnectionManager.py \ SpellCheckMetadata.py \ PluginSystemInitializer.py \ PositionMetadata.py \ TabWidthMetadata.py \ TerminalSignalHandler.py \ TextWrappingMetadata.py \ Trigger.py \ TriggerManager.py \ URIManager.py \ PluginManager.py \ RegistrationManager.py \ ReadonlyManager.py \ RecentManager.py \ Usage.py \ UseTabsMetadata.py \ UniqueStampGenerator.py \ Utils.py \ WidgetTransparencyMetadata.py \ Word.py clean-local: rm -rf *.pyc *.pyo EXTRA_DIST = Globals.py.in scribes-0.4~r910/SCRIBES/GUI/0000755000175000017500000000000011242100540015140 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/InformationWindow/0000755000175000017500000000000011242100540020615 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/InformationWindow/__init__.py0000644000175000017500000000000011242100540022714 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/InformationWindow/Image.py0000644000175000017500000000236411242100540022216 0ustar andreasandreasclass Image(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__update_cb, True) self.__sigid3 = editor.connect("show-info", self.__update_cb, False) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__image = manager.gui.get_widget("Image") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, error): from gtk import ICON_SIZE_DIALOG as DIALOG, STOCK_DIALOG_ERROR as ERROR from gtk import STOCK_DIALOG_INFO as INFO set_image = lambda image: self.__image.set_from_stock(image, DIALOG) set_image(ERROR) if error else set_image(INFO) return False def __update_cb(self, editor, title, message, window, busy, error): from gobject import idle_add idle_add(self.__update, error, priority=9999) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/WindowTitleUpdater.py0000644000175000017500000000220211242100540024761 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__update_cb, True) self.__sigid3 = editor.connect("show-info", self.__update_cb, False) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__window = manager.gui.get_widget("Window") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, error): from gettext import gettext as _ title = _("ERROR") if error else _("INFORMATION") self.__window.set_title(title) return False def __update_cb(self, editor, title, message, window, busy, error): from gobject import idle_add idle_add(self.__update, error, priority=9999) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/Makefile.in0000644000175000017500000003214111242100540022663 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/InformationWindow DIST_COMMON = $(informationwindow_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(informationwindowdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ informationwindowdir = $(pythondir)/SCRIBES/GUI/InformationWindow informationwindow_PYTHON = \ __init__.py \ Manager.py \ Window.py \ Image.py \ TitleLabel.py \ MessageLabel.py \ MessageWindow.glade \ WindowTitleUpdater.py \ BusyManager.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/InformationWindow/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/InformationWindow/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-informationwindowPYTHON: $(informationwindow_PYTHON) @$(NORMAL_INSTALL) test -z "$(informationwindowdir)" || $(MKDIR_P) "$(DESTDIR)$(informationwindowdir)" @list='$(informationwindow_PYTHON)'; dlist=; list2=; test -n "$(informationwindowdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(informationwindowdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(informationwindowdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(informationwindowdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(informationwindowdir)" $$dlist; \ fi; \ else :; fi uninstall-informationwindowPYTHON: @$(NORMAL_UNINSTALL) @list='$(informationwindow_PYTHON)'; test -n "$(informationwindowdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(informationwindowdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(informationwindowdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(informationwindowdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(informationwindowdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(informationwindowdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(informationwindowdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(informationwindowdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-informationwindowPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-informationwindowPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-informationwindowPYTHON install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-informationwindowPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/InformationWindow/MessageLabel.py0000644000175000017500000000207211242100540023514 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__update_cb) self.__sigid3 = editor.connect("show-info", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_widget("MessageLabel") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, message): self.__label.set_label(message) return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, editor, title, message, window, busy): from gobject import idle_add idle_add(self.__update, message, priority=9999) return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/BusyManager.py0000644000175000017500000000253411242100540023410 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__busy_cb) self.__sigid3 = editor.connect("show-info", self.__busy_cb) self.__sigid4 = manager.connect("hide", self.__hide_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__busy = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __enable_busy_mode(self): if self.__busy: return False self.__editor.busy() self.__busy = True return False def __disable_busy_mode(self): if not self.__busy: return False self.__editor.busy(False) self.__busy = False return False def __quit_cb(self, *args): self.__destroy() return False def __busy_cb(self, editor, title, message, window, busy): if busy: self.__enable_busy_mode() return False def __hide_cb(self, *args): self.__disable_busy_mode() return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/Manager.py0000644000175000017500000000157711242100540022553 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_BOOLEAN, TYPE_NONE SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from BusyManager import Manager Manager(self, editor) from MessageLabel import Label Label(self, editor) from TitleLabel import Label Label(self, editor) from Image import Image Image(self, editor) from WindowTitleUpdater import Updater Updater(self, editor) from Window import Window Window(self, editor) def __init_attributes(self, editor): self.__glade = editor.get_glade_object(globals(), "MessageWindow.glade", "Window") return gui = property(lambda self: self.__glade) scribes-0.4~r910/SCRIBES/GUI/InformationWindow/Makefile.am0000644000175000017500000000043311242100540022651 0ustar andreasandreasinformationwindowdir = $(pythondir)/SCRIBES/GUI/InformationWindow informationwindow_PYTHON = \ __init__.py \ Manager.py \ Window.py \ Image.py \ TitleLabel.py \ MessageLabel.py \ MessageWindow.glade \ WindowTitleUpdater.py \ BusyManager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/InformationWindow/TitleLabel.py0000644000175000017500000000210311242100540023204 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__update_cb) self.__sigid3 = editor.connect("show-info", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_widget("TitleLabel") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, title): self.__label.set_label("" + title + "") return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, editor, title, message, window, busy): from gobject import idle_add idle_add(self.__update, title, priority=9999) return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/Window.py0000644000175000017500000000433011242100540022436 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("show-error", self.__show_info_cb) self.__sigid3 = editor.connect("show-info", self.__show_info_cb) self.__sigid4 = manager.connect("hide", self.__hide_cb) self.__sigid5 = manager.connect("show", self.__show_cb) self.__sigid6 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid7 = self.__window.connect("key-press-event", self.__key_press_event_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__window = manager.gui.get_widget("Window") self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.disconnect_signal(self.__sigid6, self.__window) self.__editor.disconnect_signal(self.__sigid7, self.__window) self.__editor.unregister_object(self) del self return False def __show_window(self, window): self.__window.set_transient_for(window) self.__manager.emit("show") return False def __show(self): self.__window.show_all() return False def __hide(self): self.__window.hide_all() return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show, priority=9999) return False def __hide_cb(self, *args): from gobject import idle_add idle_add(self.__hide, priority=9999) return False def __show_info_cb(self, editor, title, message, window, busy): from gobject import idle_add idle_add(self.__show_window, window, priority=9999) return False def __delete_event_cb(self, *args): self.__manager.emit("hide") return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__manager.emit("hide") return True def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/InformationWindow/MessageWindow.glade0000644000175000017500000000660011242100540024371 0ustar andreasandreas 10 True center-on-parent True scribes dialog True True True True 10 True 10 True gtk-info 6 False False 0 True 10 True 0 <b>This is a test title label</b> True True end True 0 True 0.10000000149011612 This is a test message label. True True 1 1 False False 0 scribes-0.4~r910/SCRIBES/GUI/__init__.py0000644000175000017500000000000011242100540017237 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/0000755000175000017500000000000011242100540016371 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/__init__.py0000644000175000017500000000000011242100540020470 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/0000755000175000017500000000000011242100540020301 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/__init__.py0000644000175000017500000000000011242100540022400 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/0000755000175000017500000000000011242100540021765 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/__init__.py0000644000175000017500000000000011242100540024064 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile.in0000644000175000017500000004755511242100540024052 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/StatusBar/Feedback DIST_COMMON = $(feedback_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(feedbackdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = MessageSystem feedbackdir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/Feedback feedback_PYTHON = \ __init__.py \ Manager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-feedbackPYTHON: $(feedback_PYTHON) @$(NORMAL_INSTALL) test -z "$(feedbackdir)" || $(MKDIR_P) "$(DESTDIR)$(feedbackdir)" @list='$(feedback_PYTHON)'; dlist=; list2=; test -n "$(feedbackdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(feedbackdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(feedbackdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(feedbackdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(feedbackdir)" $$dlist; \ fi; \ else :; fi uninstall-feedbackPYTHON: @$(NORMAL_UNINSTALL) @list='$(feedback_PYTHON)'; test -n "$(feedbackdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(feedbackdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(feedbackdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(feedbackdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(feedbackdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(feedbackdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(feedbackdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(feedbackdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-feedbackPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-feedbackPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am \ install-feedbackPYTHON install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-feedbackPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/0000755000175000017500000000000011242100540024556 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/FallbackMessageHandler.py0000644000175000017500000000463711242100540031444 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): """ This module handles feedback messages that are shown indefinitely until they are removed. """ def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "loaded-file", self.__loaded_cb) self.connect(editor, "renamed-file", self.__loaded_cb) self.connect(editor, "saved-file", self.__saved_cb) self.connect(manager, "busy", self.__busy_cb) self.connect(manager, "fallback", self.__fallback_cb) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__busy = False self.__default_name = "" return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __fallback(self): if self.__busy: return False if self.__editor.uri: message, color = self.__default_name, "" bold, italic = True, False image_id, show_bar = "new", False data = message, image_id, color, bold, italic, show_bar else: data = "", "", "", False, False, False self.__manager.emit("format-feedback-message", data) return False def __fallback_on_idle(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__fallback, priority=PRIORITY_LOW) return False def __update_names(self, uri): from gio import File filename = File(uri).get_parse_name() filename = filename.replace(self.__editor.home_folder.rstrip("/"), "~") self.__default_name = filename return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __quit_cb(self, *args): self.__destroy() return False def __fallback_cb(self, *args): self.__remove_timer() from gobject import timeout_add, PRIORITY_LOW as LOW self.__timer = timeout_add(300, self.__fallback_on_idle, priority=LOW) return False def __busy_cb(self, manager, busy): self.__busy = busy return False def __loaded_cb(self, editor, uri, encoding): from gobject import idle_add idle_add(self.__update_names, uri) return False def __saved_cb(self, editor, uri, *args): if editor.generate_filename is False: return False from gobject import idle_add idle_add(self.__update_names, uri) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/__init__.py0000644000175000017500000000000011242100540026655 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Signals.py0000644000175000017500000000075411242100540026536 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, SSIGNAL, TYPE_PYOBJECT class Signal(GObject): __gsignals__ = { "message-bar-is-updated": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "reset": (SSIGNAL, TYPE_NONE, ()), "fallback": (SSIGNAL, TYPE_NONE, ()), "update-message-bar": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "format-feedback-message": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "busy": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/SavedHandler.py0000644000175000017500000000215211242100540027470 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "saved-file", self.__saved_cb) self.connect(editor, "save-error", self.__error_cb) self.connect(manager, "busy", self.__busy_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__busy = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __quit_cb(self, *args): self.__destroy() return False def __saved_cb(self, *args): if self.__busy: return False self.__editor.update_message(_("Saved file"), "save", 3, "low") return False def __error_cb(self, *args): message = _("Failed to save file") self.__editor.update_message(message, "no", 10, "high") return False def __busy_cb(self, manager, busy): self.__busy = busy return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/MessageBarUpdater.py0000644000175000017500000000424211242100540030470 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): """ This class is responsible for updating the message bar label and icon. Updates are performed when the message bar is NOT visible. The "message-bar-is-updated" signal is emitted after a successful update. """ def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "message-bar-is-visible", self.__visible_cb) self.connect(manager, "update-message-bar", self.__update_cb) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor # Message bar label and image self.__label = editor.get_data("StatusFeedback") self.__image = editor.get_data("StatusImage") # Whether or not the message bar is visible. self.__visible = False # Feedback message that needs to be set when the message bar is not visible self.__data = None return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __check(self): if self.__data is None: return False self.__update(self.__data) return False def __update(self, data): # Update the message bar only if the bar is not visible. self.__data = data if self.__visible else None if self.__data is None: self.__set(data) return False def __set(self, data): message, image_id, show_bar = data self.__label.set_label(message) from gtk import ICON_SIZE_MENU as SIZE if image_id: self.__image.set_from_icon_name(image_id, SIZE) self.__image.show() if image_id else self.__image.hide() self.__manager.emit("message-bar-is-updated", (message, image_id, show_bar)) return False def __update_cb(self, manager, data): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, data, priority=PRIORITY_LOW) return False def __visible_cb(self, manager, visible): self.__visible = visible from gobject import idle_add, PRIORITY_LOW idle_add(self.__check, priority=PRIORITY_LOW) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/TimedMessageHandler.py0000644000175000017500000000536511242100540031006 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): """ This class implements timed feedback messages. These are messages that appear for a short period of time, usually between 3 and 10 seconds, and they disappear. It also checks the priority of the message. Lower priority messages are discarded if the current message is still showing. If the new message and the old message are the same, then only the timer is updated, not the message. This saves animation cycles. #FIXME: I think priority checks and similarity checks should be performed by another class. This class should focus mainly on timing. process. """ def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "update-message", self.__update_cb) self.connect(editor, "hide-message", self.__hide_cb) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__busy = False self.__previous_message = "" return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, data): same_message = self.__is_same_message(data[0]) if same_message is False: self.__reset() self.__busy = True self.__manager.emit("busy", True) self.__remove_timer() from gobject import timeout_add message, image_id, time, priority = data self.__timer = timeout_add(time * 1000, self.__reset) if same_message: return False _images = ("error", "gtk-dialog-error", "fail", "no",) color = "red" if image_id in _images else "dark green" message, image_id, color, bold, italic, show_bar = message, image_id, color, True, False, True self.__manager.emit("format-feedback-message", (message, image_id, color, bold, italic, show_bar)) return False def __is_same_message(self, message): if self.__busy is False: return False if self.__previous_message == message: return True self.__previous_message = message return False def __reset(self): self.__busy = False self.__manager.emit("busy", False) self.__manager.emit("reset") return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return def __update_cb(self, manager, data): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, data, priority=PRIORITY_LOW) # self.__update(data) return False def __hide_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__reset, priority=PRIORITY_LOW) # self.__reset() return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ClipboardHandler.py0000644000175000017500000000211011242100540030317 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager CUT_MESSAGE = _("Cut operation") COPY_MESSAGE = _("Copy operation") PASTE_MESSAGE = _("Paste operation") class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(self.__editor, "quit", self.__destroy_cb) self.connect(self.__view, "copy-clipboard", self.__update_cb, True, (COPY_MESSAGE, "copy")) self.connect(self.__view, "cut-clipboard", self.__update_cb, True, (CUT_MESSAGE, "cut")) self.connect(self.__view, "paste-clipboard", self.__update_cb, True, (PASTE_MESSAGE, "paste")) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.view return def __destroy_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False def __update_cb(self, textview, data): message, image = data self.__editor.update_message(message, image, 3) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile.in0000644000175000017500000003231411242100540026626 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(statusmessage_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(statusmessagedir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ statusmessagedir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem statusmessage_PYTHON = \ __init__.py \ Signals.py \ Manager.py \ TimedMessageHandler.py \ StackMessageHandler.py \ FallbackMessageHandler.py \ MessageBarUpdater.py \ MessageBarDisplayer.py \ MessageFormatter.py \ FileLoadHandler.py \ SavedHandler.py \ ReadonlyHandler.py \ ClipboardHandler.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-statusmessagePYTHON: $(statusmessage_PYTHON) @$(NORMAL_INSTALL) test -z "$(statusmessagedir)" || $(MKDIR_P) "$(DESTDIR)$(statusmessagedir)" @list='$(statusmessage_PYTHON)'; dlist=; list2=; test -n "$(statusmessagedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(statusmessagedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(statusmessagedir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(statusmessagedir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(statusmessagedir)" $$dlist; \ fi; \ else :; fi uninstall-statusmessagePYTHON: @$(NORMAL_UNINSTALL) @list='$(statusmessage_PYTHON)'; test -n "$(statusmessagedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(statusmessagedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(statusmessagedir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(statusmessagedir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(statusmessagedir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(statusmessagedir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(statusmessagedir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(statusmessagedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-statusmessagePYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-statusmessagePYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-statusmessagePYTHON install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-statusmessagePYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/MessageBarDisplayer.py0000644000175000017500000000320611242100540031017 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "message-bar-is-updated", self.__update_cb, True) self.connect(manager, "reset", self.__fallback_cb, True) self.connect(manager, "fallback", self.__fallback_cb, True) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bar = editor.get_data("MessageBar") return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __hide(self): self.__bar.hide() return False def __show(self): self.__bar.show() return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __show_on_idle(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__show, priority=PRIORITY_LOW) return False def __update_cb(self, manager, data): self.__remove_timer() self.__hide() show_bar = data[-1] if not show_bar: return False from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(150, self.__show_on_idle, priority=PRIORITY_LOW) return False def __fallback_cb(self, *args): self.__remove_timer() self.__hide() # from gobject import idle_add, PRIORITY_LOW # idle_add(self.__hide, priority=PRIORITY_LOW) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/FileLoadHandler.py0000644000175000017500000000227211242100540030110 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager BUSY_MESSAGE = _("Loading file please wait...") SUCCESS_MESSAGE = _("Loaded file") ERROR_MESSAGE = _("ERROR: Failed to load file") class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "checking-file", self.__checking_cb) self.connect(editor, "loaded-file", self.__loaded_cb) self.connect(editor, "load-error", self.__error_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __quit_cb(self, *args): self.__destroy() return False def __checking_cb(self, *args): self.__editor.update_message(BUSY_MESSAGE, "run", 1000) return False def __loaded_cb(self, *args): self.__editor.update_message(SUCCESS_MESSAGE, "open") return False def __error_cb(self, *args): self.__editor.update_message(ERROR_MESSAGE, "fail", 10) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/MessageFormatter.py0000644000175000017500000000456011242100540030405 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Formatter(SignalManager): """ This class generates a marked up string and an image id for the image that will be shown in the message bar. """ def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "format-feedback-message", self.__format_cb) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from gtk import stock_list_ids self.__image_ids = [name[4:] for name in stock_list_ids()] self.__scribes_image_ids = ("error", "pass", "fail", "scribes", "busy", "run") self.__image_dictionary = self.__map_scribes_ids() return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __format(self, data): message, image_id, color, bold, italic, show_bar = data message = self.__markup((message, color, bold, italic)) image_id = self.__get_gtk_image_id_from(image_id) if image_id in ("new", "edit") and show_bar: print "Ahhhhhh! shoot! Bar should not be visible" self.__manager.emit("update-message-bar", (message, image_id, show_bar)) return False def __markup(self, data): message, color, bold, italic = data if not message: return "" if color: message = "%s" % (color, message) if bold: message = "%s" % message if italic: message = "%s" % message return message def __get_gtk_image_id_from(self, image_id): if not image_id: return "" dictionary = self.__image_dictionary image = "gtk-%s" % image_id if image_id in self.__image_ids else dictionary[image_id] return image def __map_scribes_ids(self): dictionary = {"error": "gtk-dialog-error", "pass": "gtk-yes", "fail": "gtk-no", "scribes":"scribes", "busy": "gtk-execute", "run": "gtk-execute"} return dictionary def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __format_cb(self, manager, data): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__format, data, priority=PRIORITY_LOW) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Manager.py0000644000175000017500000000136111242100540026503 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from MessageBarDisplayer import Displayer Displayer(self, editor) from MessageBarUpdater import Updater Updater(self, editor) from MessageFormatter import Formatter Formatter(self, editor) from ClipboardHandler import Handler Handler(self, editor) from ReadonlyHandler import Handler Handler(self, editor) from SavedHandler import Handler Handler(self, editor) from FileLoadHandler import Handler Handler(self, editor) from FallbackMessageHandler import Handler Handler(self, editor) from StackMessageHandler import Handler Handler(self, editor) from TimedMessageHandler import Handler Handler(self, editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/Makefile.am0000644000175000017500000000065111242100540026614 0ustar andreasandreasstatusmessagedir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem statusmessage_PYTHON = \ __init__.py \ Signals.py \ Manager.py \ TimedMessageHandler.py \ StackMessageHandler.py \ FallbackMessageHandler.py \ MessageBarUpdater.py \ MessageBarDisplayer.py \ MessageFormatter.py \ FileLoadHandler.py \ SavedHandler.py \ ReadonlyHandler.py \ ClipboardHandler.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/ReadonlyHandler.py0000644000175000017500000000221311242100540030201 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager ENABLE_READONLY_MESSAGE = _("Enabled readonly mode") READONLY_MESSAGE = _("File is in readonly mode") class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "readonly", self.__readonly_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __set(self): self.__editor.update_message(ENABLE_READONLY_MESSAGE, "yes", 7) self.__editor.set_message(READONLY_MESSAGE) return False def __unset(self): self.__editor.unset_message(READONLY_MESSAGE) return False def __quit_cb(self, *args): self.__destroy() return False def __readonly_cb(self, editor, readonly): from gobject import idle_add, PRIORITY_LOW idle_add(self.__set if readonly else self.__unset, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/MessageSystem/StackMessageHandler.py0000644000175000017500000000374311242100540031007 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): """ This module handles feedback messages that are shown indefinitely until they are removed. """ def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "set-message", self.__set_cb) self.connect(editor, "unset-message", self.__unset_cb) self.connect(manager, "reset", self.__reset_cb) self.connect(manager, "busy", self.__busy_cb) self.__editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor from collections import deque self.__queue = deque() self.__busy = False return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __set(self, data): self.__queue.append(data) self.__reset() return False def __unset(self, data): if data in self.__queue: self.__queue.remove(data) self.__reset() return False def __reset(self): if self.__busy: return False if self.__queue: message, image_id = self.__queue[-1] bold, italic, color, show_bar = True, False, "brown", True data = message, image_id, color, bold, italic, show_bar self.__manager.emit("format-feedback-message", data) else: self.__manager.emit("fallback") return False def __set_cb(self, editor, data): from gobject import idle_add, PRIORITY_LOW idle_add(self.__set, data, priority=PRIORITY_LOW) return False def __unset_cb(self, editor, data): from gobject import idle_add, PRIORITY_LOW idle_add(self.__unset, data, priority=PRIORITY_LOW) return False def __reset_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__reset, priority=PRIORITY_LOW) return False def __busy_cb(self, manager, busy): self.__busy = busy return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/Manager.py0000644000175000017500000000016311242100540023711 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from MessageSystem.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Feedback/Makefile.am0000644000175000017500000000025311242100540024021 0ustar andreasandreasSUBDIRS = MessageSystem feedbackdir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/Feedback feedback_PYTHON = \ __init__.py \ Manager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Makefile.in0000644000175000017500000004755311242100540022364 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/StatusBar DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(statusbar_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(statusbardir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Feedback MessageBar statusbardir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar statusbar_PYTHON = \ __init__.py \ Manager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-statusbarPYTHON: $(statusbar_PYTHON) @$(NORMAL_INSTALL) test -z "$(statusbardir)" || $(MKDIR_P) "$(DESTDIR)$(statusbardir)" @list='$(statusbar_PYTHON)'; dlist=; list2=; test -n "$(statusbardir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(statusbardir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(statusbardir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(statusbardir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(statusbardir)" $$dlist; \ fi; \ else :; fi uninstall-statusbarPYTHON: @$(NORMAL_UNINSTALL) @list='$(statusbar_PYTHON)'; test -n "$(statusbardir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(statusbardir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(statusbardir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(statusbardir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(statusbardir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(statusbardir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(statusbardir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(statusbardir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-statusbarPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-statusbarPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-statusbarPYTHON install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-statusbarPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/0000755000175000017500000000000011242100540022312 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/__init__.py0000644000175000017500000000000011242100540024411 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Signals.py0000644000175000017500000000124711242100540024270 0ustar andreasandreasfrom SCRIBES.SIGNALS import GObject, TYPE_NONE, TYPE_PYOBJECT, SSIGNAL class Signal(GObject): __gsignals__ = { "hide": (SSIGNAL, TYPE_NONE, ()), "show": (SSIGNAL, TYPE_NONE, ()), "_hide": (SSIGNAL, TYPE_NONE, ()), "_show": (SSIGNAL, TYPE_NONE, ()), "bar": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "bar-size": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "view-size": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "deltas": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "animation": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "slide": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "visible": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self): GObject.__init__(self) scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/VisibilityUpdater.py0000644000175000017500000000223111242100540026336 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "animation", self.__animate_cb) self.connect(manager, "slide", self.__slide_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__slide = "" return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, animation_type): visible = self.__is_visible(animation_type) self.__manager.emit("visible", visible) return False def __is_visible(self, animation_type): if self.__slide == "down" and animation_type == "end": return False return True def __quit_cb(self, *args): self.__destroy() return False def __slide_cb(self, manager, slide): self.__slide = slide return False def __animate_cb(self, manager, animation_type): from gobject import idle_add idle_add(self.__update, animation_type) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/BarSizeUpdater.py0000644000175000017500000000256311242100540025556 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "bar", self.__bar_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bar = None self.__height = 0 self.__width = 0 return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self): width, height = self.__bar.size_request() # requisition.width, requisition.height if width == self.__width and height == self.__height: return False self.__width, self.__height = width, height self.__manager.emit("bar-size", (width, height)) return False def __bar_cb(self, manager, bar): self.__bar = bar self.connect(bar, "size-allocate", self.__size_cb) return False def __quit_cb(self, *args): self.__destroy() return False def __size_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False def __visible_cb(self, manager, visible): if visible: return False from gobject import idle_add, PRIORITY_LOW idle_add(self.__update, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Positioner.py0000644000175000017500000000273011242100540025021 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Positioner(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) # self.connect(manager, "bar", self.__bar_cb) # self.connect(manager, "view-size", self.__view_size_cb) # self.connect(manager, "bar-size", self.__bar_size_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__bar = None self.__bwidth = 0 self.__bheight = 0 self.__vwidth = 0 self.__vheight = 0 return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __get_cordinates(self): if not self.__bar: return 0, 0 vwidth, vheight = self.__vwidth, self.__vheight width, height = self.__bwidth, self.__bheight return vwidth - width, vheight - height + 2 def __move(self): x, y = self.__get_cordinates() self.__view.move_child(self.__bar, x, y) return False def __bar_cb(self, manager, bar): self.__bar = bar self.__move() return False def __bar_size_cb(self, manager, size): self.__bwidth, self.__bheight = size self.__move() return False def __view_size_cb(self, manager, size): self.__vwidth, self.__vheight = size self.__move() return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile.in0000644000175000017500000003161211242100540024362 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/StatusBar/MessageBar DIST_COMMON = $(bar_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bardir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bardir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/MessageBar bar_PYTHON = \ __init__.py \ Manager.py \ Widget.py \ Displayer.py \ Signals.py \ BarSizeUpdater.py \ ViewSizeUpdater.py \ Positioner.py \ VisibilityUpdater.py \ Animator.py \ DeltaCalculator.py \ DisplayerManager.py \ PublicAPIVisibilityUpdater.py \ HideTimer.py \ EventBoxColorChanger.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-barPYTHON: $(bar_PYTHON) @$(NORMAL_INSTALL) test -z "$(bardir)" || $(MKDIR_P) "$(DESTDIR)$(bardir)" @list='$(bar_PYTHON)'; dlist=; list2=; test -n "$(bardir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bardir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bardir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(bardir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(bardir)" $$dlist; \ fi; \ else :; fi uninstall-barPYTHON: @$(NORMAL_UNINSTALL) @list='$(bar_PYTHON)'; test -n "$(bardir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(bardir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bardir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(bardir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(bardir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(bardir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(bardir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(bardir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-barPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-barPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-barPYTHON install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-barPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Animator.py0000644000175000017500000001160611242100540024442 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager OFFSET = 4 REFRESH_TIME = 5 # units in milliseconds class Animator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "slide", self.__slide_cb, True) self.connect(manager, "deltas", self.__deltas_cb) self.connect(manager, "bar-size", self.__bsize_cb) self.connect(manager, "view-size", self.__vsize_cb) self.connect(manager, "bar", self.__bar_cb) from gobject import idle_add, PRIORITY_LOW idle_add(self.__compile, priority=PRIORITY_LOW) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__bar = None self.__start_point = 0 self.__end_point = 0 self.__hdelta = 0 self.__vdelta = 0 self.__bheight = 0 self.__bwidth = 0 self.__vheight = 0 self.__vwidth = 0 self.__busy = False self.__direction = "" return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __remove_slide_timer(self): try: from gobject import source_remove source_remove(self.__slide_timer) except AttributeError: pass return def __slide(self, direction): self.__remove_slide_timer() self.__manager.emit("animation", "begin") self.__update_animation_start_point(direction) self.__update_animation_end_point(direction) from gobject import timeout_add, PRIORITY_LOW self.__slide_timer = timeout_add(REFRESH_TIME, self.__move, direction, priority=PRIORITY_LOW) return False def __move_idle(self, direction): self.__remove_move_timer() from gobject import idle_add, PRIORITY_LOW self.__move_timer = idle_add(self.__move, direction, priority=PRIORITY_LOW) return False def __move(self, direction): try: animate = True self.__can_end(direction) self.__reposition_in(direction) except ValueError: animate = False if direction == "down": self.__bar.hide() self.__manager.emit("animation", "end") self.__busy = False return animate def __reposition_in(self, direction): try: x = int(self.__get_x(direction)) y = int(self.__get_y(direction)) self.__view.move_child(self.__bar, x, y) self.__bar.show_all() except AttributeError: pass return False def __remove_move_timer(self): try: from gobject import source_remove source_remove(self.__move_timer) except AttributeError: pass return False def __can_end(self, direction): if direction == "down" and self.__start_point >= self.__end_point: raise ValueError if direction == "up" and self.__start_point <= self.__end_point: raise ValueError return False def __get_x(self, direction): if direction in ("up", "down"): return self.__vwidth - self.__bwidth + 4 if direction == "left": self.__start_point -= self.__hdelta if direction == "right": self.__start_point += self.__hdelta x = self.__vwidth - self.__bwidth if self.__start_point <= x: return x + OFFSET return self.__start_point def __get_y(self, direction): if direction in ("left", "right"): return self.__vheight - self.__bheight + 4 if direction == "up": self.__start_point -= self.__vdelta if direction == "down": self.__start_point += self.__vdelta return self.__start_point def __update_animation_start_point(self, direction): dictionary = { "up": self.__vheight, "down": self.__vheight - self.__bheight + 4, "left": self.__vwidth, "right":0, } self.__start_point = dictionary[direction] return False def __update_animation_end_point(self, direction): dictionary = { "up": self.__vheight - self.__bheight + 4, "down": self.__vheight + 4, "left": self.__vwidth - self.__bwidth + 4, "right": self.__bwidth, } self.__end_point = dictionary[direction] return False def __compile(self): self.__editor.optimize((self.__move, self.__reposition_in)) return False def __quit_cb(self, *args): self.__destroy() return False def __remove_direction_timer(self): try: from gobject import source_remove source_remove(self.__direction_timer) except AttributeError: pass return def __slide_cb(self, manager, direction): if direction == self.__direction: return False self.__direction = direction if not self.__bar: return False self.__remove_direction_timer() self.__busy = True from gobject import idle_add, PRIORITY_LOW as LOW self.__direction_timer = idle_add(self.__slide, direction, priority=LOW) return False def __deltas_cb(self, manager, deltas): self.__hdelta, self.__vdelta = deltas return False def __bsize_cb(self, manager, size): self.__bwidth, self.__bheight = size return False def __vsize_cb(self, manager, size): self.__vwidth, self.__vheight = size return False def __bar_cb(self, manager, bar): self.__bar = bar self.__bar.show_all() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/DeltaCalculator.py0000644000175000017500000000244111242100540025730 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager REFRESH_TIME = 5 # units in milliseconds ANIMATION_TIME = 250 # units in milliseconds class Calculator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "bar-size", self.__size_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, size): width, height = size hdelta = float(width) / float(ANIMATION_TIME / REFRESH_TIME) vdelta = float(height) / float(ANIMATION_TIME / REFRESH_TIME) self.__manager.emit("deltas", (int(round(hdelta)), int(round(vdelta)))) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __quit_cb(self, *args): self.__destroy() return False def __size_cb(self, manager, size): self.__remove_timer() from gobject import idle_add, PRIORITY_LOW self.__timer = idle_add(self.__update, size, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Manager.py0000644000175000017500000000157111242100540024242 0ustar andreasandreasfrom Signals import Signal class Manager(Signal): def __init__(self, editor): Signal.__init__(self) from HideTimer import Timer Timer(self, editor) from Animator import Animator Animator(self, editor) from DeltaCalculator import Calculator Calculator(self, editor) from PublicAPIVisibilityUpdater import Updater Updater(self, editor) from VisibilityUpdater import Updater Updater(self, editor) from Displayer import Displayer Displayer(self, editor) from DisplayerManager import Manager Manager(self, editor) from ViewSizeUpdater import Updater Updater(self, editor) from BarSizeUpdater import Updater Updater(self, editor) from EventBoxColorChanger import Changer Changer(self, editor) from Widget import Widget Widget(self, editor) def show(self): self.emit("show") return False def hide(self): self.emit("hide") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Makefile.am0000644000175000017500000000062211242100540024346 0ustar andreasandreasbardir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar/MessageBar bar_PYTHON = \ __init__.py \ Manager.py \ Widget.py \ Displayer.py \ Signals.py \ BarSizeUpdater.py \ ViewSizeUpdater.py \ Positioner.py \ VisibilityUpdater.py \ Animator.py \ DeltaCalculator.py \ DisplayerManager.py \ PublicAPIVisibilityUpdater.py \ HideTimer.py \ EventBoxColorChanger.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/DisplayerManager.py0000644000175000017500000000360611242100540026120 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "show-full-view", self.__show_cb) self.connect(editor, "hide-full-view", self.__hide_cb) # self.connect(editor, "toolbar-is-visible", self.__toolbar_cb) self.connect(manager, "hide", self.__hide_cb, True) self.connect(manager, "show", self.__show_cb, True) # self.connect(manager, "visible", self.__visible_cb) # self.connect(manager, "animation", self.__animate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__visible = False return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __hide(self): # if self.__visible is False: return False self.__manager.emit("_hide") self.__visible = False return False def __show(self): if self.__visible: return False self.__manager.emit("_show") self.__visible = True return False def __show_on_idle(self): from gobject import idle_add, PRIORITY_LOW idle_add(self.__show, priority=PRIORITY_LOW) return False def __remove_timer(self): try: from gobject import source_remove source_remove(self.__timer) except AttributeError: pass return False def __hide_cb(self, *args): self.__remove_timer() # from gobject import idle_add, PRIORITY_LOW # idle_add(self.__hide, priority=PRIORITY_LOW) self.__hide() return False def __show_cb(self, *args): self.__remove_timer() self.__hide() from gobject import timeout_add, PRIORITY_LOW self.__timer = timeout_add(150, self.__show_on_idle, priority=PRIORITY_LOW) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/ViewSizeUpdater.py0000644000175000017500000000265011242100540025761 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor.window, "configure-event", self.__event_cb) self.connect(editor, "scrollbar-visibility-update", self.__event_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__height = 0 self.__width = 0 return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self): geometry = self.__view.window.get_geometry() width, height = geometry[2], geometry[3] if width == self.__width and height == self.__height: return False self.__width, self.__height = width, height self.__manager.emit("view-size", (width, height)) return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __quit_cb(self, *args): self.__destroy() return False def __event_cb(self, *args): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__update, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/EventBoxColorChanger.py0000644000175000017500000000225511242100540026711 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Changer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__destroy_cb) self.connect(manager, "bar", self.__bar_cb) self.connect(editor, "syntax-color-theme-changed", self.__changed_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__bar = None return def __destroy(self): self.disconnect() del self return False def __change_color(self): if not self.__bar: return False self.__bar.set_style(None) color = self.__editor.view_bg_color if color is None: return False style = self.__bar.get_style().copy() from gtk import STATE_NORMAL style.bg[STATE_NORMAL] = color self.__bar.set_style(style) return False def __destroy_cb(self, *args): self.__destroy() return False def __bar_cb(self, manager, bar): self.__bar = bar from gobject import idle_add idle_add(self.__change_color) return False def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__change_color) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Displayer.py0000644000175000017500000000362111242100540024622 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "bar", self.__bar_cb) self.connect(manager, "_hide", self.__hide_cb) self.connect(manager, "_show", self.__show_cb) self.connect(manager, "bar-size", self.__bsize_cb) self.connect(manager, "view-size", self.__vsize_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__bar = None self.__visible = False self.__bwidth, self.__bheight = 0, 0 self.__vwidth, self.__vheight = 0, 0 return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __hide(self): # if self.__pointer_on_messagebar(): return False self.__manager.emit("slide", "down") return False def __show(self): self.__manager.emit("slide", "up") return False def __pointer_on_messagebar(self): x, y, mask = self.__editor.textview.window.get_pointer() hvalue = y >= (self.__vheight - self.__bheight) and y <= self.__vheight wvalue = x >= (self.__vwidth - self.__bwidth) and x <= self.__vwidth if hvalue and wvalue: return True return False def __bar_cb(self, manager, bar): self.__bar = bar return False def __hide_cb(self, *args): # self.__hide() from gobject import idle_add idle_add(self.__hide) return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __vsize_cb(self, manager, size): self.__vwidth, self.__vheight = size return False def __bsize_cb(self, manager, size): self.__bwidth, self.__bheight = size return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/Widget.py0000644000175000017500000000416511242100540024115 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Widget(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__setup() self.__emit() self.__update_public_api() self.connect(editor, "quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = self.__get_label() self.__button = self.__get_button() self.__bar = self.__get_bar() from gtk import HBox, Image self.__box = HBox(False, 5) self.__image = Image() self.__view = editor.textview return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __setup(self): from gtk import TEXT_WINDOW_WIDGET self.__view.add_child_in_window(self.__bar, TEXT_WINDOW_WIDGET, 0, -100) self.__bar.add(self.__button) self.__button.add(self.__box) self.__box.pack_start(self.__image, False, False) self.__box.pack_start(self.__label, False, False) self.__bar.realize() return False def __emit(self): self.__manager.emit("bar", self.__bar) return False def __update_public_api(self): self.__editor.set_data("MessageBar", self.__manager) self.__editor.set_data("StatusImage", self.__image) self.__editor.set_data("StatusFeedback", self.__label) return False def __get_bar(self): from gtk import EventBox bar = EventBox() # bar.props.visible_window = False return bar def __get_label(self): from gtk import Label label = Label() label.set_property("single-line-mode", True) label.set_property("use-markup", True) return label def __get_button(self): from gtk import Button button = Button() button.set_property("focus-on-click", False) button.set_property("can-default", False) button.set_property("can-focus", False) button.set_property("has-default", False) button.set_property("is-focus", False) button.set_property("receives-default", False) button.set_property("receives-default", False) return button def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/HideTimer.py0000644000175000017500000000336011242100540024540 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager HIDE_TIMER = 7000 class Timer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__id = self.connect(editor.textview, "motion-notify-event", self.__motion_cb) self.connect(editor, "toolbar-is-visible", self.__visible_cb) self.connect(editor, "quit", self.__quit_cb) self.__block() editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__visible = False self.__blocked = None return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __hide(self): try: hide = lambda: self.__manager.emit("hide") from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(HIDE_TIMER, hide) return False def __block(self): if self.__blocked is True: return False self.__blocked = True self.__view.handler_block(self.__id) return False def __unblock(self): if self.__blocked is False: return False self.__blocked = False self.__view.handler_unblock(self.__id) return False def __motion_cb(self, *args): if self.__visible is False: return False from gobject import idle_add idle_add(self.__hide, priority=9999) return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): self.__visible = visible self.__unblock() if visible else self.__block() if visible is False: return False from gobject import idle_add idle_add(self.__hide, priority=9999) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/MessageBar/PublicAPIVisibilityUpdater.py0000644000175000017500000000152611242100540030035 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "visible", self.__visible_cb, True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, visible): self.__editor.emit("message-bar-is-visible", visible) return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): from gobject import idle_add idle_add(self.__update, visible) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Manager.py0000644000175000017500000000025111242100540022223 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from MessageBar.Manager import Manager Manager(editor) from Feedback.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/StatusBar/Makefile.am0000644000175000017500000000025211242100540022334 0ustar andreasandreasSUBDIRS = Feedback MessageBar statusbardir = $(pythondir)/SCRIBES/GUI/MainGUI/StatusBar statusbar_PYTHON = \ __init__.py \ Manager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Makefile.in0000644000175000017500000004743411242100540020452 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI DIST_COMMON = $(maingui_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(mainguidir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Window Toolbar View Buffer StatusBar mainguidir = $(pythondir)/SCRIBES/GUI/MainGUI maingui_PYTHON = \ __init__.py \ Manager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-mainguiPYTHON: $(maingui_PYTHON) @$(NORMAL_INSTALL) test -z "$(mainguidir)" || $(MKDIR_P) "$(DESTDIR)$(mainguidir)" @list='$(maingui_PYTHON)'; dlist=; list2=; test -n "$(mainguidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mainguidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(mainguidir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(mainguidir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(mainguidir)" $$dlist; \ fi; \ else :; fi uninstall-mainguiPYTHON: @$(NORMAL_UNINSTALL) @list='$(maingui_PYTHON)'; test -n "$(mainguidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(mainguidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(mainguidir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(mainguidir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(mainguidir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(mainguidir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(mainguidir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(mainguidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-mainguiPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-mainguiPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-mainguiPYTHON install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-mainguiPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/0000755000175000017500000000000011242100540017602 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/__init__.py0000644000175000017500000000000011242100540021701 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/ResponsivenessManager.py0000644000175000017500000000206311242100540024476 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(self.__buffer, "changed", self.__response_cb, True) self.connect(editor, "quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__is_blocked = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __quit_cb(self, *args): from gobject import idle_add idle_add(self.__destroy) return False def __response_cb(self, *args): self.__remove_timer(1) from gobject import idle_add, PRIORITY_HIGH self.__timer1 = idle_add(self.__editor.refresh, priority=PRIORITY_HIGH) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/Makefile.in0000644000175000017500000003162011242100540021651 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/Buffer DIST_COMMON = $(buffer_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bufferdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bufferdir = $(pythondir)/SCRIBES/GUI/MainGUI/Buffer buffer_PYTHON = \ __init__.py \ Manager.py \ ModificationStateNotifier.py \ ModificationStateReseter.py \ UndoRedo.py \ StyleSchemeUpdater.py \ LanguageSetter.py \ CursorPositionNotifier.py \ CursorPlacer.py \ CursorPositionUpdater.py \ ResponsivenessManager.py \ Buffer.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Buffer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Buffer/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-bufferPYTHON: $(buffer_PYTHON) @$(NORMAL_INSTALL) test -z "$(bufferdir)" || $(MKDIR_P) "$(DESTDIR)$(bufferdir)" @list='$(buffer_PYTHON)'; dlist=; list2=; test -n "$(bufferdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bufferdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bufferdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(bufferdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(bufferdir)" $$dlist; \ fi; \ else :; fi uninstall-bufferPYTHON: @$(NORMAL_UNINSTALL) @list='$(buffer_PYTHON)'; test -n "$(bufferdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(bufferdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bufferdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(bufferdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(bufferdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(bufferdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(bufferdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(bufferdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-bufferPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-bufferPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-bufferPYTHON \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-bufferPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/LanguageSetter.py0000644000175000017500000000232511242100540023070 0ustar andreasandreasclass Setter(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect_after("checking-file", self.__checking_cb) self.__sigid3 = editor.connect("load-error", self.__error_cb) self.__sigid4 = editor.connect_after("renamed-file", self.__checking_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return def __set(self, language): self.__buffer.set_language(language) return False def __quit_cb(self, *args): self.__destroy() return False def __checking_cb(self, *args): from gobject import idle_add idle_add(self.__set, self.__editor.language_object) return False def __error_cb(self, *args): from gobject import idle_add idle_add(self.__set, None) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/CursorPositionNotifier.py0000644000175000017500000000314511242100540024661 0ustar andreasandreasclass Notifier(object): def __init__(self, editor): self.__init_attributes(editor) self.__buffer.notify("cursor-position") self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__buffer.connect("notify::cursor-position", self.__position_cb) self.__sigid3 = self.__editor.connect("checking-file", self.__block_cb) self.__sigid4 = self.__editor.connect("loaded-file", self.__unblock_cb) self.__sigid5 = self.__editor.connect("load-error", self.__unblock_cb) from gobject import idle_add idle_add(self.__optimize, priority=9999) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__buffer) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self self = None return def __notify(self): self.__editor.emit("cursor-moved") return False def __optimize(self): methods = (self.__notify, self.__position_cb) self.__editor.optimize(methods) return False def __quit_cb(self, *args): self.__destroy() return False def __position_cb(self, *args): self.__notify() return False def __block_cb(self, *args): self.__buffer.handler_block(self.__sigid2) return False def __unblock_cb(self, *args): self.__buffer.handler_unblock(self.__sigid2) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/Manager.py0000644000175000017500000000117211242100540021527 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from Buffer import Buffer Buffer(editor) from ModificationStateNotifier import Notifier Notifier(editor) from ModificationStateReseter import Reseter Reseter(editor) from UndoRedo import UndoRedo UndoRedo(editor) from StyleSchemeUpdater import Updater Updater(editor) from LanguageSetter import Setter Setter(editor) from CursorPositionNotifier import Notifier Notifier(editor) from CursorPlacer import Placer Placer(editor) from CursorPositionUpdater import Updater Updater(editor) from ResponsivenessManager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/Makefile.am0000644000175000017500000000056411242100540021643 0ustar andreasandreasbufferdir = $(pythondir)/SCRIBES/GUI/MainGUI/Buffer buffer_PYTHON = \ __init__.py \ Manager.py \ ModificationStateNotifier.py \ ModificationStateReseter.py \ UndoRedo.py \ StyleSchemeUpdater.py \ LanguageSetter.py \ CursorPositionNotifier.py \ CursorPlacer.py \ CursorPositionUpdater.py \ ResponsivenessManager.py \ Buffer.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/StyleSchemeUpdater.py0000644000175000017500000000253111242100540023727 0ustar andreasandreasclass Updater(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) self.__update() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer from gio import File, FILE_MONITOR_NONE self.__monitor = File(self.__get_path()).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__monitor.cancel() self.__editor.unregister_object(self) del self return False def __update(self): from SCRIBES.ColorThemeMetadata import get_value scheme_id = get_value() style_scheme = self.__editor.style_scheme_manager.get_scheme(scheme_id) if style_scheme: self.__buffer.set_style_scheme(style_scheme) self.__editor.emit("syntax-color-theme-changed") return False def __get_path(self): from os.path import join folder = join(self.__editor.metadata_folder, "Preferences") return join(folder, "ColorTheme.gdb") def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0, 2, 3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/UndoRedo.py0000644000175000017500000000453711242100540021704 0ustar andreasandreasfrom gettext import gettext as _ class UndoRedo(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("checking-file", self.__checking_cb) self.__sigid3 = editor.connect("loaded-file", self.__loaded_cb) self.__sigid4 = editor.connect("load-error", self.__error_cb) self.__sigid5 = editor.connect("undo", self.__undo_cb) self.__sigid6 = editor.connect("redo", self.__redo_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.disconnect_signal(self.__sigid6, self.__editor) self.__editor.unregister_object(self) del self return False def __undo(self): try: self.__editor.freeze() if not self.__buffer.can_undo(): raise ValueError self.__buffer.undo() self.__editor.move_view_to_cursor() message = _("Undo last action") self.__editor.update_message(message, "pass") except ValueError: message = _("Cannot undo last action") self.__editor.update_message(message, "fail") finally: self.__editor.thaw() return False def __redo(self): try: self.__editor.freeze() if not self.__buffer.can_redo(): raise ValueError self.__buffer.redo() self.__editor.move_view_to_cursor() message = _("Redo previous action") self.__editor.update_message(message, "pass") except ValueError: message = _("Cannot redo previous action") self.__editor.update_message(message, "fail") finally: self.__editor.thaw() return False def __quit_cb(self, *args): self.__destroy() return False def __checking_cb(self, *args): self.__buffer.begin_not_undoable_action() return False def __loaded_cb(self, *args): self.__buffer.end_not_undoable_action() return False def __error_cb(self, *args): self.__buffer.end_not_undoable_action() return False def __undo_cb(self, *args): self.__undo() return False def __redo_cb(self, *args): self.__redo() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/ModificationStateReseter.py0000644000175000017500000000225611242100540025121 0ustar andreasandreasclass Reseter(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("checking-file", self.__reset_cb) self.__sigid3 = editor.connect("loaded-file", self.__reset_cb) self.__sigid4 = editor.connect("load-error", self.__reset_cb) self.__sigid5 = editor.connect("saved-file", self.__reset_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __reset(self): if self.__buffer.get_modified(): self.__buffer.set_modified(False) return False def __quit_cb(self, *args): self.__destroy() return False def __reset_cb(self, *args): self.__reset() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/CursorPlacer.py0000644000175000017500000000354611242100540022570 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Placer(SignalManager): def __init__(self, editor): SignalManager.__init__(self, editor) self.__init_attributes(editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "checking-file", self.__checking_cb) self.connect(editor, "loaded-file", self.__loaded_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer self.__line_position = 0, 0 return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __place_timeout(self): from gobject import idle_add idle_add(self.__place) return False def __place(self): line, index = self.__line_position iterator = self.__get_cursor_iterator(line) index = self.__get_cursor_index(iterator, index) iterator.set_line_index(index) self.__editor.refresh(False) self.__buffer.place_cursor(iterator) self.__editor.move_view_to_cursor(True) self.__editor.refresh(True) return False def __get_cursor_data(self): from SCRIBES.CursorMetadata import get_value position = get_value(self.__editor.uri) return position[0] + 1, position[1] def __get_cursor_iterator(self, line): number_of_lines = self.__buffer.get_line_count() if line > number_of_lines: return self.__buffer.get_start_iter() return self.__buffer.get_iter_at_line(line - 1) def __get_cursor_index(self, iterator, index): line_index = iterator.get_bytes_in_line() return line_index if index > line_index else index def __quit_cb(self, *args): self.__destroy() return False def __loaded_cb(self, *args): # from gobject import timeout_add # timeout_add(250, self.__place_timeout) self.__place() return False def __checking_cb(self, *args): self.__line_position = self.__get_cursor_data() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/Buffer.py0000644000175000017500000000174111242100540021370 0ustar andreasandreasclass Buffer(object): def __init__(self, editor): self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self return False def __set_properties(self): self.__buffer.begin_not_undoable_action() self.__buffer.set_property("highlight-syntax", True) self.__buffer.set_property("highlight-matching-brackets", False) self.__buffer.set_property("max-undo-levels", -1) self.__buffer.set_text("") start, end = self.__buffer.get_bounds() self.__buffer.remove_all_tags(start, end) self.__buffer.remove_source_marks(start, end) self.__buffer.end_not_undoable_action() return def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/CursorPositionUpdater.py0000644000175000017500000000200411242100540024477 0ustar andreasandreasclass Updater(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) # self.__sigid2 = editor.connect("window-focus-out", self.__update_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) # self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__update() self.__editor.unregister_object(self) del self return False def __update(self): if not self.__editor.uri: return False cursor = self.__editor.cursor position = cursor.get_line(), cursor.get_line_index() from SCRIBES.CursorMetadata import set_value set_value(self.__editor.uri, position) return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update, priority=9999) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Buffer/ModificationStateNotifier.py0000644000175000017500000000303511242100540025263 0ustar andreasandreasclass Notifier(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("checking-file", self.__block_cb) self.__sigid3 = editor.connect("loaded-file", self.__unblock_cb) self.__sigid4 = editor.connect("load-error", self.__unblock_cb) self.__sigid5 = self.__buffer.connect("modified-changed", self.__modified_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__buffer = editor.textbuffer return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__buffer) self.__editor.unregister_object(self) del self self = None return False def __emit(self): modified = self.__buffer.get_modified() self.__editor.emit("modified-file", modified) return False def __block_signal(self): self.__buffer.handler_block(self.__sigid5) return False def __unblock_signal(self): self.__buffer.handler_unblock(self.__sigid5) return False def __quit_cb(self, *args): self.__destroy() return False def __block_cb(self, *args): self.__block_signal() return False def __unblock_cb(self, *args): self.__unblock_signal() return False def __modified_cb(self, *args): self.__emit() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Manager.py0000644000175000017500000000053111242100540020314 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): from Window.Manager import Manager Manager(editor, uri) from View.Manager import Manager Manager(editor, uri) from Buffer.Manager import Manager Manager(editor) from Toolbar.Manager import Manager Manager(editor) from StatusBar.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/Makefile.am0000644000175000017500000000025511242100540020427 0ustar andreasandreasSUBDIRS = Window Toolbar View Buffer StatusBar mainguidir = $(pythondir)/SCRIBES/GUI/MainGUI maingui_PYTHON = \ __init__.py \ Manager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/0000755000175000017500000000000011242100540017640 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/__init__.py0000644000175000017500000000000011242100540021737 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Positioner.py0000644000175000017500000000332111242100540022344 0ustar andreasandreasclass Positioner(object): def __init__(self, editor, uri): self.__init_attributes(editor, uri) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect_after("checking-file", self.__checking_cb) self.__sigid3 = editor.connect("load-error", self.__error_cb) editor.register_object(self) self.__position(uri) def __init_attributes(self, editor, uri): self.__editor = editor self.__window = editor.window self.__positioned = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self return False def __position(self, uri): try: self.__window.hide() uri = uri if uri else "" if uri != "": self.__positioned = True # Get window position from the position database, if possible. from SCRIBES.PositionMetadata import get_window_position_from_database as gp maximize, width, height, xcoordinate, ycoordinate = gp(str(uri)) if maximize: self.__window.maximize() else: self.__window.resize(width, height) self.__window.move(xcoordinate, ycoordinate) except TypeError: pass finally: from SCRIBES.Utils import SCRIBES_MAIN_WINDOW_STARTUP_ID self.__window.set_startup_id(SCRIBES_MAIN_WINDOW_STARTUP_ID) self.__window.present() self.__window.window.focus() return False def __quit_cb(self, *args): self.__destroy() return False def __checking_cb(self, editor, uri): if not self.__positioned: self.__position(uri) return False def __error_cb(self, *args): self.__position(None) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Makefile.in0000644000175000017500000003143711242100540021715 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/Window DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(window_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(windowdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ windowdir = $(pythondir)/SCRIBES/GUI/MainGUI/Window window_PYTHON = \ __init__.py \ FullscreenManager.py \ Manager.py \ StateTracker.py \ Positioner.py \ TitleUpdater.py \ PositionUpdater.py \ Grabber.py \ Window.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Window/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Window/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-windowPYTHON: $(window_PYTHON) @$(NORMAL_INSTALL) test -z "$(windowdir)" || $(MKDIR_P) "$(DESTDIR)$(windowdir)" @list='$(window_PYTHON)'; dlist=; list2=; test -n "$(windowdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(windowdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(windowdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(windowdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(windowdir)" $$dlist; \ fi; \ else :; fi uninstall-windowPYTHON: @$(NORMAL_UNINSTALL) @list='$(window_PYTHON)'; test -n "$(windowdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(windowdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(windowdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(windowdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(windowdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(windowdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(windowdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(windowdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-windowPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-windowPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-windowPYTHON installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-windowPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/TitleUpdater.py0000644000175000017500000000634211242100540022625 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, editor, uri): SignalManager.__init__(self) self.__init_attributes(editor, uri) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "checking-file", self.__checking_cb) self.connect(editor, "loaded-file", self.__loaded_cb) self.connect(editor, "load-error", self.__error_cb) self.connect(editor, "modified-file", self.__modified_cb) self.connect(editor, "readonly", self.__readonly_cb) self.connect(editor, "saved-file", self.__saved_cb) if uri: self.__set_title("loading") editor.register_object(self) def __init_attributes(self, editor, uri): self.__editor = editor self.__window = editor.window self.__uri = uri self.__dictionary = self.__get_dictionary(uri) return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update_attributes(self, uri): self.__uri = uri self.__dictionary = self.__get_dictionary(uri) return False def __get_dictionary(self, uri): from gio import File title = File(uri).get_basename() if uri else _("Unnamed Document") ellipsize = self.__ellipsize if uri: parent_path = File(uri).get_parent().get_parse_name() if uri: parent_path = ellipsize(parent_path.replace(self.__editor.home_folder, "~").strip("/\\")) fulltitle = "%s - (%s)" % (title, parent_path) if uri else title fulltitle = title if len(title) > 30 else fulltitle dictionary = { "normal": fulltitle, "modified": "*" + fulltitle, "readonly": fulltitle + _(" [READONLY]"), "loading": _("Loading %s ...") % title, } return dictionary def __ellipsize(self, path): number_of_folders = 8 from os import sep folder_paths = path.split(sep) if len (folder_paths) < number_of_folders: return path first_item = folder_paths[0] first_path = "%s%s..." % (first_item, sep) if first_item == "~" else "%s%s..." % (first_item, sep*2) last_paths = tuple(folder_paths[-5:]) from os.path import join return join(first_path, *last_paths).strip(sep) def __update_title(self, uri, title): self.__update_attributes(uri) self.__set_title(title) return False def __set_title(self, title): self.__window.set_title(self.__dictionary[title]) return False def __checking_cb(self, editor, uri): from gobject import idle_add idle_add(self.__update_title, uri, "loading") return False def __loaded_cb(self, editor, uri, *args): from gobject import idle_add idle_add(self.__set_title, "normal") return False def __error_cb(self, *args): from gobject import idle_add idle_add(self.__update_title, None, "normal") return False def __readonly_cb(self, editor, readonly): from gobject import idle_add idle_add(self.__set_title, "readonly" if readonly else "normal") return False def __modified_cb(self, editor, modified): from gobject import idle_add idle_add(self.__set_title, "modified" if modified else "normal") return False def __saved_cb(self, editor, uri, *args): if self.__uri == uri: return False from gobject import idle_add idle_add(self.__update_title, uri, "normal") return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/StateTracker.py0000644000175000017500000000247011242100540022611 0ustar andreasandreasclass Tracker(object): def __init__(self, editor): self.__init_attributes(editor) self.__editor.set_data("minimized", False) self.__editor.set_data("maximized", False) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__window.connect("window-state-event", self.__state_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__window = editor.window return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__window) self.__editor.unregister_object(self) del self return False def __update(self, state): from gtk.gdk import WINDOW_STATE_MAXIMIZED, WINDOW_STATE_FULLSCREEN from gtk.gdk import WINDOW_STATE_ICONIFIED MINIMIZED = state & WINDOW_STATE_ICONIFIED MAXIMIZED = (state & WINDOW_STATE_MAXIMIZED) or (state & WINDOW_STATE_FULLSCREEN) minimized = True if MINIMIZED else False maximized = True if MAXIMIZED else False self.__editor.set_data("minimized", minimized) self.__editor.set_data("maximized", maximized) return False def __quit_cb(self, *args): self.__destroy() return False def __state_cb(self, window, event): from gobject import idle_add idle_add(self.__update, event.new_window_state) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Manager.py0000644000175000017500000000067311242100540021572 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): from Window import Window Window(editor) from StateTracker import Tracker Tracker(editor) from Grabber import Grabber Grabber(editor) from FullscreenManager import Manager Manager(editor) from Positioner import Positioner Positioner(editor, uri) from PositionUpdater import Updater Updater(editor, uri) from TitleUpdater import Updater Updater(editor, uri) scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/FullscreenManager.py0000644000175000017500000000166411242100540023616 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("fullscreen", self.__fullscreen_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__window = editor.window return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __activate(self, fullscreen): self.__window.fullscreen() if fullscreen else self.__window.unfullscreen() self.__editor.move_view_to_cursor(True) return False def __quit_cb(self, *args): self.__destroy() return False def __fullscreen_cb(self, editor, fullscreen): from gobject import idle_add idle_add(self.__activate, fullscreen) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Makefile.am0000644000175000017500000000040511242100540021673 0ustar andreasandreaswindowdir = $(pythondir)/SCRIBES/GUI/MainGUI/Window window_PYTHON = \ __init__.py \ FullscreenManager.py \ Manager.py \ StateTracker.py \ Positioner.py \ TitleUpdater.py \ PositionUpdater.py \ Grabber.py \ Window.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Window.py0000644000175000017500000000522511242100540021465 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Window(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.__set_properties() self.connect(editor, "close", self.__close_cb) self.connect(editor, "ready", self.__ready_cb, True) self.connect(self.__window, "delete-event", self.__delete_event_cb) self.connect(self.__window, "focus-out-event", self.__focus_out_event_cb, True) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__window = editor.window self.__ready = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __set_rgba(self): screen = self.__window.get_screen() colormap = screen.get_rgba_colormap() from gtk import widget_set_default_colormap if colormap: widget_set_default_colormap(colormap) return False def __set_properties(self): from SCRIBES.WidgetTransparencyMetadata import get_value if get_value(): self.__set_rgba() self.__add_signal() from gtk import AccelGroup self.__window.add_accel_group(AccelGroup()) from gtk.gdk import KEY_PRESS_MASK self.__window.add_events(KEY_PRESS_MASK) get_resolution = self.__editor.calculate_resolution_independence width, height = get_resolution(self.__window, 1.462857143, 1.536) self.__window.set_property("default-height", height) self.__window.set_property("default-width", width) return def __add_signal(self): # Add new signal to window. from gobject import signal_new, signal_query, SIGNAL_RUN_LAST from gobject import TYPE_STRING, TYPE_BOOLEAN, SIGNAL_ACTION from gobject import SIGNAL_NO_RECURSE, type_register SIGNAL = SIGNAL_ACTION|SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE from gtk import Window if signal_query("scribes-key-event", Window): return False signal_new("scribes-key-event", Window, SIGNAL_ACTION, None, ()) signal_new("scribes-close-window", Window, SIGNAL, TYPE_BOOLEAN, (TYPE_STRING,)) signal_new("scribes-close-window-nosave", Window, SIGNAL, TYPE_BOOLEAN, (TYPE_STRING,)) signal_new("shutdown", Window, SIGNAL, TYPE_BOOLEAN, (TYPE_STRING,)) signal_new("fullscreen", Window, SIGNAL, TYPE_BOOLEAN, (TYPE_STRING,)) type_register(type(self.__window)) return False def __delete_event_cb(self, *args): if not self.__ready: return True self.__editor.close() return True def __close_cb(self, *args): self.__destroy() return False def __focus_out_event_cb(self, *args): self.__editor.emit("window-focus-out") return False def __ready_cb(self, *args): self.__ready = True self.__window.set_property("sensitive", True) return True scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/Grabber.py0000644000175000017500000000312411242100540021556 0ustar andreasandreas#FIXME: This module doesn't work well. Needs to connect to more signals? # There's a possibility to improve performance if this module works well. # GTK+ blocks all events on all windows except the focused one. from SCRIBES.SignalConnectionManager import SignalManager class Grabber(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "quit", self.__quit_cb) # self.connect(self.__window, "focus-in-event", self.__in_cb, True) self.connect(editor, "ready", self.__in_cb, True) self.connect(editor, "loaded-file", self.__in_cb, True) # self.connect(self.__window, "focus-out-event", self.__out_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__window = editor.window self.__is_grabbed = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __grab(self): if self.__is_grabbed: return False self.__window.grab_add() self.__is_grabbed = True print "%i grabbed focus" % self.__editor.id_ return False def __ungrab(self): if self.__is_grabbed is False: return False self.__is_grabbed = False self.__window.grab_remove() print "%i ungrabbed focus" % self.__editor.id_ return False def __in_cb(self, *args): if self.__editor.window_is_active is False: return False self.__editor.textview.grab_focus() #self.__editor.refresh(True) return False def __out_cb(self, *args): self.__ungrab() return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Window/PositionUpdater.py0000644000175000017500000000241211242100540023342 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, editor, uri): SignalManager.__init__(self) self.__init_attributes(editor, uri) self.connect(editor, "close", self.__close_cb) editor.register_object(self) def __init_attributes(self, editor, uri): self.__editor = editor self.__window = editor.window return False def __destroy(self): self.disconnect() self.__set_position_in_database() self.__editor.refresh(False) self.__window.hide() self.__editor.refresh(False) self.__editor.unregister_object(self) del self return False def __set_position_in_database(self): xcoordinate, ycoordinate = self.__window.get_position() width, height = self.__window.get_size() is_maximized = self.__editor.maximized uri = self.__editor.uri if self.__editor.uri else "" maximized_position = (True, None, None, None, None) unmaximized_position = (False, width, height, xcoordinate, ycoordinate) window_position = maximized_position if is_maximized else unmaximized_position from SCRIBES.PositionMetadata import update_window_position_in_database update_window_position_in_database(str(uri), window_position) return False def __close_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/0000755000175000017500000000000011242100540017773 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/__init__.py0000644000175000017500000000000011242100540022072 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbar.py0000644000175000017500000000266111242100540021754 0ustar andreasandreasclass Toolbar(object): def __init__(self, editor): self.__init_attributes(editor) self.__set_properties() self.__add_toolbuttons() self.__sigid1 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from gtk import Toolbar self.__toolbar = Toolbar() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self return def __set_properties(self): from Utils import never_focus never_focus(self.__toolbar) self.__toolbar.set_property("sensitive", True) from gtk import TEXT_WINDOW_WIDGET, ORIENTATION_HORIZONTAL, EventBox from gtk import TOOLBAR_ICONS, Frame, SHADOW_IN, ICON_SIZE_SMALL_TOOLBAR self.__toolbar.set_property("icon-size", ICON_SIZE_SMALL_TOOLBAR) self.__toolbar.set_style(TOOLBAR_ICONS) self.__toolbar.set_orientation(ORIENTATION_HORIZONTAL) self.__editor.set_data("Toolbar", self.__toolbar) frame = Frame() frame.add(self.__toolbar) frame.set_shadow_type(SHADOW_IN) box = EventBox() box.add(frame) self.__editor.set_data("ToolContainer", box) self.__editor.textview.add_child_in_window(box, TEXT_WINDOW_WIDGET, -3, -3) return def __add_toolbuttons(self): from ToolbuttonsInitializer import Initializer Initializer(self.__toolbar, self.__editor) return def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Utils.py0000644000175000017500000000101411242100540021441 0ustar andreasandreasdef never_focus(widget): widget.set_property("can-default", False) widget.set_property("can-focus", False) widget.set_property("has-default", False) widget.set_property("has-focus", False) widget.set_property("is-focus", False) widget.set_property("receives-default", False) return False def new_separator(draw=True, expand=False): from gtk import SeparatorToolItem separator = SeparatorToolItem() never_focus(separator) separator.set_draw(draw) separator.set_expand(expand) separator.show() return separator scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Makefile.in0000644000175000017500000004755411242100540022057 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/Toolbar DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(toolbar_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(toolbardir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = ToolbarVisibility Toolbuttons toolbardir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar toolbar_PYTHON = \ __init__.py \ Manager.py \ Toolbar.py \ ToolbuttonsInitializer.py \ Utils.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-toolbarPYTHON: $(toolbar_PYTHON) @$(NORMAL_INSTALL) test -z "$(toolbardir)" || $(MKDIR_P) "$(DESTDIR)$(toolbardir)" @list='$(toolbar_PYTHON)'; dlist=; list2=; test -n "$(toolbardir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(toolbardir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(toolbardir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(toolbardir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(toolbardir)" $$dlist; \ fi; \ else :; fi uninstall-toolbarPYTHON: @$(NORMAL_UNINSTALL) @list='$(toolbar_PYTHON)'; test -n "$(toolbardir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(toolbardir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(toolbardir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbardir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(toolbardir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbardir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(toolbardir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(toolbardir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-toolbarPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-toolbarPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-toolbarPYTHON installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-toolbarPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/0000755000175000017500000000000011242100540022327 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/__init__.py0000644000175000017500000000000011242100540024426 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SaveToolButton.py0000644000175000017500000000215311242100540025632 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_SAVE_AS self.set_property("stock-id", STOCK_SAVE_AS) self.set_property("name", "SaveToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Rename the current file (ctrl + shift + s)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-save-dialog") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RecentMenu.py0000644000175000017500000000313611242100540024751 0ustar andreasandreasfrom gtk import RecentChooserMenu class RecentMenu(RecentChooserMenu): def __init__(self, editor): self.__init_attributes(editor) manager = editor.get_data("RecentManager") RecentChooserMenu.__init__(self, manager) self.__set_properties() self.__sigid1 = self.__editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("item-activated", self.__activated_cb) editor.set_data("RecentMenu", self) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import RECENT_SORT_MRU self.set_show_numbers(False) self.set_property("sort-type", RECENT_SORT_MRU) self.set_property("filter", self.__create_filter()) self.set_property("limit", 15) self.set_property("local-only", False) self.set_property("show-icons", True) self.set_property("show-not-found", False) self.set_property("show-tips", True) from gettext import gettext as _ self.set_tooltip_text(_("Recently opened files")) return def __create_filter(self): from gtk import RecentFilter recent_filter = RecentFilter() recent_filter.add_application("scribes") return recent_filter def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.destroy() self.__editor.unregister_object(self) del self return def __activated_cb(self, recent_chooser): uri = self.get_current_uri() self.__editor.open_file(uri) return True def __quit_cb(self, editor): self.__destroy() return scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PreferenceMenuManager.py0000644000175000017500000000437111242100540027104 0ustar andreasandreasclass Manager(object): def __init__(self, editor, menu): self.__init_attributes(editor, menu) menu.props.sensitive = False self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("add-to-pref-menu", self.__add_cb) self.__sigid3 = editor.connect("remove-from-pref-menu", self.__remove_cb) editor.register_object(self) def __init_attributes(self, editor, menu): self.__editor = editor self.__menu = menu self.__menuitems = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__menu.destroy() self.__editor.unregister_object(self) del self self = None return False def __add(self, menuitem): self.__menu.props.sensitive = False self.__menuitems.append(menuitem) menuitems = self.__sort(self.__menuitems) self.__update(menuitems) self.__menu.props.sensitive = True self.__menu.show_all() return False def __sort(self, menuitems): # itemlist = [(menuitem.props.name, menuitem) for menuitem in menuitems] #FIXME: Refactor into a function itemlist = [] for menuitem in menuitems: itemlist.append((menuitem.props.name, menuitem)) itemlist.sort() itemlist.reverse() #FIXME: Refactor into a function menuitems = [] for element in itemlist: menuitems.append(element[1]) return menuitems def __update(self, menuitems): # [self.__menu.remove(menuitem) for menuitem in self.__menu.get_children()] #FIXME: Refactor into a function for menuitem in self.__menu.get_children(): self.__menu.remove(menuitem) #FIXME: Refactor into a function for menuitem in menuitems: self.__menu.append(menuitem) # [self.__menu.append(menuitem) for menuitem in menuitems] return False def __remove(self, menuitem): self.__menuitems.remove(menuitem) self.__menu.remove(menuitem) sensitive = True if self.__menu.get_children() else False self.__menu.props.sensitive = sensitive return False def __add_cb(self, editor, menuitem): self.__add(menuitem) return False def __remove_cb(self, editor, menuitem): self.__remove(menuitem) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/SearchToolButton.py0000644000175000017500000000213711242100540026143 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_FIND self.set_property("stock-id", STOCK_FIND) self.set_property("name", "SearchToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Show bar to search for text (ctrl + f)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-findbar") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile.in0000644000175000017500000003220111242100540024372 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(toolbuttons_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(toolbuttonsdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ toolbuttonsdir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons toolbuttons_PYTHON = \ __init__.py \ NewToolButton.py \ OpenToolButton.py \ SaveToolButton.py \ PrintToolButton.py \ UndoToolButton.py \ RedoToolButton.py \ GotoToolButton.py \ SearchToolButton.py \ ReplaceToolButton.py \ PreferenceToolButton.py \ PreferenceMenuManager.py \ HelpToolButton.py \ Spinner.py \ RecentMenu.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-toolbuttonsPYTHON: $(toolbuttons_PYTHON) @$(NORMAL_INSTALL) test -z "$(toolbuttonsdir)" || $(MKDIR_P) "$(DESTDIR)$(toolbuttonsdir)" @list='$(toolbuttons_PYTHON)'; dlist=; list2=; test -n "$(toolbuttonsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(toolbuttonsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(toolbuttonsdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(toolbuttonsdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(toolbuttonsdir)" $$dlist; \ fi; \ else :; fi uninstall-toolbuttonsPYTHON: @$(NORMAL_UNINSTALL) @list='$(toolbuttons_PYTHON)'; test -n "$(toolbuttonsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(toolbuttonsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(toolbuttonsdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbuttonsdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(toolbuttonsdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbuttonsdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(toolbuttonsdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(toolbuttonsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-toolbuttonsPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-toolbuttonsPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-toolbuttonsPYTHON \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-toolbuttonsPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Spinner.py0000644000175000017500000000511211242100540024316 0ustar andreasandreasfrom gtk import ToolItem class Spinner(ToolItem): def __init__(self, editor): ToolItem.__init__(self) self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("busy", self.__busy_cb) self.__sigid3 = editor.connect("spin-throbber", self.__spin_throbber_cb) self.__sigid4 = editor.connect("checking-file", self.__checking_file_cb) self.__sigid5 = editor.connect("loaded-file", self.__loaded_file_cb) self.__sigid6 = editor.connect("load-error", self.__load_error_cb) self.__set_properties() self.show_all() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from gtk.gdk import PixbufAnimation from os.path import join self.__animation = PixbufAnimation(join(editor.data_folder, "throbber-active.gif")) throbber_png_path = join(editor.data_folder, "throbber-inactive.png") from gtk import image_new_from_file self.__image = image_new_from_file(throbber_png_path) self.__pixbuf = self.__image.get_pixbuf() self.__call_count = 0 self.__is_spinning = False return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.disconnect_signal(self.__sigid6, self.__editor) self.__editor.unregister_object(self) self.destroy() del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) self.__image.set_property("xpad", 10) self.add(self.__image) return def __start(self): self.__call_count += 1 if self.__is_spinning: return self.__is_spinning = True self.__image.set_from_animation(self.__animation) return def __stop(self): if self.__is_spinning is False: return self.__call_count -= 1 if self.__call_count: return self.__is_spinning = False self.__call_count = 0 self.__image.clear() self.__image.set_from_pixbuf(self.__pixbuf) return def __quit_cb(self, *args): self.__destroy() return False def __busy_cb(self, editor, busy): self.__start() if busy else self.__stop() return False def __spin_throbber_cb(self, editor, spin): self.__start() if spin else self.__stop() return False def __checking_file_cb(self, *args): self.__start() return False def __loaded_file_cb(self, *args): self.__stop() return False def __load_error_cb(self, *args): self.__stop() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PrintToolButton.py0000644000175000017500000000215311242100540026030 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_PRINT self.set_property("stock-id", STOCK_PRINT) self.set_property("name", "PrintToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Show window to print current file (ctrl + p)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-print-window") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/GotoToolButton.py0000644000175000017500000000216211242100540025644 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_JUMP_TO self.set_property("stock-id", STOCK_JUMP_TO) self.set_property("name", "GotoToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Show bar to move cursor to a specific line (ctrl + i)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-gotobar") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/NewToolButton.py0000644000175000017500000000207511242100540025470 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_NEW self.set_property("stock-id", STOCK_NEW) self.set_property("name", "NewToolButton") self.set_property("sensitive", True) from gettext import gettext as _ self.set_tooltip_text(_("Open a new window (ctrl + n)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.new() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/RedoToolButton.py0000644000175000017500000000357211242100540025633 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.__sigid3 = editor.connect_after("redo", self.__redo_cb) self.__sigid4 = editor.connect_after("undo", self.__redo_cb) self.__sigid5 = editor.connect("bar-is-active", self.__active_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_REDO self.set_property("stock-id", STOCK_REDO) self.set_property("name", "RedoToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Redo last action (ctrl + shift + z)")) return def __quit_cb(self, *args): self.__destroy() return False def __sensitive(self): sensitive = True if self.__editor.textbuffer.can_redo() else False self.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__editor.redo() self.__sensitive() return False def __redo_cb(self, *args): from gobject import idle_add idle_add(self.__sensitive) # self.__sensitive() return False def __active_cb(self, editor, active): self.set_property("sensitive", False) if active else self.__sensitive() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/PreferenceToolButton.py0000644000175000017500000000257411242100540027021 0ustar andreasandreasfrom gtk import MenuToolButton class Button(MenuToolButton): def __init__(self, editor): from gtk import STOCK_PREFERENCES MenuToolButton.__init__(self, STOCK_PREFERENCES) self.__init_attributes(editor) self.__set_properties() from PreferenceMenuManager import Manager Manager(editor, self.get_menu()) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) self.set_property("name", "PreferenceToolButton") self.set_property("sensitive", False) from gtk import Menu self.set_property("menu", Menu()) from gettext import gettext as _ from gtk import Tooltips # menu_tip = _("Advanced configuration editors") # self.set_arrow_tooltip(Tooltips(), menu_tip, menu_tip) self.set_tooltip_text(_("Show window to customize the editor (F12)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-preferences-window") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/UndoToolButton.py0000644000175000017500000000376411242100540025652 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.__sigid3 = editor.connect_after("undo", self.__undo_cb) self.__sigid4 = editor.connect_after("redo", self.__undo_cb) self.__sigid5 = editor.connect("modified-file", self.__undo_cb) self.__sigid6 = editor.connect("bar-is-active", self.__active_cb) editor.register_object(self) self.show() def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.disconnect_signal(self.__sigid6, self.__editor) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_UNDO self.set_property("stock-id", STOCK_UNDO) self.set_property("name", "UndoToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Undo last action (ctrl + z)")) return def __quit_cb(self, *args): self.__destroy() return False def __sensitive(self): sensitive = True if self.__editor.textbuffer.can_undo() else False self.set_property("sensitive", sensitive) return False def __clicked_cb(self, *args): self.__editor.undo() self.__sensitive() return False def __undo_cb(self, *args): from gobject import idle_add idle_add(self.__sensitive) # self.__sensitive() return False def __active_cb(self, editor, active): self.set_property("sensitive", False) if active else self.__sensitive() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/Makefile.am0000644000175000017500000000067111242100540024367 0ustar andreasandreastoolbuttonsdir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons toolbuttons_PYTHON = \ __init__.py \ NewToolButton.py \ OpenToolButton.py \ SaveToolButton.py \ PrintToolButton.py \ UndoToolButton.py \ RedoToolButton.py \ GotoToolButton.py \ SearchToolButton.py \ ReplaceToolButton.py \ PreferenceToolButton.py \ PreferenceMenuManager.py \ HelpToolButton.py \ Spinner.py \ RecentMenu.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/OpenToolButton.py0000644000175000017500000000241711242100540025640 0ustar andreasandreasfrom gtk import MenuToolButton class Button(MenuToolButton): def __init__(self, editor): from gtk import STOCK_OPEN MenuToolButton.__init__(self, STOCK_OPEN) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self return def __set_properties(self): from ..Utils import never_focus never_focus(self) self.set_property("name", "OpenToolButton") self.set_property("sensitive", False) from RecentMenu import RecentMenu self.set_menu(RecentMenu(self.__editor)) # from gtk import Tooltips from gettext import gettext as _ # menu_tip = _("Recently opened files") # self.set_arrow_tooltip(Tooltips(), menu_tip, menu_tip) self.set_tooltip_text(_("Open a new file (ctrl + o)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-open-dialog") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/ReplaceToolButton.py0000644000175000017500000000222511242100540026307 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self self = None return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_FIND_AND_REPLACE self.set_property("stock-id", STOCK_FIND_AND_REPLACE) self.set_property("name", "ReplaceToolButton") self.set_property("sensitive", False) from gettext import gettext as _ self.set_tooltip_text(_("Show bar to search for and replace text (ctrl + r)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("show-replacebar") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Toolbuttons/HelpToolButton.py0000644000175000017500000000216211242100540025624 0ustar andreasandreasfrom gtk import ToolButton class Button(ToolButton): def __init__(self, editor): ToolButton.__init__(self) self.__init_attributes(editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("clicked", self.__clicked_cb) self.show() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self self = None return def __set_properties(self): from ..Utils import never_focus never_focus(self) from gtk import STOCK_HELP self.set_property("stock-id", STOCK_HELP) self.set_property("name", "HelpToolButton") self.set_property("sensitive", True) from gettext import gettext as _ self.set_tooltip_text(_("Show keyboard shortcuts (ctrl + h)")) return def __quit_cb(self, *args): self.__destroy() return False def __clicked_cb(self, *args): self.__editor.trigger("activate-shortcut-window") return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Manager.py0000644000175000017500000000024711242100540021722 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from Toolbar import Toolbar Toolbar(editor) from ToolbarVisibility.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/Makefile.am0000644000175000017500000000034611242100540022032 0ustar andreasandreasSUBDIRS = ToolbarVisibility Toolbuttons toolbardir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar toolbar_PYTHON = \ __init__.py \ Manager.py \ Toolbar.py \ ToolbuttonsInitializer.py \ Utils.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/0000755000175000017500000000000011242100540023445 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/__init__.py0000644000175000017500000000000011242100540025544 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/SizeUpdater.py0000644000175000017500000000321711242100540026261 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor.window, "configure-event", self.__event_cb) self.connect(editor, "scrollbar-visibility-update", self.__event_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__width = 0 self.__height = 0 self.__count = 0 self.__pount = 0 return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self): width = self.__get_width() height = self.__get_height() if width == self.__width and height == self.__height: return False self.__width, self.__height = width, height self.__manager.emit("size", (width, height)) return False def __get_width(self): from gtk import TEXT_WINDOW_WIDGET window = self.__editor.textview.get_window(TEXT_WINDOW_WIDGET) return window.get_geometry()[2] def __get_height(self): height = self.__editor.toolbar.size_request()[1] return height def __remove_timer(self, _timer=1): try: timers = { 1: self.__timer1, } from gobject import source_remove source_remove(timers[_timer]) except AttributeError: pass return False def __quit_cb(self, *args): self.__destroy() return False def __event_cb(self, *args): self.__remove_timer(1) from gobject import idle_add, PRIORITY_LOW self.__timer1 = idle_add(self.__update, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/VisibilityUpdater.py0000644000175000017500000000207411242100540027476 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "animation", self.__animation_cb) self.connect(manager, "slide", self.__slide_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__slide = "" return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, animation): if animation != "end": return False visible = False if self.__slide == "up" else True self.__manager.emit("visible", visible) return False def __quit_cb(self, *args): self.__destroy() return False def __animation_cb(self, manager, animation): from gobject import idle_add idle_add(self.__update, animation) return False def __slide_cb(self, manager, slide): self.__slide = slide return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile.in0000644000175000017500000003231411242100540025515 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(toolbarvisibility_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(toolbarvisibilitydir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ toolbarvisibilitydir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility toolbarvisibility_PYTHON = \ __init__.py \ Manager.py \ Displayer.py \ MouseSensor.py \ Animator.py \ DeltaCalculator.py \ SizeUpdater.py \ Resizer.py \ VisibilityUpdater.py \ HideTimer.py \ APIVisibilityUpdater.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-toolbarvisibilityPYTHON: $(toolbarvisibility_PYTHON) @$(NORMAL_INSTALL) test -z "$(toolbarvisibilitydir)" || $(MKDIR_P) "$(DESTDIR)$(toolbarvisibilitydir)" @list='$(toolbarvisibility_PYTHON)'; dlist=; list2=; test -n "$(toolbarvisibilitydir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(toolbarvisibilitydir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(toolbarvisibilitydir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(toolbarvisibilitydir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(toolbarvisibilitydir)" $$dlist; \ fi; \ else :; fi uninstall-toolbarvisibilityPYTHON: @$(NORMAL_UNINSTALL) @list='$(toolbarvisibility_PYTHON)'; test -n "$(toolbarvisibilitydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(toolbarvisibilitydir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(toolbarvisibilitydir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbarvisibilitydir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(toolbarvisibilitydir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(toolbarvisibilitydir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(toolbarvisibilitydir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(toolbarvisibilitydir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-toolbarvisibilityPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-toolbarvisibilityPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-toolbarvisibilityPYTHON \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-toolbarvisibilityPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Animator.py0000644000175000017500000000727211242100540025601 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager REFRESH_TIME = 5 # units in milliseconds class Animator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "slide", self.__slide_cb) self.connect(manager, "deltas", self.__deltas_cb) self.connect(manager, "size", self.__size_cb) from gobject import idle_add idle_add(self.__compile, priority=9999) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.view self.__container = editor.get_data("ToolContainer") self.__start_point = 0 self.__end_point = 0 self.__hdelta = 0 self.__vdelta = 0 self.__height = 0 self.__width = 0 self.__busy = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __slide(self, direction="left"): try: self.__manager.emit("animation", "begin") from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__update_animation_start_point(direction) self.__update_animation_end_point(direction) self.__timer = timeout_add(REFRESH_TIME, self.__move, direction) return False def __reposition_in(self, direction): try: x = int(self.__get_x(direction)) y = int(self.__get_y(direction)) self.__view.move_child(self.__container, x, y) self.__container.show_all() except AttributeError: pass return False def __move(self, direction): try: animate = True self.__can_end(direction) self.__reposition_in(direction) except ValueError: animate = False if direction == "up": self.__container.hide() self.__manager.emit("animation", "end") self.__busy = False return animate def __can_end(self, direction): if direction == "up" and self.__start_point <= -self.__height - 4: raise ValueError if direction == "down" and self.__start_point >= -2: raise ValueError return False def __get_x(self, direction): if direction in ("up", "down"): return -2 if direction == "left": self.__start_point -= self.__hdelta if direction == "right": self.__start_point += self.__hdelta if self.__start_point < -2: return -2 return self.__start_point def __get_y(self, direction): if direction in ("left", "right"): return -2 if direction == "up": self.__start_point -= self.__vdelta if direction == "down": self.__start_point += self.__vdelta if self.__start_point >= -2: return -2 return self.__start_point def __update_animation_start_point(self, direction): dictionary = { "up": -2, "down": -self.__height, "left": self.__width, "right":0, } self.__start_point = dictionary[direction] return False def __update_animation_end_point(self, direction): dictionary = { "up": -self.__height - 4, "down": -2, "left": -2, "right": self.__width, } self.__end_point = dictionary[direction] return False def __compile(self): self.__editor.optimize((self.__move, self.__reposition_in)) return False def __quit_cb(self, *args): self.__destroy() return False def __slide_cb(self, manager, direction): if self.__busy: return False try: self.__busy = True from gobject import idle_add, source_remove source_remove(self.__ttimer) except AttributeError: pass finally: self.__ttimer = idle_add(self.__slide, direction, priority=9999) return False def __deltas_cb(self, manager, deltas): self.__hdelta, self.__vdelta = deltas return False def __size_cb(self, manager, size): self.__width, self.__height = size return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/DeltaCalculator.py0000644000175000017500000000206011242100540027060 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager REFRESH_TIME = 5 # units in milliseconds ANIMATION_TIME = 250 # units in milliseconds class Calculator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "size", self.__size_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, size): width, height = size hdelta = float(width) / float(ANIMATION_TIME / REFRESH_TIME) vdelta = float(height) / float(ANIMATION_TIME / REFRESH_TIME) self.__manager.emit("deltas", (round(hdelta), round(vdelta))) return False def __quit_cb(self, *args): self.__destroy() return False def __size_cb(self, manager, size): from gobject import idle_add idle_add(self.__update, size) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Manager.py0000644000175000017500000000222411242100540025371 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE from gobject import TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "show": (SSIGNAL, TYPE_NONE, ()), "hide": (SSIGNAL, TYPE_NONE, ()), "slide": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "animation": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "deltas": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "size": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "visible": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) from HideTimer import Timer Timer(self, editor) from APIVisibilityUpdater import Updater Updater(self, editor) from VisibilityUpdater import Updater Updater(self, editor) from Resizer import Resizer Resizer(self, editor) from Animator import Animator Animator(self, editor) from Displayer import Displayer Displayer(self, editor) from MouseSensor import Sensor Sensor(self, editor) from DeltaCalculator import Calculator Calculator(self, editor) from SizeUpdater import Updater Updater(self, editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Makefile.am0000644000175000017500000000052611242100540025504 0ustar andreasandreastoolbarvisibilitydir = $(pythondir)/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility toolbarvisibility_PYTHON = \ __init__.py \ Manager.py \ Displayer.py \ MouseSensor.py \ Animator.py \ DeltaCalculator.py \ SizeUpdater.py \ Resizer.py \ VisibilityUpdater.py \ HideTimer.py \ APIVisibilityUpdater.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Resizer.py0000644000175000017500000000172311242100540025445 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Resizer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "size", self.__size_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update_size(self): from gtk import TEXT_WINDOW_WIDGET window = self.__editor.textview.get_window(TEXT_WINDOW_WIDGET) width = window.get_geometry()[2] + 2 height = self.__editor.toolbar.size_request()[1] self.__editor.toolbar.set_size_request(width, height) return False def __size_cb(self, *args): from gobject import idle_add idle_add(self.__update_size) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/Displayer.py0000644000175000017500000000351211242100540025754 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Displayer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(editor, "show-full-view", self.__show_cb) self.connect(editor, "hide-full-view", self.__hide_cb) self.connect(manager, "hide", self.__hide_cb) self.connect(manager, "show", self.__show_cb) self.connect(manager, "visible", self.__visible_cb) self.connect(editor, "window-focus-out", self.__focus_cb, True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__container = editor.get_data("ToolContainer") self.__view = editor.textview self.__visible = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __pointer_on_toolbar(self): y = self.__editor.textview.window.get_pointer()[1] height = self.__editor.toolbar.size_request()[1] if y > 0 and y <= height: return True return False def __show(self, update=False): if self.__visible is True: return False self.__visible = True # Toolbar slide animation from up to down self.__manager.emit("slide", "down") return False def __hide(self): if self.__visible is False: return False self.__manager.emit("slide", "up") return False def __hide_cb(self, *args): if self.__pointer_on_toolbar(): return False self.__hide() return False def __show_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __focus_cb(self, *args): self.__hide() return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): self.__visible = visible return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/HideTimer.py0000644000175000017500000000314211242100540025671 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager HIDE_TIMER = 7000 class Timer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__id = self.connect(editor.textview, "motion-notify-event", self.__motion_cb) self.connect(manager, "visible", self.__visible_cb) self.connect(editor, "quit", self.__quit_cb) self.__block() editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__visible = False self.__blocked = None return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __hide(self): try: hide = lambda: self.__manager.emit("hide") from gobject import timeout_add, source_remove source_remove(self.__timer) except AttributeError: pass finally: self.__timer = timeout_add(HIDE_TIMER, hide) return False def __block(self): if self.__blocked is True: return False self.__blocked = True self.__view.handler_block(self.__id) return False def __unblock(self): if self.__blocked is False: return False self.__blocked = False self.__view.handler_unblock(self.__id) return False def __motion_cb(self, *args): if self.__visible is False: return False self.__hide() return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): self.__visible = visible self.__unblock() if visible else self.__block() if visible: self.__hide() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/MouseSensor.py0000644000175000017500000000255011242100540026303 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Sensor(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.__id = self.connect(editor.textview, "motion-notify-event", self.__motion_cb) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "visible", self.__visible_cb) editor.register_object(self) self.__block() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview self.__visible = False self.__blocked = False return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __show(self): self.__manager.emit("show") return False def __block(self): if self.__blocked is True: return False self.__blocked = True self.__view.handler_block(self.__id) return False def __unblock(self): if self.__blocked is False: return False self.__blocked = False self.__view.handler_unblock(self.__id) return False def __motion_cb(self, *args): if self.__visible: return False self.__show() return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): self.__visible = visible self.__unblock() if visible else self.__block() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbarVisibility/APIVisibilityUpdater.py0000644000175000017500000000152211242100540030025 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "visible", self.__visible_cb, True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, visible): self.__editor.emit("toolbar-is-visible", visible) return False def __quit_cb(self, *args): self.__destroy() return False def __visible_cb(self, manager, visible): from gobject import idle_add idle_add(self.__update, visible) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/Toolbar/ToolbuttonsInitializer.py0000644000175000017500000000346411242100540025114 0ustar andreasandreasclass Initializer(object): def __init__(self, toolbar, editor): # Create the new window toolbutton. from Toolbuttons.NewToolButton import Button toolbar.insert(Button(editor), 0) # Create the open file toolbutton. from Toolbuttons.OpenToolButton import Button toolbar.insert(Button(editor), 1) # Create the save toolbutton. from Toolbuttons.SaveToolButton import Button toolbar.insert(Button(editor), 2) # Toolbar separator. from Utils import new_separator toolbar.insert(new_separator(), 3) # Create the print toolbutton. from Toolbuttons.PrintToolButton import Button toolbar.insert(Button(editor), 4) # Toolbar separator toolbar.insert(new_separator(), 5) # Create the undo toolbutton. from Toolbuttons.UndoToolButton import Button toolbar.insert(Button(editor), 6) # Create the redo toolbutton. from Toolbuttons.RedoToolButton import Button toolbar.insert(Button(editor), 7) # Toolbar separator toolbar.insert(new_separator(), 8) # Create the jump to another line toolbutton. from Toolbuttons.GotoToolButton import Button toolbar.insert(Button(editor), 9) # Create the search toolbutton. from Toolbuttons.SearchToolButton import Button toolbar.insert(Button(editor), 10) # Create the replace toolbutton. from Toolbuttons.ReplaceToolButton import Button toolbar.insert(Button(editor), 11) # Toolbar separator toolbar.insert(new_separator(), 12) # Create the preference toolbutton. from Toolbuttons.PreferenceToolButton import Button toolbar.insert(Button(editor), 13) # Create the help toolbutton. from Toolbuttons.HelpToolButton import Button toolbar.insert(Button(editor), 14) # Toolbar separator. toolbar.insert(new_separator(False, True), 15) # Create the spinner. from Toolbuttons.Spinner import Spinner toolbar.insert(Spinner(editor), 16) scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/0000755000175000017500000000000011242100540017303 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/View/__init__.py0000644000175000017500000000000011242100540021402 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/0000755000175000017500000000000011242100540022700 5ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/__init__.py0000644000175000017500000000000011242100540024777 0ustar andreasandreasscribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/FontListener.py0000644000175000017500000000225211242100540025667 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("Font.gdb")).monitor_file(FILE_MONITOR_NONE, None) self.__manager = manager return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self): from pango import FontDescription from SCRIBES.FontMetadata import get_value new_font = FontDescription(get_value(self.__manager.get_language())) self.__view.modify_font(new_font) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile.in0000644000175000017500000003175211242100540024755 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/View/DatabaseListeners DIST_COMMON = $(listeners_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(listenersdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ listenersdir = $(pythondir)/SCRIBES/GUI/MainGUI/View/DatabaseListeners listeners_PYTHON = \ __init__.py \ Manager.py \ FontListener.py \ RightMarginPositionListener.py \ TextWrappingListener.py \ ShowRightMarginListener.py \ UseTabsListener.py \ SpellCheckListener.py \ TabWidthListener.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-listenersPYTHON: $(listeners_PYTHON) @$(NORMAL_INSTALL) test -z "$(listenersdir)" || $(MKDIR_P) "$(DESTDIR)$(listenersdir)" @list='$(listeners_PYTHON)'; dlist=; list2=; test -n "$(listenersdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(listenersdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(listenersdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(listenersdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(listenersdir)" $$dlist; \ fi; \ else :; fi uninstall-listenersPYTHON: @$(NORMAL_UNINSTALL) @list='$(listeners_PYTHON)'; test -n "$(listenersdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(listenersdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(listenersdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(listenersdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(listenersdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(listenersdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(listenersdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(listenersdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-listenersPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-listenersPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-listenersPYTHON install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-listenersPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/UseTabsListener.py0000644000175000017500000000216111242100540026326 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__view = editor.textview self.__manager = manager from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("UseTabs.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self return False def __update(self): from SCRIBES.UseTabsMetadata import get_value self.__view.set_insert_spaces_instead_of_tabs(not get_value(self.__manager.get_language())) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/RightMarginPositionListener.py0000644000175000017500000000221511242100540030720 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("MarginPosition.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self): from SCRIBES.MarginPositionMetadata import get_value self.__view.set_property("right-margin-position", get_value(self.__manager.get_language())) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/TabWidthListener.py0000644000175000017500000000215111242100540026465 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("TabWidth.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self): from SCRIBES.TabWidthMetadata import get_value self.__view.set_tab_width(get_value(self.__manager.get_language())) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/Manager.py0000644000175000017500000000147311242100540024631 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__editor = editor from FontListener import Listener Listener(self, editor) from TabWidthListener import Listener Listener(self, editor) from UseTabsListener import Listener Listener(self, editor) from TextWrappingListener import Listener Listener(self, editor) from ShowRightMarginListener import Listener Listener(self, editor) from RightMarginPositionListener import Listener Listener(self, editor) from SpellCheckListener import Listener Listener(self, editor) def get_path(self, database): from os.path import join folder = join(self.__editor.metadata_folder, "Preferences","Languages") return join(folder, database) def get_language(self): language = self.__editor.language return language if language else "plain text" scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/TextWrappingListener.py0000644000175000017500000000232311242100540027414 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("TextWrapping.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self return False def __update(self): from gtk import WRAP_NONE, WRAP_WORD_CHAR from SCRIBES.TextWrappingMetadata import get_value wrap_mode = self.__view.set_wrap_mode wrap_mode(WRAP_WORD_CHAR) if get_value(self.__manager.get_language()) else wrap_mode(WRAP_NONE) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/Makefile.am0000644000175000017500000000051511242100540024735 0ustar andreasandreaslistenersdir = $(pythondir)/SCRIBES/GUI/MainGUI/View/DatabaseListeners listeners_PYTHON = \ __init__.py \ Manager.py \ FontListener.py \ RightMarginPositionListener.py \ TextWrappingListener.py \ ShowRightMarginListener.py \ UseTabsListener.py \ SpellCheckListener.py \ TabWidthListener.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/ShowRightMarginListener.py0000644000175000017500000000222111242100540030031 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("DisplayRightMargin.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self): from SCRIBES.DisplayRightMarginMetadata import get_value self.__view.set_property("show-right-margin", get_value(self.__manager.get_language())) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DatabaseListeners/SpellCheckListener.py0000644000175000017500000000217711242100540027004 0ustar andreasandreasclass Listener(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__changed_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__view = editor.textview from gio import File, FILE_MONITOR_NONE self.__monitor = File(manager.get_path("SpellCheck.gdb")).monitor_file(FILE_MONITOR_NONE, None) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self): from SCRIBES.SpellCheckMetadata import get_value self.__editor.emit("enable-spell-checking", get_value(self.__manager.get_language())) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): monitor, gfile, otherfile, event = args if not (event in (0,2,3)): return False from gobject import idle_add idle_add(self.__update) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/FileLoadingUpdater.py0000644000175000017500000000134211242100540023357 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.connect(editor, "quit", self.__destroy_cb) self.connect(editor, "load-file", self.__freeze_cb) self.connect(editor, "loaded-file", self.__thaw_cb, True) self.connect(editor, "load-error", self.__thaw_cb) editor.register_object(self) def __destroy_cb(self, editor, *args): self.disconnect() editor.unregister_object(self) del self return False def __freeze_cb(self, editor, *args): editor.window.window.freeze_updates() editor.freeze() return False def __thaw_cb(self, editor, *args): editor.thaw() editor.window.window.thaw_updates() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/SensitivityManager.py0000644000175000017500000000202111242100540023475 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("busy", self.__busy_cb) self.__sigid3 = editor.connect("ready", self.__ready_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__swin = editor.gui.get_widget("ScrolledWindow") self.__view = editor.textview return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.unregister_object(self) del self return False def __sensitive(self, sensitive): self.__swin.props.sensitive = sensitive return False def __quit_cb(self, *args): self.__destroy() return False def __busy_cb(self, editor, busy): self.__sensitive(not busy) return False def __ready_cb(self, *args): self.__sensitive(True) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/ResponsivenessManager.py0000644000175000017500000000164211242100540024201 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "quit", self.__quit_cb) self.connect(self.__view, "move-cursor", self.__response_cb) self.connect(self.__view, "move-cursor", self.__response_cb, True) self.connect(self.__view, "scroll-event", self.__response_cb) self.connect(self.__view, "scroll-event", self.__response_cb, True) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __quit_cb(self, *args): from gobject import idle_add idle_add(self.__destroy) return False def __response_cb(self, *args): self.__editor.refresh(False) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/Makefile.in0000644000175000017500000004763411242100540021366 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI/MainGUI/View DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(view_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(viewdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = DatabaseListeners viewdir = $(pythondir)/SCRIBES/GUI/MainGUI/View view_PYTHON = \ __init__.py \ Manager.py \ View.py \ Refresher.py \ SensitivityManager.py \ ReadonlyManager.py \ SpellChecker.py \ ResponsivenessManager.py \ PopupMenuManager.py \ DragAndDrop.py \ FileLoadingUpdater.py \ FullscreenManager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/View/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/MainGUI/View/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-viewPYTHON: $(view_PYTHON) @$(NORMAL_INSTALL) test -z "$(viewdir)" || $(MKDIR_P) "$(DESTDIR)$(viewdir)" @list='$(view_PYTHON)'; dlist=; list2=; test -n "$(viewdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(viewdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(viewdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(viewdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(viewdir)" $$dlist; \ fi; \ else :; fi uninstall-viewPYTHON: @$(NORMAL_UNINSTALL) @list='$(view_PYTHON)'; test -n "$(viewdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(viewdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(viewdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(viewdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(viewdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(viewdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(viewdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(viewdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-viewPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-viewPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-viewPYTHON installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-viewPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/PopupMenuManager.py0000644000175000017500000000374311242100540023107 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.textview.connect_after("populate-popup", self.__popup_cb) self.__sigid3 = editor.connect("add-to-popup", self.__add_to_popup_cb) self.__sigid4 = editor.textview.connect("focus-in-event", self.__focus_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__menu = None self.__items = [] return def __sort_items(self, menuitem): self.__items.append(menuitem) items = [] # items = [(menuitem.props.name, menuitem) for menuitem in self.__items] for menuitem in self.__items: items.append((menuitem.props.name, menuitem)) items.sort() items.reverse() # self.__items = [menuitem[1] for menuitem in items] self.__items = [] for menuitem in items: self.__items.append(menuitem[1]) return False def __generate_menu(self, menu): if not self.__items: return False from gtk import SeparatorMenuItem menu.insert(SeparatorMenuItem(), 0) for menuitem in self.__items: if menuitem.props.name == "AboutMenuitem": menu.append(SeparatorMenuItem()) menu.append(menuitem) menuitem.show() else: menu.prepend(menuitem) menuitem.show() menu.show_all() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor.textview) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor.textview) self.__editor.unregister_object(self) del self self = None return False def __quit_cb(self, *args): self.__destroy() return False def __popup_cb(self, textview, menu): self.__generate_menu(menu) return True def __add_to_popup_cb(self, editor, menuitem): self.__sort_items(menuitem) return False def __focus_cb(self, *args): self.__items = [] return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/SpellChecker.py0000644000175000017500000000366111242100540022227 0ustar andreasandreasclass Checker(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("enable-spell-checking", self.__checking_cb) self.__sigid3 = editor.connect("load-error", self.__check_cb) self.__sigid4 = editor.connect("checking-file", self.__check_cb) self.__sigid5 = editor.connect("renamed-file", self.__check_cb) self.__set() editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview self.__checker = None return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self return False def __set(self): from SCRIBES.SpellCheckMetadata import get_value language = self.__editor.language language = language if language else "plain text" self.__enable() if get_value(language) else self.__disable() return False def __enable(self): try: from gobject import GError from gtkspell import Spell from locale import getdefaultlocale if self.__checker: return False self.__checker = Spell(self.__view, getdefaultlocale()[0]) except GError: pass return False def __disable(self): if self.__checker: self.__checker.detach() return False def __quit_cb(self, *args): self.__destroy() return False def __checking_cb(self, editor, enable): from gobject import idle_add, PRIORITY_LOW idle_add(self.__enable if enable else self.__disable, priority=PRIORITY_LOW) return False def __check_cb(self, *args): from gobject import idle_add, PRIORITY_LOW idle_add(self.__set, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/DragAndDrop.py0000644000175000017500000000265711242100540022014 0ustar andreasandreasclass DragAndDrop(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__view.connect("drag-motion", self.__motion_cb) self.__sigid3 = self.__view.connect("drag-drop", self.__drop_cb) self.__sigid4 = self.__view.connect("drag-data-received", self.__received_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__view) self.__editor.disconnect_signal(self.__sigid3, self.__view) self.__editor.disconnect_signal(self.__sigid4, self.__view) self.__editor.unregister_object(self) del self self = None return False def __quit_cb(self, *args): self.__destroy() return False def __motion_cb(self, textview, context, x, y, time): if "text/uri-list" in context.targets: return True return False def __drop_cb(self, textview, context, x, y, time): if "text/uri-list" in context.targets: return True return False def __received_cb(self, textview, context, x, y, data, info, time): if not ("text/uri-list" in context.targets): return False if info != 80: return False uri_list = list(data.get_uris()) self.__editor.open_files(uri_list, "utf-8") context.finish(True, False, time) return True scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/Manager.py0000644000175000017500000000125111242100540021226 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): from View import View View(editor) from FileLoadingUpdater import Updater Updater(editor) from Refresher import Refresher Refresher(editor) from SensitivityManager import Manager Manager(editor) from ResponsivenessManager import Manager Manager(editor) from ReadonlyManager import Manager Manager(editor) from DragAndDrop import DragAndDrop DragAndDrop(editor) from PopupMenuManager import Manager Manager(editor) from SpellChecker import Checker Checker(editor) from FullscreenManager import Manager Manager(editor) from DatabaseListeners.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/FullscreenManager.py0000644000175000017500000000346711242100540023264 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "fullscreen", self.__fullscreen_cb, True) self.connect(editor, "quit", self.__quit_cb) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview self.__justification = self.__view.get_justification() self.__lmargin = self.__view.get_left_margin() self.__rmargin = self.__view.get_right_margin() return False def __destroy(self): self.disconnect() del self return False def __update(self, fullscreen): self.__editor.freeze() self.__view.set_property("show-right-margin", False if fullscreen else self.__margin()) self.__view.set_property("show-line-numbers", False if fullscreen else True) self.__view.set_property("highlight-current-line", False if fullscreen else True) self.__view.set_left_margin(self.__adjust_margin() if fullscreen else self.__lmargin) self.__view.set_right_margin(self.__adjust_margin() if fullscreen else self.__rmargin) from gobject import idle_add idle_add(self.__move_view_to_cursor) return False def __move_view_to_cursor(self): self.__editor.move_view_to_cursor(True) self.__editor.thaw() return False def __adjust_margin(self): width = self.__view.get_visible_rect()[2] return int(0.25 * width) def __margin(self): language = self.__editor.language language = language if language else "plain text" from SCRIBES.DisplayRightMarginMetadata import get_value as show_margin return show_margin(language) def __fullscreen_cb(self, editor, fullscreen): from gobject import idle_add idle_add(self.__update, fullscreen, priority=9999) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/Makefile.am0000644000175000017500000000055411242100540021343 0ustar andreasandreasSUBDIRS = DatabaseListeners viewdir = $(pythondir)/SCRIBES/GUI/MainGUI/View view_PYTHON = \ __init__.py \ Manager.py \ View.py \ Refresher.py \ SensitivityManager.py \ ReadonlyManager.py \ SpellChecker.py \ ResponsivenessManager.py \ PopupMenuManager.py \ DragAndDrop.py \ FileLoadingUpdater.py \ FullscreenManager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/View.py0000644000175000017500000000623511242100540020575 0ustar andreasandreasclass View(object): def __init__(self, editor): self.__init_attributes(editor) self.__add_view_to_scroll() self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("checking-file", self.__update_cb) self.__sigid3 = editor.connect_after("load-error", self.__update_cb) self.__sigid4 = editor.connect("renamed-file", self.__update_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from gtksourceview2 import View, Buffer self.__view = View(Buffer()) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self return False def __set_properties(self): from gtk import DEST_DEFAULT_ALL targets = [("text/uri-list", 0, 80)] from gtk.gdk import ACTION_COPY self.__view.set_pixels_above_lines(2) self.__view.set_pixels_below_lines(2) self.__view.set_pixels_inside_wrap(2) self.__view.drag_dest_set(DEST_DEFAULT_ALL, targets, ACTION_COPY) self.__view.drag_dest_add_text_targets() self.__view.set_property("can-focus", True) self.__view.set_property("auto-indent", True) self.__view.set_property("highlight-current-line", True) self.__view.set_property("show-line-numbers", True) self.__view.set_property("indent-width", -1) from gtksourceview2 import SMART_HOME_END_BEFORE self.__view.set_property("smart-home-end", SMART_HOME_END_BEFORE) self.__update_view() self.__view.set_property("sensitive", True) return False def __update_view(self): language = self.__editor.language language = language if language else "plain text" from SCRIBES.TabWidthMetadata import get_value as tab_width self.__view.set_property("tab-width", tab_width(language)) from SCRIBES.MarginPositionMetadata import get_value as margin_position self.__view.set_property("right-margin-position", margin_position(language)) from SCRIBES.DisplayRightMarginMetadata import get_value as show_margin self.__view.set_property("show-right-margin", show_margin(language)) from SCRIBES.UseTabsMetadata import get_value as use_tabs self.__view.set_property("insert-spaces-instead-of-tabs",(not use_tabs(language))) from SCRIBES.FontMetadata import get_value as font_name from pango import FontDescription font = FontDescription(font_name(language)) self.__view.modify_font(font) from gtk import WRAP_WORD_CHAR, WRAP_NONE from SCRIBES.TextWrappingMetadata import get_value as wrap_mode_bool wrap_mode = self.__view.set_wrap_mode wrap_mode(WRAP_WORD_CHAR) if wrap_mode_bool(language) else wrap_mode(WRAP_NONE) self.__view.grab_focus() return False def __add_view_to_scroll(self): swin = self.__editor.gui.get_widget("ScrolledWindow") swin.add(self.__view) swin.show_all() self.__view.grab_focus() return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update_view) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/Refresher.py0000644000175000017500000000161011242100540021600 0ustar andreasandreasfrom gtk import events_pending, main_iteration from SCRIBES.SignalConnectionManager import SignalManager class Refresher(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) self.connect(editor, "post-quit", self.__quit_cb) self.connect(editor, "refresh", self.__refresh_cb, True) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview return def __destroy(self): self.disconnect() del self return def __quit_cb(self, *args): from gobject import idle_add idle_add(self.__destroy) return False def __refresh_cb(self, editor, grab_focus): while events_pending(): main_iteration(False) self.__view.window.process_updates(True) while events_pending(): main_iteration(False) if grab_focus: self.__view.grab_focus() while events_pending(): main_iteration(False) return False scribes-0.4~r910/SCRIBES/GUI/MainGUI/View/ReadonlyManager.py0000644000175000017500000000176411242100540022735 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("readonly", self.__readonly_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__view = editor.textview return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __set(self, readonly): self.__view.props.editable = not readonly self.__view.props.highlight_current_line = not readonly self.__view.props.show_line_numbers = not readonly self.__view.props.cursor_visible = not readonly return False def __quit_cb(self, *args): self.__destroy() return False def __readonly_cb(self, editor, readonly): from gobject import idle_add idle_add(self.__set, readonly) return False scribes-0.4~r910/SCRIBES/GUI/Makefile.in0000644000175000017500000004720211242100540017212 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/GUI DIST_COMMON = $(gui_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(guidir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = MainGUI InformationWindow guidir = $(pythondir)/SCRIBES/GUI gui_PYTHON = \ __init__.py \ Manager.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/GUI/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/GUI/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-guiPYTHON: $(gui_PYTHON) @$(NORMAL_INSTALL) test -z "$(guidir)" || $(MKDIR_P) "$(DESTDIR)$(guidir)" @list='$(gui_PYTHON)'; dlist=; list2=; test -n "$(guidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(guidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(guidir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(guidir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(guidir)" $$dlist; \ fi; \ else :; fi uninstall-guiPYTHON: @$(NORMAL_UNINSTALL) @list='$(gui_PYTHON)'; test -n "$(guidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(guidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-guiPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-guiPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-guiPYTHON \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-guiPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/GUI/Manager.py0000644000175000017500000000027111242100540017064 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): from MainGUI.Manager import Manager Manager(editor, uri) from InformationWindow.Manager import Manager Manager(editor) scribes-0.4~r910/SCRIBES/GUI/Makefile.am0000644000175000017500000000022311242100540017171 0ustar andreasandreasSUBDIRS = MainGUI InformationWindow guidir = $(pythondir)/SCRIBES/GUI gui_PYTHON = \ __init__.py \ Manager.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/LanguagePluginManager.py0000644000175000017500000001375011242100540021271 0ustar andreasandreasclass Manager(object): def __init__(self, editor): try: from Exceptions import PluginFolderNotFoundError self.__init_attributes(editor) self.__check_plugin_folders() self.__set_plugin_search_path() if editor.contains_document: self.__load_plugins() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("loaded-file", self.__reload_cb) self.__sigid3 = editor.connect("renamed-file", self.__reload_cb) self.__sigid4 = editor.connect("reload-file", self.__reload_cb) editor.register_object(self) except PluginFolderNotFoundError: print "Error: No language plugin folder found" def __init_attributes(self, editor): self.__editor = editor # A set of initialized plugins. Each element in the set is a # tuple with format (plugin_name, plugin_version, plugin_object). self.__plugin_objects = set([]) # A set of all plugin modules. Each element in the set is a tuple # with the format, (plugin_name, plugin_version, module_object). self.__plugin_modules = set([]) return def __check_plugin_folders(self): from os import makedirs, path from Exceptions import PluginFolderNotFoundError filename = path.join(self.__editor.core_language_plugin_folder, "__init__.py") if not path.exists(filename): raise PluginFolderNotFoundError filename = path.join(self.__editor.home_language_plugin_folder, "__init__.py") if path.exists(filename): return try: makedirs(self.__editor.home_language_plugin_folder) except OSError: pass try: handle = open(filename, "w") handle.close() except IOError: raise PluginFolderNotFoundError return def __destroy(self): self.__unload_plugins() self.__plugin_modules.clear() self.__plugin_objects.clear() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return def __set_plugin_search_path(self): from sys import path if not (self.__editor.core_language_plugin_folder in path): path.insert(0, self.__editor.core_language_plugin_folder) if not (self.__editor.home_language_plugin_folder in path): path.insert(0, self.__editor.home_language_plugin_folder) return def __get_module_info(self, module): try: if not hasattr(module, "autoload"): raise Exception if not getattr(module, "autoload"): raise ValueError if not hasattr(module, "languages"): raise Exception languages = getattr(module, "languages") if hasattr(module, "version") is False: raise Exception plugin_version = getattr(module, "version") if hasattr(module, "class_name") is False: raise Exception plugin_name = class_name = getattr(module, "class_name") if hasattr(module, class_name) is False: raise Exception PluginClass = getattr(module, class_name) if hasattr(PluginClass, "__init__") is False: raise Exception if hasattr(PluginClass, "load") is False: raise Exception if hasattr(PluginClass, "unload") is False: raise Exception except ValueError: from Exceptions import DoNotLoadError raise DoNotLoadError except: from Exceptions import PluginModuleValidationError raise PluginModuleValidationError return plugin_name, plugin_version, PluginClass, languages def __unload_duplicate_plugins(self, name, version): for info in self.__plugin_objects.copy(): if name in info: if (version > info[1]): info[2].unload() self.__plugin_objects.remove(info) else: from Exceptions import DuplicatePluginError raise DuplicatePluginError break return def __init_module(self, filename, plugin_folder): from Exceptions import PluginModuleValidationError from Exceptions import DuplicatePluginError, DoNotLoadError from Exceptions import InvalidLanguagePluginError try: if not (filename.startswith("Plugin") and filename.endswith(".py")): return False from os import path filepath = path.join(plugin_folder, filename) from imp import load_source module = load_source(filename[:-3], filepath) plugin_name, plugin_version, PluginClass, languages = self.__get_module_info(module) if not (self.__editor.language in languages): raise InvalidLanguagePluginError self.__plugin_modules.add(module) self.__unload_duplicate_plugins(plugin_name, plugin_version) plugin_object = self.__load_plugin(PluginClass) self.__plugin_objects.add((plugin_name, plugin_version, plugin_object)) except InvalidLanguagePluginError: pass except PluginModuleValidationError: print "Validation Error: ", filename except DuplicatePluginError: print "Duplicate Plugin: ", (plugin_name, plugin_version) except DoNotLoadError: #print "Not loading: ", (filename) self.__plugin_modules.add(module) return False def __load_plugin(self, PluginClass): plugin_object = PluginClass(self.__editor) plugin_object.load() return plugin_object def __unload_plugin(self, plugin_info): plugin_object = plugin_info[2] plugin_object.unload() self.__plugin_objects.remove(plugin_info) return False def __load_plugins(self): if self.__editor.language is None: return False cl_folder = self.__editor.core_language_plugin_folder hl_folder = self.__editor.home_language_plugin_folder init_module = self.__init_module from os import listdir core_files = listdir(cl_folder) from gobject import idle_add for filename in core_files: idle_add(init_module, filename, cl_folder, priority=9999) home_files = listdir(hl_folder) for filename in home_files: idle_add(init_module, filename, hl_folder, priority=9999) return False def __unload_plugins(self): for plugin in self.__plugin_objects.copy(): self.__unload_plugin(plugin) return False def __reload_plugins(self): self.__unload_plugins() self.__load_plugins() return False def __reload_cb(self, *args): self.__reload_plugins() return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/SchemeManager.py0000644000175000017500000000355111242100540017571 0ustar andreasandreasclass Manager(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("ready", self.__update_cb) self.__sigid3 = editor.connect("loaded-file", self.__update_cb) self.__sigid4 = editor.connect("renamed-file", self.__update_cb) self.__set() self.__update_search_path() self.__editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor from gtksourceview2 import style_scheme_manager_get_default self.__manager = style_scheme_manager_get_default() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __set(self): self.__editor.set_data("style_scheme_manager", self.__manager) return False def __get_style_path(self, base_path): from os.path import join, exists path_ = join(self.__editor.home_folder, base_path) return path_ if exists(path_) else None def __update_search_path(self): from os.path import join gedit_path = self.__get_style_path(join(".gnome2", "gedit", "styles")) scribes_path = self.__get_style_path(join(self.__editor.metadata_folder, "styles")) search_paths = self.__manager.get_search_path() if gedit_path and not (gedit_path in search_paths): self.__manager.prepend_search_path(gedit_path) if scribes_path and not (scribes_path in search_paths): self.__manager.prepend_search_path(scribes_path) self.__manager.force_rescan() return def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): self.__update_search_path() return False scribes-0.4~r910/SCRIBES/SaveProcessorDBusService.py0000644000175000017500000000155511242100540021771 0ustar andreasandreasfrom dbus.service import Object, method, BusName, signal dbus_service = "org.sourceforge.ScribesSaveProcessor" dbus_path = "/org/sourceforge/ScribesSaveProcessor" class DBusService(Object): def __init__(self, processor): from Globals import session_bus as session bus_name = BusName(dbus_service, bus=session) Object.__init__(self, bus_name, dbus_path) self.__processor = processor @method(dbus_service) def process(self, session_id, text, uri, encoding): return self.__processor.save_file(session_id, text, uri, encoding) @method(dbus_service) def update(self, editor_id): return self.__processor.update(editor_id) @signal(dbus_service) def is_ready(self): return @signal(dbus_service) def saved_file(self, session_id, uri, encoding): return @signal(dbus_service) def error(self, session_id, uri, encoding, error_message, error_id): return scribes-0.4~r910/SCRIBES/DialogFilters.py0000644000175000017500000000204411242100540017616 0ustar andreasandreasfrom gettext import gettext as _ def create_filter(name="", mime="", pattern=""): from gtk import FileFilter filefilter = FileFilter() filefilter.set_name(name) filefilter.add_mime_type(mime) if pattern: filefilter.add_pattern(pattern) return filefilter def create_filter_list(): filter_list = [ create_filter(_("Text Documents"), "text/plain"), create_filter(_("Python Documents"), "text/x-python"), create_filter(_("Ruby Documents"), "text/x-ruby"), create_filter(_("Perl Documents"), "text/x-perl"), create_filter(_("C Documents"), "text/csrc"), create_filter(_("C++ Documents"), "text/c++src"), create_filter(_("C# Documents"), "text/csharp"), create_filter(_("Java Documents"), "text/x-java"), create_filter(_("PHP Documents"), "text/x-php"), create_filter(_("HTML Documents"), "text/html"), create_filter(_("XML Documents"), "text/xml"), create_filter(_("Haskell Documents"), "text/x-haskell"), create_filter(_("Scheme Documents"), "text/x-scheme"), create_filter(_("All Documents"), "", "*"), ] return filter_list scribes-0.4~r910/SCRIBES/ContentDetector.py0000644000175000017500000000267211242100540020201 0ustar andreasandreasclass Detector(object): def __init__(self, editor, uri): self.__init_attributes(editor) if uri: editor.set_data("contains_document", True) self.__sigid1 = editor.connect("checking-file", self.__checking_file_cb) self.__sigid2 = editor.connect("load-error", self.__load_error_cb) self.__sigid3 = editor.connect("modified-file", self.__checking_file_cb) self.__sigid4 = editor.connect("renamed-file", self.__checking_file_cb) self.__sigid5 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self return False def __set(self, contains_document, block_or_unblock_signal): self.__editor.set_data("contains_document", contains_document) block_or_unblock_signal(self.__sigid3) return False def __checking_file_cb(self, *args): self.__set(True, self.__editor.handler_block) return False def __load_error_cb(self, *args): self.__set(False, self.__editor.handler_unblock) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/ColorThemeMetadata.py0000644000175000017500000000064011242100540020570 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "ColorTheme.gdb") def get_value(): try: theme = "oblivion" database = open_database(basepath, "r") theme = database["theme"] except: pass finally: database.close() return theme def set_value(theme): try: database = open_database(basepath, "w") database["theme"] = theme finally: database.close() return scribes-0.4~r910/SCRIBES/EncodingSystem/0000755000175000017500000000000011242100540017447 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/__init__.py0000644000175000017500000000000011242100540021546 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/EncodingGuessListUpdater.py0000644000175000017500000000231111242100540024734 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("loaded-file", self.__update_cb) self.__sigid3 = editor.connect("renamed-file", self.__update_cb) self.__sigid4 = editor.connect("update-encoding-guess-list", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, encoding): encoding = self.__manager.format_encoding(encoding) from EncodingGuessListMetadata import set_value set_value(encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): from gobject import idle_add idle_add(self.__update, args[-1]) return False scribes-0.4~r910/SCRIBES/EncodingSystem/Utils.py0000644000175000017500000000026311242100540021122 0ustar andreasandreasdef format_encoding(encoding): utf8_encodings = ("utf-8", "utf8", "UTF8", "UTF-8", "Utf-8", None) if encoding in utf8_encodings: return "utf-8" return encoding.strip().lower() scribes-0.4~r910/SCRIBES/EncodingSystem/Makefile.in0000644000175000017500000005024411242100540021521 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem DIST_COMMON = $(encodingsystem_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(encodingsystemdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = SupportedEncodings ComboBoxData Error encodingsystemdir = $(pythondir)/SCRIBES/EncodingSystem encodingsystem_PYTHON = \ __init__.py \ Manager.py \ Utils.py \ EncodingGuessListUpdater.py \ EncodingListUpdater.py \ FileEncodingsUpdater.py \ EncodingGuessListMetadata.py \ EncodingListMetadata.py \ FileEncodingsMetadata.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-encodingsystemPYTHON: $(encodingsystem_PYTHON) @$(NORMAL_INSTALL) test -z "$(encodingsystemdir)" || $(MKDIR_P) "$(DESTDIR)$(encodingsystemdir)" @list='$(encodingsystem_PYTHON)'; dlist=; list2=; test -n "$(encodingsystemdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(encodingsystemdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(encodingsystemdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(encodingsystemdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(encodingsystemdir)" $$dlist; \ fi; \ else :; fi uninstall-encodingsystemPYTHON: @$(NORMAL_UNINSTALL) @list='$(encodingsystem_PYTHON)'; test -n "$(encodingsystemdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(encodingsystemdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(encodingsystemdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(encodingsystemdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(encodingsystemdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(encodingsystemdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(encodingsystemdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(encodingsystemdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-encodingsystemPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-encodingsystemPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-encodingsystemPYTHON install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-encodingsystemPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/EncodingListUpdater.py0000644000175000017500000000161711242100540023735 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("new-encoding-list", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update(self, encodings): from EncodingListMetadata import set_value set_value(encodings) return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, editor, encodings): from gobject import idle_add idle_add(self.__update, encodings) return False scribes-0.4~r910/SCRIBES/EncodingSystem/FileEncodingsUpdater.py0000644000175000017500000000310711242100540024060 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("loaded-file", self.__encoding_cb) self.__sigid2 = editor.connect("saved-file", self.__update_cb) self.__sigid3 = editor.connect("renamed-file", self.__update_cb) self.__sigid4 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__encoding = "utf-8" return def __update(self, uri, encoding): encoding = self.__manager.format_encoding(encoding) if encoding == self.__encoding: return False self.__encoding = encoding from FileEncodingsMetadata import set_value set_value(uri, encoding) return False def __update_encoding(self, uri): from FileEncodingsMetadata import get_value self.__encoding = get_value(uri) return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __update_cb(self, editor, uri, encoding): from gobject import idle_add idle_add(self.__update, uri, encoding) return False def __encoding_cb(self, editor, uri, *args): from gobject import idle_add idle_add(self.__update_encoding, uri) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/0000755000175000017500000000000011242100540021751 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/__init__.py0000644000175000017500000000000011242100540024050 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/Makefile.in0000644000175000017500000003157611242100540024032 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/ComboBoxData DIST_COMMON = $(comboboxdata_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(comboboxdatadir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ comboboxdatadir = $(pythondir)/SCRIBES/EncodingSystem/ComboBoxData comboboxdata_PYTHON = \ __init__.py \ Manager.py \ Generator.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/ComboBoxData/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/ComboBoxData/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-comboboxdataPYTHON: $(comboboxdata_PYTHON) @$(NORMAL_INSTALL) test -z "$(comboboxdatadir)" || $(MKDIR_P) "$(DESTDIR)$(comboboxdatadir)" @list='$(comboboxdata_PYTHON)'; dlist=; list2=; test -n "$(comboboxdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(comboboxdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(comboboxdatadir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(comboboxdatadir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(comboboxdatadir)" $$dlist; \ fi; \ else :; fi uninstall-comboboxdataPYTHON: @$(NORMAL_UNINSTALL) @list='$(comboboxdata_PYTHON)'; test -n "$(comboboxdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(comboboxdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(comboboxdatadir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(comboboxdatadir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(comboboxdatadir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(comboboxdatadir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(comboboxdatadir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(comboboxdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-comboboxdataPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-comboboxdataPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-comboboxdataPYTHON \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-comboboxdataPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/Generator.py0000644000175000017500000000371511242100540024257 0ustar andreasandreasfrom gettext import gettext as _ class Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("combobox-encoding-data?", self.__query_cb) self.__sigid3 = manager.connect("encoding-list", self.__encoding_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__supported_encodings = editor.supported_encodings self.__manager = manager self.__encoding_data = [] return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.unregister_object(self) del self self = None return def __generate_and_send_encoding_data(self, encodings): data = self.__reformat_data_for_display(encodings) data.insert(0, (_("Recommended") + " (UTF-8)", "utf-8")) self.__data = data self.__send_combobox_encoding_data() return False def __reformat_data_for_display(self, encodings): return [self.__extract_data(encoding) for encoding in encodings] def __extract_data(self, encoding): for codec, alias, language in self.__supported_encodings: if codec != encoding: continue data = self.__construct_data(codec, alias, language) break return data def __construct_data(self, codec, alias, language): return language + " (" + codec + ")", alias def __send_combobox_encoding_data(self): self.__editor.emit("combobox-encoding-data", self.__data) return False def __quit_cb(self, *args): self.__destroy() return False def __query_cb(self, *args): from gobject import idle_add idle_add(self.__send_combobox_encoding_data) return False def __encoding_cb(self, manager, encodings): from gobject import idle_add idle_add(self.__generate_and_send_encoding_data, encodings) return False scribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/Manager.py0000644000175000017500000000124211242100540023674 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE, TYPE_PYOBJECT from gobject import TYPE_OBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "database-changed": (SSIGNAL, TYPE_NONE, ()), "encoding-list": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) from Generator import Generator Generator(self, editor) from ..SupportedEncodings.EncodingListDispatcher import Dispatcher Dispatcher(self, editor) from ..SupportedEncodings.EncodingListDatabaseMonitor import Monitor Monitor(self, editor) scribes-0.4~r910/SCRIBES/EncodingSystem/ComboBoxData/Makefile.am0000644000175000017500000000025211242100540024004 0ustar andreasandreascomboboxdatadir = $(pythondir)/SCRIBES/EncodingSystem/ComboBoxData comboboxdata_PYTHON = \ __init__.py \ Manager.py \ Generator.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/Manager.py0000644000175000017500000000104511242100540021373 0ustar andreasandreasclass Manager(object): def __init__(self, editor): from Error.Trigger import Trigger Trigger(editor) from SupportedEncodings.Trigger import Trigger Trigger(editor) from FileEncodingsUpdater import Updater Updater(self, editor) from EncodingGuessListUpdater import Updater Updater(self, editor) from EncodingListUpdater import Updater Updater(self, editor) from ComboBoxData.Manager import Manager Manager(editor) def format_encoding(self, encoding): from Utils import format_encoding return format_encoding(encoding) scribes-0.4~r910/SCRIBES/EncodingSystem/Makefile.am0000644000175000017500000000056711242100540021513 0ustar andreasandreasSUBDIRS = SupportedEncodings ComboBoxData Error encodingsystemdir = $(pythondir)/SCRIBES/EncodingSystem encodingsystem_PYTHON = \ __init__.py \ Manager.py \ Utils.py \ EncodingGuessListUpdater.py \ EncodingListUpdater.py \ FileEncodingsUpdater.py \ EncodingGuessListMetadata.py \ EncodingListMetadata.py \ FileEncodingsMetadata.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/FileEncodingsMetadata.py0000644000175000017500000000131611242100540024174 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "FileEncodings.gdb") def get_value(uri): try: encoding = "utf-8" database = open_database(basepath, "r") encoding = database[str(uri)] except KeyError: pass finally: database.close() return encoding def set_value(uri, encoding): try: database = open_database(basepath, "w") database[str(uri)] = encoding __remove_utf8_uris(database) finally: database.close() return def __remove_utf8_uris(database): # Remove uris with utf-8 encodings. We don't need them. utf8_uris = [uri for uri, encoding in database.iteritems() if encoding =="utf-8"] for uri in utf8_uris: del database[str(uri)] return scribes-0.4~r910/SCRIBES/EncodingSystem/EncodingGuessListMetadata.py0000644000175000017500000000116111242100540025052 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "EncodingGuessList.gdb") def get_value(): try: encodings = [] database = open_database(basepath, "r") encodings = database["encodings"] except KeyError: pass finally: database.close() return encodings def set_value(encoding): try: database = None if encoding == "utf-8": return encodings = get_value() if encoding in encodings: return encodings.append(encoding) database = open_database(basepath, "w") database["encodings"] = encodings finally: if database is not None: database.close() return scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/0000755000175000017500000000000011242100540023266 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/__init__.py0000644000175000017500000000000011242100540025365 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Utils.py0000644000175000017500000000000011242100540024726 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Makefile.in0000644000175000017500000005042211242100540025336 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/SupportedEncodings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(supportedencodings_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(supportedencodingsdir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = GUI supportedencodingsdir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings supportedencodings_PYTHON = \ __init__.py \ Trigger.py \ Manager.py \ Encodings.py \ EncodingListDatabaseMonitor.py \ EncodingListDispatcher.py \ EncodingListDatabaseUpdater.py \ Utils.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-supportedencodingsPYTHON: $(supportedencodings_PYTHON) @$(NORMAL_INSTALL) test -z "$(supportedencodingsdir)" || $(MKDIR_P) "$(DESTDIR)$(supportedencodingsdir)" @list='$(supportedencodings_PYTHON)'; dlist=; list2=; test -n "$(supportedencodingsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(supportedencodingsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(supportedencodingsdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(supportedencodingsdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(supportedencodingsdir)" $$dlist; \ fi; \ else :; fi uninstall-supportedencodingsPYTHON: @$(NORMAL_UNINSTALL) @list='$(supportedencodings_PYTHON)'; test -n "$(supportedencodingsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(supportedencodingsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(supportedencodingsdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(supportedencodingsdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(supportedencodingsdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(supportedencodingsdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(supportedencodingsdir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(supportedencodingsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-supportedencodingsPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-supportedencodingsPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-supportedencodingsPYTHON installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-supportedencodingsPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Trigger.py0000644000175000017500000000177511242100540025255 0ustar andreasandreasclass Trigger(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("supported-encodings-window", self.__activate_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__manager = None return def __destroy(self): if self.__manager: self.__manager.destroy() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __activate(self): try: self.__manager.activate() except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate() return False def __quit_cb(self, *args): self.__destroy() return False def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__activate, priority=9999) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/EncodingListDatabaseMonitor.py0000644000175000017500000000162711242100540031225 0ustar andreasandreasclass Monitor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__monitor.connect("changed", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager from os.path import join database = join(editor.metadata_folder, "Preferences", "EncodingList.gdb") self.__monitor = editor.get_file_monitor(database) return def __destroy(self): self.__monitor.cancel() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, *args): if not self.__editor.monitor_events(args, (0,2,3)): return False self.__manager.emit("database-changed") return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/EncodingListDatabaseUpdater.py0000644000175000017500000000164411242100540031201 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("selected-encodings", self.__encodings_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.unregister_object(self) del self self = None return def __update(self, encodings): from ..EncodingListMetadata import set_value set_value(encodings) return False def __quit_cb(self, *args): self.__destroy() return False def __encodings_cb(self, manager, encodings): from gobject import idle_add idle_add(self.__update, encodings, priority=9999) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Manager.py0000644000175000017500000000247011242100540025215 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE, TYPE_PYOBJECT from gobject import TYPE_OBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, ()), "database-changed": (SSIGNAL, TYPE_NONE, ()), "encoding-list": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "selected-encodings": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "model-data": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "updated-model": (SSIGNAL, TYPE_NONE, ()), "toggled-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from EncodingListDispatcher import Dispatcher Dispatcher(self, editor) from EncodingListDatabaseMonitor import Monitor Monitor(self, editor) from EncodingListDatabaseUpdater import Updater Updater(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join self.__gui = editor.get_glade_object(globals(), join("GUI", "GUI.glade"), "Window") return gui = property(lambda self: self.__gui) def activate(self): self.emit("activate") return False def destroy(self): del self return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Makefile.am0000644000175000017500000000050311242100540025320 0ustar andreasandreasSUBDIRS = GUI supportedencodingsdir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings supportedencodings_PYTHON = \ __init__.py \ Trigger.py \ Manager.py \ Encodings.py \ EncodingListDatabaseMonitor.py \ EncodingListDispatcher.py \ EncodingListDatabaseUpdater.py \ Utils.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/Encodings.py0000644000175000017500000000757511242100540025567 0ustar andreasandreasfrom gettext import gettext as _ encodings = ( # Codec Alias Language ("ISO-8859-1", "iso-8859-1", _("West Europe")), ("ISO-8859-2", "iso-8859-2", _("Central and Eastern Europe")), ("ISO-8859-3", "iso-8859-3", _("Esperanto, Maltese")), ("ISO-8859-4", "iso-8859-4", _("Baltic Languages")), ("ISO-8859-5", "iso-8859-5", _("Bulgarian, Macedonian, Russian, Serbian")), ("ISO-8859-6", "iso-8859-6", _("Arabic")), ("ISO-8859-7", "iso-8859-7", _("Greek")), ("ISO-8859-8", "iso-8859-8", _("Hebrew")), ("ISO-8859-9", "iso-8859-9", _("Turkish")), ("ISO-8859-10", "iso-8859-10", _("Nordic Languages")), ("ISO-8859-13", "iso-8859-13", _("Baltic Languages")), ("ISO-8859-14", "iso-8859-14", _("Celtic Languages")), ("ISO-8859-15", "iso-8859-15", _("Western Europe")), ("ISO-2022-JP", "iso2022jp", _("Japanese")), ("ISO-2022-jp-1", "iso2022jp-1", _("Japanese")), ("ISO-2022-JP-2", "iso2022jp-2", _("Japanese, Chinese, Simplified Chinese")), ("ISO-2022-JP-2004", "iso2022jp-2004", _("Japanese")), ("ISO-2022-JP-3", "iso2022jp-3", _("Japanese")), ("ISO-2022-JP-EXT", "iso2022jp-ext", _("Japanese")), ("ISO-2022-KR", "csiso2022kr", _("Korean")), ("BIG5", "csbig5", _("Traditional Chinese")), ("BIG5HKSCS", "hkscs", _("Traditional Chinese")), ("SHIFT-JIS", "sjis", _("Japanese")), ("SHIFT-JIS-2004", "sjis2004", _("Japanese")), ("SHIFT-JISX0213", "sjisx0213", _("Japanese")), ("KOI8-R", "koi8_r", _("Russian")), ("KOI8-U", "koi8_u", _("Ukranian")), ("CP037", "IBM039", _("English")), ("CP424", "IBM424", _("Hebrew")), ("CP437", "437", _("English")), ("CP500", "IBM500", _("Western Europe")), ("CP737", "cp737", _("Greek")), ("CP775", "IBM775", _("Baltic Languages")), ("CP850", "IBM850", _("Western Europe")), ("CP852", "IBM852", _("Central and Eastern Europe")), ("CP855", "IBM855", _("Bulgarian, Macedonian, Russian, ")), ("CP856", "cp856", _("Hebrew")), ("CP857", "IBM857", _("Turkish")), ("CP860", "IBM860", _("Portuguese")), ("CP861", "IBM861", _("Icelandic")), ("CP862", "IBM862", _("Hebrew")), ("CP863", "IBM863", _("Canadian")), ("CP864", "IBM864", _("Arabic")), ("CP865", "IBM865", _("Danish, Norwegian")), ("CP866", "IBM866", _("Russian")), ("CP869", "IBM869", _("Greek")), ("CP874", "cp874", _("Thai")), ("CP875", "cp875", _("Greek")), ("CP932", "mskanji", _("Japanese")), ("CP949", "uhc", _("Korean")), ("CP950", "ms950", _("Traditional Chinese")), ("CP1006", "cp1006", _("Urdu")), ("CP1026", "ibm1026", _("Turkish")), ("CP1140", "ibm1140", _("Western Europe")), ("CP1250", "windows-1250", _("Central and Eastern Europe")), ("CP1251", "windows-1251", _("Bulgarian, Macedonian, Russian, Serbian")), ("CP1252", "windows-1252", _("Western Europe")), ("CP1253", "windows-1253", _("Greek")), ("CP1254", "windows-1254", _("Turkish")), ("CP1255", "windows-1255", _("Hebrew")), ("CP1256", "windows1256", _("Arabic")), ("CP1257", "windows-1257", _("Baltic Languages")), ("CP1258", "windows-1258", _("Vietnamese")), ("EUC-JP", "ujis", _("Japanese")), ("EUC-JIS-2004", "eucjis2004", _("Japanese")), ("EUC-JISX0213", "eucjisx0213", _("Japanese")), ("EUC-KR", "ksc5601", _("Korean")), ("GB2312", "euccn", _("Simplified Chinese")), ("GBK", "ms936", _("Unified Chinese")), ("GB18030", "gb18030-2000", _("Unified Chinese")), ("HZ", "hzgb", _("Simplified Chinese")), ("JOHAB", "cp1361", _("Korean")), ("MAC-CYRILLIC", "maccyrillic", _("Bulgarian, Macedonian, Russian, Serbian")), ("MAC-GREEK", "macgreek", _("Greek")), ("MAC-ICELAND", "maciceland", _("Icelandic")), ("MAC-LATIN2", "maccentraleurope", _("Central and Eastern Europe")), ("MAC-ROMAN", "macroman", _("Western Europe")), ("MAC-TURKISH", "macturkish", _("Turkish")), ("PTCP154", "cp154", _("Kazakh")), ("UTF-16", "utf16", _("All Languages")), ("UTF-16-BE", "UTF-16BE", _("All Languages (BMP ONLY)")), ("UTF-16-LE", "UTF-16LE", _("All Languages (BMP ONLY)")), ("UTF-7", "U7", _("All Languages")), ("ASCII", "us-ascii", _("English")), ) scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/0000755000175000017500000000000011242100540023712 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/__init__.py0000644000175000017500000000000011242100540026011 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile.in0000644000175000017500000005124211242100540025763 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/SupportedEncodings/GUI DIST_COMMON = $(gui_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(guidir)" "$(DESTDIR)$(guidir)" py_compile = $(top_srcdir)/py-compile DATA = $(gui_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Treeview guidir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings/GUI gui_PYTHON = \ __init__.py \ Manager.py \ Window.py gui_DATA = GUI.glade EXTRA_DIST = GUI.glade all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-guiPYTHON: $(gui_PYTHON) @$(NORMAL_INSTALL) test -z "$(guidir)" || $(MKDIR_P) "$(DESTDIR)$(guidir)" @list='$(gui_PYTHON)'; dlist=; list2=; test -n "$(guidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(guidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(guidir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(guidir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(guidir)" $$dlist; \ fi; \ else :; fi uninstall-guiPYTHON: @$(NORMAL_UNINSTALL) @list='$(gui_PYTHON)'; test -n "$(guidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$fileso install-guiDATA: $(gui_DATA) @$(NORMAL_INSTALL) test -z "$(guidir)" || $(MKDIR_P) "$(DESTDIR)$(guidir)" @list='$(gui_DATA)'; test -n "$(guidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(guidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(guidir)" || exit $$?; \ done uninstall-guiDATA: @$(NORMAL_UNINSTALL) @list='$(gui_DATA)'; test -n "$(guidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(guidir)" "$(DESTDIR)$(guidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-guiDATA install-guiPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-guiDATA uninstall-guiPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-guiDATA \ install-guiPYTHON install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-guiDATA uninstall-guiPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/GUI.glade0000644000175000017500000000510411242100540025334 0ustar andreasandreas False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 Select Encodings ScribesEncodingSelectionWindowRole ScribesEncodingSelectionWindowID True GTK_WIN_POS_CENTER_ON_PARENT 640 480 True Scribes GDK_WINDOW_TYPE_HINT_DIALOG True True True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_RESIZE_IMMEDIATE GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True False GTK_TREE_VIEW_GRID_LINES_VERTICAL scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Manager.py0000644000175000017500000000026611242100540025642 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from Treeview.Manager import Manager Manager(manager, editor) scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Makefile.am0000644000175000017500000000033611242100540025750 0ustar andreasandreasSUBDIRS = Treeview guidir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings/GUI gui_PYTHON = \ __init__.py \ Manager.py \ Window.py gui_DATA = GUI.glade EXTRA_DIST = GUI.glade clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Window.py0000644000175000017500000000313511242100540025535 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid3 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid4 = manager.connect("activate", self.__activate_cb) self.__window.set_property("sensitive", True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_widget("Window") return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__window) self.__editor.disconnect_signal(self.__sigid3, self.__window) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __hide(self): self.__window.hide() return False def __show(self): self.__window.show_all() return False def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/0000755000175000017500000000000011242100540025504 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/__init__.py0000644000175000017500000000000011242100540027603 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile.in0000644000175000017500000003173011242100540027555 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(treeview_PYTHON) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(treeviewdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ treeviewdir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview treeview_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ ActiveEncodingRenderer.py \ ModelUpdater.py \ RowSelector.py \ ModelDataGenerator.py \ SelectedEncodingsExtractor.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-treeviewPYTHON: $(treeview_PYTHON) @$(NORMAL_INSTALL) test -z "$(treeviewdir)" || $(MKDIR_P) "$(DESTDIR)$(treeviewdir)" @list='$(treeview_PYTHON)'; dlist=; list2=; test -n "$(treeviewdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(treeviewdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(treeviewdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(treeviewdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(treeviewdir)" $$dlist; \ fi; \ else :; fi uninstall-treeviewPYTHON: @$(NORMAL_UNINSTALL) @list='$(treeview_PYTHON)'; test -n "$(treeviewdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(treeviewdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(treeviewdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(treeviewdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(treeviewdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(treeviewdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(treeviewdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(treeviewdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-treeviewPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-treeviewPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-treeviewPYTHON \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-treeviewPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Initializer.py0000644000175000017500000000467611242100540030356 0ustar andreasandreasfrom gettext import gettext as _ class Initializer(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_widget("TreeView") from ActiveEncodingRenderer import Renderer self.__renderer = Renderer(manager, editor) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __set_properties(self): from gtk import TreeView, CellRendererToggle, TreeViewColumn from gtk import TREE_VIEW_COLUMN_AUTOSIZE, CellRendererText from gtk import SORT_DESCENDING view = self.__view self.__renderer.set_property("activatable", True) # Create a column for selecting encodings. column = TreeViewColumn(_("Select"), self.__renderer) view.append_column(column) column.set_expand(False) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.add_attribute(self.__renderer, "active", 0) column.set_sort_indicator(True) column.set_sort_order(SORT_DESCENDING) column.set_sort_column_id(0) # Create a renderer for the character encoding column. renderer = CellRendererText() # Create a column for character encoding. column = TreeViewColumn(_("Character Encoding"), renderer, text=1) view.append_column(column) column.set_expand(True) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.set_sort_indicator(True) column.set_sort_order(SORT_DESCENDING) column.set_sort_column_id(1) # Create the renderer for the Language column renderer = CellRendererText() # Create a column for Language and Region and set the column's properties. column = TreeViewColumn(_("Language and Region"), renderer, text=2) view.append_column(column) column.set_expand(True) column.set_sizing(TREE_VIEW_COLUMN_AUTOSIZE) column.set_sort_indicator(True) column.set_sort_order(SORT_DESCENDING) column.set_sort_column_id(2) # Set treeview properties view.columns_autosize() view.set_model(self.__create_model()) #view.set_enable_search(True) return def __create_model(self): from gtk import ListStore from gobject import TYPE_BOOLEAN model = ListStore(TYPE_BOOLEAN, str, str) return model def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/ModelUpdater.py0000644000175000017500000000313011242100540030440 0ustar andreasandreasclass Updater(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("model-data", self.__model_cb) self.__sigid3 = manager.connect("encoding-list", self.__encodings_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_widget("TreeView") self.__model = self.__view.get_model() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __populate(self, data): self.__view.set_model(None) for active, encoding, language in data: self.__model.append([False, encoding, language]) self.__view.set_model(self.__model) return False def __update(self, encodings): self.__view.set_model(None) for row in xrange(len(self.__model)): treemodelrow = self.__model[row] value = True if treemodelrow[1] in encodings else False treemodelrow[0] = value self.__view.set_model(self.__model) self.__manager.emit("updated-model") return False def __quit_cb(self, *args): self.__destroy() return False def __model_cb(self, manager, data): self.__populate(data) return False def __encodings_cb(self, manager, encodings): from gobject import idle_add idle_add(self.__update, encodings) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/ModelDataGenerator.py0000644000175000017500000000101411242100540031553 0ustar andreasandreasclass Generator(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__generate() self.__destroy() def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): del self self = None return False def __generate(self): data = [] for encoding, alias, language in self.__editor.supported_encodings: data.append([False, encoding, language]) self.__manager.emit("model-data", data) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Manager.py0000644000175000017500000000063011242100540027427 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Initializer import Initializer Initializer(manager, editor) from SelectedEncodingsExtractor import Extractor Extractor(manager, editor) from RowSelector import Selector Selector(manager, editor) from ModelUpdater import Updater Updater(manager, editor) from ModelDataGenerator import Generator Generator(manager, editor) scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/Makefile.am0000644000175000017500000000046211242100540027542 0ustar andreasandreastreeviewdir = $(pythondir)/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview treeview_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ ActiveEncodingRenderer.py \ ModelUpdater.py \ RowSelector.py \ ModelDataGenerator.py \ SelectedEncodingsExtractor.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/RowSelector.py0000644000175000017500000000244111242100540030327 0ustar andreasandreasclass Selector(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("toggled-path", self.__path_cb) self.__sigid3 = manager.connect("updated-model", self.__updated_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_widget("TreeView") self.__model = self.__view.get_model() self.__column = self.__view.get_column(0) self.__path = 0 return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __select(self): self.__view.set_cursor(self.__path, self.__column) self.__path = 0 self.__view.set_property("sensitive", True) self.__view.grab_focus() return False def __quit_cb(self, *args): self.__destroy() return False def __path_cb(self, manager, path): self.__path = path return False def __updated_cb(self, *args): from gobject import idle_add idle_add(self.__select) return False ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/SelectedEncodingsExtractor.pyscribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/SelectedEncodingsExtractor.p0000644000175000017500000000211611242100540033143 0ustar andreasandreasclass Extractor(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("toggled-path", self.__toggled_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_widget("TreeView") self.__model = self.__view.get_model() return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __extract(self): encodings = [] for path in xrange(len(self.__model)): if not self.__model[path][0]: continue encodings.append(self.__model[path][1]) self.__manager.emit("selected-encodings", encodings) return False def __quit_cb(self, *args): self.__destroy() return False def __toggled_cb(self, *args): from gobject import idle_add idle_add(self.__extract) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/GUI/Treeview/ActiveEncodingRenderer.py0000644000175000017500000000216511242100540032433 0ustar andreasandreasfrom gtk import CellRendererToggle class Renderer(CellRendererToggle): def __init__(self, manager, editor): CellRendererToggle.__init__(self) self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.connect("toggled", self.__toggled_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__view = manager.gui.get_widget("TreeView") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self) self.__editor.unregister_object(self) del self self = None return False def __toggle(self, path): self.__view.set_property("sensitive", False) model = self.__view.get_model() treemodelrow = model[path] treemodelrow[0] = not treemodelrow[0] self.__manager.emit("toggled-path", path) return False def __quit_cb(self, *args): self.__destroy() return False def __toggled_cb(self, renderer, path): from gobject import idle_add idle_add(self.__toggle, path) return False scribes-0.4~r910/SCRIBES/EncodingSystem/SupportedEncodings/EncodingListDispatcher.py0000644000175000017500000000173511242100540030237 0ustar andreasandreasclass Dispatcher(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("database-changed", self.__changed_cb) from gobject import idle_add idle_add(self.__emit, priority=9999) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.unregister_object(self) del self self = None return def __emit(self): from ..EncodingListMetadata import get_value self.__manager.emit("encoding-list", get_value()) return False def __quit_cb(self, *args): self.__destroy() return False def __changed_cb(self, *args): from gobject import idle_add idle_add(self.__emit, priority=9999) return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/0000755000175000017500000000000011242100540020540 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/Error/__init__.py0000644000175000017500000000000011242100540022637 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/Error/Makefile.in0000644000175000017500000004740211242100540022614 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/Error DIST_COMMON = $(error_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(errordir)" py_compile = $(top_srcdir)/py-compile RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = GUI errordir = $(pythondir)/SCRIBES/EncodingSystem/Error error_PYTHON = \ __init__.py \ Trigger.py \ Manager.py \ Loader.py all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Error/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Error/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-errorPYTHON: $(error_PYTHON) @$(NORMAL_INSTALL) test -z "$(errordir)" || $(MKDIR_P) "$(DESTDIR)$(errordir)" @list='$(error_PYTHON)'; dlist=; list2=; test -n "$(errordir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(errordir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(errordir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(errordir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(errordir)" $$dlist; \ fi; \ else :; fi uninstall-errorPYTHON: @$(NORMAL_UNINSTALL) @list='$(error_PYTHON)'; test -n "$(errordir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(errordir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(errordir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(errordir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(errordir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(errordir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(errordir)" && rm -f $$fileso # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(errordir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-errorPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-errorPYTHON .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-errorPYTHON install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-errorPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/Error/Loader.py0000644000175000017500000000245111242100540022322 0ustar andreasandreasclass Loader(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("activate", self.__error_cb) self.__sigid3 = manager.connect("new-encoding", self.__encoding_cb) self.__sigid4 = manager.connect("load", self.__load_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__uri = "" self.__encoding = "utf-8" return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.disconnect_signal(self.__sigid3, self.__manager) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.unregister_object(self) del self self = None return def __load(self): self.__editor.load_file(self.__uri, self.__encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __error_cb(self, manager, uri, *args): self.__uri = uri return False def __encoding_cb(self, editor, encoding): self.__encoding = encoding return False def __load_cb(self, *args): from gobject import idle_add idle_add(self.__load) return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/Trigger.py0000644000175000017500000000203311242100540022513 0ustar andreasandreasclass Trigger(object): def __init__(self, editor): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("private-encoding-load-error", self.__activate_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor self.__manager = None return def __destroy(self): if self.__manager: self.__manager.destroy() self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __activate(self, uri): try: self.__manager.activate(uri) except AttributeError: from Manager import Manager self.__manager = Manager(self.__editor) self.__manager.activate(uri) return False def __quit_cb(self, *args): self.__destroy() return False def __activate_cb(self, editor, uri, *args): from gobject import idle_add idle_add(self.__activate, uri, priority=9999) return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/Manager.py0000644000175000017500000000211611242100540022464 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE, TYPE_PYOBJECT from gobject import TYPE_OBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "activate": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "database-changed": (SSIGNAL, TYPE_NONE, ()), "hide-window": (SSIGNAL, TYPE_NONE, ()), "encoding-list": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "load": (SSIGNAL, TYPE_NONE, ()), "new-encoding": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), } def __init__(self, editor): GObject.__init__(self) self.__init_attributes(editor) from GUI.Manager import Manager Manager(self, editor) from Loader import Loader Loader(self, editor) def __init_attributes(self, editor): self.__editor = editor from os.path import join self.__gui = editor.get_glade_object(globals(), join("GUI", "GUI.glade"), "Window") return gui = property(lambda self: self.__gui) def activate(self, uri): self.emit("activate", uri) return False def destroy(self): del self return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/Makefile.am0000644000175000017500000000025411242100540022575 0ustar andreasandreasSUBDIRS = GUI errordir = $(pythondir)/SCRIBES/EncodingSystem/Error error_PYTHON = \ __init__.py \ Trigger.py \ Manager.py \ Loader.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/0000755000175000017500000000000011242100540021164 5ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/__init__.py0000644000175000017500000000000011242100540023263 0ustar andreasandreasscribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/Makefile.in0000644000175000017500000003311611242100540023235 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/EncodingSystem/Error/GUI DIST_COMMON = $(gui_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(guidir)" "$(DESTDIR)$(guidir)" py_compile = $(top_srcdir)/py-compile DATA = $(gui_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ guidir = $(pythondir)/SCRIBES/EncodingSystem/Error/GUI gui_PYTHON = \ __init__.py \ Manager.py \ Window.py \ ComboBox.py \ OpenButton.py \ CloseButton.py \ Label.py gui_DATA = GUI.glade EXTRA_DIST = GUI.glade all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Error/GUI/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/EncodingSystem/Error/GUI/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-guiPYTHON: $(gui_PYTHON) @$(NORMAL_INSTALL) test -z "$(guidir)" || $(MKDIR_P) "$(DESTDIR)$(guidir)" @list='$(gui_PYTHON)'; dlist=; list2=; test -n "$(guidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(guidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(guidir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(guidir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(guidir)" $$dlist; \ fi; \ else :; fi uninstall-guiPYTHON: @$(NORMAL_UNINSTALL) @list='$(gui_PYTHON)'; test -n "$(guidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$fileso install-guiDATA: $(gui_DATA) @$(NORMAL_INSTALL) test -z "$(guidir)" || $(MKDIR_P) "$(DESTDIR)$(guidir)" @list='$(gui_DATA)'; test -n "$(guidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(guidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(guidir)" || exit $$?; \ done uninstall-guiDATA: @$(NORMAL_UNINSTALL) @list='$(gui_DATA)'; test -n "$(guidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(guidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(guidir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(guidir)" "$(DESTDIR)$(guidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-guiDATA install-guiPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-guiDATA uninstall-guiPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-guiDATA install-guiPYTHON install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-guiDATA \ uninstall-guiPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/GUI.glade0000644000175000017500000002151611242100540022613 0ustar andreasandreas False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 Error ScribesEncodingErrorWindow False center-on-parent dialog True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 11 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>File:</b> True False False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 /dev/null True end True 1 False False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 The encoding of this file could not be automatically detected. If you are sure this file is a text file, please open the file with the correct encoding. True fill True word-char False False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select character encoding 10 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Character _Encoding:</b> True True False False 0 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 False False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 end gtk-close True False False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False False False 0 gtk-open True False False False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Open file with selected encoding True False False False 1 False False 3 scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/Label.py0000644000175000017500000000164711242100540022565 0ustar andreasandreasclass Label(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = manager.connect("activate", self.__activate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__label = manager.gui.get_widget("TitleLabel") return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__manager) self.__editor.unregister_object(self) del self self = None return def __set_label(self, uri): self.__label.set_label("" + uri + "") return False def __quit_cb(self, *args): self.__destroy() return False def __activate_cb(self, manager, uri, *args): from gobject import idle_add idle_add(self.__set_label, uri) return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/ComboBox.py0000644000175000017500000000512011242100540023244 0ustar andreasandreasclass ComboBox(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("combobox-encoding-data", self.__data_cb) self.__sigid3 = self.__combo.connect("changed", self.__changed_cb) editor.emit("combobox-encoding-data?") editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__combo = manager.gui.get_widget("ComboBox") self.__model = self.__create_model() return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__combo) self.__editor.unregister_object(self) del self self = None return def __set_properties(self): from gtk import CellRendererText cell = CellRendererText() self.__combo.pack_end(cell, True) self.__combo.add_attribute(cell, "text", 0) self.__combo.set_model(self.__model) self.__combo.set_row_separator_func(self.__separator_function) return def __create_model(self): from gtk import ListStore from gobject import TYPE_STRING model = ListStore(TYPE_STRING, TYPE_STRING) return model def __separator_function(self, model, iterator): if model.get_value(iterator, 0) == "Separator" : return True return False def __populate_model(self, data): self.__combo.set_property("sensitive", False) self.__combo.set_model(None) self.__model.clear() self.__model.append([data[0][0], data[0][1]]) self.__model.append(["Separator", "Separator"]) for alias, encoding in data[1:]: self.__model.append([alias, encoding]) self.__model.append(["Separator", "Separator"]) self.__model.append(["Add or Remove Encoding...", "show_encoding_window"]) self.__combo.set_model(self.__model) self.__combo.set_active(0) self.__combo.set_property("sensitive", True) return False def __emit_new_encoding(self): iterator = self.__combo.get_active_iter() encoding = self.__model.get_value(iterator, 1) if encoding == "show_encoding_window": self.__combo.set_active(0) self.__editor.show_supported_encodings_window(self.__editor.window) else: self.__manager.emit("new-encoding", encoding) return False def __quit_cb(self, *args): self.__destroy() return False def __data_cb(self, editor, data): from gobject import idle_add idle_add(self.__populate_model, data) return False def __changed_cb(self, *args): self.__emit_new_encoding() return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/CloseButton.py0000644000175000017500000000151211242100540023776 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("CloseButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.unregister_object(self) del self self = None return def __quit_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("hide-window") return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/Manager.py0000644000175000017500000000053011242100540023106 0ustar andreasandreasclass Manager(object): def __init__(self, manager, editor): from Window import Window Window(manager, editor) from ComboBox import ComboBox ComboBox(manager, editor) from Label import Label Label(manager, editor) from OpenButton import Button Button(manager, editor) from CloseButton import Button Button(manager, editor) scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/Makefile.am0000644000175000017500000000037411242100540023224 0ustar andreasandreasguidir = $(pythondir)/SCRIBES/EncodingSystem/Error/GUI gui_PYTHON = \ __init__.py \ Manager.py \ Window.py \ ComboBox.py \ OpenButton.py \ CloseButton.py \ Label.py gui_DATA = GUI.glade EXTRA_DIST = GUI.glade clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/Window.py0000644000175000017500000000334711242100540023014 0ustar andreasandreasclass Window(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__set_properties() self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__window.connect("delete-event", self.__delete_event_cb) self.__sigid3 = self.__window.connect("key-press-event", self.__key_press_event_cb) self.__sigid4 = manager.connect("activate", self.__activate_cb) self.__sigid5 = manager.connect("hide-window", self.__delete_event_cb) self.__window.set_property("sensitive", True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__editor = editor self.__manager = manager self.__window = manager.gui.get_widget("Window") return False def __set_properties(self): self.__window.set_transient_for(self.__editor.window) return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__window) self.__editor.disconnect_signal(self.__sigid3, self.__window) self.__editor.disconnect_signal(self.__sigid4, self.__manager) self.__editor.disconnect_signal(self.__sigid5, self.__manager) self.__editor.unregister_object(self) del self self = None return False def __hide(self): self.__window.hide() return False def __show(self): self.__window.show_all() return False def __delete_event_cb(self, *args): self.__hide() return True def __key_press_event_cb(self, window, event): from gtk import keysyms if event.keyval != keysyms.Escape: return False self.__hide() return True def __activate_cb(self, *args): from gobject import idle_add idle_add(self.__show) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/EncodingSystem/Error/GUI/OpenButton.py0000644000175000017500000000154711242100540023642 0ustar andreasandreasclass Button(object): def __init__(self, manager, editor): self.__init_attributes(manager, editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = self.__button.connect("clicked", self.__clicked_cb) self.__button.set_property("sensitive", True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__button = manager.gui.get_widget("OpenButton") return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__button) self.__editor.unregister_object(self) del self self = None return def __quit_cb(self, *args): self.__destroy() return def __clicked_cb(self, *args): self.__manager.emit("hide-window") self.__manager.emit("load") return False scribes-0.4~r910/SCRIBES/EncodingSystem/EncodingListMetadata.py0000644000175000017500000000074211242100540024047 0ustar andreasandreasfrom SCRIBES.Utils import open_database from os.path import join basepath = join("Preferences", "EncodingList.gdb") def get_value(): try: encodings = ["ISO-8859-1", "ISO-8859-15"] database = open_database(basepath, "r") encodings = database["encodings"] except KeyError: pass finally: database.close() return encodings def set_value(encodings): try: database = open_database(basepath, "w") database["encodings"] = encodings finally: database.close() return scribes-0.4~r910/SCRIBES/LanguageManager.py0000644000175000017500000000252711242100540020112 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): self.__init_attributes(editor) self.__sigid1 = editor.connect("quit", self.__quit_cb) self.__sigid2 = editor.connect("checking-file", self.__loaded_file_cb) self.__sigid3 = editor.connect("renamed-file", self.__loaded_file_cb) self.__sigid4 = editor.connect("load-error", self.__load_error_cb) self.__set(uri) self.__editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __set(self, uri): from Utils import get_language language_object = get_language(uri) if uri else None self.__editor.set_data("language_object", language_object) language = language_object.get_id() if language_object else "" self.__editor.set_data("language", language) return False def __quit_cb(self, *args): self.__destroy() return False def __loaded_file_cb(self, editor, uri, *args): self.__set(uri) return False def __load_error_cb(self, *args): self.__set(None) return False scribes-0.4~r910/SCRIBES/FilenameGeneratorModeManager.py0000644000175000017500000000253011242100540022555 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): self.__init_attributes(editor) set_data = lambda generate: editor.set_data("generate_filename", generate) set_data(False) if uri else set_data(True) self.__sigid1 = editor.connect("checking-file", self.__checking_file_cb) self.__sigid2 = editor.connect("load-error", self.__load_error_cb) self.__sigid3 = editor.connect("renamed-file", self.__checking_file_cb) self.__sigid4 = editor.connect("rename-file", self.__checking_file_cb) self.__sigid5 = editor.connect("quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.disconnect_signal(self.__sigid5, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __checking_file_cb(self, *args): self.__editor.set_data("generate_filename", False) return False def __load_error_cb(self, *args): self.__editor.set_data("generate_filename", True) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/Globals.py.in0000644000175000017500000000656711242100540017074 0ustar andreasandreas# -*- coding: utf-8 -*- from os import environ from os.path import join, expanduser from dbus import SessionBus, Interface, glib from xdg.BaseDirectory import xdg_config_home, xdg_data_home SCRIBES_DBUS_SERVICE = "net.sourceforge.Scribes" SCRIBES_DBUS_PATH = "/net/sourceforge/Scribes" SCRIBES_SAVE_PROCESS_DBUS_SERVICE = "net.sourceforge.ScribesSaveProcess" SCRIBES_SAVE_PROCESS_DBUS_PATH = "/net/sourceforge/ScribesSaveProcess" session_bus = SessionBus() dbus_proxy_obj = session_bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus') dbus_iface = Interface(dbus_proxy_obj, 'org.freedesktop.DBus') home_folder = expanduser("~") from tempfile import gettempdir tmp_folder = gettempdir() folder_ = join(home_folder, "Desktop") from os.path import exists desktop_folder = folder_ if exists(folder_) else home_folder metadata_folder = config_folder = join(xdg_config_home, "scribes") print_settings_filename = join(metadata_folder, "ScribesPrintSettings.txt") home_plugin_folder = home_generic_plugin_folder = join(config_folder, "GenericPlugins") home_language_plugin_folder = join(config_folder, "LanguagePlugins") scribes_theme_folder = join(config_folder, "styles") storage_folder = join(config_folder, ".config") default_home_theme_folder = join(xdg_data_home, "gtksourceview-2.0", "styles") name = "scribes" prefix = "@scribes_prefix@" executable_path = join(prefix, "bin") data_path = "@scribes_data_path@" library_path = "@scribes_lib_path@" sysconfdir = "@scribes_sysconfdir@" data_folder = join(data_path, "scribes") root_plugin_folder = join(library_path, "scribes") core_plugin_folder = core_generic_plugin_folder = join(root_plugin_folder, "GenericPlugins") core_language_plugin_folder = join(root_plugin_folder, "LanguagePlugins") python_path = "@python_path@" version = "@VERSION@" author = ["Author:", "\tLateef Alabi-Oki \n", "Contributors:", "\tIb Lundgren ", "\tHerman Polloni ", "\tJames Laver ", "\tHugo Madureira ", "\tJustin Joy ", "\tFrank Hale ", "\tHideo Hattori ", "\tMatt Murphy ", "\tChris Wagner ", "\tShawn Bright ", "\tPeter Magnusson ", "\tJakub Sadowinski ", "\tRockallite Wulf ", "\tJavier Lorenzana ", "\tKuba ", ] documenters = ["Lateef Alabi-Oki "] artists = ["Alexandre Moore ", "Panos Laganakos "] website = "http://scribes.sf.net/" copyrights = "Copyright © 2005 Lateef Alabi-Oki" translators = "Brazilian Portuguese translation by Leonardo F. Fontenelle \ \nRussian translation by Paul Chavard \ \nGerman translation by Maximilian Baumgart \ \nGerman translation by Steffen Klemer \nItalian translation by Stefano Esposito \ \nFrench translation by Gautier Portet \ \nDutch translation by Filip Vervloesem \ \ \nSwedish translation by Daniel Nylander \ \nChinese translation by chaos proton " scribes-0.4~r910/SCRIBES/i18n.py0000644000175000017500000003453411242100540015656 0ustar andreasandreasfrom gettext import gettext as _ # From module accelerators.py msg0003 = _("Cannot redo action")#.decode(encoding).encode("utf-8") msg0024 = _("Leave Fullscreen")#.decode(encoding).encode("utf-8") # From module editor_ng.py, fileloader.py, timeout.py msg0025 = _("Unsaved Document")#.decode(encoding).encode("utf-8") # From module filechooser.py msg0027 = _("All Documents")#.decode(encoding).encode("utf-8") msg0028 = _("Python Documents")#.decode(encoding).encode("utf-8") msg0029 = _("Text Documents")#.decode(encoding).encode("utf-8") # From module fileloader.py msg0030 = _('Loaded file "%s"')#.decode(encoding).encode("utf-8") msg0032 = _("Loading file please wait...")#.decode(encoding).encode("utf-8") # From module fileloader.py, savechooser.py msg0034 = _(" ")#.decode(encoding).encode("utf-8") # From module main.py msg0038 = _("Unrecognized option: '%s'")#.decode(encoding).encode("utf-8") msg0039 = _("Try 'scribes --help' for more information")#.decode(encoding).encode("utf-8") msg0040 = _("Scribes only supports using one option at a time")#.decode(encoding).encode("utf-8") msg0042 = _("Scribes version %s")#.decode(encoding).encode("utf-8") msg0043 = _("%s does not exist")#.decode(encoding).encode("utf-8") # From module timeout.py msg0044 = _('The file "%s" is open in readonly mode')#.decode(encoding).encode("utf-8") msg0045 = _('The file "%s" is open')#.decode(encoding).encode("utf-8") msg0085 = _('Saved "%s"')#.decode(encoding).encode("utf-8") msg0089 = _("Copied selected text")#.decode(encoding).encode("utf-8") msg0090 = _("No selection to copy")#.decode(encoding).encode("utf-8") msg0091 = _("Cut selected text")#.decode(encoding).encode("utf-8") msg0092 = _(u"No selection to cut")#.decode(encoding).encode("utf-8") msg0093 = _("Pasted copied text")#.decode(encoding).encode("utf-8") msg0094 = _("No text content in the clipboard")#.decode(encoding).encode("utf-8") # From module tooltips.py msg0097 = _("Open a new window")#.decode(encoding).encode("utf-8") msg0098 = _("Open a file")#.decode(encoding).encode("utf-8") msg0099 = _("Rename the current file")#.decode(encoding).encode("utf-8") msg0100 = _("Print the current file")#.decode(encoding).encode("utf-8") msg0101 = _("Undo last action")#.decode(encoding).encode("utf-8") msg0102 = _("Redo undone action")#.decode(encoding).encode("utf-8") msg0103 = _("Search for text")#.decode(encoding).encode("utf-8") msg0104 = _("Search for and replace text")#.decode(encoding).encode("utf-8") msg0105 = _("Go to a specific line")#.decode(encoding).encode("utf-8") msg0106 = _("Configure the editor")#.decode(encoding).encode("utf-8") msg0107 = _("Launch the help browser")#.decode(encoding).encode("utf-8") msg0108 = _("Search for previous occurrence of the string")#.decode(encoding).encode("utf-8") msg0109 = _("Search for next occurrence of the string")#.decode(encoding).encode("utf-8") msg0110 = _("Find occurrences of the string that match upper and lower cases \ only")#.decode(encoding).encode("utf-8") msg0111 = _("Find occurrences of the string that match the entire word only")#.decode(encoding).encode("utf-8") msg0112 = _("Type in the text you want to search for")#.decode(encoding).encode("utf-8") msg0113 = _("Type in the text you want to replace with")#.decode(encoding).encode("utf-8") msg0114 = _("Replace the selected found match")#.decode(encoding).encode("utf-8") msg0115 = _("Replace all found matches")#.decode(encoding).encode("utf-8") msg0116 = _("Click to specify the font type, style, and size to use for text.")#.decode(encoding).encode("utf-8") msg0117 = _("Click to specify the width of the space that is inserted when \ you press the Tab key.")#.decode(encoding).encode("utf-8") msg0118 = _("Select to wrap text onto the next line when you reach the \ text window boundary.")#.decode(encoding).encode("utf-8") msg0119 = _("Select to display a vertical line that indicates the right \ margin.")#.decode(encoding).encode("utf-8") msg0120 = _("Click to specify the location of the vertical line.")#.decode(encoding).encode("utf-8") msg0121 = _("Select to enable spell checking")#.decode(encoding).encode("utf-8") # From module usage.py msg0124 = _("A text editor for GNOME.")#.decode(encoding).encode("utf-8") msg0125 = _("usage: scribes [OPTION] [FILE] [...]")#.decode(encoding).encode("utf-8") msg0126 = _("Options:")#.decode(encoding).encode("utf-8") msg0127 = _("display this help screen")#.decode(encoding).encode("utf-8") msg0128 = _("output version information of Scribes")#.decode(encoding).encode("utf-8") msg0129 = _("create a new file and open the file with Scribes")#.decode(encoding).encode("utf-8") msg0130 = _("get debuggin information for scribes")#.decode(encoding).encode("utf-8") # From error.py msg0133 = _("error")#.decode(encoding).encode("utf-8") # From module actions.py msg0145 = _("Cannot perform operation in readonly mode")#.decode(encoding).encode("utf-8") # From encoding.py msg0157 = _("Character _Encoding: ")#.decode(encoding).encode("utf-8") msg0158 = _("Add or Remove Encoding ...")#.decode(encoding).encode("utf-8") msg0159 = _("Recommended (UTF-8)")#.decode(encoding).encode("utf-8") msg0160 = _("Add or Remove Character Encoding")#.decode(encoding).encode("utf-8") msg0161 = _("Language and Region")#.decode(encoding).encode("utf-8") msg0162 = _("Character Encoding")#.decode(encoding).encode("utf-8") msg0163 = _("Select")#.decode(encoding).encode("utf-8") # From filechooser.py msg0187 = _("Closed dialog window")#.decode(encoding).encode("utf-8") # From encoding.py msg0208 = _("English")#.decode(encoding).encode("utf-8") msg0209 = _("Traditional Chinese")#.decode(encoding).encode("utf-8") msg0210 = _("Traditional Chinese")#.decode(encoding).encode("utf-8") msg0211 = _("English")#.decode(encoding).encode("utf-8") msg0212 = _("Hebrew")#.decode(encoding).encode("utf-8") msg0213 = _("English")#.decode(encoding).encode("utf-8") msg0214 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0215 = _("Greek")#.decode(encoding).encode("utf-8") msg0216 = _("Baltic languages")#.decode(encoding).encode("utf-8") msg0217 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0218 = _("Central and Eastern Europe")#.decode(encoding).encode("utf-8") msg0219 = _("Bulgarian, Macedonian, Russian, Serbian")#.decode(encoding).encode("utf-8") msg0220 = _("Hebrew")#.decode(encoding).encode("utf-8") msg0221 = _("Turkish")#.decode(encoding).encode("utf-8") msg0222 = _("Portuguese")#.decode(encoding).encode("utf-8") msg0223 = _("Icelandic")#.decode(encoding).encode("utf-8") msg0224 = _("Hebrew")#.decode(encoding).encode("utf-8") msg0225 = _("Canadian")#.decode(encoding).encode("utf-8") msg0226 = _("Arabic")#.decode(encoding).encode("utf-8") msg0227 = _("Danish, Norwegian")#.decode(encoding).encode("utf-8") msg0228 = _("Russian")#.decode(encoding).encode("utf-8") msg0229 = _("Greek")#.decode(encoding).encode("utf-8") msg0230 = _("Thai")#.decode(encoding).encode("utf-8") msg0231 = _("Greek")#.decode(encoding).encode("utf-8") msg0232 = _("Japanese")#.decode(encoding).encode("utf-8") msg0233 = _("Korean")#.decode(encoding).encode("utf-8") msg0234 = _("Traditional Chinese")#.decode(encoding).encode("utf-8") msg0235 = _("Urdu")#.decode(encoding).encode("utf-8") msg0236 = _("Turkish")#.decode(encoding).encode("utf-8") msg0237 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0238 = _("Central and Eastern Europe")#.decode(encoding).encode("utf-8") msg0239 = _("Bulgarian, Macedonian, Russian, Serbian")#.decode(encoding).encode("utf-8") msg0240 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0241 = _("Greek")#.decode(encoding).encode("utf-8") msg0242 = _("Turkish")#.decode(encoding).encode("utf-8") msg0243 = _("Hebrew")#.decode(encoding).encode("utf-8") msg0244 = _("Arabic")#.decode(encoding).encode("utf-8") msg0245 = _("Baltic languages")#.decode(encoding).encode("utf-8") msg0246 = _("Vietnamese")#.decode(encoding).encode("utf-8") msg0247 = _("Japanese")#.decode(encoding).encode("utf-8") msg0248 = _("Japanese")#.decode(encoding).encode("utf-8") msg0249 = _("Japanese")#.decode(encoding).encode("utf-8") msg0250 = _("Korean")#.decode(encoding).encode("utf-8") msg0251 = _("Simplified Chinese")#.decode(encoding).encode("utf-8") msg0252 = _("Unified Chinese")#.decode(encoding).encode("utf-8") msg0253 = _("Unified Chinese")#.decode(encoding).encode("utf-8") msg0254 = _("Simplified Chinese")#.decode(encoding).encode("utf-8") msg0255 = _("Japanese")#.decode(encoding).encode("utf-8") msg0256 = _("Japanese")#.decode(encoding).encode("utf-8") msg0257 = _("Japanese, Korean, Simplified Chinese")#.decode(encoding).encode("utf-8") msg0258 = _("Japanese")#.decode(encoding).encode("utf-8") msg0259 = _("Japanese")#.decode(encoding).encode("utf-8") msg0260 = _("Japanese")#.decode(encoding).encode("utf-8") msg0261 = _("Korean")#.decode(encoding).encode("utf-8") msg0262 = _("West Europe")#.decode(encoding).encode("utf-8") msg0263 = _("Central and Eastern Europe")#.decode(encoding).encode("utf-8") msg0264 = _("Esperanto, Maltese")#.decode(encoding).encode("utf-8") msg0265 = _("Baltic languagues")#.decode(encoding).encode("utf-8") msg0266 = _("Bulgarian, Macedonian, Russian, Serbian")#.decode(encoding).encode("utf-8") msg0267 = _("Arabic")#.decode(encoding).encode("utf-8") msg0268 = _("Greek")#.decode(encoding).encode("utf-8") msg0269 = _("Hebrew")#.decode(encoding).encode("utf-8") msg0270 = _("Turkish")#.decode(encoding).encode("utf-8") msg0271 = _("Nordic languages")#.decode(encoding).encode("utf-8") msg0272 = _("Baltic languages")#.decode(encoding).encode("utf-8") msg0273 = _("Celtic languages")#.decode(encoding).encode("utf-8") msg0274 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0275 = _("Korean")#.decode(encoding).encode("utf-8") msg0276 = _("Russian")#.decode(encoding).encode("utf-8") msg0277 = _("Ukrainian")#.decode(encoding).encode("utf-8") msg0278 = _("Bulgarian, Macedonian, Russian, Serbian")#.decode(encoding).encode("utf-8") msg0279 = _("Greek")#.decode(encoding).encode("utf-8") msg0280 = _("Icelandic")#.decode(encoding).encode("utf-8") msg0281 = _("Central and Eastern Europe")#.decode(encoding).encode("utf-8") msg0282 = _("Western Europe")#.decode(encoding).encode("utf-8") msg0283 = _("Turkish")#.decode(encoding).encode("utf-8") msg0284 = _("Kazakh")#.decode(encoding).encode("utf-8") msg0285 = _("Japanese")#.decode(encoding).encode("utf-8") msg0286 = _("Japanese")#.decode(encoding).encode("utf-8") msg0287 = _("Japanese")#.decode(encoding).encode("utf-8") msg0288 = _("All languages")#.decode(encoding).encode("utf-8") msg0289 = _("All Languages (BMP only)")#.decode(encoding).encode("utf-8") msg0290 = _("All Languages (BMP only)")#.decode(encoding).encode("utf-8") msg0291 = _("All Languages")#.decode(encoding).encode("utf-8") msg0292 = _("None")#.decode(encoding).encode("utf-8") # From tooltips.py msg0314 = _("Select to use themes' foreground and background colors")#.decode(encoding).encode("utf-8") msg0315 = _("Click to choose a new color for the editor's text")#.decode(encoding).encode("utf-8") msg0316 = _("Click to choose a new color for the editor's background")#.decode(encoding).encode("utf-8") msg0317 = _("Click to choose a new color for the language syntax element")#.decode(encoding).encode("utf-8") msg0318 = _("Select to make the language syntax element bold")#.decode(encoding).encode("utf-8") msg0319 = _("Select to make the language syntax element italic")#.decode(encoding).encode("utf-8") msg0320 = _("Select to reset the language syntax element to its default \ settings")#.decode(encoding).encode("utf-8") # From syntaxcoloreditor.py # From readonly.py msg0322 = _("Toggled readonly mode on")#.decode(encoding).encode("utf-8") msg0324 = _("Toggled readonly mode off")#.decode(encoding).encode("utf-8") # From tooltips.py msg0326 = _("Menu for advanced configuration")#.decode(encoding).encode("utf-8") msg0327 = _("Configure the editor's foreground, background or syntax colors")#.decode(encoding).encode("utf-8") msg0328 = _("Create, modify or manage templates")#.decode(encoding).encode("utf-8") # From cursor.py msg0329 = _("Ln %d col %d")#.decode(encoding).encode("utf-8") # From fileloader.py msg0335 = _("Loading \"%s\"...") # From dialogfilter.py msg0343 = _("Ruby Documents") msg0344 = _("Perl Documents") msg0345 = _("C Documents") msg0346 = _("C++ Documents") msg0347 = _("C# Documents") msg0348 = _("Java Documents") msg0349 = _("PHP Documents") msg0350 = _("HTML Documents") msg0351 = _("XML Documents") msg0352 = _("Haskell Documents") msg0353 = _("Scheme Documents") msg0354 = _("INS") msg0355 = _("OVR") msg0428 = _("No bookmarks found") msg0435 = _("Use spaces instead of tabs for indentation") msg0447 = _("Select to underline language syntax element") msg0460 = _("Open recently used files") msg0468 = _("Failed to save file") msg0469 = _("Save Error: You do not have permission to modify this file \ or save to its location.") msg0470 = _("Save Error: Failed to transfer file from swap to permanent location.") msg0471 = _("Save Error: Failed to create swap location or file.") msg0472 = _("Save Error: Failed to create swap file for saving.") msg0473 = _("Save Error: Failed to write swap file for saving.") msg0474 = _("Save Error: Failed to close swap file for saving.") msg0475 = _("Save Error: Failed decode contents of file from \"UTF-8\" to Unicode.") msg0476 = _("Save Error: Failed to encode contents of file. Make sure \ the encoding of the file is properly set in the save dialog. Press \ (Ctrl - s) to show the save dialog.") msg0477 = _("File: %s") msg0478 = _("Failed to load file.") msg0479 = _("Load Error: You do not have permission to view this file.") msg0480 = _("Load Error: Failed to access remote file for permission reasons.") msg0481 = _("Load Error: Failed to get file information for loading. \ Please try loading the file again.") msg0482 = _("Load Error: File does not exist.") msg0483 = _("Damn! Unknown Error") msg0484 = _("Load Error: Failed to open file for loading.") msg0485 = _("Load Error: Failed to read file for loading.") msg0486 = _("Load Error: Failed to close file for loading.") msg0487 = _("Load Error: Failed to decode file for loading. The file \ your are loading may not be a text file. If you are sure it is a text \ file, try to open the file with the correct encoding via the open \ dialog. Press (control - o) to show the open dialog.") msg0488 = _("Load Error: Failed to encode file for loading. Try to \ open the file with the correct encoding via the open dialog. Press \ (control - o) to show the open dialog.") msg0489 = _("Reloading %s") msg0490 = _("'%s' has been modified by another program") scribes-0.4~r910/SCRIBES/EditorImports.py0000644000175000017500000000204311242100540017671 0ustar andreasandreasfrom Globals import data_folder, metadata_folder, home_folder, desktop_folder from Globals import session_bus, core_plugin_folder, home_plugin_folder from Globals import home_language_plugin_folder, core_language_plugin_folder from Globals import version, author, documenters, artists, website from Globals import copyrights, translators, python_path, dbus_iface from Globals import print_settings_filename, scribes_theme_folder from Globals import default_home_theme_folder, storage_folder from License import license_string from gio import File from DialogFilters import create_filter_list from gtksourceview2 import language_manager_get_default from EncodingSystem.EncodingGuessListMetadata import get_value as get_encoding_guess_list from EncodingSystem.FileEncodingsMetadata import get_value as get_encoding from EncodingSystem.EncodingListMetadata import get_value as get_encoding_list from EncodingSystem.SupportedEncodings.Encodings import encodings as supported_encodings from Utils import get_language, WORD_PATTERN from gettext import gettext as _ scribes-0.4~r910/SCRIBES/PluginInitializer/0000755000175000017500000000000011242100540020156 5ustar andreasandreasscribes-0.4~r910/SCRIBES/PluginInitializer/PythonPathUpdater.py0000644000175000017500000000200011242100540024143 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "update-python-path", self.__update_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __update(self, plugin_path): from sys import path if not (plugin_path in path): path.insert(0, plugin_path) self.__manager.emit("search-path-updated", plugin_path) return False def __quit_cb(self, *args): self.__destroy() return False def __update_cb(self, manager, plugin_path): self.__update(plugin_path) # from gobject import idle_add, PRIORITY_LOW # idle_add(self.__update, plugin_path, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginLoader.py0000644000175000017500000000154011242100540023115 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Loader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "load-plugin", self.__load_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __load(self, data): module, PluginClass = data if module.autoload is False: return False plugin = PluginClass(self.__editor) plugin.load() self.__manager.emit("loaded-plugin", (module, plugin)) return False def __load_cb(self, manager, data): self.__load(data) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/ErrorManager.py0000644000175000017500000000274411242100540023123 0ustar andreasandreasfrom gettext import gettext as _ from SCRIBES.SignalConnectionManager import SignalManager PLUGIN_PATH_ERROR_MESSAGE = _("ERROR: Cannot find plugin folder. Scribes will not function properly without plugins. Please file a bug report to address the issue.") PATH_CREATION_ERROR_MESSAGE = _("ERROR: Cannot create local plugin folder. Please address the source of the problem for Scribes to function properly.") PLUGIN_ERROR = _("PLUGIN ERROR!") class Manager(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "plugin-path-not-found-error", self.__not_found_cb) self.connect(manager, "plugin-folder-creation-error", self.__creation_error_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __error(self, title, message): self.__editor.show_error(title, message) return False def __quit_cb(self, *args): self.__destroy() return False def __not_found_cb(self, *args): from gobject import idle_add idle_add(self.__error, PLUGIN_ERROR, PLUGIN_PATH_ERROR_MESSAGE) return False def __creation_error_cb(self, *args): from gobject import idle_add idle_add(self.__error, PLUGIN_ERROR, PATH_CREATION_ERROR_MESSAGE) return False scribes-0.4~r910/SCRIBES/PluginInitializer/ModuleInitializer.py0000644000175000017500000000165411242100540024167 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "initialize-module", self.__initialize_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __initialize(self, module_path): from os.path import split module_name = split(module_path)[-1][:-3] from imp import load_source module = load_source(module_name, module_path) self.__manager.emit("initialized-module", module) return False def __initialize_cb(self, manager, module_path): self.__initialize(module_path) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/__init__.py0000644000175000017500000000000011242100540022255 0ustar andreasandreasscribes-0.4~r910/SCRIBES/PluginInitializer/LanguageModuleValidator.py0000644000175000017500000000157111242100540025273 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "validate-language-module", self.__validate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __validate(self, module): if not (self.__editor.language in module.languages): return False self.__manager.emit("valid-module", module) return False def __quit_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, module): self.__validate(module) return False scribes-0.4~r910/SCRIBES/PluginInitializer/ModuleValidator.py0000644000175000017500000000226711242100540023632 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "initialized-module", self.__validate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __validate(self, module): try: emit = self.__manager.emit if not hasattr(module, "autoload"): raise ValueError if not hasattr(module, "name"): raise ValueError if not hasattr(module, "version"): raise ValueError if not hasattr(module, "class_name"): raise ValueError emit("validate-language-module", module) if hasattr(module, "languages") else emit("valid-module", module) except ValueError: print module, " is an invalid plugin module" return False def __quit_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, module): self.__validate(module) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginUnloader.py0000644000175000017500000000131711242100540023462 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Unloader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "post-quit", self.__quit_cb) self.connect(manager, "unload-plugin", self.__unload_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __unload(self, data): module, plugin = data plugin.unload() self.__manager.emit("unloaded-plugin", (module, plugin)) return False def __unload_cb(self, manager, data): self.__unload(data) return False def __quit_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginPathValidator.py0000644000175000017500000000221711242100540024453 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "validate-path", self.__validate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __validate(self, plugin_path): try: from os.path import join, exists filename = join(plugin_path, "__init__.py") if not exists(filename): raise ValueError self.__manager.emit("update-python-path", plugin_path) except ValueError: self.__manager.emit("plugin-path-error", plugin_path) return False def __quit_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, plugin_path): self.__validate(plugin_path) # from gobject import idle_add, PRIORITY_LOW # idle_add(self.__validate, plugin_path, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/PluginInitializer/ModuleFinder.py0000644000175000017500000000225211242100540023106 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Finder(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "search-path-updated", self.__find_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __initialize_modules(self, plugin_path): _path = plugin_path.strip("/") if not self.__editor.language and _path.endswith("LanguagePlugins"): return False from os import listdir, path fullpath = path.join is_plugin = lambda filename: filename.startswith("Plugin") and filename.endswith(".py") modules = (fullpath(plugin_path, filename) for filename in listdir(plugin_path) if is_plugin(filename)) emit = self.__manager.emit [emit("initialize-module", module) for module in modules] return False def __find_cb(self, manager, plugin_path): self.__initialize_modules(plugin_path) return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/Makefile.in0000644000175000017500000003253611242100540022234 0ustar andreasandreas# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = SCRIBES/PluginInitializer DIST_COMMON = $(plugininitializer_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(plugininitializerdir)" py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HELP_DIR = @HELP_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ XGETTEXT = @XGETTEXT@ YELP = @YELP@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugininitializerdir = $(pythondir)/SCRIBES/PluginInitializer plugininitializer_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ PythonPathUpdater.py \ PluginPathValidator.py \ PluginPathErrorHandler.py \ HomePluginPathCreator.py \ ErrorManager.py \ ModuleFinder.py \ ModuleInitializer.py \ ModuleValidator.py \ LanguageModuleValidator.py \ PluginValidator.py \ PluginLoader.py \ PluginUnloader.py \ PluginsUpdater.py \ PluginsDestroyer.py \ DuplicatePluginDetector.py \ PluginReloader.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SCRIBES/PluginInitializer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu SCRIBES/PluginInitializer/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-plugininitializerPYTHON: $(plugininitializer_PYTHON) @$(NORMAL_INSTALL) test -z "$(plugininitializerdir)" || $(MKDIR_P) "$(DESTDIR)$(plugininitializerdir)" @list='$(plugininitializer_PYTHON)'; dlist=; list2=; test -n "$(plugininitializerdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(plugininitializerdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(plugininitializerdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(plugininitializerdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(plugininitializerdir)" $$dlist; \ fi; \ else :; fi uninstall-plugininitializerPYTHON: @$(NORMAL_UNINSTALL) @list='$(plugininitializer_PYTHON)'; test -n "$(plugininitializerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(plugininitializerdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(plugininitializerdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(plugininitializerdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(plugininitializerdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(plugininitializerdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(plugininitializerdir)" && rm -f $$fileso tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(plugininitializerdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-plugininitializerPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-plugininitializerPYTHON .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am \ install-plugininitializerPYTHON install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-plugininitializerPYTHON clean-local: rm -rf *.pyc *.pyo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: scribes-0.4~r910/SCRIBES/PluginInitializer/Initializer.py0000644000175000017500000000217311242100540023016 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Initializer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) from gobject import timeout_add, PRIORITY_HIGH as HIGH timeout_add(100, self.__validate_timeout, priority=HIGH) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__plugin_paths = ( editor.home_plugin_folder, editor.core_plugin_folder, editor.home_language_plugin_folder, editor.core_language_plugin_folder, ) return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __validate(self): emit = self.__manager.emit [emit("validate-path", plugin_path) for plugin_path in self.__plugin_paths] return False def __validate_timeout(self): from gobject import idle_add, PRIORITY_HIGH as HIGH idle_add(self.__validate, priority=HIGH) return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/PluginInitializer/DuplicatePluginDetector.py0000644000175000017500000000360211242100540025314 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Detector(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "active-plugins", self.__plugins_cb) self.connect(manager, "check-duplicate-plugins", self.__check_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__modules = [] return def __destroy(self): self.disconnect() del self return False def __handle_duplicate(self, unloaded_plugin_data, loaded_plugin_data): unloaded_module = unloaded_plugin_data[0] loaded_module = loaded_plugin_data[0] if loaded_module.version >= unloaded_module.version: return False print "Loading new duplicate plugin" print loaded_module.class_name, loaded_module.version, unloaded_module.class_name, unloaded_module.version self.__manager.emit("unload-plugin", loaded_plugin_data) self.__manager.emit("load-plugin", unloaded_plugin_data) return False def __get_duplicate(self, unloaded_plugin_data): if not self.__modules: return None module, plugin_class = unloaded_plugin_data from copy import copy for _module, _plugin in copy(self.__modules): if module.class_name == _module.class_name: return (_module, _plugin) return None def __check(self, unloaded_plugin_data): loaded_plugin_data = self.__get_duplicate(unloaded_plugin_data) if loaded_plugin_data: self.__handle_duplicate(unloaded_plugin_data, loaded_plugin_data) else: self.__manager.emit("load-plugin", unloaded_plugin_data) return False def __quit_cb(self, *args): self.__destroy() return False def __plugins_cb(self, manager, plugins): self.__modules = plugins return False def __check_cb(self, manager, unloaded_plugin_data): self.__check(unloaded_plugin_data) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginsDestroyer.py0000644000175000017500000000253011242100540024052 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Destroyer(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "active-plugins", self.__plugins_cb, True) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__quit = False self.__plugins = [] self.__destroyed = False return def __destroy(self): self.disconnect() del self return False def __check(self): if self.__destroyed: return False if self.__quit is False: return False if self.__plugins: return False self.__destroy() self.__destroyed = True return False def __unload(self, plugin_data): self.__manager.emit("unload-plugin", plugin_data) return def __unload_plugins(self): from copy import copy [self.__unload(plugin_data) for plugin_data in copy(self.__plugins)] return False def __quit_cb(self, *args): try: if not self.__plugins: raise ValueError self.__quit = True from gobject import idle_add idle_add(self.__unload_plugins) except ValueError: self.__destroy() return False def __plugins_cb(self, manager, plugins): self.__plugins = plugins from gobject import idle_add idle_add(self.__check) return False scribes-0.4~r910/SCRIBES/PluginInitializer/HomePluginPathCreator.py0000644000175000017500000000222111242100540024731 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Creator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "create-plugin-path", self.__create_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __create(self, plugin_path): try: from os import makedirs, path filename = path.join(plugin_path, "__init__.py") makedirs(plugin_path) handle = open(filename, "w") handle.close() self.__manager.emit("validate-path", plugin_path) except (OSError, IOError): self.__manager.emit("plugin-folder-creation-error", plugin_path) return False def __quit_cb(self, *args): self.__destroy() return False def __create_cb(self, manager, plugin_path): from gobject import idle_add, PRIORITY_LOW idle_add(self.__create, plugin_path, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginReloader.py0000644000175000017500000000254511242100540023452 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Reloader(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "active-plugins", self.__plugins_cb) self.connect(editor, "loaded-file", self.__loaded_cb, True) self.connect(editor, "renamed-file", self.__loaded_cb, True) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__plugins = [] return def __load_language_plugins(self): is_language_plugin = lambda data: hasattr(data[0], "languages") unload = lambda plugin: self.__manager.emit("unload-plugin", plugin) from copy import copy [unload(plugin) for plugin in copy(self.__plugins) if is_language_plugin(plugin)] paths = (self.__editor.core_language_plugin_folder, self.__editor.home_language_plugin_folder,) load = lambda path: self.__manager.emit("search-path-updated", path) [load(path) for path in paths] return False def __plugins_cb(self, manager, data): self.__plugins = data return False def __loaded_cb(self, *args): self.__load_language_plugins() return False def __quit_cb(self, *args): self.disconnect() self.__editor.unregister_object(self) del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginValidator.py0000644000175000017500000000234311242100540023636 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Validator(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "valid-module", self.__validate_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __validate(self, module): try: class_name = getattr(module, "class_name") if not hasattr(module, class_name): raise ValueError PluginClass = getattr(module, class_name) if hasattr(PluginClass, "__init__") is False: raise ValueError if hasattr(PluginClass, "load") is False: raise ValueError if hasattr(PluginClass, "unload") is False: raise ValueError self.__manager.emit("check-duplicate-plugins", (module, PluginClass)) except ValueError: print module, " has an invalid plugin class" return False def __quit_cb(self, *args): self.__destroy() return False def __validate_cb(self, manager, module): self.__validate(module) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginPathErrorHandler.py0000644000175000017500000000215711242100540025120 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Handler(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self, editor) self.__init_attributes(manager, editor) self.connect(editor, "quit", self.__quit_cb) self.connect(manager, "plugin-path-error", self.__error_cb) editor.register_object(self) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __create(self, plugin_path): try: # Can only create plugin path in home folder. if not plugin_path.startswith(self.__editor.home_folder): raise ValueError self.__manager.emit("create-plugin-path", plugin_path) except ValueError: self.__manager.emit("plugin-path-not-found-error", plugin_path) return False def __quit_cb(self, *args): self.__destroy() return False def __error_cb(self, manager, plugin_path): from gobject import idle_add, PRIORITY_LOW idle_add(self.__create, plugin_path, priority=PRIORITY_LOW) return False scribes-0.4~r910/SCRIBES/PluginInitializer/PluginsUpdater.py0000644000175000017500000000164211242100540023501 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Updater(SignalManager): def __init__(self, manager, editor): SignalManager.__init__(self) self.__init_attributes(manager, editor) self.connect(editor, "post-quit", self.__quit_cb) self.connect(manager, "loaded-plugin", self.__loaded_cb) self.connect(manager, "unloaded-plugin", self.__unloaded_cb) def __init_attributes(self, manager, editor): self.__manager = manager self.__editor = editor self.__plugins = [] return def __update(self, data, remove=False): self.__plugins.remove(data) if remove else self.__plugins.append(data) self.__manager.emit("active-plugins", self.__plugins) return False def __loaded_cb(self, manager, data): self.__update(data) return False def __unloaded_cb(self, manager, data): self.__update(data, True) return False def __quit_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/SCRIBES/PluginInitializer/Manager.py0000644000175000017500000000474111242100540022110 0ustar andreasandreasfrom gobject import GObject, SIGNAL_ACTION, SIGNAL_RUN_LAST from gobject import SIGNAL_NO_RECURSE, TYPE_NONE, TYPE_PYOBJECT SSIGNAL = SIGNAL_RUN_LAST|SIGNAL_NO_RECURSE|SIGNAL_ACTION class Manager(GObject): __gsignals__ = { "update-python-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "validate-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "plugin-path-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "search-path-updated": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "plugin-path-not-found-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "create-plugin-path": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "plugin-folder-creation-error": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "initialized-module": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "validate-language-module": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "valid-module": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "initialize-module": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "load-plugin": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "unload-plugin": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "loaded-plugin": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "unloaded-plugin": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "check-duplicate-plugins": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "active-plugins": (SSIGNAL, TYPE_NONE, (TYPE_PYOBJECT,)), "destroyed-plugins": (SSIGNAL, TYPE_NONE, ()), } def __init__(self, editor): GObject.__init__(self) from PluginReloader import Reloader Reloader(self, editor) from PluginsDestroyer import Destroyer Destroyer(self, editor) from PluginsUpdater import Updater Updater(self, editor) from PluginUnloader import Unloader Unloader(self, editor) from PluginLoader import Loader Loader(self, editor) from DuplicatePluginDetector import Detector Detector(self, editor) from PluginValidator import Validator Validator(self, editor) from LanguageModuleValidator import Validator Validator(self, editor) from ModuleValidator import Validator Validator(self, editor) from ModuleInitializer import Initializer Initializer(self, editor) from ModuleFinder import Finder Finder(self, editor) from ErrorManager import Manager Manager(self, editor) from HomePluginPathCreator import Creator Creator(self, editor) from PythonPathUpdater import Updater Updater(self, editor) from PluginPathErrorHandler import Handler Handler(self, editor) from PluginPathValidator import Validator Validator(self, editor) from Initializer import Initializer Initializer(self, editor) scribes-0.4~r910/SCRIBES/PluginInitializer/Makefile.am0000644000175000017500000000104411242100540022211 0ustar andreasandreasplugininitializerdir = $(pythondir)/SCRIBES/PluginInitializer plugininitializer_PYTHON = \ __init__.py \ Manager.py \ Initializer.py \ PythonPathUpdater.py \ PluginPathValidator.py \ PluginPathErrorHandler.py \ HomePluginPathCreator.py \ ErrorManager.py \ ModuleFinder.py \ ModuleInitializer.py \ ModuleValidator.py \ LanguageModuleValidator.py \ PluginValidator.py \ PluginLoader.py \ PluginUnloader.py \ PluginsUpdater.py \ PluginsDestroyer.py \ DuplicatePluginDetector.py \ PluginReloader.py clean-local: rm -rf *.pyc *.pyo scribes-0.4~r910/SCRIBES/ReadonlyManager.py0000644000175000017500000000274611242100540020147 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) self.__init_attributes(editor) editor.set_data("readonly", False) self.connect(editor, "loaded-file", self.__loaded_cb) self.connect(editor, "renamed-file", self.__loaded_cb) self.connect(editor, "toggle-readonly", self.__toggle_cb) self.connect(editor, "quit", self.__quit_cb) editor.register_object(self) def __init_attributes(self, editor): self.__editor = editor return False def __destroy(self): self.disconnect() self.__editor.unregister_object(self) del self return False def __set(self, readonly): self.__editor.set_data("readonly", readonly) self.__editor.emit("readonly", readonly) return False def __check(self, uri): self.__set(False) if self.__can_write(uri) else self.__set(True) return False def __toggle(self): try: if not self.__can_write(self.__editor.uri): raise ValueError self.__set(False) if self.__editor.readonly else self.__set(True) except ValueError: print "Error: You do not have permission to write to the file." return False def __can_write(self, uri): from Utils import check_uri_permission #FIXME: Bad function name return check_uri_permission(uri) def __loaded_cb(self, editor, uri, encoding): self.__check(uri) return False def __toggle_cb(self, *args): self.__toggle() return False def __quit_cb(self, *args): self.__destroy() return False scribes-0.4~r910/SCRIBES/MinimalModeMetadata.py0000644000175000017500000000072611242100540020727 0ustar andreasandreasfrom Utils import open_database from os.path import join basepath = join("Preferences", "MinimalMode.gdb") def get_value(): try: minimal_mode = False database = open_database(basepath, "r") minimal_mode = database["minimal_mode"] except KeyError: pass finally: database.close() return minimal_mode def set_value(minimal_mode): try: database = open_database(basepath, "w") database["minimal_mode"] = minimal_mode finally: database.close() return scribes-0.4~r910/SCRIBES/CompletionWindowVisibilityManager.py0000644000175000017500000000101111242100540023723 0ustar andreasandreasfrom SCRIBES.SignalConnectionManager import SignalManager class Manager(SignalManager): def __init__(self, editor): SignalManager.__init__(self) editor.set_data("completion_window_is_visible", False) self.connect(editor, "completion-window-is-visible", self.__visible_cb) self.connect(editor, "quit", self.__quit_cb) def __visible_cb(self, editor, visible): editor.set_data("completion_window_is_visible", visible) return False def __quit_cb(self, *args): self.disconnect() del self return False scribes-0.4~r910/SCRIBES/GlobalStore.py0000644000175000017500000000242011242100540017301 0ustar andreasandreasclass Store(object): def __init__(self): self.__init_attributes() def __init_attributes(self): self.__object_dictionary = {} return def add_object(self, name, instance): from operator import contains from Exceptions import GlobalStoreObjectExistsError if contains(self.__object_dictionary.keys(), name): raise GlobalStoreObjectExistsError from utils import generate_random_number object_id = generate_random_number(map(lambda x: x[1],self.__object_dictionary.values())) self.__object_dictionary[name] = instance, object_id return object_id def remove_object(self, name, object_id): from Exceptions import GlobalStoreObjectDoesNotExistError from operator import ne if ne(object_id, self.__object_dictionary[name][1]): raise GlobalStoreObjectDoesNotExistError del self.__object_dictionary[name] return def get_object(self, name): try: instance = self.__object_dictionary[name] except KeyError: from Exceptions import GlobalStoreObjectDoesNotExistError raise GlobalStoreObjectDoesNotExistError return instance[0] def list_objects(self): object_names = [] object_names = self.__object_dictionary.keys() object_names.sort() return object_names def __destroy(self): self.__object_dictionary.clear() del self self = None return scribes-0.4~r910/SCRIBES/Word.py0000644000175000017500000000205111242100540015777 0ustar andreasandreasdef starts_word(iterator, pattern): iterator = iterator.copy() character = iterator.get_char() if not pattern.match(character): return False if iterator.starts_line(): return True iterator.backward_char() character = iterator.get_char() if pattern.match(character): return False return True def ends_word(iterator, pattern): iterator = iterator.copy() if iterator.starts_line(): return False character = iterator.get_char() if pattern.match(character): return False iterator.backward_char() character = iterator.get_char() if pattern.match(character): return True return False def inside_word(iterator, pattern): iterator = iterator.copy() if starts_word(iterator, pattern) or ends_word(iterator, pattern): return True character = iterator.get_char() if pattern.match(character): return True return False def get_word_boundary(iterator, pattern): start = iterator.copy() end = iterator.copy() while starts_word(start, pattern) is False: start.backward_char() while ends_word(end, pattern) is False: end.forward_char() return start, end scribes-0.4~r910/SCRIBES/filedict.py0000644000175000017500000000715211242100540016656 0ustar andreasandreas"""filedict.py a Persistent Dictionary in Python Author: Erez Shinan Date : 31-May-2009 """ import UserDict import cPickle as pickle import sqlite3 class DefaultArg: pass class Solutions: Sqlite3 = 0 class FileDict(UserDict.DictMixin): "A dictionary that stores its data persistantly in a file" def __init__(self, solution=Solutions.Sqlite3, **options): assert solution == Solutions.Sqlite3 try: self.__conn = options.pop('connection') except KeyError: filename = options.pop('filename') self.__conn = sqlite3.connect(filename) self.__tablename = options.pop('table', 'dict') self._nocommit = False assert not options, "Unrecognized options: %s" % options self.__conn.execute('create table if not exists %s (id integer primary key, hash integer, key blob, value blob);'%self.__tablename) self.__conn.execute('create index if not exists %s_index ON %s(hash);' % (self.__tablename, self.__tablename)) self.__conn.commit() def _commit(self): if self._nocommit: return self.__conn.commit() def __pack(self, value): return sqlite3.Binary(pickle.dumps(value, -1)) def __unpack(self, value): return pickle.loads(str(value)) def __get_id(self, key): cursor = self.__conn.execute('select key,id from %s where hash=?;'%self.__tablename, (hash(key),)) for k,id in cursor: if self.__unpack(k) == key: return id raise KeyError(key) def __getitem__(self, key): cursor = self.__conn.execute('select key,value from %s where hash=?;'%self.__tablename, (hash(key),)) for k,v in cursor: if self.__unpack(k) == key: return self.__unpack(v) raise KeyError(key) def __setitem(self, key, value): value_pickle = self.__pack(value) try: id = self.__get_id(key) cursor = self.__conn.execute('update %s set value=? where id=?;'%self.__tablename, (value_pickle, id) ) except KeyError: key_pickle = self.__pack(key) cursor = self.__conn.execute('insert into %s (hash, key, value) values (?, ?, ?);' %self.__tablename, (hash(key), key_pickle, value_pickle) ) assert cursor.rowcount == 1 def __setitem__(self, key, value): self.__setitem(key, value) self._commit() def __delitem__(self, key): id = self.__get_id(key) cursor = self.__conn.execute('delete from %s where id=?;'%self.__tablename, (id,)) if cursor.rowcount <= 0: raise KeyError(key) self._commit() def update(self, d): for k,v in d.iteritems(): self.__setitem(k, v) self._commit() def __iter__(self): return (self.__unpack(x[0]) for x in self.__conn.execute('select key from %s;'%self.__tablename) ) def keys(self): return iter(self) def values(self): return (self.__unpack(x[0]) for x in self.__conn.execute('select value from %s;'%self.__tablename) ) def items(self): return (map(self.__unpack, x) for x in self.__conn.execute('select key,value from %s;'%self.__tablename) ) def iterkeys(self): return self.keys() def itervalues(self): return self.values() def iteritems(self): return self.items() def __contains__(self, key): try: self.__get_id(key) return True except KeyError: return False def __len__(self): return self.__conn.execute('select count(*) from %s;' % self.__tablename).fetchone()[0] def __del__(self): try: self.__conn except AttributeError: pass else: self.__conn.commit() @property def batch(self): return self._Batch(self) class _Batch: def __init__(self, d): self.__d = d def __enter__(self): self.__old_nocommit = self.__d._nocommit self.__d._nocommit = True return self.__d def __exit__(self, type, value, traceback): self.__d._nocommit = self.__old_nocommit self.__d._commit() return True scribes-0.4~r910/SCRIBES/InstanceManager.py0000644000175000017500000001535211242100540020133 0ustar andreasandreasclass Manager(object): def __init__(self): from DBusService import DBusService DBusService(self) self.__init_attributes() from SaveProcessInitializer.Manager import Manager Manager() # from TerminalSignalHandler import Handler # Handler(self) from signal import signal, SIGTERM, SIG_DFL signal(SIGTERM, SIG_DFL) # signal(SIGQUIT, SIG_DFL) from gobject import timeout_add, PRIORITY_LOW timeout_add(60000, self.__init_psyco, priority=PRIORITY_LOW) self.__init_i18n() def __init_attributes(self): from collections import deque self.__editor_instances = deque([]) from gtk import WindowGroup self.__wingroup = WindowGroup() self.__busy = False self.__interval = 0 self.__shortcut_list = [] # self.__count = 0 return ######################################################################## # # Public APIs # ######################################################################## def register_editor(self, instance): self.__wingroup.add_window(instance.window) self.__editor_instances.append(instance) return False def unregister_editor(self, instance): try: self.__editor_instances.remove(instance) self.__wingroup.remove_window(instance.window) except (ValueError, TypeError): print "====================================================" print "Module: InstanceManager.py" print "Class: Manager" print "Method: unregister_editor" print "Exception Type: ValueError" print "Error: Instance not found", instance print "====================================================" finally: if instance and instance.window: instance.window.destroy() if instance: del instance # Quit when there are no editor instances. if not self.__editor_instances: self.__quit() return def save_processor_is_ready(self): from Utils import get_save_processor processor = get_save_processor() return processor.is_ready() if processor else False def get_save_processor(self): from Utils import get_save_processor return get_save_processor() def open_files(self, uris=None, encoding="utf-8", stdin=None): try: if not uris: raise ValueError has_uri = lambda x: x in self.get_uris() has_not_uri = lambda x: not (x in self.get_uris()) open_file = lambda x: self.__open_file(x, encoding) # Focus respective window if file is already open. tuple([self.focus_file(str(uri)) for uri in uris if has_uri(str(uri))]) # Open new file if it's not already open. tuple([open_file(str(uri)) for uri in uris if has_not_uri(str(uri))]) except ValueError: self.__new_editor(stdin=stdin) return False def close_files(self, uris): if not uris: return False [self.__close_file(str(uri)) for uri in uris] return False def close_all_windows(self): # This is the best place I can think of to capture last session files. last_session_uris = self.get_uris() from LastSessionMetadata import set_value set_value(last_session_uris) from copy import copy [instance.close() for instance in copy(self.__editor_instances)] return False def get_last_session_uris(self): from LastSessionMetadata import get_value from Utils import uri_exists return tuple([uri for uri in get_value() if uri_exists(uri)]) def focus_file(self, uri): if uri is None: uri = "" found_instance = tuple([editor for editor in self.__editor_instances if editor.uri == str(uri)]) if not found_instance: return False editor = found_instance[0] self.__focus(editor) return False def focus_by_id(self, id_): instance = tuple([instance for instance in self.__editor_instances if instance.id_ == id_]) editor = instance[0] self.__focus(editor) return False def get_uris(self): if not self.__editor_instances: return () return tuple([str(editor.uri) for editor in self.__editor_instances if editor.uri]) def get_text(self): if not self.__editor_instances: return () return tuple([editor.text for editor in self.__editor_instances]) def get_editor_instances(self): return self.__editor_instances def add_shortcut(self, shortcut): return self.__shortcut_list.append(shortcut) def remove_shortcut(self, shortcut): return self.__shortcut_list.remove(shortcut) def get_shortcuts(self): return self.__shortcut_list def response(self): if self.__busy: return False self.__busy = True from Utils import response response() self.__busy = False return False def set_vm_interval(self, response=True): #FIXME: This function is deprecated! return False def __open_file(self, uri, encoding="utf-8"): if not uri: return False uri = str(uri) instances = self.__editor_instances empty_windows = tuple([x for x in instances if not x.contains_document]) empty_windows[0].load_file(str(uri), encoding) if empty_windows else self.__new_editor(uri, encoding) return False def __close_file(self, uri): from copy import copy [editor.close() for editor in copy(self.__editor_instances) if editor.uri == str(uri)] return False def __new_editor(self, uri=None, encoding="utf-8", stdin=None): if uri is None: uri = "" from Editor import Editor Editor(self, str(uri), encoding, stdin) return False def __focus(self, editor): editor.refresh(True) if editor.window.get_data("minimized"): editor.window.deiconify() from Utils import SCRIBES_MAIN_WINDOW_STARTUP_ID editor.window.set_startup_id(SCRIBES_MAIN_WINDOW_STARTUP_ID) editor.window.present() editor.window.window.focus() editor.refresh(True) return False def __init_garbage_collector(self): from gc import collect collect() return True def __init_psyco(self): try: from psyco import background background() except ImportError: pass return False def __init_i18n(self): from Globals import data_path from os import path locale_folder = path.join(data_path, "locale") # Initialize glade first. try: from locale import setlocale, LC_ALL, Error, bindtextdomain bindtextdomain("scribes", locale_folder) setlocale(LC_ALL, "") except Error: pass from gtk import glade glade.bindtextdomain("scribes", locale_folder) glade.textdomain("scribes") from gettext import textdomain, bindtextdomain from gettext import install, bind_textdomain_codeset bindtextdomain("scribes", locale_folder) bind_textdomain_codeset("scribes", "UTF-8") textdomain("scribes") install("scribes", locale_folder, unicode=1) return def __remove_swap_area(self): from glob import glob from Globals import metadata_folder, tmp_folder from os.path import join files = glob(join(tmp_folder, ".Scribes*scribes")) from shutil import rmtree [rmtree(file_, True) for file_ in files] files = glob(join(metadata_folder, "__db*")) [rmtree(file_, True) for file_ in files] return def __quit(self): self.__remove_swap_area() raise SystemExit def force_quit(self): from os import _exit _exit(0) return scribes-0.4~r910/SCRIBES/URIManager.py0000644000175000017500000000240611242100540017022 0ustar andreasandreasclass Manager(object): def __init__(self, editor, uri): self.__init_attributes(editor, uri) self.__set(uri) self.__sigid1 = editor.connect("checking-file", self.__checking_file_cb) self.__sigid2 = editor.connect("load-error", self.__load_error_cb) self.__sigid3 = editor.connect("saved-file", self.__saved_file_cb) self.__sigid4 = editor.connect("quit", self.__destroy_cb) editor.register_object(self) def __init_attributes(self, editor, uri): self.__editor = editor self.__uri = uri return False def __destroy(self): self.__editor.disconnect_signal(self.__sigid1, self.__editor) self.__editor.disconnect_signal(self.__sigid2, self.__editor) self.__editor.disconnect_signal(self.__sigid3, self.__editor) self.__editor.disconnect_signal(self.__sigid4, self.__editor) self.__editor.unregister_object(self) del self self = None return False def __set(self, uri=None): uri = uri if uri else None self.__editor.set_data("uri", uri) return False def __destroy_cb(self, *args): self.__destroy() return False def __checking_file_cb(self, editor, uri): self.__set(uri) return False def __load_error_cb(self, *args): self.__set() return False def __saved_file_cb(self, editor, uri, encoding): self.__set(uri) return False scribes-0.4~r910/ChangeLog0000644000175000017500000003664711242100540015214 0ustar andreasandreas2007-12-22 Lateef Alabi-Oki * New Save system * automatic word completion tweaks * remember window position and size for blank windows (rockalite) * proper use of tabs/spaces depending on user configuration when inserting templates (rockalite) * performance improvements * fix crasher bug after saves * Addressed bugs 1837941 1834492 1833757 1832650 1829035 1813341 1813334 1808136 1777273 1740190 2007-06-06 Lateef Alabi-Oki * Allow open dialog to open multiple documents 2007-06-06 Lateef Alabi-Oki * Add encoding selection to open/save dialog 2007-06-02 Lateef Alabi-Oki * Automatic completion now takes into account words in all documents * New paragraph operations - Press (alt-p) to select a paragraph - Press (alt-q) to reflow, or refill, a paragraph - Press (alt-Up) to move cursor to previous paragraph - Press (alt-Down) to move cursor to next paragraph * New navigation operations - Press (ctrl-Up) to scroll document up. - Press (ctrl-Down) to scroll document down. - Press (alt-m) to center the current line. * New line operation - Press (ctrl-shift-d) to duplicate a line or selected lines. * Dutch translation by Filip Vervloesem * Swedish translation by Daniel Nylander * Addressed bugs #1691125, #1701252, #1714001, #1720989 2007-05-16 Lateef Alabi-Oki * Fixed automatic completion bug that prevents cursor movement * New logo and window icon. * Addressed bugs #1718133 #1714001 #1717392 2007-05-13 Lateef Alabi-Oki * Brazilian Portuguese translation by Leonardo Fontenelle * More performance tweaks * Fixed AMD64 specific issues * Fixed several crasher bugs * Addressed bugs #1716591 #1714040 #1714002 #1696161 #1695328 #1693263 #1691125 #1686368 2007-04-28 Lateef Alabi-Oki * Don't overwrite folders or files when renaming files * Fixes in French translation by Hanusz leszek * Fixes in printing plugin by Peter Gordon (codergeek) * More performance tweaks 2007-03-31 Lateef Alabi-Oki * Fixed bugs in automatic word completion system. 2007-03-14 Lateef Alabi-Oki * Extend the editor via python plugins * Automatic correction or replacement * New template system * Search within selection * File modification alert * Syntax color switcher * New minimalist interface (toggle ctrl - alt -m) * Performance optimizations especially with Psyco installed. * Squashed all non-feature request bugs in the database. 2006-11-04 Lateef Alabi-Oki * Rewrite of Scribes 2006-10-06 gettextize * Makefile.am (SUBDIRS): Add intl, po. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile, po/Makefile.in. 2006-10-06 gettextize * Makefile.am (SUBDIRS): Add intl. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile. 2006-10-06 gettextize * m4/codeset.m4: New file, from gettext-0.14.6. * m4/gettext.m4: New file, from gettext-0.14.6. * m4/glibc2.m4: New file, from gettext-0.14.6. * m4/glibc21.m4: New file, from gettext-0.14.6. * m4/iconv.m4: New file, from gettext-0.14.6. * m4/intdiv0.m4: New file, from gettext-0.14.6. * m4/intmax.m4: New file, from gettext-0.14.6. * m4/inttypes.m4: New file, from gettext-0.14.6. * m4/inttypes_h.m4: New file, from gettext-0.14.6. * m4/inttypes-pri.m4: New file, from gettext-0.14.6. * m4/isc-posix.m4: New file, from gettext-0.14.6. * m4/lcmessage.m4: New file, from gettext-0.14.6. * m4/lib-ld.m4: New file, from gettext-0.14.6. * m4/lib-link.m4: New file, from gettext-0.14.6. * m4/lib-prefix.m4: New file, from gettext-0.14.6. * m4/longdouble.m4: New file, from gettext-0.14.6. * m4/longlong.m4: New file, from gettext-0.14.6. * m4/nls.m4: New file, from gettext-0.14.6. * m4/po.m4: New file, from gettext-0.14.6. * m4/printf-posix.m4: New file, from gettext-0.14.6. * m4/progtest.m4: New file, from gettext-0.14.6. * m4/signed.m4: New file, from gettext-0.14.6. * m4/size_max.m4: New file, from gettext-0.14.6. * m4/stdint_h.m4: New file, from gettext-0.14.6. * m4/uintmax_t.m4: New file, from gettext-0.14.6. * m4/ulonglong.m4: New file, from gettext-0.14.6. * m4/wchar_t.m4: New file, from gettext-0.14.6. * m4/wint_t.m4: New file, from gettext-0.14.6. * m4/xsize.m4: New file, from gettext-0.14.6. 2006-10-05 gettextize * Makefile.am (SUBDIRS): Add intl. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile. 2006-10-05 gettextize * m4/codeset.m4: New file, from gettext-0.14.6. * m4/gettext.m4: New file, from gettext-0.14.6. * m4/glibc2.m4: New file, from gettext-0.14.6. * m4/glibc21.m4: New file, from gettext-0.14.6. * m4/iconv.m4: New file, from gettext-0.14.6. * m4/intdiv0.m4: New file, from gettext-0.14.6. * m4/intmax.m4: New file, from gettext-0.14.6. * m4/inttypes.m4: New file, from gettext-0.14.6. * m4/inttypes_h.m4: New file, from gettext-0.14.6. * m4/inttypes-pri.m4: New file, from gettext-0.14.6. * m4/isc-posix.m4: New file, from gettext-0.14.6. * m4/lcmessage.m4: New file, from gettext-0.14.6. * m4/lib-ld.m4: New file, from gettext-0.14.6. * m4/lib-link.m4: New file, from gettext-0.14.6. * m4/lib-prefix.m4: New file, from gettext-0.14.6. * m4/longdouble.m4: New file, from gettext-0.14.6. * m4/longlong.m4: New file, from gettext-0.14.6. * m4/nls.m4: New file, from gettext-0.14.6. * m4/po.m4: New file, from gettext-0.14.6. * m4/printf-posix.m4: New file, from gettext-0.14.6. * m4/progtest.m4: New file, from gettext-0.14.6. * m4/signed.m4: New file, from gettext-0.14.6. * m4/size_max.m4: New file, from gettext-0.14.6. * m4/stdint_h.m4: New file, from gettext-0.14.6. * m4/uintmax_t.m4: New file, from gettext-0.14.6. * m4/ulonglong.m4: New file, from gettext-0.14.6. * m4/wchar_t.m4: New file, from gettext-0.14.6. * m4/wint_t.m4: New file, from gettext-0.14.6. * m4/xsize.m4: New file, from gettext-0.14.6. * Makefile.am (SUBDIRS): Add po. * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in. 2006-09-22 gettextize * Makefile.am (EXTRA_DIST): Add m4/ChangeLog. 2006-09-22 gettextize * Makefile.am (SUBDIRS): Add intl, po. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile, po/Makefile.in. 2006-08-21 gettextize * Makefile.am (EXTRA_DIST): Add config.rpath. 2006-08-21 gettextize * Makefile.am (SUBDIRS): Add intl, po. (EXTRA_DIST): Add subdir/config.rpath. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile, po/Makefile.in. 2006-08-04 gettextize * Makefile.am (SUBDIRS): Add intl, po. (EXTRA_DIST): Add subdir/config.rpath, m4/ChangeLog. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile, po/Makefile.in. 2006-08-03 gettextize * Makefile.am (EXTRA_DIST): Add subdir/config.rpath, subdir/mkinstalldirs. 2006-08-03 gettextize * Makefile.am (SUBDIRS): Add intl, po. (ACLOCAL_AMFLAGS): New variable. (EXTRA_DIST): Add config.rpath, mkinstalldirs, m4/ChangeLog. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile, po/Makefile.in. 2005-11-03 Lateef Alabi-Oki *Bookmarks allow you to mark important lines in a document and navigate to them quickly and efficiently. This release features a bookmark browser. You can display the bookmark browser by pressing (control - b). The bookmark browser provides a visual alternative to search and navigating to bookmarks in a document quickly and efficiently. Press (control - d) to bookmark a line. See the manual for other bookmark operations. *Permission issues caused by GNOME-VFS problems in gnome-python-2.15 have been fixed. 2005-10-03 Lateef Alabi-Oki *The automatic completion system has been enhanced to behave robustly under all conditions, especially when editing very large files. The enhancements also makes the completion system faster, more efficient and scalable. In addition, words containing dash ("-") characters will now be recognized as a unit and automatically completed when appropriate. *You can now open multiple files via drag and drop. In addition, you can now drag and drop selected text within documents. *The word selection behavior has been tweaked to enable you to select words that contain underscore ("_") or dash ("-") characters. You can press alt-w to select a word. See the manual(F1) for more selection operations. *Undo/Redo stack corruptions triggered by line operations have been fixed. 2005-09-06 Lateef Alabi-Oki * Fix inability to launch a new instance of the text editor when clicking the new file toolbar button bug discovered by Ulrik Sverdrup. 2005-09-04 Lateef Alabi-Oki * Updated German translation by Maximilian Baumgart * Updated Brazilian Portuguese translation by Leonardo F. Fontenelle * Fixed undo/redo bug discovered by Tom Czubinski * Fixed drag and drop bug discovered by Ulrik Sverdrup * Fixed readonly bug discovered by Ulrik Sverdrup * Fixed inability to open Ruby/Javascript file bug discovered by Timothée Peignier * Fixed bookmark bug * Minor startup optimizations * Minor file loading optimizations 2005-08-25 Lateef Alabi-Oki * Implemented a template system popularly called snippets * Implemented syntax color editor * Press F3 to toggle readonly mode on or off * Press alt-shift-t to convert tabs to spaces * Press alt-b to select text inside brackets, braces and parenthesis * Select a text and press any opening bracket, single or double quote, brace or parenthesis to automatically enclose the selected text in the closing pair * Press the escape key to move the cursor out of a bracket region after an automatic bracket completion. * Press the closing pair of an opening bracket to move the cursor out of a bracket region immediately after an automatic bracket completion * Automatic word completion list is now sorted based on the number of occurence of each word * Bookmarks are now preserved and persistent * Encodings of each file are now preserved and persistent * Automatic word completion window now dynamically resizes and positions itself inside the text editor and never outside it * Windows and dialogs are now resolution independent * Improved line operation behavior * Fixed preferences bugs * Fixed GConf bugs * Fixed search bugs * Fixed feedback system bugs * Fixed open dialog filter bugs * Fixed progress bar bugs * Fixed various file loading bugs * Fixed position remembering bugs * Fixed drag and drop bugs * Fixed encoding bugs * Fixed word completion bugs * Fixed GConf Schema bugs (Thanks to Fryderyk Dziarmagowski) * Fixed annoying terminal output bugs * HIG love for dialogs and windows * French translation by Gautier Portet * Italian translation by Stefano Esposito * Updated German translation by Maximilian Baumgart 2005-08-21 Lateef Alabi-Oki * Implemented automatic word completion * Implemented automatic bracket completion and smart insertion * Implemented bookmarks * Press control-d to bookmark a line * Press alt-right to move to the next bookmark * Press alt-left to move to the previous bookmark * Press alt-delete to remove a bookmark on a line * Press alt-shift-delete to remove all bookmarks * You can now open and save files in different character encoding * New artwork by Alexandre Moore * Updated Brazillian Portuguese translation by Leonardo F. Fontenelle * Updated Russian translation by Paul Chavard * German translation by Maximilian Baumgart * Fixed bug in startup script * Fixed saving bug * Proper credits to contributors in about dialog 2005-08-14 Lateef Alabi-Oki * Brazilian Portuguese translation by Leonardo F. Fontenelle * Russian translation by Paul Chavard * You can now swap the case of selected text by pressing (Alt - Shift - down) * You can now capitalize a selected text by by pressing (Alt - Shift - up) * Reverted a behavior that opens new editor windows centered on your desktop. * Improved cursor behavior and feedback. * Improved space removing behavior to support multiline operations. * Improved case changing behavior. * Improved indentation behavior. * Improved join line behavior. * Fixed case bug for non-ascii characters. * Fixed bug in startup script. * Fixed a few bugs with readonly mode behavior. * Facilities for internationalization and localization are now in place. Translators are needed. 2005-08-01 Lateef Alabi-Oki * The editor now remembers the window state, position and size of each file you edit. * The editor now remembers the last line and cursor position of each file you edit. * The editor now opens windows centered on your display. * The editor now frees up the shell terminal when launched from it. * The editor now displays a progress bar for files that take more than a second to load. * A new feedback system has been implemented. Icons indicating user operations and the editor's mode are now displayed in the statusbar. * Tooltips for the toolbar buttons now contain shortcut keys associated with them. * You can now use the editor in fullscreen mode by pressing F11 to activate the mode and pressing it once more to deactivate it. * You can now turn on/off spell checking by pressing F6. * You can indent or unindent line or lines by pressing (Ctrl - T) or (Ctrl -Shift - T) respectively. The command for this function is also available in the popup menu. * You can now find matching brackets by pressing (Ctrl - b). The command for this function is also available in the popup menu. * You can now delete a line by pressing (Alt - d). * You can now join a line by pressing (Alt - j). * You can now open a line by the current line by pressing (Alt - o). * You can now open a line above the current line by pressing (Alt - Shift - o). * You can now delete text from the cursor to the end of line by pressing (Alt - End). * You can now delete text from the cursor to the beginning of a line by pressing (Alt - Home). * You can now select a line by pressing (Alt - l) * You can now select a sentence by pressing (Alt - s) * You can now select a word by pressing (Alt - w) * You can now select a paragraph by pressing (Alt -p). * You can now remove all spaces at the end of a line by pressing (Alt - r) * You can now remove all spaces at the beginning of a line by pressing (Alt - Shift - r) * You can now changed selected text from lowercase to uppercase by pressing (Alt - Up) * You can now change selected text from uppercase to lowercase by pressing (Alt - Down) * Readonly mode has been improved to enhance readability and eliminate distractions. * The entry field in the findbar and replacebar can now be focused via access keys. * Command line operations have been implemented. Current options include --newfile (-n), --readonly (-r), --version (-v) and --help (-h). Type 'scribes --help' at the prompt in your shell terminal for more information. * The editor now adheres to most of the GNOME Human Interface Guide, where it makes sense. * The editor's help manual has been updated. * Facilities to support internationalization and localization are now in place. Translators are needed. 2005-07-21 Lateef Alabi-Oki * Initial release scribes-0.4~r910/aclocal.m40000644000175000017500000021241611242100540015270 0ustar andreasandreas# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # gnome-common.m4 # dnl GNOME_COMMON_INIT AC_DEFUN([GNOME_COMMON_INIT], [ dnl this macro should come after AC_CONFIG_MACRO_DIR AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0]) dnl ensure that when the Automake generated makefile calls aclocal, dnl it honours the $ACLOCAL_FLAGS environment variable ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" if test -n "$ac_macro_dir"; then ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS" fi AC_SUBST([ACLOCAL_AMFLAGS]) ]) AC_DEFUN([GNOME_DEBUG_CHECK], [ AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [turn on debugging]),, [enable_debug=no]) if test x$enable_debug = xyes ; then AC_DEFINE(GNOME_ENABLE_DEBUG, 1, [Enable additional debugging at the expense of performance and size]) fi ]) dnl GNOME_MAINTAINER_MODE_DEFINES () dnl define DISABLE_DEPRECATED dnl AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES], [ AC_REQUIRE([AM_MAINTAINER_MODE]) DISABLE_DEPRECATED="" if test $USE_MAINTAINER_MODE = yes; then DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP" for DOMAIN in $DOMAINS; do DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES" done fi AC_SUBST(DISABLE_DEPRECATED) ]) dnl GNOME_COMPILE_WARNINGS dnl Turn on many useful compiler warnings dnl For now, only works on GCC AC_DEFUN([GNOME_COMPILE_WARNINGS],[ dnl ****************************** dnl More compiler warnings dnl ****************************** AC_ARG_ENABLE(compile-warnings, AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], [Turn on compiler warnings]),, [enable_compile_warnings="m4_default([$1],[yes])"]) warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT($has_option) if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) ;; esac CFLAGS="$realsave_CFLAGS" AC_MSG_CHECKING(what warning flags to pass to the C compiler) AC_MSG_RESULT($warning_flags) AC_ARG_ENABLE(iso-c, AC_HELP_STRING([--enable-iso-c], [Try to warn if code is not ISO C ]),, [enable_iso_c=no]) AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCFLAGS) WARN_CFLAGS="$warning_flags $complCFLAGS" AC_SUBST(WARN_CFLAGS) ]) dnl For C++, do basically the same thing. AC_DEFUN([GNOME_CXX_WARNINGS],[ AC_ARG_ENABLE(cxx-warnings, AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@] [Turn on compiler warnings.]),, [enable_cxx_warnings="m4_default([$1],[minimum])"]) AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) warnCXXFLAGS= if test "x$GXX" != xyes; then enable_cxx_warnings=no fi if test "x$enable_cxx_warnings" != "xno"; then if test "x$GXX" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) warnCXXFLAGS="-Wall -Wno-unused" ;; esac ## -W is not all that useful. And it cannot be controlled ## with individual -Wno-xxx flags, unlike -Wall if test "x$enable_cxx_warnings" = "xyes"; then warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual" fi fi fi AC_MSG_RESULT($warnCXXFLAGS) AC_ARG_ENABLE(iso-cxx, AC_HELP_STRING([--enable-iso-cxx], [Try to warn if code is not ISO C++ ]),, [enable_iso_cxx=no]) AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) complCXXFLAGS= if test "x$enable_iso_cxx" != "xno"; then if test "x$GXX" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; esac case " $CXXFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCXXFLAGS) WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" AC_SUBST(WARN_CXXFLAGS) ]) # nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gnome-doc-utils.m4]) m4_include([m4/intltool.m4]) scribes-0.4~r910/gnome-doc-utils.make0000644000175000017500000005471711242100540017305 0ustar andreasandreas# gnome-doc-utils.make - make magic for building documentation # Copyright (C) 2004-2005 Shaun McCance # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ################################################################################ ## @@ Generating Header Files ## @ DOC_H_FILE ## The name of the header file to generate DOC_H_FILE ?= ## @ DOC_H_DOCS ## The input DocBook files for generating the header file DOC_H_DOCS ?= $(DOC_H_FILE): $(DOC_H_DOCS); @rm -f $@.tmp; touch $@.tmp; echo 'const gchar* documentation_credits[] = {' >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ xsltproc --path "$$xmlpath" $(_credits) $$doc; \ done | sort | uniq \ | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp echo ' NULL' >> $@.tmp echo '};' >> $@.tmp echo >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ echo $$xmlpath; \ ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ for id in $$ids; do \ echo '#define HELP_'`echo $$docid`'_'`echo $$id \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ done; \ echo >> $@.tmp; \ done; cp $@.tmp $@ && rm -f $@.tmp dist-check-gdu: if !HAVE_GNOME_DOC_UTILS @echo "*** GNOME Doc Utils must be installed in order to make dist" @false endif .PHONY: dist-doc-header dist-doc-header: $(DOC_H_FILE) @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) .PHONY: clean-doc-header _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) clean-local: $(_clean_doc_header) distclean-local: $(_clean_doc_header) mostlyclean-local: $(_clean_doc_header) maintainer-clean-local: $(_clean_doc_header) clean-doc-header: rm -f $(DOC_H_FILE) all: $(DOC_H_FILE) ################################################################################ ## @@ Generating Documentation Files ## @ DOC_MODULE ## The name of the document being built DOC_MODULE ?= ## @ DOC_ID ## The unique identifier for a Mallard document DOC_ID ?= ## @ DOC_PAGES ## Page files in a Mallard document DOC_PAGES ?= ## @ DOC_ENTITIES ## Files included with a SYSTEM entity DOC_ENTITIES ?= ## @ DOC_INCLUDES ## Files included with XInclude DOC_INCLUDES ?= ## @ DOC_FIGURES ## Figures and other external data DOC_FIGURES ?= ## @ DOC_FORMATS ## The default formats to be built and installed DOC_FORMATS ?= docbook _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) ## @ DOC_LINGUAS ## The languages this document is translated into DOC_LINGUAS ?= _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ $(filter $(LINGUAS),$(DOC_LINGUAS)), \ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ ################################################################################ ## Variables for Bootstrapping _xml2po ?= `which xml2po` _xml2po_mode = $(if $(DOC_ID),mallard,docbook) _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` _malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl if ENABLE_SK _ENABLE_SK = true _skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` _sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` _skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml endif ################################################################################ ## @@ Rules for OMF Files db2omf_args = \ --stringparam db2omf.basename $(DOC_MODULE) \ --stringparam db2omf.format $(3) \ --stringparam db2omf.dtd \ $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ --stringparam db2omf.omf_dir "$(OMF_DIR)" \ --stringparam db2omf.help_dir "$(HELP_DIR)" \ --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ $(if $(_ENABLE_SK), \ --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ $(_db2omf) $(2) ## @ _DOC_OMF_IN ## The OMF input file _DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) ## @ _DOC_OMF_DB ## The OMF files for DocBook output _DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) $(_DOC_OMF_DB) : $(_DOC_OMF_IN) $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist." >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } ## @ _DOC_OMF_HTML ## The OMF files for HTML output _DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) $(_DOC_OMF_HTML) : $(_DOC_OMF_IN) $(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml if ENABLE_SK @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist" >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } endif xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } ## @ _DOC_OMF_ALL ## All OMF output files to be built # FIXME _DOC_OMF_ALL = \ $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) .PHONY: omf omf: $(_DOC_OMF_ALL) ################################################################################ ## @@ C Locale Documents ## @ _DOC_C_MODULE ## The top-level documentation file in the C locale _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) ## @ _DOC_C_PAGES ## Page files in a Mallard document in the C locale _DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) ## @ _DOC_C_ENTITIES ## Files included with a SYSTEM entity in the C locale _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) ## @ _DOC_C_XINCLUDES ## Files included with XInclude in the C locale _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) ## @ _DOC_C_DOCS ## All documentation files in the C locale _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) $(_DOC_C_MODULE) ## @ _DOC_C_DOCS_NOENT ## All documentation files in the C locale, ## except files included with a SYSTEM entity _DOC_C_DOCS_NOENT = \ $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) ## @ _DOC_C_FIGURES ## All figures and other external data in the C locale _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) ## @ _DOC_C_HTML ## All HTML documentation in the C locale # FIXME: probably have to shell escape to determine the file names _DOC_C_HTML = $(foreach f, \ $(shell xsltproc --xinclude \ --stringparam db.chunk.basename "$(DOC_MODULE)" \ $(_chunks) "C/$(DOC_MODULE).xml"), \ C/$(f).xhtml) ############################################################################### ## @@ Other Locale Documentation ## @ _DOC_POFILES ## The .po files used for translating the document _DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) .PHONY: po po: $(_DOC_POFILES) ## @ _DOC_MOFILES ## The .mo files used for translating the document _DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES)) .PHONY: mo mo: $(_DOC_MOFILES) ## @ _DOC_LC_MODULES ## The top-level documentation files in all other locales _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) ## @ _DOC_LC_PAGES ## Page files in a Mallard document in all other locales _DOC_LC_PAGES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ $(lc)/$(notdir $(page)) )) ## @ _DOC_LC_XINCLUDES ## Files included with XInclude in all other locales _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) ## @ _DOC_LC_HTML ## All HTML documentation in all other locales # FIXME: probably have to shell escape to determine the file names _DOC_LC_HTML = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ $(lc)/$(notdir $(doc)) )) ## @ _DOC_LC_DOCS ## All documentation files in all other locales _DOC_LC_DOCS = \ $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) ## @ _DOC_LC_FIGURES ## All figures and other external data in all other locales _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) _DOC_SRC_FIGURES = \ $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) $(_DOC_POFILES): @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi @if test ! -f $@ -a -f $(srcdir)/$@; then \ echo "cp $(srcdir)/$@ $@"; \ cp "$(srcdir)/$@" "$@"; \ fi; @docs=; \ list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi $(_DOC_MOFILES): %.mo: %.po @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi msgfmt -o $@ $< # FIXME: fix the dependancy # FIXME: hook xml2po up $(_DOC_LC_DOCS) : $(_DOC_MOFILES) $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \ if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) ## @ _DOC_POT ## A pot file _DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) $(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ ################################################################################ ## @@ All Documentation ## @ _DOC_HTML_ALL ## All HTML documentation, only if it's built _DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ $(_DOC_C_HTML) $(_DOC_LC_HTML)) _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) ################################################################################ ## All all: \ $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) ################################################################################ ## Clean .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) clean-doc-lc: rm -f $(_DOC_LC_DOCS) rm -f $(_DOC_MOFILES) @list='$(_DOC_POFILES)'; for po in $$list; do \ if ! test "$$po" -ef "$(srcdir)/$$po"; then \ echo "rm -f $$po"; \ rm -f "$$po"; \ fi; \ done # .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc/.xml2po.mo"; then \ echo "rm -f $$lc/.xml2po.mo"; \ rm -f "$$lc/.xml2po.mo"; \ fi; \ done clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ echo "rmdir $$dir"; \ rmdir "$$dir"; \ fi; \ done; \ done _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) _clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) distclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) mostlyclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) maintainer-clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) ################################################################################ ## Dist .PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk doc-dist-hook: \ $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) @for lc in C $(_DOC_REAL_LINGUAS); do \ echo " $(mkinstalldirs) $(distdir)/$$lc"; \ $(mkinstalldirs) "$(distdir)/$$lc"; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done dist-doc-figs: $(_DOC_SRC_FIGURES) @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ for fig in $$list; do \ if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$fig"; then \ figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$figdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ $(mkinstalldirs) "$(distdir)/$$figdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ fi; \ done; dist-doc-omf: @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" dist-doc-dsk: @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" ################################################################################ ## Check .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ for page in $(DOC_PAGES); do \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \ done; \ done check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done ################################################################################ ## Install .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk _doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) install-data-local: \ $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) # $(if $(_DOC_DSK_IN),install-doc-dsk) install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ else \ figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ if $$figsymlink; then \ echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ else \ echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ fi; \ done; \ done install-doc-html: echo install-html install-doc-omf: $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk ################################################################################ ## Uninstall .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) # $(if $(_DOC_DSK_IN),uninstall-doc-dsk) uninstall-doc-docs: @list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done scribes-0.4~r910/removepyc.py0000644000175000017500000000114411242100540016005 0ustar andreasandreas#! /usr/bin/env python # -*- coding: utf8 -*- def main(): print "Removing byte compiled python objects please wait..." __remove(__byte_compiled_files()) return def __byte_compiled_files(): from os import walk, getcwd from os.path import join __files = [] for root, dirs, files in walk(getcwd()): for filename in files: if filename.endswith(".pyc") or filename.endswith(".pyo"): _file = join(root, filename) __files.append(_file) return __files def __remove(files): from os import remove [remove(path) for path in files] return if __name__ == "__main__": from sys import argv main() scribes-0.4~r910/install-sh0000755000175000017500000003253711242100540015440 0ustar andreasandreas#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: scribes-0.4~r910/i18n_plugin_extractor.py0000644000175000017500000000113511242100540020224 0ustar andreasandreasdef main(argv): if argv[0] != "plugins": raise RuntimeError files = __get_i18n_files(argv[0]) __write(files) return def __get_i18n_files(folder): from os import walk i18n_files = [] for root, dirs, files in walk(folder): for filename in files: if filename.endswith("glade") or filename == "i18n.py": _file = root + "/" + filename + "\n" i18n_files.append(_file) return i18n_files def __write(files): string = "".join(files) handle = open("i18n_plugin_files.txt", "w") handle.write(string) handle.close() return if __name__ == "__main__": from sys import argv main(argv[1:]) scribes-0.4~r910/autogen.sh0000644000175000017500000000074011242100540015421 0ustar andreasandreas#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. PKG_NAME="scribes" (test -f $srcdir/SCRIBES/Editor.py) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } which gnome-autogen.sh || { echo "You need to install gnome-common from the GNOME CVS" exit 1 } REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh