?? meld
字號:
#! /usr/bin/env python### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>### 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## pychecker#import sysif "--pychecker" in sys.argv: sys.argv.remove("--pychecker") import os os.environ['PYCHECKER'] = "--no-argsused --no-classattr --stdlib" #'--blacklist=gettext,locale,pygtk,gtk,gtk.keysyms,popen2,random,difflib,filecmp,tempfile' import pychecker.checker## i18n support#sys.path += [ #LIBDIR#]import pathsimport gettexttry: gettext.bindtextdomain("meld", paths.locale_dir()) gettext.textdomain("meld") gettext.install("meld", paths.locale_dir(), unicode=1)except IOError, e: # fake gettext until translations in place print "(meld): WARNING **: %s" % e __builtins__.__dict__["_"] = lambda x : x__builtins__.__dict__["ngettext"] = gettext.ngettext## python version#pyver = (2,3)pygtkver = (2,6,0)def ver2str(ver): return ".".join(map(str,ver))if sys.version_info[:2] < pyver: print _("Meld requires %s or higher.") % ("python%s"%ver2str(pyver)) sys.exit(1)## pygtk 2 #try: import pygtkexcept ImportError, e: print e print _("Meld requires %s or higher.") % ("pygtk%s"%ver2str(pygtkver)) sys.exit(1)else: pygtk.require("2.0")## pygtk version#import gtkimport gtk.gladeif gtk.pygtk_version < pygtkver: print _("Meld requires %s or higher.") % ("pygtk%s"%ver2str(pygtkver)) print _("Due to incompatible API changes some functions may not operate as expected.")## We target pygtk 2.6#if gtk.pygtk_version >= (2,8,0): import warnings warnings.filterwarnings("ignore", category=DeprecationWarning)gtk.glade.bindtextdomain("meld", paths.locale_dir())gtk.glade.textdomain("meld")## main#import meldappfor ignore in "--sm-config-prefix", "--sm-client-id": try: # ignore session management smprefix = sys.argv.index(ignore) del sys.argv[smprefix] del sys.argv[smprefix] except (ValueError,IndexError): passtry: # don't pass on the profiling flag minusp = sys.argv.index("--profile") del sys.argv[minusp] import profile profile.run("meldapp.main()")except ValueError: meldapp.main()sys.exit(0)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -