From 0a493d7b95ccfb0303844ad72c55918688a0123c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 23 Aug 1999 17:24:27 +0000 Subject: [PATCH] Fixup pdfto* programs, Preliminary toolbar stuff. --- pdf/xpdf/ChangeLog | 6 ++++++ pdf/xpdf/Makefile.am | 4 +--- pdf/xpdf/bonobo-image-x-pdf.cc | 13 +++++-------- pdf/xpdf/gpdf.cc | 18 +++++------------- pdf/xpdf/pdfimages.cc | 4 ++-- pdf/xpdf/pdfinfo.cc | 2 +- pdf/xpdf/pdftopbm.cc | 2 +- pdf/xpdf/pdftops.cc | 3 +-- pdf/xpdf/pdftotext.cc | 2 +- 9 files changed, 23 insertions(+), 31 deletions(-) diff --git a/pdf/xpdf/ChangeLog b/pdf/xpdf/ChangeLog index ca4b0a4f..d9998c30 100644 --- a/pdf/xpdf/ChangeLog +++ b/pdf/xpdf/ChangeLog @@ -1,3 +1,9 @@ +1999-08-23 Michael Meeks + + * Makefile.am: Added helper programs back in. + + * bonobo-image-x-pdf.cc (view_create_menus): Toolbars. + 1999-08-23 Miguel de Icaza * bonobo-image-x-pdf.cc: Replace exit() with gtk_main_quit() diff --git a/pdf/xpdf/Makefile.am b/pdf/xpdf/Makefile.am index 9e7873d5..b72a32ab 100644 --- a/pdf/xpdf/Makefile.am +++ b/pdf/xpdf/Makefile.am @@ -11,9 +11,7 @@ else gui = xpdf endif -#bin_PROGRAMS = pdftops pdftotext pdfinfo pdftopbm pdfimages $(gui) bonobo-image-x-pdf -# Wait for Derek to send updated pdfto* -bin_PROGRAMS = $(gui) bonobo-image-x-pdf +bin_PROGRAMS = pdftops pdftotext pdfinfo pdftopbm pdfimages $(gui) bonobo-image-x-pdf common_sources = \ Array.cc \ diff --git a/pdf/xpdf/bonobo-image-x-pdf.cc b/pdf/xpdf/bonobo-image-x-pdf.cc index 3a36ecf8..ac45e158 100644 --- a/pdf/xpdf/bonobo-image-x-pdf.cc +++ b/pdf/xpdf/bonobo-image-x-pdf.cc @@ -40,7 +40,6 @@ extern "C" { #include "BonoboStream.h" #define PDF_DEBUG 0 -#define UNTESTED 0 GBool printCommands = gFalse; @@ -472,25 +471,23 @@ view_create_menus (view_data_t *view_data) N_("Last"), N_("View the last page"), -1, GNOME_UI_HANDLER_PIXMAP_NONE, NULL, 0, (GdkModifierType)0, page_last_cb, (gpointer)view_data); -#if UNTESTED > 0 - gnome_ui_handler_toolbar_new_item (uih, "/First", GNOME_UI_HANDLER_MENU_ITEM, + + gnome_ui_handler_toolbar_new_item (uih, "/First", N_("First"), N_("View the first page"), -1, GNOME_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_FIRST, 0, (GdkModifierType)0, page_first_cb, (gpointer)view_data); - gnome_ui_handler_toolbar_new_item (uih, "/Prev", GNOME_UI_HANDLER_MENU_ITEM, + gnome_ui_handler_toolbar_new_item (uih, "/Prev", N_("Previous"), N_("View the previous page"), -1, GNOME_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_FIRST, 0, (GdkModifierType)0, page_prev_cb, (gpointer)view_data); - gnome_ui_handler_toolbar_new_item (uih, "/Next", GNOME_UI_HANDLER_MENU_ITEM, + gnome_ui_handler_toolbar_new_item (uih, "/Next", N_("Next"), N_("View the next page"), -1, GNOME_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_FIRST, 0, (GdkModifierType)0, page_next_cb, (gpointer)view_data); - gnome_ui_handler_toolbar_new_item (uih, "/Last", GNOME_UI_HANDLER_MENU_ITEM, + gnome_ui_handler_toolbar_new_item (uih, "/Last", N_("Last"), N_("View the last page"), -1, GNOME_UI_HANDLER_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_FIRST, 0, (GdkModifierType)0, page_last_cb, (gpointer)view_data); -#endif - } /* diff --git a/pdf/xpdf/gpdf.cc b/pdf/xpdf/gpdf.cc index 5fc249eb..ba956e43 100644 --- a/pdf/xpdf/gpdf.cc +++ b/pdf/xpdf/gpdf.cc @@ -41,8 +41,6 @@ extern "C" { #include "Error.h" #include "config.h" -#define UNTESTED 0 - poptContext ctx; gint gpdf_debug=0; @@ -611,18 +609,12 @@ container_create_menus (Container *container) static void container_create_toolbar (Container *container) { - GnomeUIHandlerMenuItem *toolbar; - -#if UNTESTED > 0 - gnome_ui_handler_create_menubar (container->uih); + GnomeUIHandlerToolbarItem *toolbar; - /* - * Create the basic menus out of UIInfo structures. - */ - toolbar = gnome_ui_handler_toolbar_parse_uiinfo_list_with_data (container_toolbar, container); - gnome_ui_handler_toolbar_add_list (container->uih, "/", menu_list); - gnome_ui_handler_toolbar_free_list (menu_list); -#endif + gnome_ui_handler_create_toolbar (container->uih, "pdf"); + toolbar = gnome_ui_handler_toolbar_parse_uiinfo_list (container->uih, container_toolbar); + gnome_ui_handler_toolbar_add_list (container->uih, "/", toolbar); + gnome_ui_handler_toolbar_free_list (toolbar); } static Container * diff --git a/pdf/xpdf/pdfimages.cc b/pdf/xpdf/pdfimages.cc index 37422496..5ab74fbd 100644 --- a/pdf/xpdf/pdfimages.cc +++ b/pdf/xpdf/pdfimages.cc @@ -72,9 +72,9 @@ int main(int argc, char *argv[]) { // read config file initParams(xpdfConfigFile); - // open PDF fihe + // open PDF file xref = NULL; - doc = new PDFDoc(new FileStream(fileOpen(fileName)), fileName); + doc = new PDFDoc(fileName); if (!doc->isOk()) { goto err1; } diff --git a/pdf/xpdf/pdfinfo.cc b/pdf/xpdf/pdfinfo.cc index 510e12e7..2c183c83 100644 --- a/pdf/xpdf/pdfinfo.cc +++ b/pdf/xpdf/pdfinfo.cc @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { // open PDF file xref = NULL; - doc = new PDFDoc(new FileStream(fileOpen(fileName)), fileName); + doc = new PDFDoc(fileName); if (!doc->isOk()) exit(1); diff --git a/pdf/xpdf/pdftopbm.cc b/pdf/xpdf/pdftopbm.cc index c77130e3..6cfe8305 100644 --- a/pdf/xpdf/pdftopbm.cc +++ b/pdf/xpdf/pdftopbm.cc @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) { // open PDF file xref = NULL; - doc = new PDFDoc(new FileStream (fileOpen (fileName)), fileName); + doc = new PDFDoc(fileName); if (!doc->isOk()) exit(1); diff --git a/pdf/xpdf/pdftops.cc b/pdf/xpdf/pdftops.cc index 07dca22d..d6fd6534 100644 --- a/pdf/xpdf/pdftops.cc +++ b/pdf/xpdf/pdftops.cc @@ -61,7 +61,6 @@ int main(int argc, char *argv[]) { PDFDoc *doc; GString *fileName; GString *psFileName; - FILE *file; PSOutputDev *psOut; GBool ok; char *p; @@ -88,7 +87,7 @@ int main(int argc, char *argv[]) { // open PDF file xref = NULL; - doc = new PDFDoc(new FileStream (fileOpen (fileName)), fileName); + doc = new PDFDoc(fileName); if (!doc->isOk()) { goto err1; } diff --git a/pdf/xpdf/pdftotext.cc b/pdf/xpdf/pdftotext.cc index 95ae8329..189d4898 100644 --- a/pdf/xpdf/pdftotext.cc +++ b/pdf/xpdf/pdftotext.cc @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) { // open PDF file xref = NULL; - doc = new PDFDoc(new FileStream (fileOpen(fileName)), fileName); + doc = new PDFDoc(fileName); if (!doc->isOk()) { goto err1; } -- 2.43.5