From c99b7a5bded1e43ec1177124ce38961c0b0b9b69 Mon Sep 17 00:00:00 2001 From: Martin Kretzschmar Date: Sat, 12 Oct 2002 11:46:34 +0000 Subject: add GNOME_PDF.server, GNOME_PDF.server.in * xpdf/.cvsignore: add GNOME_PDF.server, GNOME_PDF.server.in * xpdf/pdf-view.cc: don't #include bonobo_application_x_pdf.h, update for new GObject, GSignal, Bonobo signatures (setup_pixmap): don't use double buffering * xpdf/gtkgesture.h: s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/ * xpdf/gpdf-persist-stream.h, xpdf/gpdf-control.h, pdf-view.h (#includes): update, use gpdf-g-switch.h, s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/ * xpdf/gpdf-persist-stream.cc (#includes): update (load_pdf_from_stream): Bonobo_Unknown_ref our stream (delete_pdf_doc_full): unref our stream (all around) update for new GObject, GSignal, Bonobo signatures (gpdf_persist_stream_new, gpdf_persist_stream_construct): take iid parameter to be passed on to bonobo_persist_stream_construct * xpdf/gpdf-embeddable-view.cc: don't include bonobo-application-x-pdf.h * xpdf/gpdf-control.cc: PARENT_TYPE is BONOBO_TYPE_CONTROL; update for new GObject, GtkWidget, Bonobo signatures * xpdf/gpdf-control-ui.xml: use gtk-stock-pixmaps * xpdf/bonobo-application-x-pdf.cc (#includes): use gpdf-g-switch.h, update (gpdf_factory): don't create embeddable, gpdf_persist_stream_new takes iid parameter (init_gpdf_factory, init_corba, init_bonobo): kill (main): no need to init gdk_rgb; use BONOBO_FACTORY_INIT, bonobo_generic_factory_main * xpdf/Makefile.am (INCLUDES, LDADD): update (bin_PROGRAMS): move gnome-pdf-viewer to libexec_PROGRAMS (gnome_pdf_viewer_SOURCES): nobody needs bonobo-application-x-pdf.h, don't build embeddable stuff (oafdir, oaf_DATA): kill (server_in_files, serverdir): add, do libexec sed job on .server.in.in file, add @INTLTOOL_SERVER_RULE@ (uidir): s/gnome/gnome-2.0/ * xpdf/GOutputDev.cc (#includes): use gpdf-g-switch.h (GOutputDev::GOutputDev): get size and depth of pixmap with gdk_drawable_get_foo background color to white (all around): gdk_region_foo now destructively update their first argument, use gdk_rgb to find colors (drawImageMask): don't gdk_image_new_bitmap * xpdf/gpdf-g-switch.h: new file, include it when switching between goo and glib headers * xpdf/GNOME_PDF.server.in.in: factory is in @LIBEXECDIR@ s|GNOME/GenericFactory|Bonobo/GenericFactory|, make it translatable, kill embeddable stanza * xpdf/GNOME_PDF.oafinfo: remove * xpdf/BonoboStream.cc: s/Bonobo_Stream_SEEK_SET/Bonobo_Stream_SeekSet/ et al. (see libbonobo/ChangeLog#2002-03-31) * shell/gpdf.c (#includes): use G2 headers (main): copy from eog (struct _Component): kill (was embeddable code) (USE_CONTROL): kill #define, kill all code surrounded by #if !USE_CONTROL (i.e. embeddable code) (all around): add Corba_Environment argument where it's needed now (gw_control_load_pdf): s/BonoboStream \*stream/Bonobo_Stream stream/. get the stream using monikers, unref it later (gw_drag_data_received): use uri handling code from gnome-vfs (verb_HelpAbout_cb): update for new gnome_about_new (verb_DebugDumpXml_cb): kill (gw_destroy): may be called more than once, so update assertions (gw_finalize): is a GObject method now, chain up to parent (class_init): update for GObject methods (gw_setup_window): blend of bonobo_window_construct and old gw_setup_geometry (gw_setup_geometry): kill (gw_setup_toplevel_ui): use BonoboUIContainer from BonoboWindow (gpdf_window_construct): use gw_setup_window, not bonobo_window_construct, not gw_setup_geometry * shell/gpdf-window.h: s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/, kill struct _Component decl (was used for embeddable) * shell/gpdf-window-ui.xml: kill DebugDumpXml verb * shell/Makefile.am: update INCLUDES, LD_ADD; (gpdf_SOURCES): add missing gpdf-window.h (uidir): s/gnome/gnome-2.0/ * configure.in: clean it a bit; set version to 0.100 (version was at 0.90.1 for ever and I don't want to call it 1.01.1, this is not 1.something quality code); use GNOME2 macros; (i18n): update according to G2 porting guide (gnome-lib-checks): use PKG_CHECK * autogen.sh: PKG_NAME="gpdf:", USE_GNOME2_MACROS * .cvsignore: add intltool-... files --- (limited to 'pdf/xpdf') diff --git a/pdf/xpdf/.cvsignore b/pdf/xpdf/.cvsignore index 301a46b..1898fa0 100644 --- a/pdf/xpdf/.cvsignore +++ b/pdf/xpdf/.cvsignore @@ -1,5 +1,7 @@ .deps .libs +GNOME_PDF.server +GNOME_PDF.server.in Makefile Makefile.in bonobo-application-x-pdf diff --git a/pdf/xpdf/GNOME_PDF.oafinfo b/pdf/xpdf/GNOME_PDF.oafinfo deleted file mode 100644 index 59f1025..0000000 --- a/pdf/xpdf/GNOME_PDF.oafinfo +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pdf/xpdf/Makefile.am b/pdf/xpdf/Makefile.am index 3155607..5366940 100644 --- a/pdf/xpdf/Makefile.am +++ b/pdf/xpdf/Makefile.am @@ -1,10 +1,9 @@ -INCLUDES = \ - -I$(top_srcdir)/goo \ - -I$(top_srcdir)/ltk \ - -DDATADIR=\""$(datadir)"\" \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - $(EXTRA_GLIB_CFLAGS) \ +INCLUDES = \ + -I$(top_srcdir)/goo \ + -I$(top_srcdir)/ltk \ + -DDATADIR=\""$(datadir)"\" \ + -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ $(EXTRA_GNOME_CFLAGS) \ $(libpaper_CFLAGS) @@ -14,11 +13,12 @@ else gui = xpdf endif -bin_PROGRAMS = $(gui) gnome-pdf-viewer +bin_PROGRAMS = $(gui) # pdftops pdftotext # pdfinfo pdftopbm # pdfimages +libexec_PROGRAMS = gnome-pdf-viewer common_sources = \ Annot.cc \ @@ -106,13 +106,8 @@ gnome_pdf_viewer_SOURCES = \ GOutputDev.cc \ GOutputDev.h \ bonobo-application-x-pdf.cc \ - bonobo-application-x-pdf.h \ gpdf-control.cc \ gpdf-control.h \ - gpdf-embeddable.cc \ - gpdf-embeddable.h \ - gpdf-embeddable-view.cc \ - gpdf-embeddable-view.h \ gpdf-persist-stream.cc \ gpdf-persist-stream.h \ gpdf-util.h \ @@ -120,14 +115,14 @@ gnome_pdf_viewer_SOURCES = \ gtkgesture.h \ pdf-view.cc \ pdf-view.h +# gpdf-embeddable.cc \ +# gpdf-embeddable.h \ +# gpdf-embeddable-view.cc \ +# gpdf-embeddable-view.h \ gnome_pdf_viewer_LDADD = \ - ../goo/libgoo.a \ - $(GTK_LIBS) \ - $(GNOME_LIBDIR) \ + $(top_builddir)/goo/libgoo.a \ $(EXTRA_GNOME_LIBS) \ - $(EXTRA_GLIB_LIBS) \ - $(INTLLIBS) \ $(libpaper_LIBS) xpdf_SOURCES = \ @@ -139,7 +134,12 @@ xpdf_SOURCES = \ xpdf.cc xpdf_CFLAGS = $(X_CFLAGS) -xpdf_LDADD = ../goo/libgoo.a ../ltk/libltk.a -lXpm $(EXTRA_GNOME_LIBS) $(libpaper_CFLAGS) +xpdf_LDADD = \ + $(top_builddir)/goo/libgoo.a \ + $(top_builddir)/ltk/libltk.a \ + -lXpm \ + $(EXTRA_GNOME_LIBS) \ + $(libpaper_LIBS) #pdfimages_SOURCES = # $(common_sources) @@ -195,24 +195,27 @@ xpdf-ltk.h: xpdf.ltk stockdir = $(datadir)/pixmaps/gpdf -stock_DATA = stock-zoom-in.xpm stock-zoom-out.xpm \ - stock-zoom-fit.xpm stock-zoom-fit-wide.xpm \ - stock-zoom-fit-tall.xpm +stock_DATA = stock-zoom-fit-wide.xpm ltk = \ xpdf-flip.ltk \ xpdf-top.ltk \ xpdf.ltk -oafdir = $(datadir)/oaf -oaf_DATA = GNOME_PDF.oafinfo -XML_FILES = \ +server_in_files = GNOME_PDF.server.in.in + +serverdir = $(libdir)/bonobo/servers +server_DATA = $(server_in_files:.server.in.in=.server) +$(server_in_files:.server.in.in=.server.in): $(server_in_files) + sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ +@INTLTOOL_SERVER_RULE@ + +uidir = $(datadir)/gnome-2.0/ui +ui_DATA = \ bonobo-application-x-pdf-ui.xml \ gpdf-control-ui.xml -uidir = $(datadir)/gnome/ui -ui_DATA = $(XML_FILES) EXTRA_DIST = $(stock_DATA) $(ltk) \ - $(oaf_DATA) config.h $(XML_FILES) + $(server_in_files) config.h $(ui_DATA) diff --git a/pdf/xpdf/bonobo-application-x-pdf.h b/pdf/xpdf/bonobo-application-x-pdf.h deleted file mode 100644 index 66b4ee4..0000000 --- a/pdf/xpdf/bonobo-application-x-pdf.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef BONOBOAPPLICATIONXPDF_H -#define BONOBOAPPLICATIONXPDF_H - -/* - * This is only neccessary since the gpdf container is - * very tightly coupled to the component, for ergonomic reasons. - */ - -#define VERB_FIRST "FirstPage" -#define VERB_PREV "PrevPage" -#define VERB_NEXT "NextPage" -#define VERB_LAST "LastPage" - -#define VERB_Z_IN "ZoomIn" -#define VERB_Z_OUT "ZoomOut" -#define VERB_Z_FIT_WIDTH "ZoomFitWidth" -#define VERB_Z_FIT_HEIGHT "ZoomFitHeight" - -#endif /* BONOBOAPPLICATIONXPDF_H */ diff --git a/pdf/xpdf/gpdf-g-switch.h b/pdf/xpdf/gpdf-g-switch.h new file mode 100644 index 0000000..bc38800 --- /dev/null +++ b/pdf/xpdf/gpdf-g-switch.h @@ -0,0 +1,22 @@ +/* + * When including goo and glib headers in one file: + * + * #include "GList.h" + * #include "gpdf-g-switch.h" + * #include "glib.h" + * < more glib/gtk+/gnome headers > + * #include "gpdf-g-switch.h" + */ + + +#ifdef GPDF_GOO +# undef GString +# undef GList +# undef GDir +# undef GPDF_GOO +#else +# define GString G_String +# define GList G_List +# define GDir G_Dir +# define GPDF_GOO +#endif -- cgit v0.9.1