Skip to content

Commit

Permalink
imported Gnome2 port by guys from wipro.com.
Browse files Browse the repository at this point in the history
2002-02-06  Jaka Mocnik  <[email protected]>

        * imported Gnome2 port by guys from wipro.com.
  • Loading branch information
Jaka Mocnik authored and Jaka Mocnik committed Feb 6, 2002
1 parent 7ba8d5a commit f98e909
Show file tree
Hide file tree
Showing 29 changed files with 6,325 additions and 367 deletions.
4 changes: 3 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Jaka Mocnik <[email protected]>
Jaka Mocnik <[email protected]>
Chema Celorio <[email protected]>

46 changes: 32 additions & 14 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,24 +1,42 @@
SUBDIRS = po intl macros src help omf-install
## Process this file with automake to produce Makefile.in.

EXTRA_DIST = \
ghex.spec.in \
ghex.desktop \
app-docs.make \
COPYING-DOCS \
$(appicon_DATA)
#Remove macros intl directory from SUBDIRS -- SnM

#SUBDIRS = po src help omf-install
SUBDIRS = po src help

GHEX_SCHEMA = ghex2.schemas

EXTRA_DIST = \
ghex.spec.in \
ghex.desktop \
app-docs.make \
COPYING-DOCS \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
$(GHEX_SCHEMA)
# $(appicon_DATA)

dist-hook: ghex.spec
cp ghex.spec $(distdir)

appicondir = $(datadir)/pixmaps
#appicondir = $(datadir)/pixmaps
pixmapsdir = $(datadir)/pixmaps
pixmaps_DATA =

appicon_DATA = gnome-ghex.png
#appicon_DATA = gnome-ghex.png

sysdir = $(datadir)/gnome/apps/Applications
sys_DATA = ghex.desktop
#sysdir = $(datadir)/gnome/apps/Applications
#sys_DATA = ghex.desktop
@INTLTOOL_DESKTOP_RULE@

## to automatically rebuild aclocal.m4 if any of the macros in
## `macros/' change
@MAINT@include macros/macros.dep
@MAINT@macros/macros.dep: macros/Makefile.am
@MAINT@ cd macros && $(MAKE) macros.dep
#@MAINT@include macros/macros.dep
#@MAINT@macros/macros.dep: macros/Makefile.am
#@MAINT@ cd macros && $(MAKE) macros.dep

#Install the ghex2 schema file
install-data-local:
gconftool-2 --install-schema-file $(srcdir)/$(GHEX_SCHEMA)
81 changes: 60 additions & 21 deletions configure.in
Original file line number Diff line number Diff line change
@@ -1,57 +1,96 @@
AC_INIT(ghex.desktop)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(ghex, 1.3.0)
AM_INIT_AUTOMAKE(ghex, 1.99.0)

AM_MAINTAINER_MODE

AM_ACLOCAL_INCLUDE(macros)
dnl The following lines are no longer required. -- SnM
dnl AM_ACLOCAL_INCLUDE(macros) -- SnM
dnl GNOME_INIT() -- SnM

GNOME_INIT()
dnl The following line will have to be removed -- SnM
GNOME_COMMON_INIT

dnl added AC_PROG_INTLTOOL -- SnM
AC_PROG_INTLTOOL

AC_ISC_POSIX
AC_PROG_CC
dnl AC_PROG_CPP
AC_STDC_HEADERS
dnl AC_ARG_PROGRAM
dnl AM_PROG_LIBTOOL

dnl Added AC_PROG_LIBTOOL -- SnM
AC_PROG_LIBTOOL

AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
GNOME_COMPILE_WARNINGS

GNOME_X_CHECKS
dnl Added GNOME_PLATFORM_GNOME_2 and removed GNOME_COMPILE_WARNINGS --SnM
dnl GNOME_COMPILE_WARNINGS(maximum) -- SnM
dnl Removed GNOME_PLATFORM_GNOME_2 as my Gnome2 build does not put it
dnl among known autoconf stuff...
dnl GNOME_PLATFORM_GNOME_2(yes, force)

dnl Dont know what this is used for now. Removed for now -- SnM
dnl GNOME_X_CHECKS

dnl ******************************
dnl GnomePrint checking
dnl ******************************
AC_MSG_CHECKING(for GnomePrint libraries >= 0.32)
if gnome-config --libs print > /dev/null 2>&1; then
vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" -e 's/cvs$//' -e 's/pre$//' | \
awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
if test "$vers" -ge 32; then
AC_MSG_RESULT(found)
else
AC_MSG_ERROR(You need at least GNOME print 0.32 for this version of ghex)
fi
else
AC_MSG_ERROR(Did not find GnomePrint installed)
fi

dnl AC_MSG_CHECKING(for GnomePrint libraries >= 0.32)
dnl if gnome-config --libs print > /dev/null 2>&1; then
dnl vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" -e 's/cvs$//' -e 's/pre$//' | \
dnl awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
dnl if test "$vers" -ge 32; then
dnl AC_MSG_RESULT(found)
dnl else
dnl AC_MSG_ERROR(You need at least GNOME print 0.32 for this version of ghex)
dnl fi
dnl else
dnl AC_MSG_ERROR(Did not find GnomePrint installed)
dnl fi

dnl **************************************************************
dnl Now we shall use pkg-config rather than gnome-config. -- SnM
dnl **************************************************************

PKG_CHECK_MODULES(GHEX,
libgnomeui-2.0 >= 1.96.0 \
libglade-2.0 >= 1.99.2 \
libgnomeprintui-2.0 >= 1.106.0)

AC_SUBST(GHEX_CFLAGS)
AC_SUBST(GHEX_LIBS)

dnl Checks for typedefs, structures, and compiler characteristics.
ALL_LINGUAS="ca cs da de el en_GB es et fi fr ga gl hr hu it ja ko nl nn no pl pt pt_BR ro ru sk sl sv tr uk wa zh_TW zh_CN"
AM_GNOME_GETTEXT
AM_PATH_GNOME_PRINT(0.32.0)

dnl removed the following lines -- SnM
dnl AM_GNOME_GETTEXT -- SnM
dnl AM_PATH_GNOME_PRINT(0.32.0) -- SnM

dnl added AM_GLIB_GNU_GETTEXT -- SnM
AM_GLIB_GNU_GETTEXT

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

dnl Remove the following line from AC_OUTPUT. -- SnM
dnl macros/Makefile -- SnM
dnl intl/Makefile -- SnM

dnl Added the program glib-genmarshal -- SnM
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)

AC_OUTPUT([
Makefile
po/Makefile.in
intl/Makefile
macros/Makefile
src/Makefile
help/Makefile
help/C/Makefile
Expand Down
151 changes: 151 additions & 0 deletions ghex2.schemas
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<gconfschemafile>

<!--
Note: all double hyphens in this comment have a space in the middle
because double hyphen isn't allowed in comments. So, remove the space
before use.

To install this file type:
gconftool - -install-schema-file basic-gconf-app.schemas
You probably want your "make install" to do this for real applications.
Also, you probably want a configure option so people can retarget where the
schema file gets installed. The option should be called - -gconf-config-source=blah
To change the gconftool target use the - -config-source=blah option to gconftool.
-->

<schemalist>
<schema>
<applyto>/apps/ghex2/mdi-mode</applyto>
<key>/schemas/apps/ghex2/default-mdi-mode</key>
<owner>ghex2</owner>
<type>int</type>
<locale name="C">
<default>2</default>
<short>Default MDI Mode</short>
<long>Default MDI Mode</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/font</applyto>
<key>/schemas/apps/ghex2/default-font</key>
<owner>ghex2</owner>
<type>string</type>
<locale name="C">
<default>-*-courier-medium-r-normal--12-*-*-*-*-*-*-*</default>
<short>Default Font</short>
<long>Default Font</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/group</applyto>
<key>/schemas/apps/ghex2/default-group</key>
<owner>ghex2</owner>
<type>int</type>
<locale name="C">
<default>1</default>
<short>Default Group</short>
<long>Default Group</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/maxundodepth</applyto>
<key>/schemas/apps/ghex2/default-max-undo-depth</key>
<owner>ghex2</owner>
<type>int</type>
<locale name="C">
<default>100</default>
<short>Default Max Undo Depth</short>
<long>Default Max Undo Depth</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/offsetformat</applyto>
<key>/schemas/apps/ghex2/default-offset-format</key>
<owner>ghex2</owner>
<type>string</type>
<locale name="C">
<default>%X</default>
<short>Default Offset Format</short>
<long>Default Offset Format</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/offsetscolumn</applyto>
<key>/schemas/apps/ghex2/default-show-offsets</key>
<owner>ghex2</owner>
<type>bool</type>
<locale name="C">
<default>1</default>
<short>Default Show Offsets</short>
<long>Default Show Offsets</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/paper</applyto>
<key>/schemas/apps/ghex2/default-paper</key>
<owner>ghex2</owner>
<type>string</type>
<locale name="C">
<default>a4</default>
<short>Default Paper</short>
<long>Default Paper</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/boxsize</applyto>
<key>/schemas/apps/ghex2/default-box-size</key>
<owner>ghex2</owner>
<type>int</type>
<locale name="C">
<default>0</default>
<short>Default Box Size</short>
<long>Default Box Size</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/datafont</applyto>
<key>/schemas/apps/ghex2/default-data-font</key>
<owner>ghex2</owner>
<type>string</type>
<locale name="C">
<default>Courier</default>
<short>Default Data Font</short>
<long>Default Data Font</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/datafontsize</applyto>
<key>/schemas/apps/ghex2/default-data-font-size</key>
<owner>ghex2</owner>
<type>float</type>
<locale name="C">
<default>10</default>
<short>Default Data Font Size</short>
<long>Default Data Size</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/headerfont</applyto>
<key>/schemas/apps/ghex2/default-header-font</key>
<owner>ghex2</owner>
<type>string</type>
<locale name="C">
<default>Helvetica</default>
<short>Default Header Font</short>
<long>Default Header Font</long>
</locale>
</schema>
<schema>
<applyto>/apps/ghex2/headerfontsize</applyto>
<key>/schemas/apps/ghex2/default-header-font-size</key>
<owner>ghex2</owner>
<type>float</type>
<locale name="C">
<default>12</default>
<short>Default Header Font Size</short>
<long>Default Header Font Size</long>
</locale>
</schema>
</schemalist>

</gconfschemafile>
45 changes: 34 additions & 11 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,43 @@
INCLUDES = -I$(includedir) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
$(GNOME_INCLUDEDIR) \
$(GNOME_PRINT_CFLAGS)
-DGHEX_UI_DIR=\""$(datadir)/ghex2/ui/"\" \
-DGHEX_GLADEDIR=\""$(datadir)/ghex2/glade/"\" \
$(GHEX_CFLAGS)

bin_PROGRAMS = ghex
bin_PROGRAMS = ghex2

ghex_SOURCES = hex-document.c hex-document.h hex-document-ui.c \
preferences.c findreplace.c converter.c config.c ghex.h \
gtkhex.c gtkhex.h main.c ui.c session.c chartable.c \
print.c
uidir = $(datadir)/ghex2/ui/

ghex_LDADD = $(GNOME_LIBDIR) \
$(GNOMEUI_LIBS) \
$(INTLLIBS) \
$(GNOME_PRINT_LIBS)
BUILT_SOURCES = \
ghex-marshal.c \
ghex-marshal.h

ghex2_SOURCES = hex-document.c hex-document.h hex-document-ui.c \
preferences.c findreplace.c converter.c config.c ghex.h \
gtkhex.c gtkhex.h main.c ui.c session.c chartable.c \
print.c bonobo-mdi.c bonobo-mdi-child.c \
ghex-mdi.c bonobo-mdi-session.c bonobo-mdi-session.h \
$(BUILT_SOURCES)

ghex-marshal.h: ghex-marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=ghex_marshal > $@
ghex-marshal.c: ghex-marshal.list $(GLIB_GENMARSHAL)
echo "#include \"ghex-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=ghex_marshal >> $@

ui_DATA = ghex-ui.xml

EXTRA_DIST = \
$(ui_DATA) \
ghex-marshal.list

#ghex_LDADD = $(GNOME_LIBDIR) \
# $(GNOMEUI_LIBS) \
# $(INTLLIBS) \
# $(GNOME_PRINT_LIBS)

LDADD = \
$(GHEX_LIBS)

CLEAN_FILES = $(BUILT_SOURCES)
Loading

0 comments on commit f98e909

Please sign in to comment.