Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@src.gnome.org>1999-08-23 17:24:27 (GMT)
committer Michael Meeks <mmeeks@src.gnome.org>1999-08-23 17:24:27 (GMT)
commit0a493d7b95ccfb0303844ad72c55918688a0123c (patch)
treec70f59bd74b852d049c6abd06972578508d201fb
parent6bf8080516ffe50afba89f1f07f486000423bcd8 (diff)
Fixup pdfto* programs,
Preliminary toolbar stuff.
-rw-r--r--pdf/xpdf/ChangeLog6
-rw-r--r--pdf/xpdf/Makefile.am4
-rw-r--r--pdf/xpdf/bonobo-image-x-pdf.cc13
-rw-r--r--pdf/xpdf/gpdf.cc18
-rw-r--r--pdf/xpdf/pdfimages.cc4
-rw-r--r--pdf/xpdf/pdfinfo.cc2
-rw-r--r--pdf/xpdf/pdftopbm.cc2
-rw-r--r--pdf/xpdf/pdftops.cc3
-rw-r--r--pdf/xpdf/pdftotext.cc2
9 files changed, 23 insertions, 31 deletions
diff --git a/pdf/xpdf/ChangeLog b/pdf/xpdf/ChangeLog
index ca4b0a4..d9998c3 100644
--- a/pdf/xpdf/ChangeLog
+++ b/pdf/xpdf/ChangeLog
@@ -1,3 +1,9 @@
+1999-08-23 Michael Meeks <michael@imaginator.com>
+
+ * Makefile.am: Added helper programs back in.
+
+ * bonobo-image-x-pdf.cc (view_create_menus): Toolbars.
+
1999-08-23 Miguel de Icaza <miguel@gnu.org>
* bonobo-image-x-pdf.cc: Replace exit() with gtk_main_quit()
diff --git a/pdf/xpdf/Makefile.am b/pdf/xpdf/Makefile.am
index 9e7873d..b72a32a 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 3a36ecf..ac45e15 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 5fc249e..ba956e4 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 3742249..5ab74fb 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 510e12e..2c183c8 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 c77130e..6cfe830 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 07dca22..d6fd653 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 95ae832..189d489 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;
}