Commit 80865600 authored by Kai Willadsen's avatar Kai Willadsen

Move source into meld package, and split out ui and util subpackages

parent c60a68c0
......@@ -5,12 +5,12 @@
include INSTALL
#
VERSION := $(shell grep "^version" meldapp.py | cut -d \" -f 2)
VERSION := $(shell grep "^version" meld/meldapp.py | cut -d \" -f 2)
RELEASE := meld-$(VERSION)
MELD_CMD := ./meld #--profile
TESTNUM := 1
DEVELOPER := 0
SPECIALS := bin/meld paths.py
SPECIALS := bin/meld meld/paths.py
BROWSER := firefox
ifeq ($(DEVELOPER), 1)
......@@ -29,7 +29,7 @@ all: $(addsuffix .install,$(SPECIALS)) meld.desktop
.PHONY:clean
clean:
-rm -f *.pyc vc/*.pyc *.install data/meld.desktop *.bak data/ui/*.bak
-rm -f meld/*.pyc meld/ui/*.pyc meld/util/*.pyc meld/vc/*.pyc *.install data/meld.desktop *.bak data/ui/*.bak
$(MAKE) -C po clean
$(MAKE) -C help clean
......@@ -38,7 +38,10 @@ install: $(addsuffix .install,$(SPECIALS)) meld.desktop
mkdir -m 755 -p \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir_) \
$(DESTDIR)$(libdir_)/vc \
$(DESTDIR)$(libdir_)/meld \
$(DESTDIR)$(libdir_)/meld/ui \
$(DESTDIR)$(libdir_)/meld/util \
$(DESTDIR)$(libdir_)/meld/vc \
$(DESTDIR)$(sharedir_)/ui \
$(DESTDIR)$(sharedir_)/icons \
$(DESTDIR)$(docdir_) \
......@@ -47,12 +50,16 @@ install: $(addsuffix .install,$(SPECIALS)) meld.desktop
$(DESTDIR)$(helpdir_)
install -m 755 bin/meld.install \
$(DESTDIR)$(bindir)/meld
install -m 644 *.py \
$(DESTDIR)$(libdir_)
install -m 644 vc/*.py \
$(DESTDIR)$(libdir_)/vc
install -m 644 paths.py.install \
$(DESTDIR)$(libdir_)/paths.py
install -m 644 meld/*.py \
$(DESTDIR)$(libdir_)/meld
install -m 644 meld/ui/*.py \
$(DESTDIR)$(libdir_)/meld/ui
install -m 644 meld/util/*.py \
$(DESTDIR)$(libdir_)/meld/util
install -m 644 meld/vc/*.py \
$(DESTDIR)$(libdir_)/meld/vc
install -m 644 meld/paths.py.install \
$(DESTDIR)$(libdir_)/meld/paths.py
install -m 644 data/meld.desktop \
$(DESTDIR)$(sharedir)/applications
$(PYTHON) -c 'import compileall; compileall.compile_dir("$(DESTDIR)$(libdir_)",10,"$(libdir_)")'
......
......@@ -38,11 +38,11 @@ else:
# i18n support
import paths
import meld.paths
import gettext
_ = gettext.gettext
gettext.bindtextdomain("meld", paths.locale_dir())
gettext.bindtextdomain("meld", meld.paths.locale_dir())
gettext.textdomain("meld")
# Check requirements: Python 2.4, pygtk 2.8
......@@ -86,13 +86,13 @@ if gtk.pygtk_version < pygtkver:
# import warnings
# warnings.filterwarnings("ignore", category=DeprecationWarning)
gtk.glade.bindtextdomain("meld", paths.locale_dir())
gtk.glade.bindtextdomain("meld", meld.paths.locale_dir())
gtk.glade.textdomain("meld")
#
# main
#
import meldapp
import meld.meldapp
for ignore in "--sm-config-prefix", "--sm-client-id":
try: # ignore session management
smprefix = sys.argv.index(ignore)
......@@ -104,7 +104,7 @@ try: # don't pass on the profiling flag
minusp = sys.argv.index("--profile")
del sys.argv[minusp]
import profile
profile.run("meldapp.main()")
profile.run("meld.meldapp.main()")
except ValueError:
meldapp.main()
meld.meldapp.main()
sys.exit(0)
......@@ -111,7 +111,7 @@
<child>
<widget class="Custom" id="fileentry0">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">direntry</property>
<property name="int1">1</property>
<signal name="activate" handler="on_fileentry_activate"/>
......@@ -128,7 +128,7 @@
<child>
<widget class="Custom" id="fileentry1">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">direntry</property>
<property name="int1">1</property>
<signal name="activate" handler="on_fileentry_activate"/>
......@@ -145,7 +145,7 @@
<child>
<widget class="Custom" id="fileentry2">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">direntry</property>
<property name="int1">1</property>
<signal name="activate" handler="on_fileentry_activate"/>
......
......@@ -20,7 +20,7 @@
<child>
<widget class="Custom" id="fileentry2">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">fileentry</property>
<signal name="activate" handler="on_fileentry_activate"/>
</widget>
......@@ -34,7 +34,7 @@
<child>
<widget class="Custom" id="fileentry1">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">fileentry</property>
<signal name="activate" handler="on_fileentry_activate"/>
</widget>
......@@ -48,7 +48,7 @@
<child>
<widget class="Custom" id="fileentry0">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">fileentry</property>
<signal name="activate" handler="on_fileentry_activate"/>
</widget>
......@@ -253,7 +253,7 @@
<child>
<widget class="Custom" id="msgarea_mgr0">
<property name="visible">True</property>
<property name="creation_function">msgarea.msgarea_mgr_create</property>
<property name="creation_function">meld.ui.msgarea.msgarea_mgr_create</property>
</widget>
<packing>
<property name="left_attach">1</property>
......@@ -266,7 +266,7 @@
<child>
<widget class="Custom" id="msgarea_mgr1">
<property name="visible">True</property>
<property name="creation_function">msgarea.msgarea_mgr_create</property>
<property name="creation_function">meld.ui.msgarea.msgarea_mgr_create</property>
</widget>
<packing>
<property name="left_attach">3</property>
......@@ -279,7 +279,7 @@
<child>
<widget class="Custom" id="msgarea_mgr2">
<property name="visible">True</property>
<property name="creation_function">msgarea.msgarea_mgr_create</property>
<property name="creation_function">meld.ui.msgarea.msgarea_mgr_create</property>
</widget>
<packing>
<property name="left_attach">5</property>
......@@ -310,7 +310,7 @@
<widget class="Custom" id="findbar">
<property name="height_request">12</property>
<property name="visible">True</property>
<property name="creation_function">findbar.findbar_create</property>
<property name="creation_function">meld.ui.findbar.findbar_create</property>
</widget>
<packing>
<property name="expand">False</property>
......
......@@ -143,7 +143,7 @@ Adam Weinberger (en_CA)</property>
<child>
<widget class="Custom" id="fileentry2">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">file_comparison</property>
<property name="string2">My File</property>
<signal name="activate" handler="on_entry_activate"/>
......@@ -159,7 +159,7 @@ Adam Weinberger (en_CA)</property>
<child>
<widget class="Custom" id="fileentry1">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">file_comparison</property>
<property name="string2">Original File</property>
<signal name="activate" handler="on_entry_activate"/>
......@@ -176,7 +176,7 @@ Adam Weinberger (en_CA)</property>
<widget class="Custom" id="fileentry0">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">file_comparison</property>
<property name="string2">Other File</property>
<signal name="activate" handler="on_entry_activate"/>
......@@ -281,7 +281,7 @@ Adam Weinberger (en_CA)</property>
<child>
<widget class="Custom" id="direntry2">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">dir_comparison</property>
<property name="string2">My Directory</property>
<property name="int1">1</property>
......@@ -298,7 +298,7 @@ Adam Weinberger (en_CA)</property>
<child>
<widget class="Custom" id="direntry1">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">dir_comparison</property>
<property name="string2">Original Directory</property>
<property name="int1">1</property>
......@@ -316,7 +316,7 @@ Adam Weinberger (en_CA)</property>
<widget class="Custom" id="direntry0">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">dir_comparison</property>
<property name="string2">Other Directory</property>
<property name="int1">1</property>
......@@ -405,7 +405,7 @@ Adam Weinberger (en_CA)</property>
<child>
<widget class="Custom" id="vcentry0">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">vc_directory</property>
<property name="string2">VC Directory</property>
<property name="int1">1</property>
......
......@@ -33,7 +33,7 @@
<child>
<widget class="Custom" id="fileentry">
<property name="visible">True</property>
<property name="creation_function">historyentry.create_fileentry</property>
<property name="creation_function">meld.ui.historyentry.create_fileentry</property>
<property name="string1">direntry</property>
<property name="int1">1</property>
<signal name="activate" handler="on_fileentry_activate"/>
......@@ -452,7 +452,7 @@
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="string1">previousentry</property>
<property name="creation_function">historyentry.create_entry</property>
<property name="creation_function">meld.ui.historyentry.create_entry</property>
<signal name="changed" handler="on_previousentry_activate"/>
</widget>
<packing>
......
......@@ -15,7 +15,7 @@
### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import paths
import gnomeglade
from ui import gnomeglade
import gobject
import gtk
import gtk.keysyms
......
......@@ -28,14 +28,14 @@ import gtk
import gtk.keysyms
import diffutil
import gnomeglade
from ui import gnomeglade
import misc
import melddoc
import msgarea
from ui import msgarea
import paths
import cairo
from sourceviewer import srcviewer
from util.sourceviewer import srcviewer
gdk = gtk.gdk
......
......@@ -35,17 +35,17 @@ except ImportError:
# project
import paths
import prefs
import gnomeglade
from util import prefs
from ui import gnomeglade
import misc
import notebooklabel
from ui import notebooklabel
import filediff
import vcview
import dirdiff
import task
import vc
from sourceviewer import srcviewer
from util.sourceviewer import srcviewer
version = "1.3.1"
......
......@@ -23,7 +23,7 @@ _help_dir = ( #HELPDIR#
_share_dir = ( #SHAREDIR#
)
appdir = os.path.dirname(__file__)
appdir = os.path.dirname(os.path.dirname(__file__))
if not _locale_dir: _locale_dir = os.path.join(appdir,"po")
if not _help_dir: _help_dir = os.path.join(appdir,"help")
......
......@@ -17,7 +17,7 @@
import os
import gobject
import gtk
import gnomeglade
from ui import gnomeglade
import paths
COL_PATH, COL_STATE, COL_TEXT, COL_ICON, COL_END = range(5)
......
......@@ -15,8 +15,8 @@
### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import gnomeglade
import paths
import misc
from meld import paths
from meld import misc
import gtk
import re
from gettext import gettext as _
......
......@@ -29,7 +29,7 @@ def load_plugins():
_vcdir = os.path.dirname(os.path.abspath(__file__))
ret = []
for plugin in glob.glob(os.path.join(_vcdir, "[a-z]*.py")):
modname = "vc.%s" % os.path.basename(os.path.splitext(plugin)[0])
modname = "meld.vc.%s" % os.path.basename(os.path.splitext(plugin)[0])
ret.append( __import__(modname, globals(), locals(), "*") )
return ret
_plugins = load_plugins()
......
......@@ -25,7 +25,7 @@ import os
from gettext import gettext as _
import re
import time
import misc
from meld import misc
import _vc
class Vc(_vc.Vc):
......
......@@ -21,7 +21,7 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import misc
from meld import misc
import svn
class Vc(svn.Vc):
......
......@@ -22,7 +22,7 @@ from gettext import gettext as _
import tree
import misc
import gnomeglade
from ui import gnomeglade
import melddoc
import paths
import vc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment